Holiday calendar

Create holiday calendar

Creates a new holiday calendar with associated holidays.

This endpoint does not generate an event.

post/v1/holiday-calendar

Request

  • Base URL
    https://sandbox.pismolabs.io/holidays-core
  • URL
    https://sandbox.pismolabs.io/holidays-core/v1/holiday-calendar
  • Auth
    HTTP bearer

Request body

namestring required

Holiday calendar name. Must be unique per organization.

typestring required

Type, free-form field. For example, Country or Region.

external_idstring

Client-created external ID

metadataMetadata

A valid JSON schema as specified in https://json-schema.org/specification.html. Used to register rules used to authorize the transaction.

Note: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to Get started with Pismo APIs.

parent_external_idstring

Client-created external ID for parent calendar. Refer to parent_id parameter for more information.

parent_idinteger

Calendar parent ID.

Holiday calendars can have parent-child relationships, creating a hierarchy. Child calendars inherit holidays from their parent calendars.

Common use case: Country → State → City hierarchy

Example:

  • Brazil (parent)
    • São Paulo (child of Brazil)
      • Campinas (child of São Paulo)

When you query holidays for Campinas, you automatically get:

  • Campinas city holidays
  • São Paulo state holidays
  • Brazil national holidays

You can reference the parent calendar using either:

  • parent_id: The internal parent calendar ID
  • parent_external_id: The parent calendar external_id
working_daysinteger[]

Working days array

0 = Sunday, 1 = Monday, ..., 6 = Saturday. Default = [1, 2, 3, 4, 5].

Example request

{
  "name": "Brazil holiday calendar",
  "type": "Country",
  "external_id": "f89urqljnahosluiefku",
  "holidays": [
    {
      "name": "New Year's Day",
      "holiday_date": "2023-12-01",
      "description": "Day to party like it's 1999"
    }
  ],
  "parent_external_id": "f89urqljnahosluiefku",
  "parent_id": 8675309,
  "working_days": [
    1,
    2,
    3,
    4,
    5
  ]
}

Response

Created

external_idstring

Client-created external ID

holiday_calendar_idinteger

Holiday calendar ID

metadataMetadata

A valid JSON schema as specified in https://json-schema.org/specification.html. Used to register rules used to authorize the transaction.

Note: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to Get started with Pismo APIs.

namestring

Holiday name

parent_external_idstring

Client-created external ID for parent calendar. Refer to parent_id parameter for more information.

parent_idinteger

Calendar parent ID.

Holiday calendars can have parent-child relationships, creating a hierarchy. Child calendars inherit holidays from their parent calendars.

Common use case: Country → State → City hierarchy

Example:

  • Brazil (parent)
    • São Paulo (child of Brazil)
      • Campinas (child of São Paulo)

When you query holidays for Campinas, you automatically get:

  • Campinas city holidays
  • São Paulo state holidays
  • Brazil national holidays

You can reference the parent calendar using either:

  • parent_id: The internal parent calendar ID
  • parent_external_id: The parent calendar external_id
typestring

Type, free-form field. For example, Country or Region.

working_daysinteger[]

Working days array

0 = Sunday, 1 = Monday, ..., 6 = Saturday. Default = [1, 2, 3, 4, 5].

Example response

{
  "external_id": "f89urqljnahosluiefku",
  "holiday_calendar_id": 8675309,
  "holidays": [
    {
      "description": "Day to party like it's 1999",
      "holiday_date": "2023-12-01",
      "holiday_id": 8675309,
      "name": "New Year's Day",
      "working_date": "2023-01-02"
    }
  ],
  "name": "New Year's Day",
  "parent_external_id": "f89urqljnahosluiefku",
  "parent_id": 8675309,
  "type": "Country",
  "working_days": [
    1,
    2,
    3,
    4,
    5
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.