Skip to main content

kobana billing holidays

Commands of kobana billing holidays. Every global option (Global options) applies here.

CommandHTTPDescription
holidays listGET /v1/holidaysList holidays
holidays createPOST /v1/holidaysCreate a holiday
holidays syncPOST /v1/holidays/syncImport national holidays
holidays getGET /v1/holidays/{id}Get a holiday
holidays updatePATCH /v1/holidays/{id}Update a holiday
holidays deleteDELETE /v1/holidays/{id}Delete a holiday

holidays list​

List holidays

kobana billing holidays list [OPTIONS]

GET /v1/holidays

Returns the organization holidays — the days business-day counting skips. A late fee policy with day_count = business reads exactly this table.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
yearintegernoFilters by calendar year.
date_fromstringnoStart date, inclusive, as YYYY-MM-DD.
date_tostringnoEnd date, inclusive, as YYYY-MM-DD.
typestringnoFilters by the holiday scope. Values: national, state, municipal, optional, custom.
include_deletedstringnoIncludes soft-deleted holidays. Values: true, false.

Responses

HTTPDescription
200Paginated list of holidays.
404Resource not found in the current organization.

holidays create​

Create a holiday

kobana billing holidays create [OPTIONS]

POST /v1/holidays

Creates a holiday. Use it for state and municipal holidays and optional days off — the national ones arrive through the automatic import.

Request body

NameTypeRequiredDescription
datestringyesCalendar day of the holiday, as YYYY-MM-DD. No time of day: a holiday is a date on a wall calendar, and accepting an instant would make the stored day depend on the sender timezone.
namestringyesHoliday name. Together with the date it identifies the row — a municipal and a national holiday can fall on the same day.
typestringnoScope: national, state, municipal, an optional day off (optional), or the organization own (custom). Values: national, state, municipal, optional, custom.
notesstringnoFree text — the city of a municipal holiday, or any note.

More fields and nested objects: kobana schema billing.holidays.create.

Responses

HTTPDescription
201Holiday created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

holidays sync​

Import national holidays

kobana billing holidays sync [OPTIONS]

POST /v1/holidays/sync

Imports the Brazilian national holidays from BrasilAPI for the given years (default: the current one plus the next two). Idempotent: it imports only what is missing and never resurrects a holiday removed on purpose.

Request body

NameTypeRequiredDescription
yearsarray<integer>noYears to import. Defaults to the current one plus the next two.

More fields and nested objects: kobana schema billing.holidays.sync.

Responses

HTTPDescription
200Import result.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

holidays get​

Get a holiday

kobana billing holidays get [ID] [OPTIONS]

GET /v1/holidays/{id}

Path arguments: id

Responses

HTTPDescription
200Holiday found.
404Resource not found in the current organization.

holidays update​

Update a holiday

kobana billing holidays update [ID] [OPTIONS]

PATCH /v1/holidays/{id}

Path arguments: id

Request body

NameTypeRequiredDescription
datestringnoCalendar day of the holiday, as YYYY-MM-DD. No time of day: a holiday is a date on a wall calendar, and accepting an instant would make the stored day depend on the sender timezone.
namestringnoHoliday name. Together with the date it identifies the row — a municipal and a national holiday can fall on the same day.
typestringnoScope: national, state, municipal, an optional day off (optional), or the organization own (custom). Values: national, state, municipal, optional, custom.
notesstringnoFree text — the city of a municipal holiday, or any note.

More fields and nested objects: kobana schema billing.holidays.update.

Responses

HTTPDescription
200Holiday updated.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

holidays delete​

Delete a holiday

kobana billing holidays delete [ID] [OPTIONS]

DELETE /v1/holidays/{id}

Soft delete. The row stays, and that is what makes the import respect the removal: a holiday taken out on purpose does not come back on the next sync.

Path arguments: id

Responses

HTTPDescription
200Holiday deleted.
404Resource not found in the current organization.