GET /moves/:id/workflows/:slot
Fetch the workflow definition for a single slot of a move. Use this to discover which steps a move's pickup or delivery workflow has and which of those are server-editable via PATCH /moves/:id/workflows/:slot/data.
A step is server-editable when its config.allow_server_edits is true. The step's id is the body key the PATCH endpoint accepts; the step's type (boolean, string, number, or integer) constrains the value.
Request
curl --request GET \
--url https://api.hopdrive.com/v1/moves/:id/workflows/:slot \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your token>'
URL Params
| Field | Type | Required? | Description |
|---|---|---|---|
| id | Number | Required | The move's numeric ID. |
| slot | String | Required | Which workflow to fetch. "pickup" or "delivery". |
Headers
| Header | Required? | Description |
|---|---|---|
| Content-Type | Required | Must be application/json. |
| Authorization | Required | Bearer token from POST /v1/authorize. |
Example Response
200 GET /v1/moves/10033/workflows/pickup
{
"id": 5,
"name": "Standard Pickup",
"description": "Default pickup workflow",
"type": "pickup",
"steps": [
{
"id": "consumer-info-complete",
"type": "boolean",
"config": { "allow_server_edits": true }
},
{
"id": "vehicle-inspection",
"type": "boolean",
"config": { "allow_server_edits": false }
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| id | Number | The workflow definition's numeric ID. |
| name | String | Human-readable name of the workflow. |
| description | String | Description of the workflow. |
| type | String | The workflow's type (e.g. pickup, delivery). |
| steps | Array | The workflow's steps in order. Each step has an id, a type, and a config object. Steps with config.allow_server_edits: true are writable through the PATCH endpoint. |
Authorization
The bearer token's x-hasura-allowed-customers claim must include the move's rooftop (the move's customer_id).
Error Responses
All errors follow this envelope:
{
"errors": [
{ "type": "invalid_request_error", "code": "REQUEST_INVALID", "message": "..." }
]
}
| Status | Description |
|---|---|
| 400 | Invalid move ID. |
| 401 | Missing or invalid authorization token. |
| 403 | The bearer token is malformed, or its allowed-customers claim does not include the move's rooftop. |
| 404 | Move not found, slot is not a known workflow slot, or no workflow is assigned to that slot on this move. |
| 500 | Unexpected server error. |