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.
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
- 201
- 401
- 403
- 404
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.