> ## Documentation Index
> Fetch the complete documentation index at: https://developers.openborder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating Orders

> Learn how to keep OpenBorder synchronized as orders progress through fulfillment.

## Overview

After an order is created in OpenBorder, updates are expected as it progresses through fulfillment.

These updates, such as shipment events, customer detail corrections, or cancellations, keep OpenBorder’s OMS aligned with your commerce platform and ensure accurate order, shipment, and product-level data throughout the fulfillment lifecycle.

All order updates are made by calling the **Update an Order** endpoint.

## Common Update Workflows

<Steps>
  <Step title="Mark an Order as Fulfilled">
    Once an order has been packed, labeled, and handed off to the carrier, your system should notify OpenBorder that the order (or a specific shipment within it) has been fulfilled and is now in transit.

    Each fulfillment update should include:

    * The identifiers for the order (`source_reference`) and shipment (`shipment_id`) being fulfilled.
    * The shipment’s status set to `fulfilled`.
    * A `fulfillments` array containing tracking details, carrier information, timestamps, and item references.
    * The `shipping_rate_id` and `shipping_rate` of the shipment being fulfilled.

    **Endpoint:** `PUT https://api.openborder.com/api/direct/v1/orders`

    <CodeGroup>
      ```json Request theme={null} theme={null}
      {
        "source_reference": 98765,
        "source_updated_at": "2025-10-23T14:45:00Z",
        "shipments": [
          {
            "shipment_id": "ship_1",
            "status": "fulfilled",
            "fulfillments": [
              {
                "tracking_number": "1Z12345E0205271688",
                "carrier": "UPS",
                "location": "San Francisco, CA",
                "shipped_at": "2025-10-23T12:30:00Z",
                "status": "in_transit",
                "items": [
                  {
                    "source_line_id": "1",
                    "source_product_id": 1001,
                    "source_variant_id": 2001,
                    "quantity": 1
                  }
                ]
              }
            ],
            "shipping_rate_id": "rate_ups_priority",
            "shipping_rate": 25
          }
        ]
      }
      ```

      ```text Response theme={null} theme={null}
      HTTP/1.1 204 No Content
      ```
    </CodeGroup>

    <Tip>
      A `204 No Content` response indicates the shipment update was successfully received and processed by OpenBorder.
    </Tip>
  </Step>

  <Step title="Cancel an Order">
    If an order is cancelled, send an update to OpenBorder to indicate the order will not proceed to fulfillment or shipment. A cancellation update should include:

    * The identifiers for the order (`source_reference`) and shipment (`shipment_id`) being fulfilled.
    * The shipment-level status set to `cancelled`.
    * The `shipping_rate_id` and `shipping_rate` of the shipment being cancelled

    **Endpoint:** `PUT https://api.openborder.com/api/direct/v1/orders`

    <CodeGroup>
      ```json Request theme={null} theme={null}
      {
        "source_reference": 202510234,
        "source_updated_at": "2025-10-20T12:30:00Z",
        "shipments": [
          {
            "shipment_id": "ship_1",
            "status": "canceled",
            "shipping_rate_id": "rate_usps_priority",
            "shipping_rate": 25.0
          }
        ]
      }
      ```

      ```text Response theme={null} theme={null}
      HTTP/1.1 204 No Content
      ```
    </CodeGroup>

    <Tip>
      Once cancelled, the shipment will no longer proceed through the OpenBorder fulfillment workflow.
    </Tip>
  </Step>
</Steps>

## Summary

| Update Type  | Status      | Description                                                                              |
| ------------ | ----------- | ---------------------------------------------------------------------------------------- |
| Fulfillment  | `fulfilled` | Indicates the shipment has been handed to the carrier and includes tracking information. |
| Cancellation | `canceled`  | Indicates the shipment has been cancelled and will not be fulfilled.                     |

<Note>
  All order updates are submitted using the **Update Order** endpoint.

  For detailed request parameters and the complete schema, see the [**Update Order API Reference**](/api-reference/orders/update-an-order).
</Note>
