Skip to content

Inventory/status of one managed tenant

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

The row GET /partner/tenants lists for this company, plus credentials per environment — configured, the .p12 expiry (certExpiresAt), and since when Hacienda refuses the ATV user and password with its own words (atvRejectedAt, atvRejectionDetail: the pull version of the credentials.rejected webhook) — and activeApiKeys, the data-plane keys this partner minted for it that are not revoked, both environments. 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
tenantId
required

Identifier of the company — the :id of the /partner/tenants/:id/* routes.

string format: uuid
identificationType
required

Hacienda identification type: 01 cédula física, 02 cédula jurídica, 03 DIMEX, 04 NITE, 05 foreign, 06 no contribuyente.

string
Allowed values: 01 02 03 04 05 06
identificationNumber
required

Identification number, as provisioned (uppercase).

string
name
required

Legal name (razón social) — <Nombre> on its documents.

string
commercialName
required

Trade name shown on its documents; null when it has none.

string
nullable
createdAt
required

When the company was provisioned — for a revived one, the first time, not the revival.

string format: date-time
readiness
required

What the company is missing to emit in production.

object
credentials
required

Production credentials are uploaded and Hacienda does not refuse them (credentials.production.atvRejectedAt is null on the detail): refused ones keep every document from reaching Hacienda just like missing ones.

boolean
branchAndTerminal
required

The company has at least one branch and one terminal. A provisioned company starts with branch 001 and its terminal 00001.

boolean
economicActivity
required

The company has at least one economic activity — sent at provisioning (economicActivityCode) or brought from the registry with syncEconomicActivities.

boolean
location
required

The fiscal address (province, canton and district) is set — every document carries it as the issuer <Ubicacion>, and emission answers 422 TENANT_LOCATION_MISSING without it. Set it at provisioning or through profile.location of the config endpoint.

boolean
sequencesSeeded
required

Informational, not a requirement: some production counter is above zero — numbering was seeded (a migration from another provider) or a document already got a number.

boolean
issuerIdSupported
required

The identification fits the 12 characters the 50-character clave reserves for the issuer. An alphanumeric cédula jurídica (decree 44648-MJ) fits since the Anexo of 2026-04-22, padded with zeros; false means an identification no issuer has, and emission answers 422 ISSUER_ALPHANUMERIC_ID_UNSUPPORTED. A company with an alphanumeric cédula can issue but cannot answer a purchase yet (the MensajeReceptor still asks for digits): 422 ACCEPTANCE_ALPHANUMERIC_ID_UNSUPPORTED.

boolean
readyToEmit
required

true when every requirement is met: credentials, branchAndTerminal, economicActivity, location and issuerIdSupported (sequencesSeeded does not count). Emission can still be refused for reasons outside this checklist, such as the monthly cap in usage.

boolean
usage
required

This month's production documents against the cap.

object
documentsUsed
required

Production documents numbered in the current Costa Rica calendar month and counted against monthlyDocCap; one that Hacienda rejects, or that ends in error, stops counting.

number
monthlyDocCap
required

The partner app's monthly cap per company — a safety brake, not a price: once documentsUsed reaches it, emission answers 402 DOCUMENT_QUOTA_EXCEEDED until the next month.

number
percentUsed
required

documentsUsed as a whole percentage of monthlyDocCap; above 100 if the cap was lowered after the documents were counted.

number
credentials
required

The ATV credentials of each environment — their state, never their secrets.

object
sandbox
required

Sandbox credentials.

object
configured
required

Whether credentials — .p12, PIN, ATV user and password — are stored for this environment. Their secrets are never returned.

boolean
certExpiresAt
required

When the stored .p12 certificate expires — poll it and get the renewed one uploaded before then. null when nothing is stored, or when the stored certificate cannot be read.

string format: date-time
nullable
atvRejectedAt
required

Since when Hacienda refuses this environment's ATV user and password (its identity provider's own verdict); null while nothing is known against them. While set, they are not presented to Hacienda again: the company's documents keep their number and wait as signed — no error, no 24-hour timeout — and go out on their own once the credentials are uploaded again or the daily check finds them working. The pull version of the credentials.rejected / credentials.restored webhooks.

string format: date-time
nullable
atvRejectionDetail
required

What Hacienda's identity provider answered when it refused them; null when atvRejectedAt is.

string
nullable
production
required

Production credentials — the ones readiness.credentials is about.

object
configured
required

Whether credentials — .p12, PIN, ATV user and password — are stored for this environment. Their secrets are never returned.

boolean
certExpiresAt
required

When the stored .p12 certificate expires — poll it and get the renewed one uploaded before then. null when nothing is stored, or when the stored certificate cannot be read.

string format: date-time
nullable
atvRejectedAt
required

Since when Hacienda refuses this environment's ATV user and password (its identity provider's own verdict); null while nothing is known against them. While set, they are not presented to Hacienda again: the company's documents keep their number and wait as signed — no error, no 24-hour timeout — and go out on their own once the credentials are uploaded again or the daily check finds them working. The pull version of the credentials.rejected / credentials.restored webhooks.

string format: date-time
nullable
atvRejectionDetail
required

What Hacienda's identity provider answered when it refused them; null when atvRejectedAt is.

string
nullable
activeApiKeys
required

Data-plane keys this partner minted for the company, in both environments, that were never revoked; a key still in a rotation grace is no longer counted.

number
Example
{
"identificationType": "01",
"identificationNumber": "3101234567",
"name": "Restaurante El Fogón S.A.",
"commercialName": "El Fogón",
"usage": {
"documentsUsed": 1250,
"monthlyDocCap": 30000,
"percentUsed": 4
},
"credentials": {
"sandbox": {
"atvRejectionDetail": "invalid_grant: Invalid user credentials"
},
"production": {
"atvRejectionDetail": "invalid_grant: Invalid user credentials"
}
},
"activeApiKeys": 2
}