---
schema_version: "1"
id: f710ad391c178fbe7662b48b2c6e41bbcdc45580be9059976a5664b9697cea45
title: Data Orders (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-data-orders.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-orders
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0c5941cf3450b435cbfc4f9303d5fd32d9405028b60be590c509135bf181703f
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Orders (deprecated)

# Data Orders (deprecated)

Data API endpoints enable developers to build applications for merchants: Create, update, delete business objects, like products, customers, pricing and promotions or assignments. They typically provide read and write access and are designed for moderate usage.

**Version:** 25.6

## Servers

*   `https://{host}/s/-/dw/data/v25_6`

Protocols: https.

## Security

*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### PATCH Updates the order

`PATCH /sites/{site_id}/orders/{order_no}`

Operation ID: `Updates the order`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order confirmation status

`PUT /sites/{site_id}/orders/{order_no}/confirmation_status`

Operation ID: `Updates the order confirmation status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order confirmation status.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_confirmation_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order export status

`PUT /sites/{site_id}/orders/{order_no}/export_status`

Operation ID: `Updates the order export status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order export status. Setting the status to EXPORTED will also trigger the finalization of on-order inventory transactions for this order, meaning that all inventory transactions with type on-order will be moved into final inventory transactions. This is only relevant when on-order inventory is turned on for the inventory list ordered products are in.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_export_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order external status

`PUT /sites/{site_id}/orders/{order_no}/external_status`

Operation ID: `Updates the order external status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order external status.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_external_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Updates the payment instrument of an order

`PATCH /sites/{site_id}/orders/{order_no}/payment_instruments/{payment_instrument_id}`

Operation ID: `Updates the payment instrument of an order`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the payment instrument of an order.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - PaymentInstrumentNotFoundException - In case of the given payment\_instrument\_id does not reference an existing payment instrument.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.
*   `payment_instrument_id` (path, string, required) ID of the payment instrument  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `payment_instrument_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `PaymentInstrumentNotFoundException` - In case of the given payment\_instrument\_id does not reference an existing payment instrument. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Updates the transaction of an order payment instrument

`PATCH /sites/{site_id}/orders/{order_no}/payment_instruments/{payment_instrument_id}/transaction`

Operation ID: `Updates the transaction of an order payment instrument`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the transaction of an order payment instrument.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - PaymentInstrumentNotFoundException - In case of the given payment\_instrument\_id does not reference an existing payment instrument.
*   404 - PaymentTransactionNotFoundException - In case of the payment instrument does not reference a payment transaction.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.
*   `payment_instrument_id` (path, string, required) ID of the payment instrument  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `payment_transaction_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `PaymentInstrumentNotFoundException` - In case of the given payment\_instrument\_id does not reference an existing payment instrument. or `PaymentTransactionNotFoundException` - In case of the payment instrument does not reference a payment transaction. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order payment status

`PUT /sites/{site_id}/orders/{order_no}/payment_status`

Operation ID: `Updates the order payment status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order payment status.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_payment_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates (create or replace) the order shipment address

`PUT /sites/{site_id}/orders/{order_no}/shipments/{shipment_id}/shipping_address`

Operation ID: `Updates (create or replace) the order shipment address`. Tags: sites. Security: oauth2\_application; client\_id.

Updates (create or replace) the order shipment address.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - ShipmentNotFoundException - In case of the given shipment\_id does not reference an existing shipment.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.
*   `shipment_id` (path, string, required) ID of the shipment  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `shipping_address_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `ShipmentNotFoundException` - In case of the given shipment\_id does not reference an existing shipment. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order shipping status

`PUT /sites/{site_id}/orders/{order_no}/shipping_status`

Operation ID: `Updates the order shipping status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order shipping status.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_shipping_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PUT Updates the order status

`PUT /sites/{site_id}/orders/{order_no}/status`

Operation ID: `Updates the order status`. Tags: sites. Security: oauth2\_application; client\_id.

Updates the order status by using the corresponding methods (fail, undoFail, place, cancel and undoCancel) from the dw.order.OrderMgr. Orders which are not in status CREATED or FAILED can not be set back.

This endpoint may return the following faults:

*   404 - OrderNotFoundException - In case of the given order\_no does not reference an existing order.
*   404 - SiteNotFoundException - In case of the given site\_id does not reference an existing site.
*   409 - CancelOrderException - The order could not be cancelled.
*   409 - OrderIntegrationStatusException - The status change is not supported. An external order management system is integrated which has responsibility for further status changes on placed orders.
*   409 - OrderPreviouslyIntegratedStatusException - The status change is not supported. The order was previously integrated with an external order management system which has responsibility for further status changes.
*   409 - OrderStatusTransitionException - The status change is not supported.
*   409 - PlaceOrderException - The order could not be placed.
*   409 - UndoCancelOrderException - The cancelled order can not be reopened.
*   409 - UndoFailOrderException - The failed order can not be reopened.

#### Parameters

*   `site_id` (path, string, required) ID of the site  
    Minimum length: 1.
*   `order_no` (path, string, required) The order number  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `order_status_update_request`.

#### Responses

*   **204**
*   **404** `OrderNotFoundException` - In case of the given order\_no does not reference an existing order. or `SiteNotFoundException` - In case of the given site\_id does not reference an existing site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **409** `CancelOrderException` - The order could not be cancelled. or `OrderIntegrationStatusException` - The status change is not supported. An external order management system is integrated which has responsibility for further status changes on placed orders. or `OrderPreviouslyIntegratedStatusException` - The status change is not supported. The order was previously integrated with an external order management system which has responsibility for further status changes. or `OrderStatusTransitionException` - The status change is not supported. or `PlaceOrderException` - The order could not be placed. or `UndoCancelOrderException` - The cancelled order can not be reopened. or `UndoFailOrderException` - The failed order can not be reopened.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

## Schemas

### order\_update\_request

Request body to update an order.

Type: `any`.

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### order\_confirmation\_status\_update\_request

Request body to update the order confirmation status.

*   `status` (_string_, required) The new confirmation status for an order.  
    Allowed values: `confirmed`, `not_confirmed`.

### order\_export\_status\_update\_request

Request body to update the order export status.

*   `status` (_string_, required) The new export status for an order.  
    Allowed values: `exported`, `not_exported`, `ready`, `failed`.

### order\_external\_status\_update\_request

Request body to update the order external status.

*   `status` (_string_, required) The new external status for an order.  
    Minimum length: 1. Maximum length: 256.

### payment\_instrument\_update\_request

Request body to update an order payment instrument.

Type: `any`.

### payment\_transaction\_update\_request

Request body to update an order payment transaction.

Type: `any`.

### order\_payment\_status\_update\_request

Request body to update the order payment status.

*   `status` (_string_, required) The new payment status for an order.  
    Allowed values: `paid`, `part_paid`, `not_paid`.

### shipping\_address\_update\_request

Request body to update the order shipping address.

*   `address1` (_string_)
*   `address2` (_string_)
*   `city` (_string_)
*   `company_name` (_string_)
*   `country_code` (_string_)
*   `first_name` (_string_)
*   `full_name` (_string_)
*   `id` (_string_)
*   `job_title` (_string_)
*   `last_name` (_string_)
*   `phone` (_string_)
*   `post_box` (_string_)
*   `postal_code` (_string_)
*   `salutation` (_string_)
*   `second_name` (_string_)
*   `state_code` (_string_)
*   `suffix` (_string_)
*   `suite` (_string_)
*   `title` (_string_)

### order\_shipping\_status\_update\_request

Request body to update the order shipping status.

*   `status` (_string_, required) The new shipping status for an order.  
    Allowed values: `shipped`, `part_shipped`, `not_shipped`.

### order\_status\_update\_request

Request body to update the order status.

*   `status` (_string_, required) The new status for an order.  
    Allowed values: `created`, `new`, `open`, `completed`, `cancelled`, `failed`, `failed_with_reopen`.

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)