Programme Contracts
Read publication Bank Holidays
/a/ContractProgramme_holidays
Read the tenant calendar dates skipped by publication unless explicitly included.
When to use this endpoint
Read before choosing preview/publish calendar flags. This is an account-managed calendar, not an automatic national-holiday lookup.
Send operation fields inside one JSON-encoded data object. When data is present it replaces top-level operation fields; otherwise the handler accepts the top-level request. String data is limited to 2 MB. Reserved transport/internal keys are removed. Malformed or non-array JSON becomes an empty input, so validate JSON before sending.
Authentication and permissions
Authenticate with a signed API key or logged-in CRM session; session requests follow dispatcher CSRF checks. API-key requests use the key owner’s identity and permissions.
Requires the Contracts entitlement (features & 64), features2.contractProgrammes and Contracts View. Also requires features2.contractProgrammePublishing.
All storage belongs to the authenticated tenant. Contract operations follow the actor’s recursive HR manager/team scope, or the configured TeamAccess Contract/Department policy. Client administrators have broad Contract scope; private Programme and route ownership still applies. Active assignees must be within the permitted team.
The tenant must have the Programme storage upgrade (foundation 803; independent route ownership 804 before planning). Requests never create or repair tables. A missing/incompatible storage failure can return an initialization/storage error or Contracts operation failed. Check the saved state before retrying.
Parameters
This endpoint has no operation-specific parameters.
Example request
$result = FM_api('ContractProgramme_holidays', [
'data' => json_encode([
]),
]);
Example response
{
"ok": 1,
"data": []
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"Programme Contracts is not enabled"} | Workspace flag or Contracts entitlement is disabled. |
{"error":"Permission denied"} | Contracts View or the required action permission is unavailable. |
{"error":"This Contracts capability is not enabled"} | The operation’s additional feature flag is disabled. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns all non-deleted holiday rows ordered by date, without pagination or year/date filters. Rows retain id/date/name/cdate/last_edited/deleted/ddate storage fields.
- Publication skips these local dates when bank_holidays=0; bank_holidays=1 includes them. Weekend flags are checked independently.
See it in Fieldmotion
CRM1
No direct caller was found in CRM1 source. This workflow is implemented by the opted-in CRM2 Programme Contracts workspace.
CRM2
No direct holidays caller was found in CRM2 or CRM1 source. The Publish dialog sends the Include Bank Holidays flag; the service reads saved dates while previewing.
Related endpoints
ContractProgramme_saveHoliday— Maintain a calendar date.ContractProgramme_preview— Observe skipped dates.