Authentication

Every request uses a bearer token for one organisation.

curl "https://app.assignpoint.com/api/v1/external/jobs" \
  -H "Authorization: Bearer assignpoint_live_EXAMPLE"

The sample value assignpoint_live_EXAMPLE is not a working token. A token issued by AssignPoint is the prefix assignpoint_live_ followed by 64 letters and digits. AssignPoint stores only a hash of the token.

Tokens issued before the product was renamed still authenticate. Those tokens begin with staffapp_live_. New tokens use assignpoint_live_.

How a customer gets a token

An organisation owner or administrator creates an API client in AssignPoint, on the API integrations screen. AssignPoint shows the token once, in the browser. Copy it then. Later responses about that client do not include the token again.

This API has no call that mints a token for an anonymous caller, and it has no separate test-mode prefix. Revoking the client in AssignPoint makes that token return 401 on the next request.

Abilities

Each client is created with one or more abilities. A request outside those abilities returns 403 and the message This API client is not allowed to perform that action.

AbilityAllows
jobsCreate, update, cancel and read jobs
workersUpsert and read worker profiles
assignmentsRead assignments on a job
timesheetsRead timesheets on a job

The jobs ability does not include assignments or timesheets. A client created before workers was a separate ability can call jobs, assignments and timesheets, and cannot call workers, until someone issues a client that includes workers.

Scope

A token is bound to one organisation and one integration.

Jobs, assignments and timesheets are organisation-wide. A jobs token can read a job that was created in AssignPoint or by another client in that organisation.

Worker profiles belong to the integration, not to every client in the organisation. A token cannot read a profile that belongs to a different integration. Upserting a worker does not create a login and does not add the person to the organisation's staff list.

Rejected tokens

A missing token, a token with the wrong prefix, an unknown token and a revoked token all return 401:

{ "message": "Unauthenticated." }

A client that is not bound to an integration returns 403 with the message This API client is not bound to an integration.