Managing holiday and weekend calendars
You can update a division with certain configurations and behaviors. For example, you can define a division's holidays and forbid transactions on those days. All accounts created within that division inherit the holiday configuration. Holidays will validate for a division if a specific transaction can occur on that day. If a transaction occurs in a division on a day that is not a business day for that division, or any of its parents (since holiday configurations are always inherited), that transaction will be denied.
Holiday inheritance example
- Define a holiday in the Temuco division:
curl --request PATCH 'https://api-sandbox.pismolabs.io/corporate/hierarchies/{hierarchyId}/levels/{levelId}/divisions/{divisionId}' \
--header 'x-tenant: {tenId}' \
--header 'Content-Type: application/json' \
--data-raw '{
"holidays": [
{"month": 2, "day": 2, "description": "Temuco festival"},
{"month": 2, "day": 3, "description": "Temuco festival"}
],
"allow_weekends_transactions": false
}'
- Define a holiday in the Chile division
curl --request PATCH 'https://api-sandbox.pismolabs.io/corporate/hierarchies/{hierarchyId}/levels/{levelId}/divisions/{divisionId}' \
--header 'x-tenant: {tenId}' \
--header 'Content-Type: application/json' \
--data-raw '{
"holidays": [
{"month": 3, "day": 15, "description": "Chile special date"}
],
"allow_weekends_transactions": false
}'
Results
- Any account created in the Temuco division inherits the above configuration.
- Since Temuco is within the Chile division, an account in the division inherits both Temuco and Chile holidays.
Updated 3 months ago