All API requests must be authenticated using Bearer tokens. Include your token in the Authorization header of every request.
Retrieving a token
Contact your Plan My Shifts administrator to obtain your authentication token. Tokens are department-specific and grant access only to your organization's scheduling data.
Using your token
Include the token in the Authorization header with the Bearer prefix:
curl -H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-X POST https://prod-scheduler.datapult.dk/api/v1/gateway \
--data-binary @schedule.json
Gateway submissions are accepted on /api/v1/gateway. Put your solved-schedule receiver in the request's callbackUrl; the solver calls that URL when the job completes.
Authentication responses
The API returns standard HTTP status codes for authentication:
- 200 / 201 - Request authenticated and processed
- 401 Unauthorized - Missing or invalid token
- 403 Forbidden - Token valid but lacks permission for this resource
Always check response status codes in your integration to handle authentication failures gracefully.
Internal solver preview
First-party clients use the same Bearer authentication for internal solver endpoints. GET /solver/{problemId}/best-solution returns the latest transient best-solution preview for an active solver job, 204 No Content when no preview has been captured yet, and 404 Not Found for an unknown solver problem ID.
Fixed schedule evaluation
First-party clients can evaluate existing assignments without starting an optimizer job with POST /solver/evaluate-fixed-schedule. The request uses the same gzipped multipart schedule payload as /solver/evaluate-denested.
The endpoint validates and initializes the submitted schedule, runs score explanation for the fixed assignments, and returns:
constraintReleasefreePeriodSelectionsresidualFreeDaysunresolvedFreePeriodRequirements
It does not create a solver problem, change shift assignments, require callback configuration, or call the optimizer solve loop.