Skip to main content

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

FieldTypeRequired?Description
idNumberRequiredThe move's numeric ID.
slotStringRequiredWhich workflow to fetch. "pickup" or "delivery".

Headers

HeaderRequired?Description
Content-TypeRequiredMust be application/json.
AuthorizationRequiredBearer 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

FieldTypeDescription
idNumberThe workflow definition's numeric ID.
nameStringHuman-readable name of the workflow.
descriptionStringDescription of the workflow.
typeStringThe workflow's type (e.g. pickup, delivery).
stepsArrayThe 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": "..." }
]
}
StatusDescription
400Invalid move ID.
401Missing or invalid authorization token.
403The bearer token is malformed, or its allowed-customers claim does not include the move's rooftop.
404Move not found, slot is not a known workflow slot, or no workflow is assigned to that slot on this move.
500Unexpected server error.