POST

Authorizations

x-api-key
string
header
required

Body

application/json

Include business to create a B2B order; omit it to create a D2C order. See the endpoint description for the fields each type requires.

external_order_number
string
required

Your order number. Used to look the order up later. Not checked for uniqueness.

external_order_id
string
required

Your order id.

shipping_method_code
string
required

Code of the shipping method (see Reference data).

line_items
object[]
required

Products and quantities ordered.

hold_fulfillment_after_processing
boolean
default:false

When true, the order is put on hold once its items are reserved and is not prepared until you release it. Optional, false by default.

warehouse_code
string

Code of the warehouse that fulfills the order (see Reference data). Required for B2B orders. Optional for D2C orders; when omitted Melonn assigns it.

tags
string[]

Free-text tags to attach to the order.

business
object

Presence makes the order B2B. The business that receives the order. It must already exist (see the Business endpoints).

sell_order_vas
object[]

B2B only. Value-added services for the order (see Reference data). Each code must be enabled for the business. When omitted, the business's default VAS are applied.

shipping_info
object

Required for D2C orders; ignored for B2B orders. Delivery address and recipient.

buyer
object

Required for D2C orders; ignored for B2B orders (the buyer is the business).

payment_on_delivery_amount
number

D2C only. Amount the carrier collects from the buyer on delivery (cash on delivery). The shipping method must support cash on delivery. Ignored for B2B orders.

Response

The order was created and its fulfillment requested.

message
string

Order created successfully.

sell_order
object