Skip to main content

API Workflow: Sorting a Warehouse Task

S
Written by Sam Andrew
Updated this week

This article explains the complete workflow for retrieving and completing a sorting task using the Logiwa API. The process involves two main steps: first fetching a list of open tasks, and then posting the completion details for a specific task.


Step 1: Retrieve Sorting Tasks

Before you can complete a task, you must first retrieve a list of available sorting tasks for your operation.

  • Method: GET

  • URL: v3.1/Report/WarehouseTask/order-operation/i/{index}/s/{size}


Field Mapping (GET -> POST)

The response from the GET request will contain the necessary data to build the POST request. The following table summarizes the data source for each field in the POST request, which is especially useful for the Explicit Completion mode.

POST Field

Data Source

Notes

warehouseIdentifier

GET Request

Source field: warehouseIdentifier

warehouseTaskIdentifier

GET Request

Source field: identifier. Note the name change.

warehouseJobIdentifier

GET Request

Source field: warehouseJobIdentifier

shipmentOrderIdentifier

GET Request

Source field: shipmentOrderIdentifier

quantity

GET Request / User Input

Can be taken from the GET request or defined by the user.

productIdentifier

GET Request

Source field: productIdentifier


Step 2: Complete the Sorting Task

Once you have the task data, you can complete the sorting operation by sending the details to the /sort endpoint. This endpoint can be used in two modes.

  • Method: POST

  • URL: v3.1/WarehouseTask/sort

Mode 1: Explicit Completion

In this mode, you must provide all relevant data in the body of your POST request, using the mapping table above as a guide.

Request Body Parameters (Explicit Mode)

Parameter

Data Type

Description

Required?

warehouseIdentifier

String (UUID)

The unique ID of the warehouse where the operation is being performed.

Yes

warehouseTaskIdentifier

String (UUID)

The unique ID of the sorting task being completed.

Yes

shipmentOrderIdentifier

String (UUID)

The unique ID of the shipment order associated with the task.

Yes

quantity

Number

The quantity of the product being sorted.

Yes

productIdentifier

String (UUID)

The unique ID of the product being sorted.

Yes

packTypeIdentifier

String (UUID)

The unique ID of the product's package type.

Yes

lotBatchNumber

String

The lot/batch number if the product is lot-tracked.

No

expiryDate

String

The expiration date. The format must be YYYYMMDD.

No

productionDate

String

The production date. The format must be YYYYMMDD.

No

sourceWarehouseLocationIdentifier

String (UUID)

The unique ID of the source location where the product was picked from.

Yes

sourceLicensePlateIdentifier

String (UUID)

The ID of the source license plate (LP) if the product was picked from one.

No

targetWarehouseMobileCartCode

String

The code of the mobile sorting cart where the product is placed.

Yes

targetWarehouseLocationCode

String

The code for the specific bin/location on the mobile cart.

Yes

targetLicensePlateNumber

String

The license plate number (LPN) of the target container/tote/pallet the product is placed into.

Conditional

targetParentLPINumber

String

The parent LPN if the target license plate is nested within another.

No

damageReasonName

String

The reason for the damage, if the item is being marked as damaged.

No

Note on Conditional Fields

  • targetLicensePlateNumber: The requirement for this field is determined by the Disable Tote Scanning setting in the associated Job Type.

    • When Disable Tote Scanning is set to true, the user sorts directly into a location bin, and this field must be sent as empty or null.

    • When Disable Tote Scanning is set to false, the user must sort into a tote, and this field is required.

Sample Request (Explicit Mode)

JSON

{
"warehouseIdentifier" : "DEAD011E-AE3B-44B2-99B8-759DFC5AC143",
"warehouseTaskIdentifier" : "69b46333-3a31-4457-a29a-a0ede4d3812d",
"shipmentOrderIdentifier" : "be35107c-0337-4312-8b05-5cb3dd099d9a",
"quantity" : 5,
"productIdentifier" : "67F72A24-8E93-49E2-ADF3-C3E8BE80393D",
"packTypeIdentifier" : "f65854e7-129e-4418-9786-3ca3d74eeee0",
"lotBatchNumber" : null,
"expiryDate" : "20250822",
"productionDate" : null,
"sourceWarehouseLocationIdentifier" : "a0009f83-ec01-465e-8c3c-01d74b58889a",
"sourceLicensePlateIdentifier" : null,
"targetWarehouseMobileCartCode" : "mluSorting-AllowMultiple",
"targetWarehouseLocationCode" : "mluSorting-AllowMultiple_1_1",
"targetLicensePlateNumber" : "LPOffungkDjZ111",
"targetParentLPINumber" : null,
"damageReasonName" : null
}

Mode 2: Simple Completion

This mode significantly simplifies the request. You only need to send the warehouseTaskIdentifier and the specific details of the completion (like quantity and target location). The system will use the warehouseTaskIdentifier to find all other necessary task data in the background.

Required Fields (Simple Mode)

  • warehouseTaskIdentifier

  • quantity

  • All target... fields (e.g., targetWarehouseMobileCartCode, targetWarehouseLocationCode, targetLicensePlateNumber)

System-Fetched Fields When using Simple Completion, Logiwa automatically finds the following data for you: warehouseIdentifier, warehouseJobIdentifier, shipmentOrderIdentifier, productIdentifier, packTypeIdentifier, allocatedPackTypeIdentifier, lotBatchNumber, expiryDate, productionDate, sourceWarehouseLocationIdentifier, sourceLicensePlateIdentifier, damageReasonName.

Sample Request (Simple Mode)

JSON

{
"warehouseTaskIdentifier" : "69b46333-3a31-4457-a29a-a0ede4d3812d",
"quantity" : 5,
"targetWarehouseMobileCartCode" : "mluSorting-AllowMultiple",
"targetWarehouseLocationCode" : "mluSorting-AllowMultiple_1_1",
"targetLicensePlateNumber" : "LPOffungkDjZ111"
}

Responses

Note: The following success and error responses apply to the POST request in Step 2.

Success Response (200 OK)

A successful request will return a 200 OK status code. The response body will be a simple JSON object where the value field is true, indicating the operation was successful.

JSON

{ "value": true }

Error Response (400 Bad Request)

If the request fails due to validation errors (for example, an incorrectly formatted identifier or a missing required field), the system will return a 400 Bad Request. The response body will contain a detailed breakdown of the errors. The errors object pinpoints the exact field that caused the issue, making it easier to troubleshoot the request.

JSON

{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-ed89d548bac9b480fe5f7596def6f99e-1661d9a8fee6b39d-00",
"errors": {
"$.warehouseIdentifier": [
"The JSON value could not be converted to System.Guid. Path: $.warehouseIdentifier | LineNumber: 0 | BytePositionInLine: 27."
]
}
}
Did this answer your question?