POST
Ship specific lines in a sales order
Scope:
inventory:sales-orders.writehttps://api.holded.com/api/v2/sales-orders/{salesOrderId}/ship-by-linesPartially 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
salesOrderId
stringrequiredSales 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 linesError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Sales order not foundapplication/json