Skip to content
Not publicly available.This reference describes Ambula API v1 before launch. Endpoints, limits and fields can still change.

Assignments

An assignment groups the rides for one melding, such as an outbound and a return trip. Its status isn’t stored: it follows from its rides.

List assignments

GET/v1/assignments

Requires the scope assignments:read.

Available from phase 2

Assignments (opdrachten): the rides for one melding, such as outbound and return. status is derived from the rides: empty without rides, done when all are closed, open otherwise.

Query parameters

statusstring

empty, open or done.

created_afterISO 8601

Only records created after this time.

created_beforeISO 8601

Only records created before this time.

updated_afterISO 8601

Only records changed after this time. For a sync, pass your last sync time minus 60 seconds and deduplicate by id.

limitinteger

Page size, 1 to 100. Default 25.

cursorstring

The next_cursor of the previous page.

Get an assignment

GET/v1/assignments/{id}

Requires the scope assignments:read.

Available from phase 2

One assignment, with the ids of its rides.

Create an assignment

POST/v1/assignments

Requires the scope assignments:write.

Available from phase 2

Create an assignment. Plan its rides with POST /rides and assignment_id.

Body

titlestringrequired

What the assignment is for.

reporterobject

name, phone and, optionally, contact_id.

conversation_idstring

The conversation it came from.

pickup_locationobject

address, latitude and longitude.

Update an assignment

PATCH/v1/assignments/{id}

Requires the scope assignments:write.

Available from phase 2

Change an assignment. Send If-Match with the ETag from your last read.

Body

titlestring

What the assignment is for.

Delete an assignment

DELETE/v1/assignments/{id}

Requires the scope assignments:write.

Available from phase 2

Delete an assignment.

Add a comment

POST/v1/assignments/{id}/comments

Requires the scope assignments:write.

Available from phase 2

Add a comment to the assignment's thread.

Body

textstringrequired

The comment.

Complete an assignment

POST/v1/assignments/{id}/complete

Requires the scope assignments:write.

Available from phase 2

Mark the assignment done, which moves it to history.