Skip to content

Current branches / terminals / economic activities (with ids)

GET
/v1/partner/tenants/{id}/config
curl --request GET \
--url https://api.emite.cr/v1/partner/tenants/example/config

The 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.

id
required
string
x-partner-key
string

Partner app credential (ecp_*)

Media typeapplication/json
object
branches
required

The company's branches (deleted ones left out), in no particular order.

Array<object>
object
id
required

Identifier of the branch — the branchId the numbering endpoints (sequences) ask for.

string format: uuid
code
required

Branch number, zero-padded to 3 digits — the first digits of its consecutivos. A provisioned company starts with 001 (Casa Matriz).

string
name
required

Name of the branch.

string
isDefault
required

Whether it is the company's default branch — the one a document uses when it names no branchCode. True for one branch at most.

boolean
terminals
required

The terminals of every branch in branches (deleted ones left out), grouped by branch.

Array<object>
object
id
required

Identifier of the terminal — the terminalId the numbering endpoints (sequences) ask for.

string format: uuid
branchId
required

Identifier of the branch it belongs to (an id of branches).

string format: uuid
code
required

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.

string
name
required

Name of the terminal.

string
isDefault
required

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.

boolean
economicActivities
required

The company's economic activities (the ones a sync dropped are left out), in no particular order.

Array<object>
object
id
required

Identifier of the activity.

string format: uuid
code
required

Hacienda's activity code in its dotted form — what defaultEconomicActivityCode takes and a document carries as <CodigoActividadEmisor>.

string
description
required

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.

string
nullable
isDefault
required

Whether it is the company's default activity — the one a document uses when it names none. True for one activity at most.

boolean
customerEmail
required

Whether EmiteCR emails the company's customer each accepted document, and under which name and reply address.

object
enabled
required

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.

boolean
senderName
required

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.

string
replyTo
required

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.

string
nullable
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"
}
}