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 ${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.

The submission response is the public request identifier. GET /api/v1/gateway returns it as solverProblemId, and DELETE /api/v1/gateway/{solverProblemId} accepts the same string. This compatibility identifier currently matches the numeric gateway row ID but remains a string API contract.

The gateway is served by the scheduler application. The Laravel application does not expose gateway or token-creation endpoints.

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.