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

# Update an order

> Partially update some fields of an order.



## OpenAPI

````yaml /.openapi/v3/orders/openapi.yaml patch /orders/{id}
openapi: 3.1.0
info:
  title: Orders
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Orders API lets you manage your orders within Sendcloud. You can create
    and update orders in batch, retrieve a list of orders per integration,
    retrieve an order, partially update an order, and delete an order.
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Orders
    description: OrderAPI
paths:
  /orders/{id}:
    parameters:
      - schema:
          type: integer
          minimum: 1
        name: id
        in: path
        required: true
        description: Filtering on the Sendcloud order ID
    patch:
      tags:
        - Orders
      summary: Update an order
      description: Partially update some fields of an order.
      operationId: sc-public-v3-orders-patch-partial_update_order
      requestBody:
        description: >-
          Only include the fields you would like to update. If you need to
          update any of the `order_items`, the `name` field is required so that
          the correct `order_item` is updated. If you need to add items to or
          remove items from an order, you should use the [Create/Update orders
          in batch](/api/v3/orders/create-update-orders-in-batch) endpoint
          instead.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/order-partial-update'
            examples:
              UpdateOrderStatus:
                summary: Update the status of an Order
                value:
                  id: '669'
                  order_id: '555413'
                  order_details:
                    status:
                      code: fulfilled
                      message: Fulfilled
                    tags:
                      - october_campaign
              UpdateOrderItem:
                summary: Update an order's item
                value:
                  id: '669'
                  order_id: '555413'
                  order_details:
                    order_items:
                      - name: Cylinder candle
                        measurement:
                          weight:
                            value: 1
                            unit: kg
                        quantity: 2
                        unit_price:
                          value: 7
                          currency: EUR
                        total_price:
                          value: 7
                          currency: EUR
                        mid_code: US1234567
                        material_content: 100% Cotton
                        intended_use: Personal use
      responses:
        '200':
          $ref: '#/components/responses/OrderUpdated'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                MissingRequiredField:
                  summary: Missing required field
                  value:
                    errors:
                      - status: '400'
                        code: invalid
                        title: Invalid
                        detail: Could not find specified item.
                        source:
                          pointer: order/order_details/order_items
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                OrderNotFound:
                  summary: Order does not exist
                  value:
                    errors:
                      - status: '404'
                        code: not_found
                        title: Not found
                        detail: Could not find specified item.
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    order-partial-update:
      title: Order partial update
      x-stoplight:
        id: vgzuo3oqxarv1
      type: object
      description: >-
        API v3 Order model without any required fields to be used in partial
        update.
      properties:
        id:
          description: Autogenerated Sendcloud's internal ID
          type: string
          readOnly: true
        order_id:
          type: string
          description: External order ID assigned by shop system
          example: 7bdd5bfd-76bc-4654-9d40-5d5d49f1cd6c
        order_number:
          type: string
          description: Unique order number generated manualy or by shop system
          example: '101170081'
        created_at:
          type: string
          format: date-time
          description: The date when an order was created at Sendcloud in ISO 8601
          example: '2018-02-27T10:00:00.555309+00:00'
          readOnly: true
        modified_at:
          type: string
          format: date-time
          description: The date when an order was last modified at Sendcloud in ISO 8601
          example: '2018-02-27T10:00:00.555309+00:00'
          readOnly: true
        order_details:
          type: object
          description: Node for general order information
          properties:
            integration:
              type: object
              description: Sendcloud Integration object where orders come from
              properties:
                id:
                  type: integer
                  description: >-
                    Sendcloud Integration ID. To obtain the integration ID, you
                    can use the [Retrieve a list of
                    integrations](/api/v3/integrations/retrieve-a-list-of-integrations)
                    endpoint.'
                  example: 74937
                  minimum: 1
            status:
              type: object
              description: Order status
              properties:
                code:
                  type: string
                  description: Custom internal shop status, you can use it for filtering
                  example: fulfilled
                message:
                  type: string
                  description: User-defined human readable status
                  example: Order has been fulfilled
            order_created_at:
              type: string
              format: date-time
              description: >-
                The date and time that the order was placed in the respective
                shop system in ISO 8601
              example: '2018-02-27T10:00:00.555309+00:00'
            order_updated_at:
              type: string
              format: date-time
              description: >-
                The date and time that the order was last updated in the
                respective shop system in ISO 8601
              example: '2018-02-27T10:00:00.555309+00:00'
            order_items:
              type: array
              description: List of items the order contains
              items:
                type: object
                description: Order item
                properties:
                  item_id:
                    type: string
                    description: Order Item external ID in shop system
                    example: '5552'
                  product_id:
                    type: string
                    description: Shop system product ID
                    example: '1458734634'
                  name:
                    type: string
                    description: The name of ordered product
                    example: Cylinder candle
                  description:
                    type: string
                    description: The product description
                    example: Pebble green - 12x8 cm
                  quantity:
                    type: integer
                    example: 2
                    minimum: 0
                  sku:
                    type: string
                    example: WW-DR-GR-XS-001
                    description: >-
                      Stock keeping unit - used by retailers to assign to
                      products, in order to keep track of stock levels
                      internally.
                  hs_code:
                    type: string
                    example: '6205.20'
                  country_of_origin:
                    type: string
                    example: NL
                    description: Country code of origin of the item in ISO 3166-1 alpha-2
                    maxLength: 2
                    minLength: 2
                  properties:
                    type: object
                    additionalProperties: true
                    description: >-
                      Any custom user-defined properties of order item or
                      product
                    example:
                      size: small
                      color: red
                  unit_price:
                    $ref: '#/components/schemas/price'
                  total_price:
                    $ref: '#/components/schemas/price'
                  measurement:
                    $ref: '#/components/schemas/measurement'
                  mid_code:
                    title: MID Code
                    type:
                      - string
                      - 'null'
                    description: >-
                      MID code, an abbreviation for Manufacturer's
                      Identification code, is necessary on the commercial
                      invoice, serving as an alternative for the complete
                      manufacturer, shipper, or exporter details, and it's
                      mandatory for U.S. formal customs entries.
                    example: NLOZR92MEL
                  material_content:
                    title: Material Content
                    type:
                      - string
                      - 'null'
                    description: A description of materials of the order content.
                    example: 100% Cotton
                  intended_use:
                    title: Intended Use
                    type:
                      - string
                      - 'null'
                    description: >-
                      Intended use of the order contents: personal or
                      commercial.
                    example: Personal use
                  delivery_dates:
                    type:
                      - object
                      - 'null'
                    description: Defined delivery dates
                    properties:
                      handover_at:
                        type: string
                        format: date-time
                        description: >-
                          The date when the item will be handed over to the
                          carrier by the merchant in ISO 8601
                        example: '2022-02-27T10:00:00.555309+00:00'
                      deliver_at:
                        type: string
                        format: date-time
                        description: >-
                          The date when the order reaches the end customer in
                          ISO 8601
                        example: '2022-03-02T11:50:00.555309+00:00'
            notes:
              type:
                - string
                - 'null'
              description: Internal notes or comments placed by consumer on the order
              example: 'Call this number before delivery: 063 874 6473'
            tags:
              type:
                - array
                - 'null'
              description: Tags assigned to the order
              items:
                type: string
              example:
                - fragile
                - countryside warehouse
        payment_details:
          type: object
          description: Node for everything about payments and money
          properties:
            total_price:
              $ref: '#/components/schemas/price'
            subtotal_price:
              $ref: '#/components/schemas/price'
            estimated_shipping_price:
              $ref: '#/components/schemas/price'
            estimated_tax_price:
              $ref: '#/components/schemas/price'
            status:
              type: object
              description: Payment status of an order
              properties:
                code:
                  type: string
                  description: Custom internal shop status, you can use it for filtering
                  example: paid
                message:
                  type: string
                  description: User-defined human readable status
                  example: Order has been paid
            invoice_date:
              type:
                - string
                - 'null'
              title: Invoice Date
              description: The date when invoice was issued.
              example: '2018-07-14'
            discount_granted:
              $ref: '#/components/schemas/costs-object'
              type:
                - object
                - 'null'
              title: Discount Granted
              description: >-
                Discount granted on the total order excluding any possible
                discounts on shipping.
            insurance_costs:
              $ref: '#/components/schemas/costs-object'
              type:
                - object
                - 'null'
              title: Insurance Cost
              description: Amount the order is insured for
            freight_costs:
              $ref: '#/components/schemas/costs-object'
              type:
                - object
                - 'null'
              title: Freight Cost
              description: Order shipping cost after applying discounts.
            other_costs:
              $ref: '#/components/schemas/costs-object'
              type:
                - object
                - 'null'
              title: Other Costs
              description: >-
                Any other costs, for example — wrapping costs, associated with
                the order.
        customs_details:
          $ref: '#/components/schemas/customs-details'
        customer_details:
          type: object
          description: Node for an information about customer
          properties:
            name:
              type: string
              example: John Doe
            phone:
              type: string
              example: '+31626262626'
            email:
              type: string
              example: johndoe@gmail.com
        billing_address:
          $ref: '#/components/schemas/address'
        shipping_address:
          $ref: '#/components/schemas/address'
        shipping_details:
          allOf:
            - $ref: '#/components/schemas/shipping-details'
            - type: object
              properties:
                measurement:
                  $ref: '#/components/schemas/measurement-partial-update'
        service_point_details:
          type: object
          description: >-
            Node for service point information. The service point information
            can be retrieved using the [Service points
            API](/api/v2/service-points).


            You must provide either the Sendcloud `id` or the
            `carrier_service_point_id` to identify the service point.


            > **Note:** The Service Points API is currently only available in
            API v2. This reference will be updated when a v3 version becomes
            available.
          oneOf:
            - title: Sendcloud ID
              type: object
              properties:
                id:
                  type: string
                  description: >-
                    An id of Sendcloud Service Point to which the shipment is
                    going to be shipped
                  example: '123'
                post_number:
                  type: string
                  description: >-
                    An optional field that only applies to PackStation service
                    point types
                  example: some-post-number
                latitude:
                  type: string
                  description: The Latitude of where the service point is located
                  example: '51.427063'
                longitude:
                  type: string
                  description: The Longitude of where the service point is located
                  example: '5.486414'
                type:
                  type: string
                  description: Carrier defined service point type
                  example: packstation
                extra_data:
                  type: object
                  description: Can contain carrier specific data
              required:
                - id
            - title: Carrier Service Point ID
              type: object
              properties:
                carrier_service_point_id:
                  type: string
                  description: The carrier's native id for the service point
                  example: '91233'
                post_number:
                  type: string
                  description: >-
                    An optional field that only applies to PackStation service
                    point types
                  example: some-post-number
                latitude:
                  type: string
                  description: The Latitude of where the service point is located
                  example: '51.427063'
                longitude:
                  type: string
                  description: The Longitude of where the service point is located
                  example: '5.486414'
                type:
                  type: string
                  description: Carrier defined service point type
                  example: packstation
                extra_data:
                  type: object
                  description: Can contain carrier specific data
              required:
                - carrier_service_point_id
    errors:
      title: Errors
      type: object
      description: A standardized format for errors in JSON:API responses.
      properties:
        errors:
          type:
            - array
            - object
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/ErrorObject'
            required:
              - status
              - code
              - detail
    price:
      title: Price Object
      type: object
      properties:
        value:
          type: number
        currency:
          type: string
          description: ISO 4217 currency code
          enum:
            - EUR
            - GBP
            - USD
      description: Price in the specified currency
    measurement:
      title: Measurement Object
      type: object
      properties:
        dimension:
          $ref: '#/components/schemas/dimension'
        weight:
          $ref: '#/components/schemas/weight'
        volume:
          $ref: '#/components/schemas/volume'
      description: >-
        This object provides essential information for accurate packing,
        shipping, and inventory management
    costs-object:
      title: Costs Object
      type: object
      properties:
        value:
          type:
            - string
            - 'null'
          pattern: '[\d]+(\.[\d]+)?'
          example: '3.99'
        currency:
          type:
            - string
            - 'null'
          example: EUR
    customs-details:
      title: Customs Details
      type:
        - object
        - 'null'
      description: Customs information required for international shipments.
      properties:
        commercial_invoice_number:
          type: string
          description: Your own commercial invoice number
          example: '1002404102022'
        shipment_type:
          type: string
          description: >-
            Indicates the purpose or reason behind exporting the items. This
            classification helps customs authorities determine the applicable
            regulations, taxes, and duties.
          enum:
            - gift
            - commercial_goods
            - commercial_sample
            - returned_goods
          example: commercial_goods
        export_type:
          type: string
          description: >
            Export type documentation serves to categorize international
            shipments into three primary classifications: 
              - Private exports, intended for personal use
              - Commercial B2C exports, directed towards individual consumers
              - Commercial B2B exports, involving business-to-business transactions
              These distinctions facilitate adherence to regulatory requirements and ensure the orderly movement of goods across international boundaries.
          enum:
            - private
            - commercial_b2c
            - commercial_b2b
          example: private
        tax_numbers:
          type:
            - object
            - 'null'
          title: >-
            Identification numbers and codes related to sender, receiver and
            importer of record provider.
          properties:
            sender:
              type: array
              title: Sender's Tax Information
              minItems: 0
              items:
                $ref: '#/components/schemas/tax-number'
            receiver:
              type: array
              title: Receiver's Tax Information
              minItems: 0
              items:
                $ref: '#/components/schemas/tax-number'
            importer_of_record:
              type: array
              title: Receiver's Tax Information
              minItems: 0
              items:
                $ref: '#/components/schemas/tax-number'
    address:
      title: Address Object
      type: object
      description: Sendcloud Address object
      properties:
        name:
          type: string
          example: John Doe
          description: Name of the person associated with the address
          minLength: 1
        company_name:
          type: string
          example: Sendcloud
          description: Name of the company associated with the address
        address_line_1:
          type: string
          example: Stadhuisplein
          description: First line of the address
        house_number:
          type: string
          example: '50'
          description: House number of the address
        address_line_2:
          type: string
          description: Additional address information, e.g. 2nd level
          example: Apartment 17B
        postal_code:
          type: string
          example: 1013 AB
          description: Zip code of the address
          minLength: 1
        city:
          type: string
          example: Eindhoven
          description: City of the address
          minLength: 1
        po_box:
          type:
            - string
            - 'null'
          description: Code required in case of PO Box or post locker delivery
        state_province_code:
          type: string
          example: IT-RM
          description: >-
            The character state code of the customer represented as ISO 3166-2
            code. This field is required for certain countries. See
            [international
            shipping](/docs/shipments/international-shipping#required-fields-for-international-shipments)
            for details.
        country_code:
          type: string
          example: NL
          description: The country code of the customer represented as ISO 3166-1 alpha-2
          minLength: 1
        email:
          type: string
          format: email
          example: johndoe@gmail.com
          description: Email address of the person associated with the address
        phone_number:
          type: string
          example: '+319881729999'
          description: Phone number of the person associated with the address
    shipping-details:
      type: object
      description: Shipping information
      properties:
        is_local_pickup:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates if customers should collect the order in person from a
            merchant location
          example: true
        delivery_indicator:
          title: Delivery Indicator
          description: >-
            A free text field to indicate how a specific order should be
            shipped.


            - The field is intended for applying the Checkout Delivery Method
            condition in shipping rules.

            - Learn more about [shipping rules](/docs/shipping/shipping-rules/).
          type: string
          example: DHL Home Delivery
        measurement:
          $ref: '#/components/schemas/measurement'
          description: Total order measurements
        ship_with:
          $ref: '#/components/schemas/ship-with'
    measurement-partial-update:
      title: Measurement Object
      type: object
      properties:
        dimension:
          type: object
          description: Dimension in the specified unit
          properties:
            length:
              type: number
              description: length in specified unit
              minimum: 0
              example: 15
            width:
              type: number
              description: width in specified unit
              minimum: 0
              example: 20.5
            height:
              type: number
              description: height in specified unit
              minimum: 0
              example: 37
            unit:
              $ref: '#/components/schemas/dimension-units'
        weight:
          type: object
          description: Weight in the specified unit
          properties:
            value:
              type: number
              description: Weight value
              exclusiveMinimum: 0
              example: 14.5
            unit:
              $ref: '#/components/schemas/weight-units'
        volume:
          type: object
          description: Volume in the specified unit
          properties:
            value:
              type: integer
              description: Volume value
              minimum: 0
              example: 5
            unit:
              $ref: '#/components/schemas/volume-units'
      description: >-
        This object provides essential information for accurate packing,
        shipping, and inventory management
    ErrorObject:
      title: Error
      type: object
      description: Error in a JSON:API error format
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        links:
          type: object
          description: >-
            A set of hyperlinks that provide additional information about the
            error.
          properties:
            about:
              type: string
              description: A URL that provides additional information about the error.
        status:
          type: string
          format: int32
          description: The HTTP status code of the error.
          minLength: 1
        code:
          type: string
          description: A unique error code for the error, in snake case format.
          minLength: 1
          enum:
            - unknown_field
            - invalid
            - forbidden
            - invalid_choice
            - min_value
            - 'null'
            - not_found
            - required
            - not_a_list
            - non_field_errors
            - authentication_failed
            - validation_error
            - parcel_announcement_error
        title:
          type: string
          description: A short, human-readable summary of the error.
          minLength: 1
        detail:
          type: string
          description: A human-readable explanation of the error.
          minLength: 1
        source:
          type: object
          description: >-
            An object that identifies the source of the error within the request
            payload.
          properties:
            pointer:
              type: string
              description: >-
                A `JSON` pointer to the location of the error within the request
                payload.
            parameter:
              type: string
              description: The name of the `query` parameter that caused the error.
            header:
              type: string
              description: The name of the `header` parameter that caused the error.
        meta:
          type: object
          description: Additional metadata about the error.
    dimension:
      title: Dimension
      type: object
      description: Dimension in the specified unit
      properties:
        length:
          type: number
          description: length in specified unit
          minimum: 0
          example: 15
        width:
          type: number
          description: width in specified unit
          minimum: 0
          example: 20.5
        height:
          type: number
          description: height in specified unit
          minimum: 0
          example: 37
        unit:
          $ref: '#/components/schemas/dimension-units'
      required:
        - length
        - width
        - height
        - unit
    weight:
      title: Weight
      type: object
      description: Weight in the specified unit
      properties:
        value:
          type: number
          description: Weight value
          exclusiveMinimum: 0
          example: 14.5
        unit:
          $ref: '#/components/schemas/weight-units'
      required:
        - value
        - unit
    volume:
      title: Volume
      type: object
      description: Volume in the specified unit
      properties:
        value:
          type: integer
          description: Volume value
          minimum: 0
          example: 5
        unit:
          $ref: '#/components/schemas/volume-units'
      required:
        - value
        - unit
    tax-number:
      title: Tax Number
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          title: Tax ID name
          example: VAT
        country_code:
          type:
            - string
            - 'null'
          title: The country code of the country in the address
          example: NL
        value:
          type:
            - string
            - 'null'
          title: The value of the Tax ID
          example: NL987654321B02
    ship-with:
      title: Ship with object
      type: object
      description: >
        The ship with object can be used to define how you would like to send
        your shipment.


        You can use a `shipping_option_code`. This is a unique identifier that
        displays what carrier and what set of shipping functionalities you want
        to use.
      examples:
        - type: shipping_option_code
          properties:
            shipping_option_code: postnl:standard/insured=3000
            contract_id: 517
      properties:
        type:
          type: string
          description: |
            The way the shipping method and carrier will be selected.
          enum:
            - shipping_option_code
          example: shipping_option_code
        properties:
          $ref: '#/components/schemas/shipping-option-code-properties'
      required:
        - type
        - properties
    dimension-units:
      type: string
      title: Dimensional units
      enum:
        - cm
        - mm
        - m
        - yd
        - ft
        - in
      example: mm
    weight-units:
      type: string
      title: Mass Units Object
      enum:
        - kg
        - g
        - lbs
        - oz
      example: g
    volume-units:
      type: string
      title: Volume units
      enum:
        - m3
        - cm3
        - l
        - ml
        - gal
      example: l
    shipping-option-code-properties:
      title: Shipping option properties Object
      description: >-
        Contains the required properties to be sent when API client informs the
        shipping method and carrier to be used
      type: object
      properties:
        shipping_option_code:
          type:
            - string
            - 'null'
          description: >-
            The shipping option that will be or is used for shipping your
            parcel. A shipping option `code` can be retrieved from the [Create a
            list of shipping
            options](/api/v3/shipping-options/create-a-list-of-shipping-options)
            endpoint.
          example: postnl:standard/insured=3000
        contract_id:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Selected shipping contract. If you haven't specified a contract for
            shipping your parcel, we will automatically select the default
            contract for the carrier that matches your shipping option. You can
            retrieve your contract IDs by using the [Retrieve a list of
            contracts](/api/v3/contracts/retrieve-a-list-of-contracts)
            operation. Otherwise, the default direct contract will be
            automatically selected.
      required:
        - shipping_option_code
  responses:
    OrderUpdated:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                description: Create/Update orders in batch response object
                properties:
                  id:
                    description: Autogenerated Sendcloud's internal ID
                    type: integer
                    example: 234543
                  order_id:
                    type: string
                    description: External order ID assigned by shop system
                    example: 7bdd5bfd-76bc-4654-9d40-5d5d49f1cd6c
                  order_number:
                    type: string
                    description: Unique order number generated manually or by shop system
                    example: '101170081'
          examples:
            UpdateOrder:
              summary: Update an Order
              value:
                data:
                  id: 669
                  order_id: '555413'
                  order_number: OXSDFGHTD-12
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: >-
        Basic Authentication using API key and secrets is currently the main
        authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: >-
        OAuth2 is a standardized protocol for authorization that allows users to
        share their private resources stored on one site with another site
        without having to provide their credentials. OAuth2 Client Credentials
        Grant workflow. This workflow is typically used for server-to-server
        interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            api: Default OAuth scope required to access Sendcloud API.

````