curl --request POST \
--url https://api.orbita.melonn.com/supplier-orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"seller_supplier_id": "SUP-001",
"destination_warehouse_code": "WCOD-1",
"external_order_number": "PO-2025-001",
"line_items": [
{
"sku": "PROD-ABC-001",
"qty_ordered": 100
}
]
}
'{
"id": 12345,
"seller_supplier_id": 123,
"destination_warehouse_code": "WCOD-1",
"internal_order_number": "I00012345",
"external_order_number": "PO-2025-001",
"creation_date": "2025-01-15T10:30:00.000Z",
"supplier_order_state": {
"code": 2,
"description": "Confirmed",
"closed": false
},
"comments": "Urgent replenishment order",
"supplier_order_lines": [
{
"sku": "PROD-ABC-001",
"original": true,
"qty_ordered": 100,
"qty_received_ok": 0,
"qty_received_defective": 0,
"expiration_date": "2026-12-31T00:00:00.000Z",
"lot_number": "LOT-2025-001",
"reception_services": [
{
"reception_service_code": "bag",
"requested_by_seller": true,
"qty_executed": null
}
]
},
{
"sku": "PROD-XYZ-002",
"original": true,
"qty_ordered": 50,
"qty_received_ok": 0,
"qty_received_defective": 0,
"expiration_date": null,
"lot_number": null,
"reception_services": [
{
"reception_service_code": "lab",
"requested_by_seller": true,
"qty_executed": null
}
]
}
]
}Create supplier order
Creates a supplier order (inbound order) to send inventory from one of your suppliers to a
Melonn warehouse. The order is created directly in state 2 (Confirmed) and a
SUPPLIER_ORDER/CREATED webhook is emitted.
Required fields
Only four fields are required: seller_supplier_id, destination_warehouse_code,
external_order_number and line_items. Everything else is optional.
seller_supplier_idaccepts your own supplierexternal_idor the Melonn supplierid. It is matched againstexternal_idfirst; if no supplier of yours has thatexternal_idand the value is a positive integer, it is matched against the Melonnid. The supplier must be active.- The destination warehouse must exist and be active for your account.
- Every
skumust be one of your products and must not be a composite product (kit).
Deprecated fields
tracking_number, comments, courier_company_id, shipped_packages and the six
return_* fields are no longer required. No action is needed if you already send them:
they remain accepted. The six return_* fields are deprecated: they are accepted and
discarded, never stored or returned.
shipped_packages is absent-or-non-empty: omitting it is valid, an empty array returns 400.
When the request carries shipment data (courier_company_id, tracking_number,
expected_reception_date or shipped_packages), a shipment is registered with the order;
otherwise it is registered when the inventory arrives at the warehouse.
Properties that are not declared in this schema are ignored (silently dropped), not rejected.
Supplier order states
| Code | Name | Closed |
|---|---|---|
| 1 | Created | No |
| 2 | Confirmed | No |
| 3 | Canceled | Yes |
| 4 | Reception in process | No |
| 5 | Finalized | Yes |
| 6 | Unpacking in progress | No |
| 7 | Unpacked with differences | No |
curl --request POST \
--url https://api.orbita.melonn.com/supplier-orders \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"seller_supplier_id": "SUP-001",
"destination_warehouse_code": "WCOD-1",
"external_order_number": "PO-2025-001",
"line_items": [
{
"sku": "PROD-ABC-001",
"qty_ordered": 100
}
]
}
'{
"id": 12345,
"seller_supplier_id": 123,
"destination_warehouse_code": "WCOD-1",
"internal_order_number": "I00012345",
"external_order_number": "PO-2025-001",
"creation_date": "2025-01-15T10:30:00.000Z",
"supplier_order_state": {
"code": 2,
"description": "Confirmed",
"closed": false
},
"comments": "Urgent replenishment order",
"supplier_order_lines": [
{
"sku": "PROD-ABC-001",
"original": true,
"qty_ordered": 100,
"qty_received_ok": 0,
"qty_received_defective": 0,
"expiration_date": "2026-12-31T00:00:00.000Z",
"lot_number": "LOT-2025-001",
"reception_services": [
{
"reception_service_code": "bag",
"requested_by_seller": true,
"qty_executed": null
}
]
},
{
"sku": "PROD-XYZ-002",
"original": true,
"qty_ordered": 50,
"qty_received_ok": 0,
"qty_received_defective": 0,
"expiration_date": null,
"lot_number": null,
"reception_services": [
{
"reception_service_code": "lab",
"requested_by_seller": true,
"qty_executed": null
}
]
}
]
}Authorizations
Body
Your supplier external_id, or the Melonn supplier id. Matched against
external_id first. The supplier must be active.
1Code of the destination warehouse where the inventory will be received.
Your identifier for the supplier order.
Products being sent.
1Show child attributes
Show child attributes
Courier tracking number for the shipment.
Expected date and time the shipment arrives at the warehouse (ISO 8601 with time zone, e.g. 2025-01-31T00:00:00Z).
Comments or notes about the supplier order.
Deprecated. Accepted and discarded; the value is not stored.
Deprecated. Accepted and discarded; the value is not stored.
Deprecated. Accepted and discarded; the value is not stored.
Deprecated. Accepted and discarded; the value is not stored.
Deprecated. Accepted and discarded; the value is not stored.
Deprecated. Accepted and discarded; the value is not stored.
Id of the courier company bringing the shipment (see Courier companies).
Physical packages being shipped. Omit it rather than sending an empty array.
1Show child attributes
Show child attributes
Response
Supplier order created. Returns the order with its line items.
A supplier order with its line items.
Melonn id of the supplier order.
Melonn id of the supplier.
Code of the destination warehouse.
Internal order number assigned by Melonn. Use it in the other supplier order endpoints.
Your identifier for the order. Absent when the order has none.
Date and time the order was created.
Current state of the supplier order.
Show child attributes
Show child attributes
Comments of the order. Absent when the order has none.
Show child attributes
Show child attributes