{"componentChunkName":"component---src-templates-redoc-operation-js","path":"/api/orders/operation/update-fulfillment-order-delivery-method/","result":{"data":{"contentItem":{"type":"redoc-operation","link":"/api/orders/operation/update-fulfillment-order-delivery-method/","data":{"redocStoreStr":"{\"menu\":{\"activeItemIdx\":-1},\"definition\":{\"data\":{\"openapi\":\"3.0.1\",\"info\":{\"title\":\"Carriyo Orders API\",\"description\":\"# Carriyo Orders API\\n[**Download OpenAPI specification**](/oas/orders.yaml)\\n\\nThe Carriyo Orders API enables you to manage the complete order lifecycle, from order creation through fulfillment and shipping.\\n\\n## Key Resources\\n\\n* [Orders](./order-object.md) - Create and manage customer orders\\n* [Fulfillment Orders](./fulfillment-orders.md) - Manage order fulfillment across locations\\n\\n## Overview\\n\\nThe Orders API provides a comprehensive solution for:\\n\\n- **Order Management**: Create orders, track their status, cancellations, change logs, system logs, redaction, and shipment-driven status updates\\n- **Multi-Location Fulfillment**: Split orders across multiple fulfillment locations\\n- **Inventory Integration**: Automatic inventory reservation and allocation\\n- **Shipping Integration**: Seamless handoff to the Carriyo Shipping API\\n\\n## Order Lifecycle\\n\\n1. **Order Creation**: Create an order with line items and customer details\\n2. **Fulfillment Allocation**: Orders are split into fulfillment orders based on inventory availability\\n3. **Fulfillment Processing**: Fulfill orders by preparing items for shipping\\n4. **Shipping**: Create shipments for fulfilled orders\\n5. **Completion**: Orders are completed when all items are delivered\\n\\n\",\"contact\":{\"name\":\"Carriyo Support\",\"url\":\"https://help.carriyo.com\",\"email\":\"support@carriyo.com\"},\"version\":\"\"},\"servers\":[{\"url\":\"https://api.carriyo.com\",\"description\":\"Production Server\"},{\"url\":\"https://demo-api.carriyo.com\",\"description\":\"Demo Server\"}],\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"tags\":[{\"name\":\"Orders\",\"description\":\"# Orders\\n\\nThe Order object represents a customer order containing one or more items to be fulfilled. Orders serve as the foundation for the fulfillment process in Carriyo.\\n\\n## Key Concepts\\n\\n### Order Structure\\n\\nEach order contains:\\n- **Customer Information**: `customer` (contact + address), `billing_address`, and language/sales channel\\n- **Line Items**: Products ordered with quantities and prices\\n- **Fulfillment Orders**: Groups of line items assigned to specific locations; each FO holds **delivery method**, **delivery type**, and delivery or customer-collection **address** and **schedule**\\n- **Payment Information**: Currency, order total, and any payment-on-delivery amount\\n\\n### Delivery Methods\\n\\nA fulfillment order's `delivery_method` controls how the customer receives the items:\\n\\n- **`DELIVERY`** — Standard delivery to the customer's address. Uses `delivery_address` and `delivery_schedule`.\\n- **`COLLECTION`** — Customer collects the order from a specified location (e.g., a store, locker, or pickup point). Uses `customer_collection_address` and `customer_collection_schedule`.\\n- **`DIGITAL`** — No physical delivery; the order is fulfilled digitally.\\n\\nWhen creating an order, you can set `delivery_method`, addresses, and schedules either at the top level (which propagates to all auto-allocated fulfillment orders) or per fulfillment order in the `fulfillment_orders` array.\\n\\n### Order Status\\n\\nOrders progress through the following statuses:\\n- **`open`** — Order created, awaiting allocation\\n- **`partially_allocated`** — Some line items have been allocated to a fulfillment location\\n- **`allocated`** — All line items are allocated and ready to be fulfilled\\n- **`processing`** — One or more fulfillment orders are being processed (picked, packed, shipped, or partially fulfilled)\\n- **`fulfilled`** — All items have been fulfilled\\n- **`cancelled`** — Order has been cancelled\\n- **`closed`** — Order is complete and closed\\n\\n### Reference Keys\\n\\nOrders can be retrieved using:\\n- **`order_id`** — Carriyo's unique identifier for the order\\n- **`partner_order_reference`** — Your system's order reference (pass `key=partner_order_reference` as a query parameter)\\n\\nThis allows flexible integration with your existing order management systems.\\n\\n### Change history and system logs\\n\\n- **Change logs** — List transactional audit records for the order (who/what changed and when).\\n- **System logs** — Record and query integration traffic metadata (correlation id, request/response summary, stored payloads via pre-signed URLs when applicable).\\n\\n### Privacy\\n\\n- **Redact** — Remove or mask personal data on an order while retaining the record structure for operational needs.\\n\\n### Shipment-driven updates\\n\\n- **Shipment status update** — Post a shipment payload (as from the Shipping API or webhooks) so Carriyo can align order and fulfillment state—for example when a shipment reaches `delivered` and eligible line items can be auto-closed.\\n\\n### Fulfillment Orders\\n\\nWhen an order is created, Carriyo automatically generates fulfillment orders based on:\\n- Inventory availability across locations\\n- Location-based allocation rules\\n- Explicit fulfillment order specifications in the request\\n\\nEach fulfillment order represents items to be shipped from a single location, with its own delivery method, address, and schedule.\\n\\n\"},{\"name\":\"Fulfillment Orders\",\"description\":\"# Fulfillment Orders\\n\\nFulfillment Orders represent groups of line items from an order that are assigned to a specific location and delivery method. They enable split-shipment workflows, multi-location fulfillment, and mixed delivery/collection scenarios.\\n\\n## Key Concepts\\n\\n### Fulfillment Order Lifecycle\\n\\n1. **`open`** — Created, no location assigned yet\\n2. **`allocated`** — Assigned to a location and ready to be fulfilled\\n3. **`processing`** — Items are being picked, packed, shipped, or partially fulfilled\\n4. **`fulfilled`** — All line items have been fulfilled\\n5. **`cancelled`** — The fulfillment order has been cancelled\\n6. **`closed`** — All processing is complete\\n\\nEach fulfillment order line item has its own status as it moves through the pick/pack/ship workflow: `open`, `allocated`, `pick_in_progress`, `picked`, `pack_in_progress`, `fulfilled`, `cancelled`, `closed`.\\n\\n### Delivery Method\\n\\nEach fulfillment order has a `delivery_method` that determines how the customer receives the items:\\n\\n- **`DELIVERY`** — Standard delivery to a customer address (`delivery_address` + `delivery_schedule`).\\n- **`COLLECTION`** — Customer collects from a pickup point (`customer_collection_address` + `customer_collection_schedule`).\\n- **`DIGITAL`** — No physical delivery; fulfilled digitally.\\n\\nYou can switch between delivery methods at any time before fulfillment using the [Update Delivery Method](#operation/update-fulfillment-order-delivery-method) endpoint.\\n\\n### Operations\\n\\n#### Fulfill\\nMark items as fulfilled and ready for shipping. This operation:\\n- Updates line item statuses to `fulfilled`\\n- Optionally creates a draft shipment automatically\\n- Triggers inventory updates\\n\\n#### Unfulfill\\nReverse a fulfillment when items cannot be shipped. This allows:\\n- Correcting fulfillment errors\\n- Handling out-of-stock situations discovered after fulfillment\\n- Reallocating items to different locations\\n\\n#### Split\\nDivide a fulfillment order when items need to ship from different sources:\\n- Create a new fulfillment order with selected line items\\n- Assign to a different location if needed\\n- Maintain order integrity across splits\\n\\n#### Merge\\nCombine fulfillment orders when consolidation makes sense:\\n- Reduce shipping costs by combining shipments\\n- Improve customer experience with fewer deliveries\\n- Optimize fulfillment operations\\n\\n#### Ship\\nCreate shipments for fulfilled items:\\n- Specify carrier account and parcel details\\n- Include scheduling preferences\\n- Generate shipping labels through the Carriyo Shipping API\\n\\n#### Cancel\\nCancel specific line items within a fulfillment order:\\n- Provide a cancellation reason\\n- Automatically updates inventory\\n- Triggers order status recalculation\\n\\n#### Update Location\\nReassign a fulfillment order to a different location, e.g., to optimise based on inventory or proximity to the customer.\\n\\n#### Update Address\\nUpdate `delivery_address` or `customer_collection_address` in place, depending on the fulfillment order's current `delivery_method`. For switching between delivery and collection, use [Update Delivery Method](#operation/update-fulfillment-order-delivery-method) first.\\n\\n#### Update Delivery Method\\nSwitch a fulfillment order between `DELIVERY`, `COLLECTION`, and `DIGITAL`, updating the corresponding address and schedule in a single call.\\n\\n#### Update Schedule\\nChange the scheduled `from`/`to` window for a fulfillment order without changing its delivery method.\\n\\n#### Update Partner References\\nSync your system's references (`partner_fulfillment_order_reference` and individual `partner_fulfillment_reference` values) back to Carriyo without affecting any other fields.\\n\\n### Location Management\\n\\nFulfillment orders are tied to locations. You can:\\n- Update the assigned location before fulfillment\\n- Move items between locations using split and merge operations\\n- Track inventory across all fulfillment locations\\n\\n\"}],\"paths\":{\"/orders\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Create Order\",\"operationId\":\"create-order\",\"description\":\"Creates a new order in Carriyo with the specified line items, customer details, and delivery method.\\n\\n### Order Creation Flow\\n\\nWhen you create an order:\\n1. Carriyo validates the request and creates the order\\n2. Fulfillment orders are generated based on your specifications or automatic allocation\\n3. Inventory is reserved for the allocated items\\n4. Webhooks are triggered to notify your systems\\n\\n### Delivery Method\\n\\nEach fulfillment order can have one of three delivery methods:\\n- **`DELIVERY`** — Standard delivery to the customer's address (`delivery_address` + `delivery_schedule`)\\n- **`COLLECTION`** — Customer collects from a pickup point (`customer_collection_address` + `customer_collection_schedule`)\\n- **`DIGITAL`** — No physical delivery; fulfilled digitally\\n\\nThe top-level `delivery_method`, `delivery_type`, `delivery_address`, `delivery_schedule`, `customer_collection_address`, and `customer_collection_schedule` are **request-only** convenience fields — they are propagated to each auto-allocated fulfillment order and persisted there, but are **not stored on the `Order` itself**. To set them per fulfillment order, provide them inside each entry of the `fulfillment_orders` array.\\n\\n### Fulfillment Order Allocation\\n\\nYou can control how fulfillment orders are created:\\n- **Automatic**: Omit `fulfillment_orders` and Carriyo allocates based on inventory and rules\\n- **Manual**: Specify `fulfillment_orders` to control which items go to which locations\\n\\n### Line Items\\n\\nEach line item represents a product in the order with:\\n- Product identification (`id`, `sku`, `product_id`, `barcode`)\\n- Quantity ordered\\n- Pricing information (`unit_price`, `unit_cost`, taxes, duties, discount allocations)\\n- Physical attributes (`weight`, `dimension`, `dangerous_goods`, `battery`)\\n\\n### Response\\n\\nThe API returns the complete order object including:\\n- Generated `order_id` for future reference\\n- Fulfillment orders with their allocations\\n- Initial order status\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/create-order-request\"}}}},\"responses\":{\"201\":{\"description\":\"Order created successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request payload.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{reference}\":{\"patch\":{\"tags\":[\"Orders\"],\"summary\":\"Update Order\",\"operationId\":\"update-order\",\"description\":\"Updates an existing order with the specified changes. This endpoint allows partial updates to order details, line items, and fulfillment orders.\\n\\n### ⚠️ Important Warning\\n\\nThis endpoint can be **dangerous if not used correctly**. The fulfillment orders (`fulfillment_orders`) field behaves as a **full replacement** - any fulfillment order not included in the request will be **permanently removed**.\\n\\n---\\n\\n### Update Behavior\\n\\n#### Simple Fields (Partial Update)\\nThe following fields are updated only if provided in the request:\\n- `partner_order_reference`, `order_date`, `merchant`, `language`, `sales_channel`\\n- `taxes_included`, `duties_included`\\n- `billing_address`, `customer`\\n- `payment`, `discount_applications`, `shipping_lines`\\n\\nTop-level delivery fields (`delivery_method`, `delivery_address`, `delivery_schedule`, `customer_collection_address`, `customer_collection_schedule`) are managed per fulfillment order — use the `fulfillment_orders` array (or the dedicated FO endpoints) to change them.\\n\\n#### Line Items (Full Replacement)\\nIf `line_items` is provided, it **completely replaces** the existing line items. Ensure you include all line items you want to keep.\\n\\n#### Fulfillment Orders (Full Replacement with Preservation Rules)\\nIf `fulfillment_orders` is provided:\\n- **Any FO not included will be REMOVED** - Always include all FOs you want to keep\\n- FOs are matched by `fulfillment_order_id` or `partner_fulfillment_order_reference`\\n- New FOs (without matching ID) will be created with a new `fulfillment_order_id`\\n\\n---\\n\\n### Fulfillment Order Line Items - Critical Rules\\n\\nWhen updating FO line items, you must follow these rules:\\n\\n#### What to Include\\nOnly pass line items with **pending statuses**:\\n- `open` - Items not yet allocated\\n- `allocated` - Items allocated but not fulfilled\\n\\n#### What is Automatically Preserved\\nThe system **automatically preserves** line items with terminal statuses:\\n- `fulfilled` - Items that have been fulfilled (will be added back automatically)\\n- `cancelled` - Items that have been cancelled (will be added back automatically)\\n- `closed` - Items that are closed (will be added back automatically)\\n\\n**You do NOT need to include fulfilled, cancelled, or closed line items in your request** - they will be preserved automatically.\\n\\n---\\n\\n### Example Scenarios\\n\\n#### Scenario 1: Adding a new line item to an FO\\n\\nIf you have an FO with 2 items (item-1: open, item-2: fulfilled) and want to add item-3:\\n\\n```json\\n{\\n  \\\"fulfillment_orders\\\": [{\\n    \\\"fulfillment_order_id\\\": \\\"FO-123\\\",\\n    \\\"line_items\\\": [\\n      { \\\"id\\\": \\\"item-1\\\", \\\"quantity\\\": 1 },\\n      { \\\"id\\\": \\\"item-3\\\", \\\"quantity\\\": 2 }\\n    ]\\n  }]\\n}\\n```\\n\\nResult: FO will have item-1 (open), item-2 (fulfilled - preserved), item-3 (open)\\n\\n#### Scenario 2: Removing a pending line item from an FO\\n\\nIf you have an FO with 3 items and want to remove item-2 (which is open):\\n\\n```json\\n{\\n  \\\"fulfillment_orders\\\": [{\\n    \\\"fulfillment_order_id\\\": \\\"FO-123\\\",\\n    \\\"line_items\\\": [\\n      { \\\"id\\\": \\\"item-1\\\", \\\"quantity\\\": 1 },\\n      { \\\"id\\\": \\\"item-3\\\", \\\"quantity\\\": 1 }\\n    ]\\n  }]\\n}\\n```\\n\\n#### Scenario 3: Moving a line item between FOs\\n\\nTo move item-2 from FO-A to FO-B:\\n\\n```json\\n{\\n  \\\"fulfillment_orders\\\": [\\n    {\\n      \\\"fulfillment_order_id\\\": \\\"FO-A\\\",\\n      \\\"line_items\\\": [{ \\\"id\\\": \\\"item-1\\\", \\\"quantity\\\": 1 }]\\n    },\\n    {\\n      \\\"fulfillment_order_id\\\": \\\"FO-B\\\",\\n      \\\"line_items\\\": [\\n        { \\\"id\\\": \\\"item-2\\\", \\\"quantity\\\": 1 },\\n        { \\\"id\\\": \\\"item-3\\\", \\\"quantity\\\": 1 }\\n      ]\\n    }\\n  ]\\n}\\n```\\n\\n---\\n\\n### Common Mistakes to Avoid\\n\\n1. **Forgetting to include all FOs**: If you only include one FO in the request, all other FOs will be deleted\\n2. **Including fulfilled/cancelled items**: Don't include them - they're preserved automatically. Including them may cause unexpected behavior\\n3. **Not matching FO identifiers**: Always use either `fulfillment_order_id` or `partner_fulfillment_order_reference` to match existing FOs\\n4. **Partial line item updates**: The line_items array replaces all pending items, so include all pending items you want to keep\\n\\n---\\n\\n### Order Status Restrictions\\n\\nOrders can only be updated when their status allows it:\\n- ✅ `open`, `partially_allocated`, `allocated`, `partially_fulfilled`, `fulfilled`, `closed` - Can be updated\\n- ❌ `cancelled` - Cannot be updated\\n\\n---\\n\\n### Inventory Impact\\n\\nIf inventory management is enabled, updating FOs will automatically:\\n- Reserve inventory for new FO allocations\\n- Release inventory for removed FO allocations\\n- Adjust inventory for quantity changes\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used:\\n- `order_id`: Carriyo's unique order identifier (default)\\n- `partner_order_reference`: Your system's order reference\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-order-request\"}}}},\"responses\":{\"200\":{\"description\":\"Order updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request or order cannot be updated in current status.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"409\":{\"description\":\"Concurrent update detected. Retry the request.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"},\"get\":{\"tags\":[\"Orders\"],\"summary\":\"Get Order\",\"operationId\":\"get-order\",\"description\":\"Retrieves the complete details of an order by its reference.\\n\\n### Reference Types\\n\\nYou can retrieve an order using:\\n- **Carriyo Order ID**: The unique identifier generated by Carriyo (default)\\n- **Partner Order Reference**: Your system's order reference by setting `key=partner_order_reference`\\n\\n### Response\\n\\nReturns the full order object including:\\n- Order details and status\\n- All fulfillment orders and their current states\\n- Line item details and fulfillment status\\n- Customer and address information\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used:\\n- `order_id`: Carriyo's unique order identifier (default)\\n- `partner_order_reference`: Your system's order reference\"}],\"responses\":{\"200\":{\"description\":\"Order retrieved successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}]}},\"/orders/{reference}/change-logs\":{\"get\":{\"tags\":[\"Orders\"],\"summary\":\"List Order Change Logs\",\"operationId\":\"list-order-change-logs\",\"description\":\"Returns the transactional change history for an order (create, updates, and other recorded changes).\\n\\nResults are sorted by `log_date` ascending by default. Pass `sort_order=DESC` for newest-first.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type `reference` uses.\"},{\"name\":\"sort_order\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"ASC\",\"DESC\"],\"default\":\"ASC\"},\"description\":\"Sort direction by log timestamp. Omit or `ASC` for oldest-first; `DESC` for newest-first.\"}],\"responses\":{\"200\":{\"description\":\"Change logs retrieved successfully.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/order-change-log\"}}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}]}},\"/orders/{reference}/system-logs\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Add Order System Log\",\"operationId\":\"add-order-system-log\",\"description\":\"Records a system log entry for the order (e.g., outbound API call details). Carriyo sets `entity_id` to the order id from the resolved order.\\n\\nTypically used for debugging, support, or auditing integration traffic associated with this order.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type `reference` uses.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/api-call-details\"}}}},\"responses\":{\"200\":{\"description\":\"System log created.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order-system-log\"}}}},\"400\":{\"description\":\"Invalid request.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"},\"get\":{\"tags\":[\"Orders\"],\"summary\":\"List Order System Logs\",\"operationId\":\"list-order-system-logs\",\"description\":\"Returns a paginated list of system log entries for the order. Filter by correlation id, event type, request type, or HTTP response code.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type `reference` uses.\"},{\"name\":\"correlation_id\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\"},\"description\":\"Filter by correlation id.\"},{\"name\":\"event_type\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\"},\"description\":\"Filter by event type (e.g. `INBOUND`, `OUTBOUND`, `INTERNAL`).\"},{\"name\":\"request_type\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\"},\"description\":\"Filter by Carriyo request type (see `RequestType` in platform logging — e.g. `ORDER_CREATE`, `SHIPMENT_CREATE`).\"},{\"name\":\"response_code\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\"},\"description\":\"Filter by HTTP response status code recorded on the log (e.g. `200`).\"},{\"name\":\"page_num\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"integer\",\"default\":1},\"description\":\"Page number (1-based).\"},{\"name\":\"rows_per_page\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"integer\",\"default\":10},\"description\":\"Page size.\"}],\"responses\":{\"200\":{\"description\":\"Paginated system logs.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/pageable-order-system-log-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}]}},\"/orders/{reference}/system-logs/{identifier}\":{\"get\":{\"tags\":[\"Orders\"],\"summary\":\"Get Order System Log Detail URL\",\"operationId\":\"get-order-system-log-detail-url\",\"description\":\"Returns a time-limited pre-signed URL to download the full request/response payload stored for this system log entry (when stored in S3).\\n\\nUse the `identifier` value from a row returned by [List Order System Logs](#operation/list-order-system-logs).\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"identifier\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"System log entry identifier (sort key of the log record).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type `reference` uses.\"}],\"responses\":{\"200\":{\"description\":\"Pre-signed URL as a plain string.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"string\",\"description\":\"HTTPS URL to download the archived log payload.\"}}}},\"400\":{\"description\":\"System log not found or not available.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}]}},\"/orders/{reference}/redact\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Redact Order\",\"operationId\":\"redact-order\",\"description\":\"Redacts sensitive personal data on the order according to Carriyo privacy rules. The order remains in the system but PII fields are cleared or masked.\\n\\nNo request body is required.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type `reference` uses.\"}],\"responses\":{\"200\":{\"description\":\"Order redacted successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Order cannot be redacted.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}]}},\"/orders/{reference}/cancel\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Cancel Order\",\"operationId\":\"cancel-order\",\"description\":\"Cancels an order and all its associated fulfillment orders.\\n\\n### Status Requirements\\n\\nOrders can **only** be cancelled when in one of these statuses:\\n- ✅ `open` - Order has been created but not yet allocated\\n- ✅ `allocated` - Order is fully allocated to fulfillment locations\\n- ✅ `partially_allocated` - Order is partially allocated\\n\\nOrders **cannot** be cancelled when in these statuses:\\n- ❌ `partially_fulfilled` - Some items have already been shipped\\n- ❌ `fulfilled` - All items have been shipped\\n- ❌ `closed` - Order has been closed\\n- ❌ `cancelled` - Order is already cancelled\\n\\n### Cancellation Effects\\n\\nWhen an order is successfully cancelled:\\n- All line items quantities are set to 0 with removed quantities recorded\\n- All fulfillment order line items are marked as `cancelled`\\n- Reserved inventory is released back to stock\\n- Order status is updated to `cancelled`\\n- Webhooks are triggered to notify your systems\\n\\n### Cancellation Reason\\n\\nYou must provide a `cancellation_reason` which is one of the predefined enum values:\\n- `CUSTOMER_CANCELLATION` - Customer requested cancellation\\n- `AUTO_ALLOCATION_FAILED` - Automatic fulfillment allocation failed\\n- `INVENTORY_OUT_OF_STOCK` - Items are out of stock\\n- `STAFF_ERROR` - Staff made an error\\n- `PAYMENT_ISSUE` - Payment problem occurred\\n- `OTHER` - Other reason\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"reference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used:\\n- `order_id`: Carriyo's unique order identifier (default)\\n- `partner_order_reference`: Your system's order reference\"}],\"requestBody\":{\"required\":false,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/cancel-order-request\"}}}},\"responses\":{\"200\":{\"description\":\"Order cancelled successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Order cannot be cancelled.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/shipment-status-update\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Order Shipment Status Update\",\"operationId\":\"order-shipment-status-update\",\"description\":\"Notifies the order service of a shipment status change using a **shipment** payload.\\n\\nAt minimum, `references.partner_order_reference` must match an existing order. When `post_shipping_info.status` is `delivered` (and the order is eligible), Carriyo may run auto-close logic on related fulfillment line items. Shopify-sourced orders are skipped for auto-close.\\n\\nFor the complete shipment JSON model, see the **Shipping API** (`shipment` object). This endpoint accepts the same structure you receive from shipment webhooks or get-shipment responses.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/shipment-status-update-request\"}}}},\"responses\":{\"200\":{\"description\":\"Updated order when processing applied; may return the unchanged order when the shipment does not qualify for updates (for example status is not `delivered`). The response body may be empty when no order is found for `references.partner_order_reference`.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/bulk/import\":{\"post\":{\"tags\":[\"Orders\"],\"summary\":\"Bulk Import Orders\",\"operationId\":\"bulk-import-orders\",\"description\":\"Creates multiple orders in a single request for efficient batch processing.\\n\\n### Use Cases\\n\\n- Migrating orders from another system\\n- Processing batch uploads from sales channels\\n- Syncing orders from offline sources\\n\\n### Processing\\n\\nEach order in the batch is processed independently:\\n- Valid orders are created successfully\\n- Invalid orders return error details\\n- Processing continues even if some orders fail\\n\\n### Limits\\n\\n- Maximum 20 orders per request\\n- Each order follows the same validation as single order creation\\n\\n### Response\\n\\nReturns a list of results for each order:\\n- Successfully created orders include the full order object\\n- Failed orders include error details for troubleshooting\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/bulk-order-import-request\"}}}},\"responses\":{\"200\":{\"description\":\"Bulk import processed.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/bulk-order-import-response\"}}}}},\"400\":{\"description\":\"Invalid request payload.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/fulfill\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Fulfill Order\",\"operationId\":\"fulfill-order\",\"description\":\"Marks items in a fulfillment order as fulfilled and creates a shipment.\\n\\n### Line Item Status Requirements\\n\\nOnly items in **pending status** (`open` or `allocated`) can be fulfilled:\\n- ✅ `open` - Item awaiting allocation\\n- ✅ `allocated` - Item assigned to a location\\n- ❌ `fulfilled` - Already fulfilled\\n- ❌ `cancelled` - Cannot be fulfilled\\n- ❌ `closed` - Cannot be fulfilled\\n\\n### Fulfillment Process\\n\\nWhen you fulfill an order:\\n1. Validates that requested line items exist and are in pending status\\n2. Validates that requested quantities don't exceed available quantities\\n3. Creates a shipment (unless `skip_shipping=true`)\\n4. Marks line items as `fulfilled` with a unique fulfillment ID\\n5. Updates order status based on overall fulfillment progress\\n6. Triggers webhooks\\n\\n### Line Items (Required)\\n\\nYou must provide `line_items` array specifying which items to fulfill:\\n- Each item needs `id` matching an order line item\\n- Each item needs `quantity` to fulfill (must be ≤ pending quantity)\\n\\n### Shipment Creation\\n\\nControl shipment creation with query parameters:\\n- `create_draft_shipment=true`: Creates a draft shipment for review before carrier booking\\n- `skip_shipping=true`: Fulfills without creating any shipment (items auto-close)\\n\\n### Inventory Impact\\n\\nIf inventory management is enabled with `stock_reduction_timing = ON_ORDER_FULFILLED`:\\n- `on_hand` is reduced by the fulfilled quantity\\n- `reserved` is reduced by the fulfilled quantity\\n\\nIf shipping is not required (or `skip_shipping=true`), items are automatically set to `closed` status.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"},{\"name\":\"create_draft_shipment\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false},\"description\":\"If true, creates a draft shipment instead of immediately booking with a carrier.\"},{\"name\":\"skip_shipping\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false},\"description\":\"If true, fulfills the order without creating a shipment.\"}],\"requestBody\":{\"required\":false,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/create-fulfillment-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment order fulfilled successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request or fulfillment not possible.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/unfulfill\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Unfulfill Order\",\"operationId\":\"unfulfill-order\",\"description\":\"Reverses a previous fulfillment, returning items to `allocated` status.\\n\\n### When to Unfulfill\\n\\nUse this endpoint when:\\n- Items were fulfilled in error\\n- Stock is discovered to be unavailable after fulfillment\\n- The fulfillment needs to be reassigned to another location\\n- A shipment was cancelled before pickup\\n\\n### Request Requirements\\n\\nYou must provide:\\n- `fulfillment_ids`: Array of fulfillment IDs to reverse (required)\\n- The fulfillment IDs must exist in the fulfillment order's fulfilled line items\\n\\n### Effects\\n\\nWhen you unfulfill:\\n1. Associated shipments are cancelled (if not already cancelled)\\n2. Line items return to `allocated` status\\n3. Fulfillment ID, shipment IDs, and partner reference are cleared from items\\n4. Items with the same ID and status are merged\\n5. Order status is recalculated\\n6. Webhooks are triggered\\n\\n### Inventory Impact\\n\\nIf inventory management is enabled:\\n- `on_hand` is increased by the unfulfilled quantity (restoring stock)\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/unfulfill-fulfillment-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment reversed successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot unfulfill - items may already be shipped.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/merge\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Merge Fulfillment Orders\",\"operationId\":\"merge-fulfillment-orders\",\"description\":\"Combines line items from one fulfillment order into another.\\n\\n### Use Cases\\n\\n- Consolidating shipments to reduce shipping costs\\n- Combining split orders when inventory becomes available at one location\\n- Optimizing fulfillment operations\\n\\n### Merge Process\\n\\nSpecify:\\n- **Source**: The fulfillment order (with specific line items) to merge from\\n- **Destination**: The fulfillment order to merge into\\n\\nAfter merging:\\n- Source line items are moved to the destination fulfillment order\\n- If all items are moved, the source fulfillment order is removed\\n- Order status is recalculated\\n- Webhooks are triggered\\n\\n### Restrictions\\n\\nBoth source and destination fulfillment orders:\\n- ❌ Cannot have any fulfilled line items (only pending items can be merged)\\n- ✅ Must have the same `location_id`\\n- ✅ Must have the same `delivery_type` (if specified)\\n- ✅ Must have the same delivery method (from metadata)\\n- ❌ Cannot mix items where some require shipping and some don't\\n\\n### Inventory Impact\\n\\nNo direct inventory changes occur during merge - items are simply reorganized between fulfillment orders.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/merge-fulfillment-order-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment orders merged successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot merge fulfillment orders.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment orders not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/split\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Split Fulfillment Order\",\"operationId\":\"split-fulfillment-order\",\"description\":\"Splits selected line items from a fulfillment order into a new fulfillment order.\\n\\n### Use Cases\\n\\n- Shipping available items immediately while backordered items wait\\n- Fulfilling from multiple locations when partial inventory exists\\n- Separating items with different shipping requirements\\n\\n### Line Item Status Requirements\\n\\nOnly items in **pending status** (`open` or `allocated`) can be split:\\n- ✅ `open` - Can be split\\n- ✅ `allocated` - Can be split\\n- ❌ `fulfilled` - Cannot be split\\n- ❌ `cancelled` - Cannot be split\\n- ❌ `closed` - Cannot be split\\n\\n### Split Process\\n\\nSpecify:\\n- `line_items` (required): Items and quantities to move to the new FO\\n- `location_id` (optional): New location for the split items (defaults to original FO's location)\\n- `partner_fulfillment_order_reference` (optional): Your reference for the new FO\\n\\nAfter splitting:\\n- A new fulfillment order is created with a new `fulfillment_order_id`\\n- The new FO inherits `delivery` and `carriyo_metadata` from the original\\n- Line items get status `allocated` if location is set, otherwise `open`\\n- Original FO quantities are reduced (items removed if quantity becomes 0)\\n- Order status is recalculated\\n- Webhooks are triggered\\n\\n### Inventory Impact\\n\\nNo direct inventory changes occur during split - items are simply reorganized.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order to split.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/split-fulfillment-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment order split successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot split fulfillment order.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/cancel\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Cancel Fulfillment Order Line Items\",\"operationId\":\"cancel-fulfillment-order-line-items\",\"description\":\"Cancels specific line items within a fulfillment order.\\n\\n### Line Item Status Requirements\\n\\nOnly items in **pending status** (`open` or `allocated`) can be cancelled:\\n- ✅ `open` - Can be cancelled\\n- ✅ `allocated` - Can be cancelled\\n- ❌ `fulfilled` - Cannot be cancelled (use unfulfill first)\\n- ❌ `cancelled` - Already cancelled\\n- ❌ `closed` - Cannot be cancelled\\n\\n### Request Requirements (All Required)\\n\\n- `cancellation_reason` (required): One of the predefined enum values\\n- `line_items` (required): Array of items to cancel with quantities\\n\\n### Cancellation Reason Values\\n\\n- `CUSTOMER_CANCELLATION` - Customer requested cancellation\\n- `AUTO_ALLOCATION_FAILED` - Automatic fulfillment allocation failed\\n- `INVENTORY_OUT_OF_STOCK` - Items are out of stock\\n- `STAFF_ERROR` - Staff made an error\\n- `PAYMENT_ISSUE` - Payment problem occurred\\n- `OTHER` - Other reason\\n\\n### Cancellation Effects\\n\\nWhen items are cancelled:\\n1. Item status is updated to `cancelled` with the cancellation reason\\n2. Order line item's `removed_quantities` is updated\\n3. Order status is recalculated\\n4. Webhooks are triggered\\n\\n### Inventory Impact\\n\\nIf inventory management is enabled and the FO has a `location_id`:\\n- `reserved` is decreased by the cancelled quantity (releasing reserved stock)\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":false,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/cancel-fo-line-items-request\"}}}},\"responses\":{\"200\":{\"description\":\"Line items cancelled successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot cancel line items.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/ship\":{\"post\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Ship Fulfillment Order\",\"operationId\":\"ship-fulfillment-order\",\"description\":\"Creates a shipment for items in a fulfillment order.\\n\\n### Line Item Status Requirements\\n\\nItems must be in `allocated` or `fulfilled` status:\\n- ✅ `allocated` - Can be shipped\\n- ✅ `fulfilled` - Can be shipped (additional shipment)\\n- ❌ `open` - Must be allocated first\\n- ❌ `cancelled` - Cannot be shipped\\n- ❌ `closed` - Cannot be shipped\\n\\n### Request Requirements\\n\\n- `line_items` (required): Array of items to ship with quantities\\n\\n### Shipping Process\\n\\nThis endpoint:\\n1. Validates that requested items exist in `allocated` or `fulfilled` status\\n2. Validates that requested quantities don't exceed available quantities\\n3. Creates a draft shipment in the Carriyo Shipping API\\n4. Confirms the shipment with the carrier (unless `create_draft_shipment=true`)\\n5. Links the shipment ID to the specified line items\\n6. Triggers webhooks\\n\\n### Shipment Configuration\\n\\nConfigure the shipment with:\\n- **Carrier Account**: Specify carrier or let automation rules decide\\n- **Parcels**: Dimensions, weights, and contents\\n- **Delivery**: Instructions and scheduling preferences\\n- **Payment**: Cash on delivery and payment details\\n- **Pre-booking**: For externally booked shipments\\n\\n### Draft Shipments\\n\\nSet `create_draft_shipment=true` to create a draft for review before booking with the carrier.\\n\\n### Inventory Impact\\n\\nNo direct inventory changes occur - inventory is managed during fulfill/cancel operations.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"},{\"name\":\"create_draft_shipment\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false},\"description\":\"If true, creates a draft shipment instead of immediately booking with a carrier.\"}],\"requestBody\":{\"required\":false,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ship-fo-line-items-request\"}}}},\"responses\":{\"200\":{\"description\":\"Shipment created successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot create shipment.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-location\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order Location\",\"operationId\":\"update-fulfillment-order-location\",\"description\":\"Updates the assigned location for a fulfillment order.\\n\\n### Use Cases\\n\\n- Reassigning to a location with available inventory\\n- Optimizing fulfillment based on proximity to customer\\n- Correcting initial allocation decisions\\n\\n### Request Requirements\\n\\n- `location_id` (required): The new location ID or location code\\n\\n### Location Resolution\\n\\nThe location is resolved in this order:\\n1. First tries to find by `partner_location_id`\\n2. If not found, tries to find by `location_code` for the merchant\\n\\n### Effects\\n\\nWhen location is updated:\\n- Fulfillment order's `location_id` is updated to the new location\\n- Order status is recalculated\\n- Webhooks are triggered\\n\\n### Inventory Impact\\n\\nNo direct inventory changes occur during location update. If you need to manage inventory reservations when changing locations, you should handle this separately through the Inventory API.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-location-request\"}}}},\"responses\":{\"200\":{\"description\":\"Location updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot update location.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-delivery-method\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order Delivery Method\",\"operationId\":\"update-fulfillment-order-delivery-method\",\"description\":\"Switches the delivery method of a fulfillment order between `DELIVERY`, `COLLECTION`, and `DIGITAL`, and updates the corresponding address and schedule in a single call.\\n\\n### Behaviour\\n\\nDepending on the new `delivery_method`, the request body fields are interpreted as follows:\\n\\n| New `delivery_method` | `address` is set as | `scheduled_from`/`scheduled_to` are set as |\\n|---|---|---|\\n| `DELIVERY` | `delivery_address` | `delivery_schedule` |\\n| `COLLECTION` | `customer_collection_address` | `customer_collection_schedule` |\\n| `DIGITAL` | not used | not used |\\n\\nSwitching to a new delivery method will clear the address and schedule fields associated with the previous method.\\n\\n### Use Cases\\n\\n- Convert an online order from home delivery to a click-and-collect pickup at a store.\\n- Switch a fulfillment order from `COLLECTION` back to `DELIVERY` if the customer changes their mind.\\n- Mark a fulfillment order as `DIGITAL` when no physical delivery is required.\\n\\n### Constraints\\n\\nThis endpoint cannot be called on fulfillment orders that have already started processing (e.g., shipments created, items fulfilled). Use unfulfill or cancel flows first if you need to change the method on an in-progress FO.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-delivery-method-request\"}}}},\"responses\":{\"200\":{\"description\":\"Delivery method updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request or fulfillment order is not in a state that allows this update.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-address\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order Address\",\"operationId\":\"update-fulfillment-order-address\",\"description\":\"Updates the address on the fulfillment order according to its current `delivery_method`:\\n\\n| `delivery_method` | `address` updates |\\n|---|---|\\n| `DELIVERY` | `delivery_address` |\\n| `COLLECTION` | `customer_collection_address` |\\n\\nUse [Update Delivery Method](#operation/update-fulfillment-order-delivery-method) first if you need to switch between delivery and collection before setting the correct address type.\\n\\nNot applicable when `delivery_method` is `DIGITAL`.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-address-request\"}}}},\"responses\":{\"200\":{\"description\":\"Address updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request or fulfillment order is not in a state that allows this update.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-schedule\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order Schedule\",\"operationId\":\"update-fulfillment-order-schedule\",\"description\":\"Updates the scheduled window of a fulfillment order without changing its delivery method.\\n\\n### Behaviour\\n\\n- For fulfillment orders with `delivery_method: DELIVERY`, this updates `delivery_schedule`.\\n- For fulfillment orders with `delivery_method: COLLECTION`, this updates `customer_collection_schedule`.\\n- Not applicable to fulfillment orders with `delivery_method: DIGITAL`.\\n\\n### Use Cases\\n\\n- Reschedule a delivery to a later time slot at the customer's request.\\n- Push out a customer collection window when the items aren't ready by the original time.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-schedule-request\"}}}},\"responses\":{\"200\":{\"description\":\"Schedule updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request or fulfillment order is not in a state that allows this update.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-partner-references\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order Partner References\",\"operationId\":\"update-fulfillment-order-partner-references\",\"description\":\"Updates partner reference fields on a fulfillment order without affecting its line items, schedule, or location.\\n\\n### Updatable Fields\\n\\n- **`partner_fulfillment_order_reference`**: Your system's reference for the fulfillment order.\\n- **`fulfillments`**: Update `partner_fulfillment_reference` for individual fulfilled items.\\n\\nEither or both of the above may be provided.\\n\\n### Updating Fulfillments\\n\\nWhen updating fulfillments, you must provide:\\n- `fulfillment_id`: Must match an existing fulfillment ID in the FO's fulfilled items.\\n- `partner_fulfillment_reference`: Your new reference for this fulfillment.\\n\\n### Use Cases\\n\\n- Sync partner references back to Carriyo after they are generated in your downstream WMS or OMS.\\n- Correct an incorrect partner reference without having to issue a full order update.\\n\\n### Inventory Impact\\n\\nNo inventory changes occur - this endpoint only updates reference fields.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-fo-references-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment order references updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Invalid request.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}},\"/orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}\":{\"patch\":{\"tags\":[\"Fulfillment Orders\"],\"summary\":\"Update Fulfillment Order (Deprecated)\",\"operationId\":\"update-fulfillment-order\",\"deprecated\":true,\"description\":\"> **Deprecated.** Use [Update Fulfillment Order Partner References](#operation/update-fulfillment-order-partner-references) instead. This endpoint is retained for backwards compatibility and may be removed in a future version.\\n\\nUpdates fulfillment order partner references. The behaviour is identical to `PATCH /orders/{orderReference}/fulfillment-orders/{fulfillmentOrderId}/update-partner-references`.\\n\\n### Updatable Fields\\n\\n- **`partner_fulfillment_order_reference`**: Your system's reference for the fulfillment order.\\n- **`fulfillments`**: Update `partner_fulfillment_reference` for individual fulfilled items.\\n\\n### Updating Fulfillments\\n\\nWhen updating fulfillments, you must provide:\\n- `fulfillment_id`: Must match an existing fulfillment ID in the FO's fulfilled items.\\n- `partner_fulfillment_reference`: Your new reference for this fulfillment.\\n\\n### Inventory Impact\\n\\nNo inventory changes occur - this endpoint only updates reference fields.\",\"parameters\":[{\"name\":\"x-api-key\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your Carriyo API key for authentication.\"},{\"name\":\"tenant-id\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"Your unique tenant identifier in Carriyo.\"},{\"name\":\"Content-Type\",\"in\":\"header\",\"schema\":{\"type\":\"string\",\"default\":\"application/json\"}},{\"name\":\"orderReference\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The order reference (order_id or partner_order_reference based on the key parameter).\"},{\"name\":\"fulfillmentOrderId\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"},\"description\":\"The unique identifier of the fulfillment order.\"},{\"name\":\"key\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"order_id\",\"partner_order_reference\"],\"default\":\"order_id\"},\"description\":\"Specifies which reference type is being used for the order reference.\"}],\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/update-fo-references-request\"}}}},\"responses\":{\"200\":{\"description\":\"Fulfillment order updated successfully.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/order\"}}}},\"400\":{\"description\":\"Cannot update fulfillment order.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}},\"404\":{\"description\":\"Order or fulfillment order not found.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/error-response\"}}}}},\"security\":[{\"OAuth2-Production\":[]},{\"OAuth2-Demo\":[]}],\"x-codegen-request-body-name\":\"body\"}}},\"components\":{\"schemas\":{\"error-response\":{\"title\":\"Error Response\",\"type\":\"object\",\"properties\":{\"error\":{\"type\":\"string\",\"description\":\"Error message describing what went wrong.\"},\"code\":{\"type\":\"string\",\"description\":\"Error code for programmatic handling.\"},\"details\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}}},\"description\":\"Detailed error information for specific fields.\"}}},\"create-order-request\":{\"title\":\"Create Order Request\",\"type\":\"object\",\"required\":[\"line_items\"],\"description\":\"Request body for creating an order.\\n\\n**Order-level delivery fields are request-only.** The following fields exist only on the create/update request payloads and are **not stored on the `Order` itself** — they are propagated to each auto-allocated fulfillment order and persisted there:\\n\\n- `delivery_method`\\n- `delivery_type`\\n- `delivery_address`\\n- `delivery_schedule`\\n- `customer_collection_address`\\n- `customer_collection_schedule`\\n\\nWhen `fulfillment_orders` are explicitly provided in the request, the per-FO values take precedence over these top-level values. To inspect or change these fields after creation, read or update them on the corresponding fulfillment order.\",\"properties\":{\"merchant\":{\"type\":\"string\",\"description\":\"The merchant identifier for this order.\"},\"partner_order_reference\":{\"type\":\"string\",\"description\":\"Your system's unique order reference for correlation.\"},\"language\":{\"type\":\"string\",\"description\":\"Language code for customer communications (e.g., \\\"en\\\", \\\"ar\\\").\"},\"order_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date when the order was placed (ISO 8601 format).\"},\"sales_channel\":{\"type\":\"string\",\"description\":\"The sales channel where the order originated (e.g., \\\"web\\\", \\\"mobile\\\", \\\"store\\\").\"},\"carriyo_metadata\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/carriyo-metadata\"},\"description\":\"Custom key-value metadata for the order.\"},\"delivery_method\":{\"allOf\":[{\"$ref\":\"#/components/schemas/delivery-method\"}],\"description\":\"The delivery method to apply to all auto-allocated fulfillment orders.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"delivery_type\":{\"type\":\"string\",\"description\":\"The delivery service level (e.g., `standard`, `express`, `same_day`). Configurable per tenant. Only applicable when `delivery_method` is `DELIVERY`.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"delivery_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address where the order should be delivered. Used when `delivery_method` is `DELIVERY`.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"delivery_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The scheduled delivery window. Only applicable when `delivery_method` is `DELIVERY`.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"customer_collection_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address from which the customer will collect the order (e.g., a store, locker, or pickup point). Only applicable when `delivery_method` is `COLLECTION`.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"customer_collection_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The window during which the customer can collect the order. Only applicable when `delivery_method` is `COLLECTION`.\\n\\nRequest-only field — stored on each fulfillment order, not on the `Order`.\"},\"billing_address\":{\"$ref\":\"#/components/schemas/address\"},\"customer\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The customer's contact and address details.\"},\"payment\":{\"$ref\":\"#/components/schemas/order-payment\"},\"taxes_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include taxes.\"},\"duties_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include duties.\"},\"discount_applications\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/discount-application\"},\"description\":\"Discounts applied to the order.\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/line-item\"},\"description\":\"Products ordered with quantities and prices.\"},\"fulfillment_orders\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fulfillment-order-request\"},\"description\":\"Optional explicit fulfillment order specifications. When omitted, Carriyo auto-allocates fulfillment orders based on inventory and rules.\"},\"shipping_lines\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/shipping-line\"},\"description\":\"Shipping methods and costs.\"}}},\"order\":{\"title\":\"Order\",\"type\":\"object\",\"properties\":{\"tenant\":{\"type\":\"string\",\"description\":\"The tenant identifier.\"},\"order_id\":{\"type\":\"string\",\"description\":\"Carriyo's unique identifier for the order.\"},\"merchant\":{\"type\":\"string\",\"description\":\"The merchant identifier.\"},\"partner_order_reference\":{\"type\":\"string\",\"description\":\"Your system's order reference.\"},\"language\":{\"type\":\"string\",\"description\":\"Language code for customer communications.\"},\"order_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date when the order was placed.\"},\"sales_channel\":{\"type\":\"string\",\"description\":\"The sales channel where the order originated.\"},\"creation_source\":{\"$ref\":\"#/components/schemas/request-source\"},\"update_source\":{\"$ref\":\"#/components/schemas/request-source\"},\"carriyo_metadata\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/carriyo-metadata\"},\"description\":\"Custom metadata for the order.\"},\"status\":{\"type\":\"string\",\"enum\":[\"open\",\"partially_allocated\",\"allocated\",\"processing\",\"fulfilled\",\"cancelled\",\"closed\"],\"description\":\"Current status of the order:\\n- `open` - Order created, not yet allocated\\n- `partially_allocated` - Some items allocated to fulfillment locations\\n- `allocated` - All items allocated to fulfillment locations\\n- `processing` - One or more fulfillment orders are being processed (picked, packed, shipped or partially fulfilled)\\n- `fulfilled` - All items have been fulfilled\\n- `cancelled` - Order has been cancelled\\n- `closed` - Order is complete and closed\"},\"auto_allocation_failed\":{\"type\":\"boolean\",\"description\":\"Whether automatic fulfillment allocation failed.\"},\"cancellation_reason\":{\"$ref\":\"#/components/schemas/cancellation-reason\"},\"billing_address\":{\"$ref\":\"#/components/schemas/address\"},\"customer\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The customer's contact and address details.\"},\"customer_key\":{\"type\":\"string\",\"description\":\"A derived key that uniquely identifies the customer based on email/phone, used to link orders to a customer record.\"},\"payment\":{\"$ref\":\"#/components/schemas/order-payment\"},\"redacted\":{\"type\":\"boolean\",\"description\":\"Whether personal data has been redacted.\"},\"taxes_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include taxes.\"},\"duties_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include duties.\"},\"discount_applications\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/discount-application\"}},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/line-item\"}},\"fulfillment_orders\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fulfillment-order\"}},\"shipping_lines\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/shipping-line\"}},\"error_details\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/error-detail\"},\"description\":\"Any errors that occurred during order processing.\"},\"creation_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"When the order was created in Carriyo.\"},\"update_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"When the order was last updated.\"}}},\"update-order-request\":{\"title\":\"Update Order Request\",\"type\":\"object\",\"description\":\"Request body for updating an order. All fields are optional - only include fields you want to update.\\n\\n**Warning**: The `fulfillment_orders` field is a full replacement. Include ALL fulfillment orders you want to keep.\",\"properties\":{\"partner_order_reference\":{\"type\":\"string\",\"description\":\"Your system's unique order reference.\"},\"order_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date when the order was placed (ISO 8601 format).\"},\"merchant\":{\"type\":\"string\",\"description\":\"The merchant identifier.\"},\"language\":{\"type\":\"string\",\"description\":\"Language code for customer communications.\"},\"sales_channel\":{\"type\":\"string\",\"description\":\"The sales channel where the order originated.\"},\"taxes_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include taxes.\"},\"duties_included\":{\"type\":\"boolean\",\"description\":\"Whether prices include duties.\"},\"billing_address\":{\"$ref\":\"#/components/schemas/address\"},\"customer\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The customer's contact and address details.\"},\"payment\":{\"$ref\":\"#/components/schemas/order-payment\"},\"discount_applications\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/discount-application\"}},\"shipping_lines\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/shipping-line\"}},\"line_items\":{\"type\":\"array\",\"description\":\"**Full replacement** - If provided, completely replaces all existing line items.\\nInclude all line items you want to keep.\",\"items\":{\"$ref\":\"#/components/schemas/update-line-item-request\"}},\"fulfillment_orders\":{\"type\":\"array\",\"description\":\"**Full replacement with preservation rules**.\\n\\n⚠️ **Critical**: Any fulfillment order NOT included in this array will be PERMANENTLY REMOVED.\\n\\nFor each FO's line_items:\\n- Only include items with pending statuses (`open`, `allocated`, `pick_in_progress`, `picked`, `pack_in_progress`)\\n- Items with terminal statuses (`fulfilled`, `cancelled`, `closed`) are automatically preserved\",\"items\":{\"$ref\":\"#/components/schemas/update-fulfillment-order-request\"}}}},\"update-line-item-request\":{\"title\":\"Update Line Item Request\",\"type\":\"object\",\"required\":[\"id\",\"sku\"],\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Unique identifier for the line item. Must match an existing line item ID to update, or be new to add.\"},\"sku\":{\"type\":\"string\",\"description\":\"Stock keeping unit.\"},\"origin_country\":{\"type\":\"string\",\"description\":\"Country of origin (ISO 3166-1 alpha-2 code).\"},\"description\":{\"type\":\"string\",\"description\":\"Product description.\"},\"barcode\":{\"type\":\"string\",\"description\":\"Product barcode.\"},\"digital\":{\"type\":\"boolean\",\"description\":\"Whether this item is a digital product.\"},\"quantity\":{\"type\":\"integer\",\"description\":\"Quantity ordered. If reduced, the difference is tracked as removed quantity.\"},\"unit_price\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Unit price of the item.\"},\"unit_cost\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Unit cost of the item.\"},\"discount_allocations\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/discount-allocation\"}},\"taxes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/tax\"}},\"duties\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/duty\"}},\"weight\":{\"$ref\":\"#/components/schemas/weight\"},\"dimension\":{\"$ref\":\"#/components/schemas/dimension\"},\"image_link\":{\"type\":\"string\",\"description\":\"URL to product image.\"},\"product_ref\":{\"type\":\"string\",\"description\":\"Product reference in your system.\"},\"product_id\":{\"type\":\"string\",\"description\":\"Product identifier.\"},\"hs_code\":{\"type\":\"string\",\"description\":\"Harmonized System code for customs.\"},\"manufacturer_id\":{\"type\":\"string\",\"description\":\"Manufacturer identifier.\"},\"material_composition\":{\"type\":\"string\",\"description\":\"Material composition of the product.\"},\"category\":{\"type\":\"string\",\"description\":\"Product category.\"},\"dangerous_goods\":{\"type\":\"boolean\",\"description\":\"Whether the item contains dangerous goods.\"},\"battery\":{\"$ref\":\"#/components/schemas/battery\"}}},\"update-fulfillment-order-request\":{\"title\":\"Update Fulfillment Order Request\",\"type\":\"object\",\"required\":[\"partner_fulfillment_order_reference\"],\"description\":\"Request to update a fulfillment order. Use either `fulfillment_order_id` or `partner_fulfillment_order_reference` to identify existing FOs.\\n\\nIf neither identifier matches an existing FO, a new FO will be created.\",\"properties\":{\"fulfillment_order_id\":{\"type\":\"string\",\"description\":\"Carriyo's unique identifier for the fulfillment order.\\nUse this to match and update an existing FO.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for the fulfillment order.\\nCan be used as an alternative to `fulfillment_order_id` for matching existing FOs.\"},\"location_id\":{\"type\":\"string\",\"description\":\"The location ID where items will be fulfilled.\"},\"delivery_method\":{\"$ref\":\"#/components/schemas/delivery-method\"},\"delivery_type\":{\"type\":\"string\",\"description\":\"The delivery service level (e.g., `standard`, `express`, `same_day`). Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address where the fulfillment order should be delivered. Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The scheduled delivery window. Only applicable when `delivery_method` is `DELIVERY`.\"},\"customer_collection_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address from which the customer will collect this fulfillment order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"customer_collection_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The window during which the customer can collect the order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"line_items\":{\"type\":\"array\",\"description\":\"Line items for this fulfillment order.\\n\\n**Important Rules**:\\n- Only include items with pending statuses (`open`, `allocated`, `pick_in_progress`, `picked`, `pack_in_progress`)\\n- Do NOT include items with terminal statuses (`fulfilled`, `cancelled`, `closed`) — they are preserved automatically\\n- This replaces all pending items in the FO\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"}},\"carriyo_metadata\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/carriyo-metadata\"}}}},\"discount-allocation\":{\"title\":\"Discount Allocation\",\"type\":\"object\",\"properties\":{\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The discounted amount allocated.\"},\"discount_application_id\":{\"type\":\"integer\",\"description\":\"References the corresponding `discount_application_id` in the order's `discount_applications`.\"}}},\"tax\":{\"title\":\"Tax\",\"type\":\"object\",\"properties\":{\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Tax amount.\"},\"rate\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Tax rate (e.g., 0.05 for 5%).\"},\"description\":{\"type\":\"string\",\"description\":\"Tax description (e.g., \\\"VAT\\\").\"}}},\"duty\":{\"title\":\"Duty\",\"type\":\"object\",\"properties\":{\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Duty amount.\"},\"rate\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Duty rate.\"},\"description\":{\"type\":\"string\",\"description\":\"Duty description.\"},\"taxes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/tax\"},\"description\":\"Taxes that apply on top of this duty.\"}}},\"weight\":{\"title\":\"Weight\",\"type\":\"object\",\"properties\":{\"value\":{\"type\":\"number\",\"format\":\"double\"},\"unit\":{\"type\":\"string\",\"enum\":[\"kg\",\"lb\",\"gm\"],\"description\":\"Unit of weight. `gm` is deprecated — use `kg` instead.\"}}},\"dimension\":{\"title\":\"Dimension\",\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"number\",\"format\":\"double\"},\"height\":{\"type\":\"number\",\"format\":\"double\"},\"depth\":{\"type\":\"number\",\"format\":\"double\"},\"unit\":{\"type\":\"string\",\"enum\":[\"cm\",\"in\",\"mm\"],\"description\":\"Unit of dimension. `mm` is deprecated — use `cm` instead.\"}}},\"battery\":{\"title\":\"Battery\",\"type\":\"object\",\"properties\":{\"material_type\":{\"type\":\"string\",\"description\":\"Battery material composition.\",\"enum\":[\"lithium_metal\",\"lithium_ion\"]},\"packing_type\":{\"type\":\"string\",\"description\":\"How the battery is packed.\",\"enum\":[\"contained_in_equipment\",\"packed_with_equipment\",\"stand_alone\"]}}},\"cancel-order-request\":{\"title\":\"Cancel Order Request\",\"type\":\"object\",\"properties\":{\"cancellation_reason\":{\"$ref\":\"#/components/schemas/cancellation-reason\"}}},\"bulk-order-import-request\":{\"title\":\"Bulk Order Import Request\",\"type\":\"object\",\"properties\":{\"order_requests\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/create-order-request\"},\"description\":\"Array of orders to create (maximum 20).\"}}},\"bulk-order-import-response\":{\"title\":\"Bulk Order Import Response\",\"type\":\"object\",\"properties\":{\"order\":{\"$ref\":\"#/components/schemas/order\"},\"error\":{\"type\":\"string\",\"description\":\"Error message if order creation failed.\"},\"partner_order_reference\":{\"type\":\"string\",\"description\":\"The partner reference from the request for correlation.\"}}},\"fulfillment-order-request\":{\"title\":\"Fulfillment Order Request\",\"type\":\"object\",\"required\":[\"partner_fulfillment_order_reference\"],\"properties\":{\"fulfillment_order_id\":{\"type\":\"string\",\"description\":\"Carriyo's unique identifier for the fulfillment order. Only used when updating an existing fulfillment order during an order update; ignored on create.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for this fulfillment order.\"},\"location_id\":{\"type\":\"string\",\"description\":\"The location ID (or `partner_location_code`) where items will be fulfilled from.\"},\"delivery_method\":{\"$ref\":\"#/components/schemas/delivery-method\"},\"delivery_type\":{\"type\":\"string\",\"description\":\"The delivery service level (e.g., `standard`, `express`, `same_day`). Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address where the fulfillment order should be delivered. Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The scheduled delivery window. Only applicable when `delivery_method` is `DELIVERY`.\"},\"customer_collection_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address from which the customer will collect this fulfillment order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"customer_collection_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The window during which the customer can collect the order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Line items to include in this fulfillment order.\"},\"carriyo_metadata\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/carriyo-metadata\"}}}},\"fulfillment-order\":{\"title\":\"Fulfillment Order\",\"type\":\"object\",\"properties\":{\"fulfillment_order_id\":{\"type\":\"string\",\"description\":\"Carriyo's unique identifier for the fulfillment order.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for this fulfillment order.\"},\"location_id\":{\"type\":\"string\",\"description\":\"The location ID where items are being fulfilled.\"},\"allocation_history\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/allocation-history\"},\"description\":\"History of location allocations for this fulfillment order.\"},\"creation_date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"When the fulfillment order was created.\"},\"status\":{\"type\":\"string\",\"enum\":[\"open\",\"allocated\",\"processing\",\"fulfilled\",\"cancelled\",\"closed\"],\"description\":\"Current status of the fulfillment order:\\n- `open` - Created, no location assigned\\n- `allocated` - Assigned to a location and ready to be fulfilled\\n- `processing` - One or more line items are being picked, packed, shipped, or partially fulfilled\\n- `fulfilled` - All line items have been fulfilled\\n- `cancelled` - Fulfillment order has been cancelled\\n- `closed` - All processing is complete\"},\"delivery_method\":{\"$ref\":\"#/components/schemas/delivery-method\"},\"delivery_type\":{\"type\":\"string\",\"description\":\"The delivery service level (e.g., `standard`, `express`, `same_day`). Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address where the fulfillment order is to be delivered. Only applicable when `delivery_method` is `DELIVERY`.\"},\"delivery_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The scheduled delivery window. Only applicable when `delivery_method` is `DELIVERY`.\"},\"customer_collection_address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The address from which the customer will collect this fulfillment order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"customer_collection_schedule\":{\"allOf\":[{\"$ref\":\"#/components/schemas/fo-schedule\"}],\"description\":\"The window during which the customer can collect the order. Only applicable when `delivery_method` is `COLLECTION`.\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item\"}},\"carriyo_metadata\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/carriyo-metadata\"}}}},\"create-fulfillment-request\":{\"title\":\"Create Fulfillment Request\",\"type\":\"object\",\"properties\":{\"partner_fulfillment_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for this fulfillment.\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Specific line items to fulfill. Omit to fulfill all pending items.\"},\"carrier_account\":{\"$ref\":\"#/components/schemas/carrier-account-request\"},\"parcels\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/parcel-request\"},\"description\":\"Parcel details for the shipment.\"},\"delivery\":{\"$ref\":\"#/components/schemas/fulfillment-delivery\"},\"payment\":{\"$ref\":\"#/components/schemas/fulfillment-payment\"},\"pre_booking_info\":{\"$ref\":\"#/components/schemas/pre-booking-info\"}}},\"unfulfill-fulfillment-request\":{\"title\":\"Unfulfill Fulfillment Request\",\"type\":\"object\",\"properties\":{\"fulfillment_ids\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"List of fulfillment IDs to reverse.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Partner reference to identify the fulfillment to reverse.\"}}},\"merge-fulfillment-order-request\":{\"title\":\"Merge Fulfillment Order Request\",\"type\":\"object\",\"required\":[\"source\",\"destination\"],\"properties\":{\"source\":{\"type\":\"object\",\"properties\":{\"fulfillment_order_id\":{\"type\":\"string\",\"description\":\"The source fulfillment order ID.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Alternative source identification by partner reference.\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Specific items to merge. Omit to merge all.\"}},\"description\":\"The fulfillment order to merge from.\"},\"destination\":{\"type\":\"object\",\"properties\":{\"fulfillment_order_id\":{\"type\":\"string\",\"description\":\"The destination fulfillment order ID.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Alternative destination identification by partner reference.\"}},\"description\":\"The fulfillment order to merge into.\"}}},\"split-fulfillment-request\":{\"title\":\"Split Fulfillment Request\",\"type\":\"object\",\"required\":[\"line_items\"],\"properties\":{\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Line items to move to the new fulfillment order.\"},\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Partner reference for the new fulfillment order.\"},\"location_id\":{\"type\":\"string\",\"description\":\"Optional new location for the split fulfillment order.\"}}},\"cancel-fo-line-items-request\":{\"title\":\"Cancel Fulfillment Order Line Items Request\",\"type\":\"object\",\"properties\":{\"cancellation_reason\":{\"$ref\":\"#/components/schemas/cancellation-reason\"},\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Specific line items to cancel. Omit to cancel all pending items.\"}}},\"ship-fo-line-items-request\":{\"title\":\"Ship Fulfillment Order Line Items Request\",\"type\":\"object\",\"properties\":{\"line_items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/fo-line-item-request\"},\"description\":\"Specific fulfilled items to ship. Omit to ship all fulfilled items.\"},\"carrier_account\":{\"$ref\":\"#/components/schemas/carrier-account-request\"},\"parcels\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/parcel-request\"}},\"delivery\":{\"$ref\":\"#/components/schemas/fulfillment-delivery\"},\"payment\":{\"$ref\":\"#/components/schemas/fulfillment-payment\"},\"pre_booking_info\":{\"$ref\":\"#/components/schemas/pre-booking-info\"}}},\"update-location-request\":{\"title\":\"Update Location Request\",\"type\":\"object\",\"required\":[\"location_id\"],\"properties\":{\"location_id\":{\"type\":\"string\",\"description\":\"The new location ID for the fulfillment order.\"}}},\"update-fo-references-request\":{\"title\":\"Update Fulfillment Order References Request\",\"type\":\"object\",\"description\":\"Request body for updating partner reference fields on a fulfillment order. Either `partner_fulfillment_order_reference` or `fulfillments` (or both) may be provided.\",\"properties\":{\"partner_fulfillment_order_reference\":{\"type\":\"string\",\"description\":\"Updated partner reference for the fulfillment order.\"},\"fulfillments\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/update-fulfillment-request\"},\"description\":\"Updates to existing fulfillments' partner references.\"}}},\"update-fulfillment-request\":{\"title\":\"Update Fulfillment Request\",\"type\":\"object\",\"properties\":{\"fulfillment_id\":{\"type\":\"string\",\"description\":\"The fulfillment ID to update.\"},\"partner_fulfillment_reference\":{\"type\":\"string\",\"description\":\"Updated partner reference for this fulfillment.\"}}},\"update-delivery-method-request\":{\"title\":\"Update Delivery Method Request\",\"type\":\"object\",\"description\":\"Request body for changing the delivery method of a fulfillment order. The required fields depend on the new `delivery_method`.\",\"required\":[\"delivery_method\"],\"properties\":{\"delivery_method\":{\"$ref\":\"#/components/schemas/delivery-method\"},\"address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The new address for the fulfillment order.\\n- For `DELIVERY`: the new delivery address.\\n- For `COLLECTION`: the new customer collection address.\\n- For `DIGITAL`: not required.\"},\"scheduled_from\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Start of the new scheduled window (delivery or customer-collection, depending on `delivery_method`).\"},\"scheduled_to\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"End of the new scheduled window.\"},\"delivery_type\":{\"type\":\"string\",\"description\":\"The delivery service level (e.g., `standard`, `express`). Only applicable when `delivery_method` is `DELIVERY`.\"}}},\"update-schedule-request\":{\"title\":\"Update Schedule Request\",\"type\":\"object\",\"description\":\"Request body for updating the scheduled window of a fulfillment order.\\n\\n- For fulfillment orders with `delivery_method: DELIVERY`, this updates the `delivery_schedule`.\\n- For fulfillment orders with `delivery_method: COLLECTION`, this updates the `customer_collection_schedule`.\",\"properties\":{\"scheduled_from\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Start of the scheduled window.\"},\"scheduled_to\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"End of the scheduled window.\"}}},\"delivery-method\":{\"title\":\"Delivery Method\",\"type\":\"string\",\"description\":\"How the order is delivered to the customer:\\n- `DELIVERY` — Standard delivery to the customer's address (uses `delivery_address` and `delivery_schedule`).\\n- `COLLECTION` — Customer collects the order from a specified location (uses `customer_collection_address` and `customer_collection_schedule`).\\n- `DIGITAL` — No physical delivery; the order is fulfilled digitally.\",\"enum\":[\"DELIVERY\",\"COLLECTION\",\"DIGITAL\"]},\"fo-schedule\":{\"title\":\"Fulfillment Order Schedule\",\"type\":\"object\",\"description\":\"A scheduled window expressed as a `from`–`to` date-time pair.\",\"properties\":{\"scheduled_from\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Start of the scheduled window.\"},\"scheduled_to\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"End of the scheduled window.\"}}},\"allocation-history\":{\"title\":\"Allocation History\",\"type\":\"object\",\"description\":\"A historical entry showing when and why a fulfillment order was allocated to a location.\",\"properties\":{\"date\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"When the allocation occurred.\"},\"location_id\":{\"type\":\"string\",\"description\":\"The location the fulfillment order was allocated to.\"},\"reason\":{\"type\":\"string\",\"description\":\"Reason for the allocation (e.g., `auto_allocation`, `manual_reallocation`).\"}}},\"personal-id\":{\"title\":\"Personal ID\",\"type\":\"object\",\"description\":\"ID of the person to whom the shipment is addressed.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"ID number.\",\"example\":\"U123457896\"},\"type\":{\"type\":\"string\",\"description\":\"ID type.\",\"example\":\"Passport\"}}},\"removed-quantity\":{\"title\":\"Removed Quantity\",\"type\":\"object\",\"description\":\"Tracks a quantity removed from a line item over the order's lifecycle.\",\"properties\":{\"quantity\":{\"type\":\"integer\",\"description\":\"The quantity that was removed.\"},\"note\":{\"type\":\"string\",\"description\":\"Optional note describing why the quantity was removed.\"}}},\"custom-fields\":{\"title\":\"Custom Fields\",\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"description\":\"Custom fields in the form of a map of arrays:\\n```\\n{\\\"field1\\\": [\\\"value1\\\", \\\"value2\\\"], \\\"field2\\\": [\\\"value1\\\"]}\\n```\"},\"address\":{\"title\":\"Address\",\"type\":\"object\",\"description\":\"Carriyo address object used for customer, billing, delivery and customer-collection addresses.\\n\\nYou can either pass a fully free-form address (`contact_name`, `address1`, `city`, `country`, etc.) or reference a pre-configured location in Carriyo using `partner_location_id`, `partner_location_name`, or `partner_location_code`.\",\"properties\":{\"partner_location_id\":{\"type\":\"string\",\"description\":\"Reference to a pre-configured location in Carriyo. When provided, the address is resolved from the matching location and free-form fields are typically not required.\"},\"partner_location_name\":{\"type\":\"string\",\"description\":\"Alternative way to reference a Carriyo location by name.\"},\"partner_location_code\":{\"type\":\"string\",\"description\":\"Alternative way to reference a Carriyo location by your custom location code.\"},\"collection_point_id\":{\"type\":\"string\",\"description\":\"ID of the carrier's collection point for deliveries held at the carrier location for collection.\"},\"contact_name\":{\"type\":\"string\",\"description\":\"Name of the contact person or business.\",\"example\":\"Jo Bloggs\"},\"personal_id\":{\"$ref\":\"#/components/schemas/personal-id\"},\"contact_phone\":{\"type\":\"string\",\"description\":\"Primary phone number for contact in E164 Format with country code, e.g., +16175551212.\\nConditionally mandatory based on Account Settings.\",\"format\":\"E164 Format (with +<country-code-prefix>)\",\"example\":\"+16175551212\"},\"alternate_phone\":{\"type\":\"string\",\"description\":\"Alternate phone number for contact in E164 Format with country code.\",\"format\":\"E164 Format (with +<country-code-prefix>)\",\"example\":\"+16175551210\"},\"contact_email\":{\"type\":\"string\",\"format\":\"email\",\"description\":\"Email address for contact.\\nConditionally mandatory based on Account Settings.\",\"example\":\"jo.bloggs@example.com\"},\"company_name\":{\"type\":\"string\",\"description\":\"Business or legal entity name. Optional — only needed when it differs from `contact_name`.\",\"example\":\"Acme Fashion Ltd\"},\"address1\":{\"type\":\"string\",\"description\":\"Address Line 1 (e.g., street, PO Box, or company name).\",\"example\":\"1 Financial Centre Road\"},\"address2\":{\"type\":\"string\",\"description\":\"Address Line 2 (e.g., apartment, floor, unit, or building).\",\"example\":\"Downtown Views, Apartment 101\"},\"city\":{\"type\":\"string\",\"description\":\"City, town, or village, represented by the Carriyo City Code if known. If not, it's a free text.\\n\\n[Please refer to the Carriyo Geo List for more information.](https://carriyo.com/docs/guides/carriyo-geo-list)\",\"example\":\"DUBAI\"},\"state\":{\"type\":\"string\",\"description\":\"State, county, province, or region, represented by the Carriyo State Code if known. If not, it's a free text.\",\"example\":\"DUBAI\"},\"postcode\":{\"type\":\"string\",\"description\":\"ZIP or postal code.\",\"example\":\"E1 6AN\"},\"country\":{\"type\":\"string\",\"description\":\"Two-letter country code (ISO 3166-1 alpha-2).\",\"example\":\"AE\",\"format\":\"Two-letter ISO country code\"},\"area\":{\"type\":\"string\",\"description\":\"District, suburb or neighbourhood, represented by the Carriyo Area Code if known. If not, it's a free text.\",\"example\":\"DOWNTOWN-DUBAI\"},\"coords\":{\"type\":\"array\",\"description\":\"Latitude and longitude (decimal degrees) of the address as an array. e.g., `[25.19741, 55.27442]`.\",\"items\":{\"type\":\"number\",\"format\":\"double\"}},\"type\":{\"type\":\"string\",\"description\":\"Type of address.\",\"enum\":[\"residential\",\"business\"]},\"notes\":{\"type\":\"string\",\"maxLength\":1000,\"description\":\"Any additional notes, e.g., \\\"Leave the parcel next to the bin\\\".\"},\"street\":{\"type\":\"string\",\"description\":\"Street name when capturing the address in structured form.\"},\"building\":{\"type\":\"string\",\"description\":\"Building name or number.\"},\"floor\":{\"type\":\"string\",\"description\":\"Floor.\"},\"flat\":{\"type\":\"string\",\"description\":\"Flat or apartment.\"},\"po_box\":{\"type\":\"string\",\"description\":\"Box number if the address is a PO Box.\"},\"custom_fields\":{\"$ref\":\"#/components/schemas/custom-fields\"},\"address_codes\":{\"$ref\":\"#/components/schemas/address-codes\"}}},\"address-codes\":{\"title\":\"Address Codes\",\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/address-code\"}},\"address-code\":{\"title\":\"Address Code\",\"type\":\"object\",\"description\":\"Location-specific address identifier used in certain countries or systems to enhance delivery precision\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"WHAT_3_WORDS\",\"EMIRATES_MAKANI_CODE\",\"KUWAIT_PACI_CODE\",\"SAUDI_SHORT_CODE\"],\"description\":\"Type of address code\"},\"value\":{\"type\":\"string\",\"description\":\"The actual value of the address code corresponding to the selected type\"}}},\"carriyo-metadata\":{\"title\":\"Carriyo Metadata\",\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"description\":\"Metadata key.\"},\"value\":{\"type\":\"string\",\"description\":\"Metadata value.\"}}},\"order-payment\":{\"title\":\"Order Payment\",\"type\":\"object\",\"properties\":{\"currency\":{\"type\":\"string\",\"description\":\"Currency code (ISO 4217).\"},\"order_total\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Total amount of the order in the specified currency.\"},\"payment_on_delivery\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Amount the customer needs to pay on delivery (e.g., for cash-on-delivery or card-on-delivery orders). `0` or omitted indicates a fully prepaid order.\"}}},\"discount-application\":{\"title\":\"Discount Application\",\"type\":\"object\",\"properties\":{\"discount_application_id\":{\"type\":\"integer\",\"description\":\"Identifier referenced by line item discount allocations.\"},\"type\":{\"type\":\"string\",\"description\":\"Type of discount (e.g., `percentage`, `fixed_amount`, `automatic`).\"},\"coupon_code\":{\"type\":\"string\",\"description\":\"The coupon or discount code applied.\"}}},\"line-item\":{\"title\":\"Line Item\",\"type\":\"object\",\"required\":[\"id\"],\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Unique identifier for the line item within the order.\"},\"sku\":{\"type\":\"string\",\"description\":\"Stock keeping unit.\"},\"origin_country\":{\"type\":\"string\",\"description\":\"Country of origin (ISO 3166-1 alpha-2 code).\"},\"description\":{\"type\":\"string\",\"description\":\"Product description.\"},\"barcode\":{\"type\":\"string\",\"description\":\"Product barcode.\"},\"digital\":{\"type\":\"boolean\",\"description\":\"Whether this item is a digital product.\"},\"quantity\":{\"type\":\"integer\",\"description\":\"Quantity ordered.\"},\"removed_quantities\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/removed-quantity\"},\"description\":\"Tracks quantities removed from this line item over its lifecycle.\"},\"unit_price\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Unit price of the item.\"},\"unit_cost\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Unit cost of the item.\"},\"discount_allocations\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/discount-allocation\"}},\"taxes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/tax\"}},\"duties\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/duty\"}},\"weight\":{\"$ref\":\"#/components/schemas/weight\"},\"dimension\":{\"$ref\":\"#/components/schemas/dimension\"},\"image_link\":{\"type\":\"string\",\"description\":\"URL to product image.\"},\"product_ref\":{\"type\":\"string\",\"description\":\"Product reference in your system.\"},\"product_id\":{\"type\":\"string\",\"description\":\"Product identifier.\"},\"hs_code\":{\"type\":\"string\",\"description\":\"Harmonized System code for customs.\"},\"manufacturer_id\":{\"type\":\"string\",\"description\":\"Manufacturer identifier.\"},\"material_composition\":{\"type\":\"string\",\"description\":\"Material composition of the product.\"},\"category\":{\"type\":\"string\",\"description\":\"Product category.\"},\"dangerous_goods\":{\"type\":\"boolean\",\"description\":\"Whether the item contains dangerous goods.\"},\"battery\":{\"$ref\":\"#/components/schemas/battery\"}}},\"fo-line-item-request\":{\"title\":\"Fulfillment Order Line Item Request\",\"type\":\"object\",\"required\":[\"id\"],\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Reference to the order line item's `id`.\"},\"quantity\":{\"type\":\"integer\",\"description\":\"Quantity to fulfill.\"}}},\"fo-line-item\":{\"title\":\"Fulfillment Order Line Item\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Reference to the order line item's `id`.\"},\"quantity\":{\"type\":\"integer\",\"description\":\"Quantity in this fulfillment order.\"},\"status\":{\"type\":\"string\",\"enum\":[\"open\",\"allocated\",\"pick_in_progress\",\"picked\",\"pack_in_progress\",\"cancelled\",\"fulfilled\",\"closed\"],\"description\":\"Current status of the line item:\\n- `open` - Item is pending allocation\\n- `allocated` - Item is allocated and ready for fulfillment\\n- `pick_in_progress` - Item is being picked\\n- `picked` - Item has been picked\\n- `pack_in_progress` - Item is being packed\\n- `cancelled` - Item has been cancelled\\n- `fulfilled` - Item has been fulfilled/shipped\\n- `closed` - Item is complete and closed\"},\"fulfillment_id\":{\"type\":\"string\",\"description\":\"ID of the fulfillment if fulfilled.\"},\"partner_fulfillment_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for the fulfillment of this line item.\"},\"shipment_ids\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"IDs of shipments containing this item.\"},\"collection_ids\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"IDs of customer collections (when delivery method is `COLLECTION`) containing this item.\"},\"cancellation_reason\":{\"type\":\"string\",\"description\":\"Reason this item was cancelled, if applicable.\"}}},\"shipping-line\":{\"title\":\"Shipping Line\",\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Display name for the shipping method.\"},\"carrier_account_id\":{\"type\":\"string\",\"description\":\"ID of the carrier account chosen for this shipping line.\"},\"carrier\":{\"type\":\"string\",\"description\":\"Carrier code.\"},\"price\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Shipping cost.\"},\"taxes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/tax\"},\"description\":\"Taxes applied on the shipping cost.\"}}},\"fulfillment-delivery\":{\"title\":\"Fulfillment Delivery\",\"type\":\"object\",\"description\":\"Scheduling window for a fulfillment.\",\"properties\":{\"scheduled_from\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"Start of the scheduled window.\"},\"scheduled_to\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"End of the scheduled window.\"}}},\"fulfillment-payment\":{\"title\":\"Fulfillment Payment\",\"type\":\"object\",\"properties\":{\"currency\":{\"type\":\"string\",\"description\":\"Currency code (ISO 4217).\"},\"fulfillment_total\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Total amount for this fulfillment.\"},\"payment_on_delivery\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Amount to be collected on delivery for this fulfillment.\"},\"payment_mode\":{\"type\":\"string\",\"description\":\"Payment mode for this fulfillment (e.g., `prepaid`, `cash_on_delivery`, `card_on_delivery`). The exact set of valid values is configurable per tenant.\"}}},\"carrier-account-request\":{\"title\":\"Carrier Account Request\",\"type\":\"object\",\"description\":\"Identifies a specific carrier account configured in Carriyo.\",\"properties\":{\"carrier_id\":{\"type\":\"string\",\"description\":\"ID of the carrier (e.g., `aramex`, `dhl`).\"},\"carrier_account_name\":{\"type\":\"string\",\"description\":\"Name of the carrier account configured in Carriyo.\"}}},\"parcel-request\":{\"title\":\"Parcel Request\",\"type\":\"object\",\"properties\":{\"packing_template_reference\":{\"type\":\"string\",\"description\":\"Reference to a pre-configured packing template.\"},\"parcel_id\":{\"type\":\"string\",\"description\":\"Carriyo's parcel ID, when updating an existing parcel.\"},\"partner_parcel_reference\":{\"type\":\"string\",\"description\":\"Your system's reference for this parcel.\"},\"description\":{\"type\":\"string\",\"description\":\"Description of parcel contents.\"},\"weight\":{\"$ref\":\"#/components/schemas/weight\"},\"dimension\":{\"$ref\":\"#/components/schemas/dimension\"},\"parcel_items\":{\"type\":\"array\",\"description\":\"Items inside this parcel. Each entry references an order line item id with its packed quantity.\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"The line item `id`.\"},\"quantity\":{\"type\":\"integer\",\"description\":\"Quantity of this line item in the parcel.\"}}}}}},\"pre-booking-info\":{\"title\":\"Pre-Booking Info\",\"type\":\"object\",\"description\":\"Information about a shipment that has already been booked with a carrier outside Carriyo.\",\"properties\":{\"carrier_tracking_no\":{\"type\":\"string\",\"description\":\"Tracking number from the carrier.\"},\"carrier_tracking_url\":{\"type\":\"string\",\"description\":\"Tracking URL provided by the carrier.\"},\"input_carrier\":{\"type\":\"string\",\"description\":\"The carrier used for the pre-booked shipment.\"}}},\"cancellation-reason\":{\"title\":\"Cancellation Reason\",\"type\":\"string\",\"description\":\"The reason for cancellation. Must be one of the following values:\\n- `CUSTOMER_CANCELLATION` - Customer requested cancellation\\n- `AUTO_ALLOCATION_FAILED` - Automatic fulfillment allocation failed\\n- `INVENTORY_OUT_OF_STOCK` - Items are out of stock\\n- `STAFF_ERROR` - Staff made an error\\n- `PAYMENT_ISSUE` - Payment problem occurred\\n- `OTHER` - Other reason\",\"enum\":[\"CUSTOMER_CANCELLATION\",\"AUTO_ALLOCATION_FAILED\",\"INVENTORY_OUT_OF_STOCK\",\"STAFF_ERROR\",\"PAYMENT_ISSUE\",\"OTHER\"],\"example\":\"CUSTOMER_CANCELLATION\"},\"request-source\":{\"title\":\"Request Source\",\"type\":\"object\",\"description\":\"Describes which system or actor triggered an order create or update.\",\"properties\":{\"source_type\":{\"type\":\"string\",\"description\":\"The type of source (e.g., `api`, `dashboard`, `handler`, `carriyo`, `order_service`, `shopify_connector`, `magento_connector`, etc.).\"},\"source_id\":{\"type\":\"string\",\"description\":\"Identifier of the originator (e.g., user id, connector identifier).\"},\"api_pattern\":{\"type\":\"string\",\"description\":\"For API-originated requests, the matched API path pattern.\"},\"request_type\":{\"type\":\"string\",\"description\":\"The Carriyo request type that produced this change (e.g., `ORDER_CREATE`, `ORDER_UPDATE`).\"},\"system_log_identifier\":{\"type\":\"string\",\"description\":\"Reference to the system log entry that recorded this request.\"}}},\"error-detail\":{\"title\":\"Error Detail\",\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"string\",\"description\":\"Severity level of the error (e.g., `error`, `warning`).\"},\"trigger\":{\"type\":\"string\",\"description\":\"What triggered this error (e.g., the operation or field).\"},\"source\":{\"type\":\"string\",\"description\":\"Where the error originated (e.g., `carriyo`, `carrier`).\"},\"type\":{\"type\":\"string\",\"description\":\"Category of error.\"},\"message\":{\"type\":\"string\",\"description\":\"Human-readable error message.\"},\"code\":{\"type\":\"string\",\"description\":\"Machine-readable error code.\"},\"field\":{\"type\":\"string\",\"description\":\"The field that caused the error, if applicable.\"}}},\"api-call-details\":{\"title\":\"API Call Details\",\"type\":\"object\",\"description\":\"Metadata for an integration API call stored as an order system log. All fields are optional except those you need for your use case; Carriyo merges this with server-side context when persisting the log.\",\"properties\":{\"entity_id\":{\"type\":\"string\"},\"entity_ids\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"carrier_id\":{\"type\":\"string\"},\"webhook_id\":{\"type\":\"string\"},\"tenant\":{\"type\":\"string\"},\"correlation_id\":{\"type\":\"string\"},\"event_type\":{\"type\":\"string\",\"description\":\"One of `INBOUND`, `INTERNAL`, `OUTBOUND`.\",\"enum\":[\"INBOUND\",\"INTERNAL\",\"OUTBOUND\"]},\"request_type\":{\"type\":\"string\",\"description\":\"Carriyo `RequestType` enum name (e.g. `ORDER_CREATE`, `SHIPMENT_CREATE`, `SHIPMENT_HANDLER_TRACK`).\"},\"source_type\":{\"type\":\"string\"},\"source_id\":{\"type\":\"string\"},\"request_time\":{\"type\":\"integer\",\"format\":\"int64\"},\"request_method\":{\"type\":\"string\"},\"request_url\":{\"type\":\"string\"},\"request_headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"request_body\":{\"type\":\"string\"},\"raw_request_body\":{\"type\":\"string\"},\"response_time\":{\"type\":\"integer\",\"format\":\"int64\"},\"response_headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"response_code\":{\"type\":\"integer\"},\"response_body\":{\"type\":\"string\"},\"call_statistics\":{\"$ref\":\"#/components/schemas/call-statistics\"},\"duration_statistics\":{\"$ref\":\"#/components/schemas/duration-statistics\"}}},\"call-statistics\":{\"title\":\"Call Statistics\",\"type\":\"object\",\"description\":\"Fine-grained HTTP client phase timestamps (strings, implementation-defined format).\",\"properties\":{\"call_start\":{\"type\":\"string\"},\"dns_start\":{\"type\":\"string\"},\"dns_end\":{\"type\":\"string\"},\"connect_start\":{\"type\":\"string\"},\"secure_connect_start\":{\"type\":\"string\"},\"secure_connect_end\":{\"type\":\"string\"},\"connect_end\":{\"type\":\"string\"},\"connection_acquired\":{\"type\":\"string\"},\"request_headers_start\":{\"type\":\"string\"},\"request_headers_end\":{\"type\":\"string\"},\"request_body_start\":{\"type\":\"string\"},\"request_body_end\":{\"type\":\"string\"},\"response_headers_start\":{\"type\":\"string\"},\"response_headers_end\":{\"type\":\"string\"},\"response_body_start\":{\"type\":\"string\"},\"response_body_end\":{\"type\":\"string\"},\"connection_released\":{\"type\":\"string\"},\"call_end\":{\"type\":\"string\"}}},\"duration-statistics\":{\"title\":\"Duration Statistics\",\"type\":\"object\",\"properties\":{\"dns_lookup_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"tcp_connection_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"tls_handshake_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"sending_request_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"wait_response_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"receive_response_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"overhead_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"total_duration\":{\"type\":\"integer\",\"format\":\"int64\"},\"connection_reused\":{\"type\":\"boolean\"}}},\"order-change-log\":{\"title\":\"Order Change Log\",\"type\":\"object\",\"properties\":{\"tenant\":{\"type\":\"string\"},\"record\":{\"type\":\"string\",\"description\":\"Serialized change payload or diff for this log entry.\"},\"log_date\":{\"type\":\"string\",\"format\":\"date-time\"},\"order_id\":{\"type\":\"string\"},\"source_type\":{\"type\":\"string\",\"description\":\"Source that triggered the change (e.g. `api`, `dashboard`, `order_service`, connector names).\"},\"source_id\":{\"type\":\"string\"},\"api_pattern\":{\"type\":\"string\"},\"request_type\":{\"type\":\"string\"},\"system_log_identifier\":{\"type\":\"string\",\"description\":\"Links to the related system log entry when applicable.\"}}},\"order-system-log\":{\"title\":\"Order System Log\",\"type\":\"object\",\"properties\":{\"tenant\":{\"type\":\"string\"},\"identifier\":{\"type\":\"string\",\"description\":\"Unique key for this log row within the order partition.\"},\"order_id\":{\"type\":\"string\"},\"correlation_id\":{\"type\":\"string\"},\"event_type\":{\"type\":\"string\",\"enum\":[\"INBOUND\",\"INTERNAL\",\"OUTBOUND\"]},\"request_type\":{\"type\":\"string\"},\"source_type\":{\"type\":\"string\"},\"source_id\":{\"type\":\"string\"},\"request_time\":{\"type\":\"integer\",\"format\":\"int64\"},\"response_time\":{\"type\":\"integer\",\"format\":\"int64\"},\"response_code\":{\"type\":\"integer\"},\"s3_content_key\":{\"type\":\"string\"},\"s3_content_bucket\":{\"type\":\"string\"},\"details_json\":{\"type\":\"string\",\"description\":\"Optional JSON blob for allocation or history UI details.\"}}},\"pageable-order-system-log-response\":{\"title\":\"Pageable Order System Log Response\",\"type\":\"object\",\"properties\":{\"total\":{\"type\":\"integer\"},\"page_num\":{\"type\":\"integer\"},\"rows_per_page\":{\"type\":\"integer\"},\"items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/order-system-log\"}}}},\"shipment-status-update-request\":{\"title\":\"Shipment (status update)\",\"type\":\"object\",\"description\":\"Subset of the Carriyo `shipment` object used when posting delivery updates. Send the full shipment object as returned by the Shipping API or webhooks when possible.\\n\\n**Required for routing:** `references.partner_order_reference` must match the order's `partner_order_reference`.\",\"properties\":{\"references\":{\"type\":\"object\",\"properties\":{\"partner_order_reference\":{\"type\":\"string\",\"description\":\"Partner order reference that ties this shipment to an order in Carriyo.\"}}},\"post_shipping_info\":{\"type\":\"object\",\"description\":\"Latest booking / tracking status on the shipment.\",\"properties\":{\"status\":{\"type\":\"string\",\"description\":\"Carriyo shipment status (e.g. `delivered`). Auto-close logic runs when this is `delivered`, subject to order eligibility.\"}}}}},\"update-address-request\":{\"title\":\"Update Address Request\",\"type\":\"object\",\"required\":[\"address\"],\"properties\":{\"address\":{\"allOf\":[{\"$ref\":\"#/components/schemas/address\"}],\"description\":\"The new address. Applies to `delivery_address` when `delivery_method` is `DELIVERY`, or `customer_collection_address` when `delivery_method` is `COLLECTION`.\"}}}},\"securitySchemes\":{\"OAuth2-Production\":{\"type\":\"oauth2\",\"flows\":{\"clientCredentials\":{\"tokenUrl\":\"https://api.carriyo.com/oauth/token\",\"scopes\":{}}}},\"OAuth2-Demo\":{\"type\":\"oauth2\",\"flows\":{\"clientCredentials\":{\"tokenUrl\":\"https://demo-api.carriyo.com/oauth/token\",\"scopes\":{}}}}}}}},\"options\":{\"hideTryItPanel\":false,\"pagination\":\"item\",\"noAutoAuth\":true,\"generateCodeSamples\":{\"languages\":[{\"lang\":\"curl\",\"label\":\"cURL\"},{\"lang\":\"JavaScript\",\"label\":\"JS\"},{\"lang\":\"Java\"},{\"lang\":\"Python\"},{\"lang\":\"Go\"},{\"lang\":\"PHP\"},{\"lang\":\"C#\"}]},\"disableSearch\":true,\"ctrlFHijack\":false,\"disableSidebar\":true,\"theme\":{\"overrides\":{\"DownloadButton\":{\"custom\":\"\"},\"NextSectionButton\":{\"custom\":\"\"}},\"codeBlock\":{\"tokens\":{}},\"schema\":{\"constraints\":{},\"examples\":{}},\"rightPanel\":{\"textColor\":\"#eeeeee\"},\"typography\":{\"heading1\":{},\"heading2\":{},\"heading3\":{},\"rightPanelHeading\":{}}}}}","redocHasSecurityDefinitions":false,"redocInfoPageLink":"/api/orders/overview/","redocItemId":"tag/Fulfillment-Orders/operation/update-fulfillment-order-delivery-method","redocHasInfoPage":false,"settings":{"noAutoAuth":true,"generateCodeSamples":{"languages":[{"lang":"curl","label":"cURL"},{"lang":"JavaScript","label":"JS"},{"lang":"Java"},{"lang":"Python"},{"lang":"Go"},{"lang":"PHP"},{"lang":"C#"}]}},"requestLogin":false,"lastModified":"2026-04-30T13:46:39.000Z"},"seo":{"title":"Update Fulfillment Order Delivery Method"}}},"pageContext":{"id":"c0263cdd-4645-5a1b-9881-698560925ebboperation/update-fulfillment-order-delivery-method__redocly content/api/orders/operation/update-fulfillment-order-delivery-method/","seo":{"title":"Update Fulfillment Order Delivery Method","description":"Switches the delivery method of a fulfillment order between `DELIVERY`, `COLLECTION`, and `DIGITAL`, and updates the corresponding address and schedule in a single call.\n\n### Behaviour\n\nDepending on the new `delivery_method`, the request body fields are interpreted as follows:\n\n| New `delivery_method` | `address` is set as | `scheduled_from`/`scheduled_to` are set as |\n|---|---|---|\n| `DELIVERY` | `delivery_address` | `delivery_schedule` |\n| `COLLECTION` | `customer_collection_address` | `customer_collection_schedule` |\n| `DIGITAL` | not used | not used |\n\nSwitching to a new delivery method will clear the address and schedule fields associated with the previous method.\n\n### Use Cases\n\n- Convert an online order from home delivery to a click-and-collect pickup at a store.\n- Switch a fulfillment order from `COLLECTION` back to `DELIVERY` if the customer changes their mind.\n- Mark a fulfillment order as `DIGITAL` when no physical delivery is required.\n\n### Constraints\n\nThis endpoint cannot be called on fulfillment orders that have already started processing (e.g., shipments created, items fulfilled). Use unfulfill or cancel flows first if you need to change the method on an in-progress FO.","image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"api/orders.page.yaml#operation/update-fulfillment-order-delivery-method","pageBaseUrl":"/api/orders","type":"redoc-operation","toc":{"enable":true,"maxDepth":4,"headings":null},"data":{},"catalogInfo":null,"link":"/api/orders/operation/update-fulfillment-order-delivery-method/","sidebarName":"api","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":[{"definitionId":"orders","id":"orders","title":"orders","isDefault":true,"apiId":null}],"apiVersionId":null,"isDefaultApiVersion":true}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}