source: api. Prices come from the catalog, stock is reserved, free shipping applies, and the store does not need to be published. The order runs the store automation: inbox card, the store_order default flow, payment reminder, CRM opportunity and the order.created webhook — so the buyer may receive WhatsApp messages. Requires the store:orders scope, which store:write does not grant.Idempotency-Key is required. Repeating the key with the same body returns the same order (201, Idempotent-Replayed: true) with no side effect, except that a mark_paid request whose order is still novo or confirmado (the first attempt failed after creating it) finishes the payment; a different body, mark_paid included, answers 409 idempotency_conflict.422 unless noted): product_unavailable (with details.product_uuid), variant_required, variant_unavailable, out_of_stock, shipping_unavailable, invalid_items, invalid_quantity, invalid_total, store_disabled (the store was never opened in the dashboard), idempotency_key_required (400), idempotency_conflict (409), storefront_not_allowed (403). (API 1.19)curl --location '/store/orders' \
--header 'Idempotency-Key;' \
--header 'Content-Type: application/json' \
--data '{
"customer_name": "string",
"customer_phone": "stringst",
"items": [
{
"product_uuid": "ef6d6af2-aef1-49f6-a502-cfed9e6fd1a9",
"variant_uuid": "0770eee5-321d-4bad-a2b7-4254a295d56a",
"quantity": 1
}
],
"shipping_option_uuid": "7692cfb2-6e50-4aad-906c-7c527357fcc9",
"payment_method": "pix",
"notes": "string",
"mark_paid": true
}'{
"data": {
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"ref": "string",
"status": "novo",
"customer_name": "string",
"customer_phone": "string",
"customer_email": "user@example.com",
"customer_document": "string",
"contact_uuid": "ef88867c-78a0-4c23-93c5-269f718bc3e8",
"conversation_uuid": "f81f7689-2025-4406-9d8e-9f897908652d",
"items": [
{
"product_uuid": "ef6d6af2-aef1-49f6-a502-cfed9e6fd1a9",
"product_external_id": "string",
"name": "string",
"variant_label": "string",
"quantity": 0,
"unit_price_cents": 0,
"total_cents": 0,
"discount_cents": 0,
"net_cents": 0
}
],
"subtotal_cents": 0,
"shipping_name": "string",
"shipping_cents": 0,
"total_cents": 0,
"payment_method": "pix",
"payment_status": "string",
"payment_provider": "string",
"paid_at": "2019-08-24T14:15:22.123Z",
"payment": {
"method": "pix",
"provider_bill_id": "string",
"installments": 1
},
"notes": "string",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z",
"source": "storefront",
"agent": {
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"name": "string"
},
"provider_order_id": "string",
"tracking": {
"property1": "string",
"property2": "string"
},
"discount_cents": 0,
"discount": {
"property1": "string",
"property2": "string"
},
"currency": "str",
"allowed_transitions": [
"confirmado"
]
}
}