Skip to content

Mark an activity as default for new invoices

PATCH
/v1/tenants/{tenantId}/economic-activities/{activityId}/default
curl --request PATCH \
--url https://api.emite.cr/v1/tenants/example/economic-activities/example/default \
--header 'Authorization: Bearer <token>'

Makes this activity the <CodigoActividadEmisor> a document declares when the request names no activity, and clears the flag on the previous default. Returns the activity (its description comes from Hacienda and cannot be edited). 404 for an activity that is not the company's.

tenantId
required
string
activityId
required
string

EconomicActivity UUID.

Media typeapplication/json
object
id
required

Id of the activity in the company; PATCH …/{activityId}/default takes it.

string format: uuid
code
required

Hacienda's economic activity code, in the dotted form its registry returns. The default one is what documents declare as <CodigoActividadEmisor>.

string
description
required

The activity's name, as Hacienda's registry returns it (in Spanish). null for an activity seeded from the company's economicActivityCode at its creation, until the first sync with Hacienda fills it.

string
nullable
isDefault
required

Whether documents declare this activity when the request names none. At most one activity of the company is the default; with none, creating a document that names no activity answers 412 TENANT_NOT_CONFIGURED.

boolean
Example
{
"code": "6201.0",
"description": "Programación de computadoras"
}

Missing or invalid JWT / API key

Tenant boundary violation or insufficient scope.

No such activity in the company.