Operations not currently supported:
- Inventory managed by serials.
Inventory managed without labels
For inventory that is managed without labels, you can create Shipping orders and leave them in "Shipped" status.
Considerations:
- Part numbers must have the "Manage inventory by part number without using labels" setting enabled.
- It is mandatory to indicate a carrier that has been previously configured in the system.
- It is mandatory to indicate the location from which the inventory will be taken.
Steps to create Shipping orders and leave them in shipped status:
- Use the API /api/v2/shippingorders/create
{
"shippingOrders": [
{
"supplier": "Account name",
"warehouse": "Warehouse name",
"shipTo": "Ship to account name",
"targetStatus": 600,
"carrier": "Carrier name",
"lineItems": [
{
"partNumber": "Part number name",
"quantity": 10,
"location": "A-1-A"
}
]
}
]
}- Perform a POST with the previous request. If the orders are created successfully with the "Ready to Ship" status, you will receive a response similar to the following, which will include the IDs of the generated Shipping orders:
{
"shippingOrders": [
{
"id": 2102
}
]
}- Use the API /shipping/express/batch/ship to communicate the IDs of the Shipping orders generated in step #3.
{
"changeStatusBatch": {
"shippingOrders": [
2102
]
}
}- Perform a POST of the previous request. If the orders are successfully modified to the "Shipped" status, you will receive a response similar to the following:
{
"orders": {
"detailedResponse": [
{
"orderId": 2102,
"messages": [],
"isSuccess": true
}
]
}
}
Inventory managed by label
For inventory that is managed with labels, you can create Shipping orders and leave them in "Shipped" status.
Considerations:
- The labels and the quantity to be picked from each label must be specified.
- Part numbers must use the system's default labels or have the "Use custom label?" setting enabled.
- It is mandatory to indicate a carrier that has been previously configured in the system.
- Shipping of serials is not supported.
Steps to create Shipping orders and leave them in shipped status:
- Use a BQI to get the labels that should be shipped in the order, based on the appropriate criteria for the operation to be performed (FIFO, LIFO, Expiration Date, direct selection, etc).
- Use the API /api/v2/shippingorders/create
{
"shippingOrders": [
{
"supplier": "Account name",
"warehouse": "Warehouse name",
"shipTo": "Ship to account name",
"targetStatus": 600,
"carrier": "Carrier name",
"lineItems": [
{
"label": "LBL-0000rcdy",
"quantity": 10,
}
]
}
]
}- Perform a POST with the previous request. If the orders are created successfully with the "Ready to Ship" status, you will receive a response similar to the following, which will include the IDs of the generated Shipping orders:
{
"shippingOrders": [
{
"id": 2102
}
]
}- Use the API /shipping/express/batch/ship to communicate the IDs of the Shipping orders generated in step #3.
{
"changeStatusBatch": {
"shippingOrders": [
2102
]
}
}- Perform a POST of the previous request. If the orders are successfully modified to the "Shipped" status, you will receive a response similar to the following:
{
"orders": {
"detailedResponse": [
{
"orderId": 2102,
"messages": [],
"isSuccess": true
}
]
}
}
Possible errors that may occur with labels
When using the API /api/v2/shippingorders/create, it is necessary to specify the labels that will be used for the order, but a situation may arise where one of the specified labels is not valid for different reasons. Below is a list of some of the reasons why a label may be invalid along with the error message that the system returns:
- The label is in a different warehouse from the one specified for the order.
{
"label": [
"The label does not exist or is not valid for current warehouse"
]
}
2. The label belongs to a different account than the account considered for the order.
{
"label": [
"The label does not belong to the account"
]
}
3. The entire label is already committed to another order or was previously shipped in a different order.
{
"label": [
"Label is not available for shipping"
]
}
4. The label does not have enough available quantity.
{
"label": [
"The stock does not have enough product available"
]
}
5. The label is not registered in the system.
{
"label": [
"The label does not exist"
]
}
When the request contains invalid labels, the system returns a 422 code as a response along with a JSON structure that can change depending on whether all labels are invalid or if there is at least one valid label:
1. If all labels are invalid, the following structure is communicated:
{ "errors": { "0": { "lineItems": [ { "label": [ "The label does not exist or is not valid for current warehouse" ] }, { "label": [ "The label does not belong to the account" ] } ] } } }
2. If there is at least one valid label, the system returns the JSON structure with the position numbers of the invalid labels. For example, assuming that the label at position 2 of the array is valid but the other labels are not, the system returns the following JSON structure:
{ "errors": { "0": { "lineItems": { "0": { "label": [ "The label does not exist or is not valid for current warehouse" ] }, "1": { "label": [ "The label does not belong to the account" ] }, "3": { "label": [ "Label is not available for shipping" ] }, "4": { "label": [ "Label is not available for shipping" ] } } } } }
Comments
0 comments
Please sign in to leave a comment.