Skip to main content

Create Sales Order from MCF Order

POST 

/api/amazon/unified/fulfillment-orders/:fulfillmentOrder/create-sales-order

Creates a sales order from the MCF order — one line per Amazon item resolved to its product, the ship-to from the Amazon destination address, prices from the Amazon per-unit values (0 when absent), tagged mcf-created — and maps the MCF order to it in one transaction. sales_channel_id null creates a manual order. create_customer mints customer and address records instead of inline columns only. order_status is one of draft, reserved, open, closed (default open); payment_status is one of unpaid, partially_paid, paid, refunded, partially_refunded, and defaults to paid when every item carries a price, else unpaid. Idempotent: if a sales order already exists for this MCF order the request maps to it and reports already_existed. When the Amazon display order number is already in use, the seller fulfillment order ID is used instead and number_fallback is true. Returns 422 when an item's FNSKU is not mapped to a product, and 409 when the order was mapped concurrently. Requires both the sales_orders.create and sales_orders.fulfill permissions.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Idempotent: repeating the request for an MCF order that already produced a sales order returns 200 with already_existed: true and the same sales_order; no second order is created. A 409 is returned only when the MCF order is mapped to a different sales order.

Request

Responses

Created

Response Headers
    Content-Type