Skip to main content
POST

Ship specific lines in a sales order

Scope:inventory:sales-orders.write
https://api.holded.com/api/v2/sales-orders/{salesOrderId}/ship-by-lines

Partially ships specific line items of a sales order. Use this when you can only fulfill part of the order. Specify which lines and quantities to ship. Stock movements are created only for the shipped items. The order remains open until all lines are fully shipped.

Parameters

Path parameters

salesOrderIdstringrequired

Sales Order ID (24-char hex ObjectId)

Request body

object
lines[]object[]

Line items to ship

item_line_positioninteger

Zero-based position of the line item

unitsnumber

Number of units to ship

Request

python
import requests

url = "https://api.holded.com/api/v2/sales-orders/{salesOrderId}/ship-by-lines"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "lines": [
        {
            "item_line_position": 0,
            "units": 0
        }
    ]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Success responses

200Sales order shipped by lines

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Sales order not foundapplication/json