API Documentation

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. The submitted payload's callbackUrl is the consumer endpoint that receives the solved schedule response; Ktor does not expose a public solver callback route for this flow.

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.