Current branches / terminals / economic activities (with ids)
const url = 'https://api.emite.cr/v1/partner/tenants/example/config';const options = {method: 'GET'};
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/partner/tenants/example/configThe read side of PUT /partner/tenants/:id/config: the company's branches, the terminals of every branch and its economic activities, with the ids the numbering endpoints ask for. Deleted rows are left out, and rows come in no particular order. 404 PARTNER_TENANT_NOT_FOUND for a company this partner does not manage.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Partner app credential (ecp_*)
Responses
Section titled “Responses”object
The company's branches (deleted ones left out), in no particular order.
object
Identifier of the branch — the branchId the numbering endpoints (sequences) ask for.
Branch number, zero-padded to 3 digits — the first digits of its consecutivos. A provisioned company starts with 001 (Casa Matriz).
Name of the branch.
Whether it is the company's default branch — the one a document uses when it names no branchCode. True for one branch at most.
The terminals of every branch in branches (deleted ones left out), grouped by branch.
object
Identifier of the terminal — the terminalId the numbering endpoints (sequences) ask for.
Identifier of the branch it belongs to (an id of branches).
Terminal number, zero-padded to 5 digits and unique within its branch — the digits after the branch code in its consecutivos. A provisioned company starts with 00001 (Terminal Principal) in branch 001.
Name of the terminal.
Whether it is its branch's default terminal — the one a document of that branch uses when it names no terminalCode. True for one terminal per branch at most.
The company's economic activities (the ones a sync dropped are left out), in no particular order.
object
Identifier of the activity.
Hacienda's activity code in its dotted form — what defaultEconomicActivityCode takes and a document carries as <CodigoActividadEmisor>.
Name of the activity as Hacienda's registry lists it. null for an activity set by code (at provisioning) until syncEconomicActivities brings the registry's list.
Whether it is the company's default activity — the one a document uses when it names none. True for one activity at most.
Whether EmiteCR emails the company's customer each accepted document, and under which name and reply address.
object
On: once Hacienda accepts a document whose receiver has an email, EmiteCR emails that receiver the PDF, the signed XML and Hacienda's response. It goes out in the company's name: its trade name (its legal name without one) as the sender's name over EmiteCR's sending address, replies to the company's email, and the partner's name in the footer; EmiteCR's brand never appears. A document without a receiver email gets nothing. Off: nothing is sent automatically. Either way, POST /invoices/:id/resend-email with the company's API key sends one on request.
The name the email goes out under (the sender's name, the header and the body): the company's trade name, or its legal name without one. Read from EmiteCR's record of the company, the one profile changes.
Where the customer's reply goes: the company's email. Null when that email is not a valid address; a reply then goes to EmiteCR's sending address instead.
Example
{ "branches": [ { "code": "001", "name": "Casa Matriz" } ], "terminals": [ { "code": "00001", "name": "Terminal Principal" } ], "economicActivities": [ { "code": "5610.11" } ], "customerEmail": { "enabled": true, "senderName": "El Fogón", "replyTo": "facturas@elfogon.cr" }}