Get the receiver's activity last declared for a contact
const url = 'https://api.emite.cr/v1/invoices/last-receptor-activity?receiverPartyId=01a00c73-5c07-7bb5-8b9e-d20f16537e42';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.emite.cr/v1/invoices/last-receptor-activity?receiverPartyId=01a00c73-5c07-7bb5-8b9e-d20f16537e42' \ --header 'Authorization: Bearer <token>'The receiver's economic activity (economicActivityCodeReceptor) on the most recent invoice, debit note or credit note issued to the contact in the current environment that declared one — a suggestion for the next document to that contact, which may carry a different one: a taxpayer with several registered activities states, per purchase, the one the purchase belongs to.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
01a00c73-5c07-7bb5-8b9e-d20f16537e42The contact (tenant_parties.id) the documents were issued to.
Responses
Section titled “Responses”object
The receiver's economic activity (economicActivityCodeReceptor, emitted as <CodigoActividadReceptor>) on the most recent invoice, debit note or credit note issued to this contact in the current environment that declared one, in its dotted form. Documents without a number, deleted ones and notes over a purchase invoice (where the company is the receiver) are not considered. Null when none qualifies.
Example
{ "code": "6920.0"}