Consignment Tasks

Manage tasks associated with consignments. Tasks represent work items or activities to be performed on a consignment (e.g., restack, relabel, quality check).

Endpoints Overview

Method Endpoint Description
GET /v1/consignments/{consignmentId}/tasks Get consignment tasks
PUT /v1/consignments/{consignmentId}/tasks Update all tasks
POST /v1/consignments/{consignmentId}/tasks/{taskTypeId} Add task to consignment
PUT /v1/consignments/{consignmentId}/tasks/{taskTypeId} Update specific task
DELETE /v1/consignments/{consignmentId}/tasks/{taskTypeId} Delete task from consignment

Get Consignment Tasks

Retrieve all tasks for a consignment.

Endpoint: GET /v1/consignments/{consignmentId}/tasks

Path Parameters

Parameter Type Required Description
consignmentId uuid Yes The consignment ID

Request Example

curl -X GET "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/tasks" \
  -H "Authorization: Bearer ACCESS_TOKEN"

Response Example

{
  "tasks": [
    {
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440800",
      "name": "Restack",
      "value": 2
    },
    {
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440801",
      "name": "Relabel",
      "value": 50
    },
    {
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440802",
      "name": "Quality Check",
      "value": 1
    }
  ]
}

Response Fields

Field Type Description
taskTypeId uuid Task type ID
name string Task type name
value number Task value (quantity or count)

Update All Tasks

Update all tasks for a consignment at once. This replaces the full set of tasks — existing tasks not present in the request will be removed.

Endpoint: PUT /v1/consignments/{consignmentId}/tasks

Path Parameters

Parameter Type Required Description
consignmentId uuid Yes The consignment ID

Request Body

{
  "tasks": [
    {
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440800",
      "value": 3
    },
    {
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440801",
      "value": 100
    }
  ]
}
Field Type Required Description
tasks array Yes Array of task updates
tasks[].taskTypeId uuid Yes Task type ID
tasks[].value number Yes New task value

Request Example

curl -X PUT "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/tasks" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tasks": [
      {
        "taskTypeId": "550e8400-e29b-41d4-a716-446655440800",
        "value": 3
      }
    ]
  }'

Response

Status Description
200 Tasks updated successfully
304 Not modified (no changes)

Update Specific Task

Update a single task for a consignment.

Endpoint: PUT /v1/consignments/{consignmentId}/tasks/{taskTypeId}

Path Parameters

Parameter Type Required Description
consignmentId uuid Yes The consignment ID
taskTypeId uuid Yes The task type ID

Request Body

{
  "value": 5
}
Field Type Required Description
value number Yes New task value

Request Example

curl -X PUT "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/tasks/550e8400-e29b-41d4-a716-446655440800" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value": 5}'

Response

Status Description
200 Task updated successfully
304 Not modified (no changes)

Error Cases

Status Cause Resolution
404 Consignment not found Verify consignment ID
404 Task type not found Verify task type ID exists

Add Task to Consignment

Add a single task to a consignment.

Endpoint: POST /v1/consignments/{consignmentId}/tasks/{taskTypeId}

Path Parameters

Parameter Type Required Description
consignmentId uuid Yes The consignment ID
taskTypeId uuid Yes The task type ID to add

Request Body

{
  "value": 5
}
Field Type Required Description
value number Yes Task value (quantity or count)

Request Example

curl -X POST "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/tasks/550e8400-e29b-41d4-a716-446655440800" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value": 5}'

Response

Status Description
200 Task added successfully

Error Cases

Status Cause Resolution
404 Consignment not found Verify consignment ID
404 Task type not found Verify task type ID exists

Delete Task from Consignment

Remove a single task from a consignment.

Endpoint: DELETE /v1/consignments/{consignmentId}/tasks/{taskTypeId}

Path Parameters

Parameter Type Required Description
consignmentId uuid Yes The consignment ID
taskTypeId uuid Yes The task type ID to remove

Request Example

curl -X DELETE "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/tasks/550e8400-e29b-41d4-a716-446655440800" \
  -H "Authorization: Bearer ACCESS_TOKEN"

Response

Status Description
200 Task deleted successfully

Error Cases

Status Cause Resolution
404 Consignment not found Verify consignment ID
404 Task type not found Verify task type ID exists

Tasks in Consignment Detail

Tasks are included in the consignment detail response:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "tasks": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440810",
      "taskTypeId": "550e8400-e29b-41d4-a716-446655440800",
      "taskTypeName": "Restack",
      "value": 2
    }
  ]
}

Tasks in Consignment Import

You can add tasks when creating a consignment via import using task type codes:

{
  "consignmentType": 1,
  "clientCode": "ECL",
  "tasks": [
    {
      "taskTypeCode": "RESTACK",
      "value": 2
    },
    {
      "taskTypeCode": "RELABEL",
      "value": 50
    }
  ],
  "products": [...]
}