Skip to main content

Create Shipment

This endpoint allows you to create shipments on the Willog platform. A response with "success": true indicates a successful creation, while "success": false indicates a failure.

  • If a customerCode is provided, the shipment is created for that customer.
  • If serial is not provided, a pre-mapped relationship for the given transportCode must already exist for the shipment to be created.
  • If a serial is provided, the shipment will only be created if the device is eligible for use.

Request​


POST https://openapi.willog.io/ext/v1/box/transports​

Request Body​

NameTypeRequiredDescription
customerCodeStringfalseCustomer code
transportsArraytrueList of shipment data (max: 100 items)
transportCodeStringtrueShipment code
orderCodeStringfalseOrder code
serialStringfalseDevice serial number
departureTimeUnix timestamp(ms)falseDeparture time
fetchedManualArrivalTimeUnix timestamp(ms)falseManually fetched arrival time
receiverNameStringtrueReceiver (client) name
receiverAddressStringtrueReceiver address
receiverAddressDetailStringfalseDetailed receiver address
receiverPostCodeStringfalseReceiver postal code
productsArrayfalseList of products to be shipped
nameStringtrueProduct name
quantityNumbertrueProduct quantity
unitStringfalseProduct unit (e.g., EA)
descriptionStringfalseProduct description

Example Request​

POST /ext/v1/box/transports
Authorization: Bearer token
{
"customerCode": "customer1",
"transports": [
{
"transportCode": "5089229ca9f1",
"orderCode": "order-001",
"serial": "AB000343",
"departureTime": 1738655274000,
"fetchedManualArrivalTime": 1738655274000,
"receiverName": "Willog customer",
"receiverAddress": "Samseong-ro, Gangnam-gu, Seoul, Republic of Korea",
"receiverAddressDetail": "9F Willog",
"receiverPostCode": "06158",
"products": [
{
"name": "V2",
"quantity": 1,
"unit": "EA",
"description": "Willog's device"
},
{
"name": "V1",
"quantity": 1
}
]
},
{
"transportCode": "f0531fb95d21",
"orderCode": "order-002",
"receiverName": "Willog Research Center",
"receiverAddress": "Samseong-ro, Gangnam-gu, Seoul, Republic of Korea"
}
]
}

Response​


Response Body​

NameTypeNot-nullDescription
customerCodeStringfalseThe customer code (if provided in the request)
resultsArraytrueShipment creation results
transportCodeStringtrueShipment code
orderCodeStringfalseOrder code
serialStringtrueDevice serial number
successBooleantrueIndicates whether shipment creation was successful
errorObjectfalseError details (present if creation failed)
typeStringtrueError type (see table below)
messageStringtrueError message

Error Types​

NameDescription
REQUIRED_MAPPINGMapping is required
UNREGISTERED_DEVICEDevice is not registered
ALREADY_USING_DEVICEDevice is already in use
DUPLICATED_TRANSPORT_CODEShipment code is duplicated

Example Response​

HTTP/1.1 200 OK

{
"customerCode": "customer1",
"results": [
{
"transportCode": "5089229ca9f1",
"orderCode": "order-001",
"serial": "AB000343",
"success": true
},
{
"transportCode": "f0531fb95d21",
"orderCode": "order-002",
"serial": "AB000881",
"success": false,
"error": {
"type": "REQUIRED_MAPPING",
"message": "The mapping is required."
}
},
{
"transportCode": "e1507e850213",
"orderCode": "order-003",
"serial": "AB000883",
"success": false,
"error": {
"type": "ALREADY_USING_DEVICE",
"message": "The device is already in use."
}
}
]
}

Error Responses​

- Unauthorized Access to Customer Data​

HTTP/1.1 400 Bad Request

{
"code": "A0016"
}