Overview
The carrierlabel/by/licenseplate endpoint lets an automation system (print-and-apply line, pack automation) generate a carrier label for a packed LP with one call. You send the LP number with its final weight and dimensions. Logiwa IO takes the carrier, shipping option, carrier setup and addresses from the LP's shipment order. The endpoint works with every carrier setup type: integrated carriers, multi-carrier connections, and custom carriers.
Optionally, Logiwa IO compares the measured weight to the expected weight of the LP before buying a label. A package outside the allowed tolerance is rejected, so mis-packed or short-packed LPs never get a label.
When to use it
An automation line weighs and measures packages and needs to print the carrier label without anyone using the web app.
You want to stop LPs whose weight doesn't match their packed contents before a label is purchased.
Your integration needs to safely retry label requests without buying duplicate labels.
Prerequisites
The LP is a closed package on a shipment order that is not Shipped or Cancelled.
The shipment order has a carrier and shipping option assigned.
Your Open API token has access to the client that owns the LP.
To use the weight check: a Label Weight Tolerance (%) is set on the order's Shipment Order Type (see below), every product in the LP has a weight, and the LP Type has an empty weight.
Endpoint details
URL: v3.1/ShipmentOrder/carrierlabel/by/licenseplate Method: POST
Request body parameters
Parameter | Type | Required | Description |
| String | Yes | The LP to label. Max 50 characters. |
| Decimal | Yes | Measured weight. Greater than 0, up to 2 decimals, in the warehouse/client default weight unit. |
| Decimal | Yes | Greater than 0, up to 2 decimals, in the default dimension unit. |
| Decimal | Yes | Same as |
| Decimal | Yes | Same as |
| String | No |
|
The weight and dimensions are saved to the LP when a label is created.
Existing label handling
Value | LP has an active label | LP has no active label |
| Returns the existing label. No carrier call and no weight check. | Runs the weight check, then creates a label. |
| Runs the weight check first. If it passes, voids the old label and creates a new one. | Runs the weight check, then creates a label. |
đĄ Use ReturnExisting when your automation may retry a request. Retries return the same label instead of buying a second one.
Weight tolerance check
Turn it on
Set Label Weight Tolerance (%) on the Shipment Order Type:
Go to Data Setup â Shipment Order Type.
Click Create New SO Type, or open an existing type to update it.
Enter a value between 0 and 100 (up to 2 decimals) in Label Weight Tolerance (%).
Click Save.
Leave the field empty or enter 0 to turn the check off. Existing Shipment Order Types are empty by default, so their behavior doesn't change. The field is also available as labelWeightTolerancePercent on the Shipment Order Type Open API (Data Setup) endpoints. It is optional, so existing integrations keep working.
How it works
Expected weight = ÎŁ (product unit weight Ă quantity in the LP) + empty weight of the LP Type. All weights are converted to the request's weight unit before the calculation.
The check passes when the measured weight is within the tolerance of the expected weight. Boundary values pass.
Example: Products weigh 6.50 LB and the LP Type empty weight is 0.50 LB, so the expected weight is 7.00 LB. With a 10% tolerance, weights from 6.30 to 7.70 LB pass. A weight of 9.40 LB or 5.00 LB is rejected.
When the check runs
Only when the tolerance is greater than 0, and only when a label would be created (see the table above).
After the LP, access, carrier and order status validations, and before any void, LP update, or carrier call.
When it fails, no label is created, no void is sent, and the LP's weight and dimensions are not updated. Nothing is logged on the Carrier Errors page, because no carrier was called.
Example request
{
"licensePlateNumber": "LPN-0012345",
"weight": 7.1,
"length": 4.2,
"width": 5.3,
"height": 6.4,
"existingLabelAction": "ReturnExisting"
}Responses
Success: 200 OK
{
"shipmentOrderCode": "SO-000123",
"licensePlateNumber": "LPN-0012345",
"trackingNumber": "1ZXXXXXXXXXXXXXXXX",
"carrier": "FedEx",
"labelUrl": "https://âŠ",
"labelFormat": "ZPL",
"labelAction": "Created"
}labelFormat(ZPL, PDF or PNG) comes from the carrier setup's label settings.labelActionisCreated,ReturnedExistingorRecreated, so you know whether a new label was bought.
Failure: 4xx
{
"licensePlateNumber": "LPN-0012345",
"isSuccess": false,
"errors": [
{
"code": "WEIGHT_OUT_OF_TOLERANCE",
"message": "Carrier label could not be created because the measured weight 9.40 LB for license plate LPN-0012345 is outside the allowed range 6.30â7.70 LB (expected 7.00 LB ±10%). Please check the package contents and re-weigh before retrying."
}
]
}Error codes
Code | Meaning and what to do |
| A required field is missing. Add it to the request body. |
| A numeric field is not greater than 0. |
| Use |
| The LP isn't in your account. Check the number. |
| Your token can't access the client that owns the LP. Contact your account administrator. |
| The LP isn't a closed package on a shipment order. Complete packing first. |
| The order has no carrier or shipping option. Assign them and retry. |
| The order is Shipped or Cancelled. |
| A product or the LP Type has no weight, so the expected weight can't be calculated. Add the missing weight in product or LP Type setup. |
| The measured weight is outside the allowed range. Check the contents and re-weigh. |
| The carrier rejected the void for |
| The carrier returned an error. Review the Carrier Errors page, correct the shipment data and retry. |
Common questions
Where do I find labels created through this endpoint? In the Shipment Label section of the Shipment Order detail page, linked to the LP, and through the existing carrier label GET and list endpoints.
Does it work for multi-box orders? Yes. Only the LP you send gets a label, and its expected weight is calculated only from that LP's contents.
Is the weight check applied when an active label already exists? Not with ReturnExisting. The existing label is returned as is. With VoidAndRecreate, the check runs before anything is voided.
What if two requests arrive at the same time for the same LP? With ReturnExisting, only one label is created and both responses return the same tracking number.
Where do I see carrier failures? On the Carrier Errors page under label generation. See Understanding the Carrier Errors Page.
