Skip to content

Add an obligation of your own

POST
/v1/fiscal/custom-obligations
curl --request POST \
--url https://api.emite.cr/v1/fiscal/custom-obligations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Planilla CCSS", "periodicity": "mensual", "dueDay": 1, "dueDayKind": "calendar", "monthOffset": 1, "anchorMonth": 1, "notes": "example" }'

dueDayKind: business counts BUSINESS days — CCSS is due on the 4th business day of the following month, which is not the 4th of the month. A non-monthly obligation must carry anchorMonth (400 CUSTOM_OBLIGATION_ANCHOR_REQUIRED), or the first period of the year would be a guess. Requires fiscal:write.

Media typeapplication/json
object
name
required

Name the obligation is shown with in the calendar (stored trimmed).

string
<= 120 characters
Example
Planilla CCSS
periodicity
required

How often it falls due: mensual (monthly), trimestral (every three months), cuatrimestral (every four), semestral (every six) or anual (yearly). Any but mensual needs anchorMonth (400 CUSTOM_OBLIGATION_ANCHOR_REQUIRED).

string
Allowed values: mensual trimestral cuatrimestral semestral anual
dueDay
required

The day it falls due. With dueDayKind: calendar, a day of the month: the last day when the month is shorter, moved to the next business day when it falls on a weekend or holiday. With business, the Nth business day of the month: the last business day when the month has fewer.

number
>= 1 <= 31
dueDayKind
required

How dueDay counts: calendar days, or Costa Rica business days — the CCSS falls due on the 4th business day of the following month, which is not the 4th. Must be sent: the API applies no default.

string
default: calendar
Allowed values: calendar business
monthOffset

How many months after the end of the period the due date falls, from 0 to 12: 0 is the same month, 1 (the default) the following one.

number
default: 1
anchorMonth

For a non-monthly obligation, a month in which one of its periods ends: it sets the phase of the cycle (a quarterly one anchored at 2 has periods ending in February, May, August and November) and, for an annual one, the month its year ends. Required unless periodicity is mensual, for which it is ignored.

number
>= 1 <= 12
notes

Free-text notes; omitting them on an update clears the stored ones.

string
<= 500 characters
Media typeapplication/json
object
id
required

Id of the obligation: the customObligationId of its occurrences.

string format: uuid
name
required

Name the obligation is shown with.

string
periodicity
required

How often it falls due (see the request body).

string
Allowed values: mensual trimestral cuatrimestral semestral anual
dueDay
required

The day it falls due, counted as dueDayKind says.

number
dueDayKind
required

Whether dueDay counts calendar or business days.

string
Allowed values: calendar business
monthOffset
required

Months after the end of the period the due date falls.

number
anchorMonth
required

The month that sets the cycle of a non-monthly obligation; null when none was given.

number
nullable >= 1 <= 12
notes
required

Free-text notes, or null.

string
nullable
Example
{
"periodicity": "mensual",
"dueDayKind": "calendar"
}