---
schema_version: "1"
id: 89ae11ee5370751cc265c8b366a1b54d214f4c2b8497d078b6d8944d734b4995
title: Shop Baskets (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-shop-baskets.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-shop-baskets
source_site: developer.salesforce.com
content_type: documentation
content_hash: fd607d189bab49f60063aba708154521b6b3a37fc418554733556a138d9f3b28
products:
  - B2C Commerce
  - Salesforce APIs
---
Shop Baskets (deprecated)

# Shop Baskets (deprecated)

The Shop API endpoints enable developers to build full shopper-experience applications such as storefronts. They are designed for high-scale usage, and include a number of areas such as Baskets & Orders, Customers, Products and Pricing. Shop API endpoints are typically read-only APIs, with the exception of baskets and orders.

**Version:** 25.6

## Servers

*   `https://{host}/s/{siteId}/dw/shop/v25_6`

Protocols: https.

## Security

*   `customers_auth` (basic) User authentication either for a registered or a guest customer (selectable in request body). Access via Base64 encoded customer:password string as 'Authorization: Basic' header.
*   `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

### POST Create basket

`POST /baskets`

Operation ID: `Create basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Creates a new basket. The created basket is initialized with default values. Data provided in the body document will be populated into the created basket. Query parameter `temporary` can be set to `true` to create a temporary basket for the customer. The default value is `false` . Temporary baskets are separate from shopper storefront and agent baskets, and are intended for use to perform calculations or create an order without disturbing a shopper's open storefront basket. Temporary baskets are automatically deleted after a short time (15 minutes). A temporary basket can be identified with the property `temporary_basket` , which is `true` for temporary basket and `false` otherwise. Temporary baskets are available to all shoppers including guests (unlike agent baskets). All functionality that exists for a basket also applies to a temporary basket.  
A basket can be updated with further Shop API calls. Considered values from the request body are:

*   customer information: PUT /baskets/{basket\_id}/customer
    
*   billing address: PUT /baskets/{basket\_id}/billing\_address
    
*   shipments including shipping address and shipping method: POST /baskets/{basket\_id}/shipments
    
*   product items: POST /baskets/{basket\_id}/items
    
*   coupon items: POST /baskets/{basket\_id}/coupons
    
*   Invalid coupons are silently ignored.
    
*   gift certificate items: POST /baskets/{basket\_id}/gift\_certificates
    
*   payment method and card type: POST /baskets/{basket\_id}/payment\_instruments
    
*   custom properties: PATCH /baskets/{basket\_id}
    

Related resource means with which resource you can specify the same data after the basket creation. Identify the basket using the `basket_id` property, which should be integrated into the path of an update request, for example a POST to `/baskets/{basket_id}/items` . The resource supports JWT or OAuth tokens for authentication:

*   A customer must provide a JWT which specifies exactly one customer (it may be a guest or a registered customer). In this case the resource creates a basket for this customer.
    
*   An agent must provide an OAuth token. The agent can use this resource to create a basket for a newly created guest customer, and can later update the customer if desired.
    

The number of baskets which can be created per customer is limited. When a basket is created it is said to be _open_ . It remains _open_ until either an order is created from it using a POST to resource `/orders` or it is _deleted_ using a DELETE to resource `/baskets/{basket_id}` . The number of _open_ baskets allowed depends on the authentication method used and the type of basket:

*   When using JWT each customer can have just 1 _open_ basket. In addition, each customer can have up to 4 _open temporary_ baskets (by default).
    
*   When using OAuth each customer can have up to 4 _open_ baskets. These baskets can be temporary baskets or a mix of storefront and temporary baskets.
    

Custom properties in the form c\_ < CUSTOM\_NAME > are supported. A custom property must correspond to a custom attribute ( < CUSTOM\_NAME > ) defined for the Basket system object, and its value must be valid for that custom attribute. Other basket properties like the channel type or source code cannot be set with this resource.

This endpoint may return the following faults:

*   400 - CustomerBasketsQuotaExceededException - Thrown if a new basket cannot be created because the maximum number of baskets per customer would be exceeded.
*   400 - CustomerTemporaryBasketsQuotaExceededException - Thrown if a new temporary basket cannot be created because the maximum number of temporary baskets per customer would be exceeded.
*   400 - DuplicateShipmentIdException - Indicates that the same shipment id appeared twice in the body.
*   400 - InvalidCustomerException - Thrown if the customerId URL parameter does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidPaymentMethodIdException - Indicates that the provided payment method is invalid or not applicable.
*   400 - InvalidPriceAdjustmentLevelException - Indicates that a fixed price adjustment was added at order level which is disallowed.
*   400 - InvalidPromotionIdException - When attempting to add a price adjustment, indicates that a promotion id was used twice.
*   400 - MissingCouponCodeException - Thrown if the coupon number is not provided.
*   400 - SystemPromotionIdException - When attempting to add a price adjustment, indicates that a system promotion id was used as a manual promotion id.
*   400 - TooManyPromotionsException - Indicates that more than one hundred price adjustments would have been created.
*   404 - ShipmentNotFoundException - Thrown if the shipment with the given shipment id is unknown.

#### Parameters

*   `temporary` (query, boolean) The boolean flag for creating the basket as temporary.

#### Request body

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

#### Responses

*   **400** `CustomerBasketsQuotaExceededException` - Thrown if a new basket cannot be created because the maximum number of baskets per customer would be exceeded. or `CustomerTemporaryBasketsQuotaExceededException` - Thrown if a new temporary basket cannot be created because the maximum number of temporary baskets per customer would be exceeded. or `DuplicateShipmentIdException` - Indicates that the same shipment id appeared twice in the body. or `InvalidCustomerException` - Thrown if the customerId URL parameter does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidPaymentMethodIdException` - Indicates that the provided payment method is invalid or not applicable. or `InvalidPriceAdjustmentLevelException` - Indicates that a fixed price adjustment was added at order level which is disallowed. or `InvalidPromotionIdException` - When attempting to add a price adjustment, indicates that a promotion id was used twice. or `MissingCouponCodeException` - Thrown if the coupon number is not provided. or `SystemPromotionIdException` - When attempting to add a price adjustment, indicates that a system promotion id was used as a manual promotion id. or `TooManyPromotionsException` - Indicates that more than one hundred price adjustments would have been created.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ShipmentNotFoundException` - Thrown if the shipment with the given shipment id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Create a basket from a reference

`POST /baskets/reference`

Operation ID: `Create a basket from a reference`. Tags: baskets. Security: customers\_auth; client\_id.

Creates a new basket based on a basket reference.

The returned basket will be a copy of the basket in the reference. The basket in the reference must be a basket of a guest customer and the provided customer\_id in the reference must match the guest customer in the basket. There is a check that an authenticated customer for whom a basket is being copied doesn't already have a basket. In case customer\_id not matching a BasketNotFoundException will be returned as fault. All personal data like payment instruments and coupons will not be copied over to the new basket. When authenticated via JWT, a customer can only have one open basket and a CustomerBasketsQuotaExceededException is thrown, when the customer tries to create a second basket. Before using this endpoint to create a basket for a JWT-authenticated customer, verify that they don't already have one.

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id and customer id is unknown.

#### Request body (required)

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

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id and customer id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### GET Get basket

`GET /baskets/{basket_id}`

Operation ID: `Get basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Gets a basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be retrieved  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove a basket

`DELETE /baskets/{basket_id}`

Operation ID: `Remove a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be retrieved  
    Minimum length: 1.

#### Responses

*   **204**
*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Update the customer of a basket

`PATCH /baskets/{basket_id}`

Operation ID: `Update the customer of a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates a basket. Only the currency of the basket, source code, and the custom properties of the basket and of the shipping items will be considered.

This endpoint may return the following faults:

*   400 - DuplicateShippingItemIdException - Indicates that a few shipping items with the same item id are provided.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidShippingItemIdException - Indicates that the given shipping item id is null or empty.
*   400 - SourceCodeInactiveException - Indicates that the provided code is not currently active.
*   400 - UnsupportedCurrencyException - Indicates that the basket cannot be updated because the requested currency is not supported by the site.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - ShippingItemNotFoundException - Indicates that the shipping item with the given item id is unknown for the basket
*   404 - SourceCodeNotFoundException - Indicates that the provided code was not found.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `DuplicateShippingItemIdException` - Indicates that a few shipping items with the same item id are provided. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidShippingItemIdException` - Indicates that the given shipping item id is null or empty. or `SourceCodeInactiveException` - Indicates that the provided code is not currently active. or `UnsupportedCurrencyException` - Indicates that the basket cannot be updated because the requested currency is not supported by the site.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `ShippingItemNotFoundException` - Indicates that the shipping item with the given item id is unknown for the basket or `SourceCodeNotFoundException` - Indicates that the provided code was not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PUT Put a basket as agent basket.

`PUT /baskets/{basket_id}/agent`

Operation ID: `Put a basket as agent basket.`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Marks a basket as an agent basket.

This endpoint may return the following faults:

*   400 - CustomerBasketsQuotaExceededException - Indicates that marking this basket as an agent basket would exceed the open agent basket limit for the basket customer
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.

#### Responses

*   **400** `CustomerBasketsQuotaExceededException` - Indicates that marking this basket as an agent basket would exceed the open agent basket limit for the basket customer
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### GET Get approaching discounts of a basket

`GET /baskets/{basket_id}/approaching_discounts`

Operation ID: `Get approaching discounts of a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Gets the approaching discounts of a basket

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be checked.  
    Minimum length: 1.

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `approaching_discount_result`.
    

### PUT Set billing address of a basket

`PUT /baskets/{basket_id}/billing_address`

Operation ID: `Set billing address of a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Sets the billing address of a basket.

This endpoint may return the following faults:

*   400 - CustomerAddressIdNotApplicableException - Indicates that both customer\_address\_id and address body was provided.
*   400 - EmptyBillingAddressException - Indicates that the billing address was null and no customer\_address\_id was provided.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT (not relevant when using OAuth).
*   404 - AddressNotFoundException - Indicates that the address specified by customer\_address\_id is unknown.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be modified.  
    Minimum length: 1.
*   `use_as_shipping` (query, boolean) The flag indicating whether the given address will also be used as shipping address for the default shipment.
*   `customer_address_id` (query, string) The id of the customer address to be set as billing address. Cannot be used together with an existing body.  
    Minimum length: 1.

#### Request body

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

#### Responses

*   **400** `CustomerAddressIdNotApplicableException` - Indicates that both customer\_address\_id and address body was provided. or `EmptyBillingAddressException` - Indicates that the billing address was null and no customer\_address\_id was provided. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT (not relevant when using OAuth).
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `AddressNotFoundException` - Indicates that the address specified by customer\_address\_id is unknown. or `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Update basket with coupon

`POST /baskets/{basket_id}/coupons`

Operation ID: `Update basket with coupon`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds a coupon to an existing basket.

This endpoint may return the following faults:

*   400 - InvalidCouponCodeException - Thrown if the coupon code specified is invalid.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - MissingCouponCodeException - Thrown if the coupon number is not provided.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be modified.  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidCouponCodeException` - Thrown if the coupon code specified is invalid. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `MissingCouponCodeException` - Thrown if the coupon number is not provided.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove coupon from basket

`DELETE /baskets/{basket_id}/coupons/{coupon_item_id}`

Operation ID: `Remove coupon from basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a coupon from the basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - CouponItemNotFoundException - Indicates that the couponItemId URL parameter does not match any coupon item id in the basket.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `coupon_item_id` (path, string, required) the id of the coupon item to be removed  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `CouponItemNotFoundException` - Indicates that the couponItemId URL parameter does not match any coupon item id in the basket.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PUT Update customer of basket

`PUT /baskets/{basket_id}/customer`

Operation ID: `Update customer of basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Sets customer information for an existing basket.

This endpoint may return the following faults:

*   400 - CustomerBasketsQuotaExceededException - Indicates that the customer cannot be set to the basket because the max number of baskets per customer would be exceeded.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - CustomerNotFoundException - Indicates that the customer with the given customer number is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `CustomerBasketsQuotaExceededException` - Indicates that the customer cannot be set to the basket because the max number of baskets per customer would be exceeded. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `CustomerNotFoundException` - Indicates that the customer with the given customer number is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Add a gift certificate item to a basket

`POST /baskets/{basket_id}/gift_certificate_items`

Operation ID: `Add a gift certificate item to a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds a gift certificate item to an existing basket.

This endpoint may return the following faults:

*   400 - InvalidGiftCertificateItemAmountException - Indicates that the gift certificate item amount is negative.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - ShipmentNotFoundException - Indicates that the shipment with the given shipment id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidGiftCertificateItemAmountException` - Indicates that the gift certificate item amount is negative.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `ShipmentNotFoundException` - Indicates that the shipment with the given shipment id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Delete a gift certificate item from a basket

`DELETE /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

Operation ID: `Delete a gift certificate item from a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Deletes a gift certificate item from an existing basket.

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - GiftCertificateItemNotFoundException - Indicates that the gift certificate item with the given gift certificate item id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `gift_certificate_item_id` (path, string, required) the id of the gift certificate item to be removed  
    Minimum length: 1.

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `GiftCertificateItemNotFoundException` - Indicates that the gift certificate item with the given gift certificate item id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH Updates a gift certificate item of a basket

`PATCH /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

Operation ID: `Updates a gift certificate item of a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates a gift certificate item of an existing basket.

This endpoint may return the following faults:

*   400 - InvalidGiftCertificateItemAmountException - Indicates that the gift certificate item amount is negative.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - GiftCertificateItemNotFoundException - Indicates that the gift certificate item with the given gift certificate item id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `gift_certificate_item_id` (path, string, required) the id of the gift certificate item to be updated  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidGiftCertificateItemAmountException` - Indicates that the gift certificate item amount is negative.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `GiftCertificateItemNotFoundException` - Indicates that the gift certificate item with the given gift certificate item id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Add items to a basket

`POST /baskets/{basket_id}/items`

Operation ID: `Add items to a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds new items to a basket. The added items are associated with the specified shipment. If no shipment id is specified, the added items are associated with the default shipment. Considered values from the request body, for each item are:

*   **product\_id** : a valid product id. This is the id of the product to be added to the basket. If the product is already in the basket, the API either increments the quantity of the existing product line item or creates a new product line item, based on the site preference 'Add Product Behavior'. For option products and product bundles containing variation masters, the API creates a new product line item regardless of the site preference.
    
*   **shipment\_id** : a valid shipment id (optional). This is the id of the shipment in which the product item is created.
    
*   **quantity** : a number between 0.01 and 999. This is the quantity of the product to order.
    
*   **inventory\_id** : a valid inventory id (optional). This is the id of the inventory from which the item is allocated.
    
*   **bonus\_discount\_line\_item\_id** : a valid bonus discount line item id (optional). This is the id of the bonus discount line item for which the added product is a selected bonus product.
    
*   **option\_items/option\_value\_id** : a valid option value id. This is an option value for an option item of an option product. This is only possible if the product item is an option product. To set option values, you must specify a collection of option items in the `option_items` property. These option items must contain `option_id` and `option_value_id` . Also, the values you specify must be valid for the option product that this product item represents. Otherwise, the server throws an `InvalidProductOptionItemException` or an `InvalidProductOptionValueItemException` .
    
*   **custom properties in the form c\_ < CUSTOM\_NAME >** : the custom property must correspond to a custom attribute ( < CUSTOM\_NAME > ) defined for ProductLineItem. The value of this property must be valid for the type of custom attribute defined for ProductLineItem.
    

This endpoint may return the following faults:

*   400 - BasketQuotaExceededException - Indicates that the maximum allowed number, of products added to the basket, has been exceeded.
*   400 - BonusDiscountLineItemNotFoundException - Indicates that the provided bonus discount line item id is not present in the current basket.
*   400 - BonusProductQuantityException - Indicates that the quantity of the product to be added will result in the number of selected bonus choice products to exceed the amount that the user is permitted to select.
*   400 - InvalidBonusProductException - Indicates that the selected bonus product is not an applicable product for the bonus discount line item provided.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidProductIdException - Indicates that the given product id is `null` or invalid.
*   400 - InvalidProductItemException - Indicates that the product with the given product id is unknown, offline or not assigned to site catalog or the given product item quantity is `null` or invalid.
*   400 - InvalidProductItemQuantityException - Indicates a null quantity value
*   400 - InvalidProductOptionItemException - Indicates that an option with the specified option id is unknown.
*   400 - InvalidProductOptionValueItemException - Indicates that an option with the specified option value id is unknown.
*   400 - InvalidProductTypeException - Indicates that the product cannot be added to the basket because of its type.
*   400 - ProductItemNotAvailableException - Indicates that the requested product quantity is not available.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - ShipmentNotFoundException - Indicates that the basket does not contain a shipment with the given shipment id.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be modified.  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `BasketQuotaExceededException` - Indicates that the maximum allowed number, of products added to the basket, has been exceeded. or `BonusDiscountLineItemNotFoundException` - Indicates that the provided bonus discount line item id is not present in the current basket. or `BonusProductQuantityException` - Indicates that the quantity of the product to be added will result in the number of selected bonus choice products to exceed the amount that the user is permitted to select. or `InvalidBonusProductException` - Indicates that the selected bonus product is not an applicable product for the bonus discount line item provided. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidProductIdException` - Indicates that the given product id is `null` or invalid. or `InvalidProductItemException` - Indicates that the product with the given product id is unknown, offline or not assigned to site catalog or the given product item quantity is `null` or invalid. or `InvalidProductItemQuantityException` - Indicates a null quantity value or `InvalidProductOptionItemException` - Indicates that an option with the specified option id is unknown. or `InvalidProductOptionValueItemException` - Indicates that an option with the specified option value id is unknown. or `InvalidProductTypeException` - Indicates that the product cannot be added to the basket because of its type. or `ProductItemNotAvailableException` - Indicates that the requested product quantity is not available.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `ShipmentNotFoundException` - Indicates that the basket does not contain a shipment with the given shipment id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH patchBasketsByIDItems

`PATCH /baskets/{basket_id}/items`

Operation ID: `patchBasketsByIDItems`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

#### Parameters

*   `basket_id` (path, string, required)  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove product item from basket

`DELETE /baskets/{basket_id}/items/{item_id}`

Operation ID: `Remove product item from basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a product item from the basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - ProductItemNotFoundException - Indicates that the product item with the given product item id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `item_id` (path, string, required) the id of the product item to be removed  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `ProductItemNotFoundException` - Indicates that the product item with the given product item id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH Update an item of a basket

`PATCH /baskets/{basket_id}/items/{item_id}`

Operation ID: `Update an item of a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates an item in a basket. The following values in the request body are considered by the server:

*   `product_id` : a valid product id. The purpose of this value is to exchange a variation of a variation product.
    
*   `shipment_id` : a valid shipment id. The purpose of this value is to move a product item to another shipment.
    
*   `quantity` : a number between 0 and 999. The purpose of this value is to change quantity of the product item. If quantity is 0, the product item is removed.
    
*   `gift` : a boolean and `gift_message` a string allowing the setting of gift details in the product item.
    
*   `option_items/option_value_id` : a valid option value id. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values a collection of option items to be changed need to be provided in property `option_items` . Those `option_items` need to contain `option_id` and `option_value_id` . The provided values must be valid for the option product that this product item represents. Otherwise `InvalidProductOptionItemException` or `InvalidProductOptionValueItemException` will be thrown.
    
*   `_custom properties_ c_ < CUSTOM_NAME >` : a value corresponding to the type defined for custom attribute < CUSTOM\_NAME > of ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for ProductLineItem.
    

Support for updating bundled-productlineitems is limited. This allows the caller to specify an itemId identifying a bundled-productlineitem (as opposed to a top-level productlineitem) and to update one of `product_id` , `custom properties` , `gift` and `gift_message` properties.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidProductItemException - Indicates that the product with the given product id in the request body is invalid.
*   400 - InvalidProductItemIdException - Indicates that no product item with given item id was found for the basket.
*   400 - InvalidProductItemQuantityException - Indicates a null quantity value
*   400 - InvalidProductOptionItemException - Indicates that an option with the specified option id is unknown.
*   400 - InvalidProductOptionValueItemException - Indicates that an option with the specified option value id is unknown.
*   400 - InvalidShipmentIdException - Indicates that the given shipment id is invalid.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown
*   404 - ShipmentNotFoundException - Indicates that a shipment with it's given id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `item_id` (path, string, required) the it of the item to be updated  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidProductItemException` - Indicates that the product with the given product id in the request body is invalid. or `InvalidProductItemIdException` - Indicates that no product item with given item id was found for the basket. or `InvalidProductItemQuantityException` - Indicates a null quantity value or `InvalidProductOptionItemException` - Indicates that an option with the specified option id is unknown. or `InvalidProductOptionValueItemException` - Indicates that an option with the specified option value id is unknown. or `InvalidShipmentIdException` - Indicates that the given shipment id is invalid.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown or `ShipmentNotFoundException` - Indicates that a shipment with it's given id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### GET Get notes from a basket

`GET /baskets/{basket_id}/notes`

Operation ID: `Get notes from a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Retrieves notes for a basket.

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket for which you want to retrieve the notes.  
    Minimum length: 1.

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `notes_result`.
    

### POST Add a note to a basket

`POST /baskets/{basket_id}/notes`

Operation ID: `Add a note to a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds a note to an existing basket.

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be modified.  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove a note from a basket

`DELETE /baskets/{basket_id}/notes/{note_id}`

Operation ID: `Remove a note from a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a basket note.

This endpoint may return the following faults:

*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `note_id` (path, string, required) the id of the note to be removed  
    Minimum length: 1.

#### Responses

*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Add payment instrument to basket

`POST /baskets/{basket_id}/payment_instruments`

Operation ID: `Add payment instrument to basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds a payment instrument to a basket.

Payment instruments are usually authorized after order creation, for example in a custom hook. The default payment authorization process executes an authorization when a payment instrument is added to an order or updated. See `POST /orders/{order_no}/payment_instruments` and `PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}` . NOTE: If CREDIT\_CARD is selected as the payment\_method\_id, it is mandatory to provide the property card\_type.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidPaymentMethodIdException - Indicates that the provided payment method is invalid or not applicable.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - PaymentInstrumentNotFoundException - Indicates that the payment instrument with the given customer payment instrument id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidPaymentMethodIdException` - Indicates that the provided payment method is invalid or not applicable.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `PaymentInstrumentNotFoundException` - Indicates that the payment instrument with the given customer payment instrument id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Removes a payment instrument from a basket

`DELETE /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

Operation ID: `Removes a payment instrument from a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a payment instrument of a basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - PaymentInstrumentNotFoundException - Indicates that the payment instrument with the given payment instrument number is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.
*   `payment_instrument_id` (path, string, required) the id of the payment instrument to be removed  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `PaymentInstrumentNotFoundException` - Indicates that the payment instrument with the given payment instrument number is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH Updates payment instrument of basket

`PATCH /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

Operation ID: `Updates payment instrument of basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates a payment instrument of a basket.

Payment instruments are usually authorized after order creation, for example in a custom hook. The default payment authorization process executes an authorization when a payment instrument is added to an order or updated. See `POST /orders/{order_no}/payment_instruments` and `PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidPaymentMethodIdException - Indicates that the provided payment method is invalid or not applicable.
*   400 - PaymentInstrumentPermanentlyMaskedException - Indicates that the basket payment instrument with the given id already is permanently masked. Please see `dw.order.PaymentInstrument.isPermanentlyMasked()` for detailed information.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - PaymentInstrumentNotFoundException - Indicates that the payment instrument with the given payment instrument number is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.
*   `payment_instrument_id` (path, string, required) the id of the payment instrument to be updated  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidPaymentMethodIdException` - Indicates that the provided payment method is invalid or not applicable. or `PaymentInstrumentPermanentlyMaskedException` - Indicates that the basket payment instrument with the given id already is permanently masked. Please see `dw.order.PaymentInstrument.isPermanentlyMasked()` for detailed information.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `PaymentInstrumentNotFoundException` - Indicates that the payment instrument with the given payment instrument number is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### GET Get applicable payment methods for basket

`GET /baskets/{basket_id}/payment_methods`

Operation ID: `Get applicable payment methods for basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Gets applicable payment methods for an existing basket considering the open payment amount only.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `payment_method_result`.
    

### POST Add price adjustment to basket

`POST /baskets/{basket_id}/price_adjustments`

Operation ID: `Add price adjustment to basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Adds a custom manual price adjustment to the basket.

This endpoint may return the following faults:

*   400 - FixedPriceAdjustmentAlreadyExistsException - Indicates that a fixed price adjustment was already created for the given level.
*   400 - InvalidPriceAdjustmentLevelException - Indicates that a fixed price adjustment was added at order level.
*   400 - InvalidPromotionIdException - Indicates that a promotion id was used twice.
*   400 - PriceAdjustmentLimitExceededException - Indicates that the price adjustment limit is exceeded.
*   400 - SystemPromotionIdException - Indicates that a system promotion id was used as a manual promotion id.
*   400 - TooManyPromotionsException - Indicates that more than one hundred price adjustments would have been created.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `FixedPriceAdjustmentAlreadyExistsException` - Indicates that a fixed price adjustment was already created for the given level. or `InvalidPriceAdjustmentLevelException` - Indicates that a fixed price adjustment was added at order level. or `InvalidPromotionIdException` - Indicates that a promotion id was used twice. or `PriceAdjustmentLimitExceededException` - Indicates that the price adjustment limit is exceeded. or `SystemPromotionIdException` - Indicates that a system promotion id was used as a manual promotion id. or `TooManyPromotionsException` - Indicates that more than one hundred price adjustments would have been created.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove price adjustment from basket

`DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

Operation ID: `Remove price adjustment from basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a custom manual price adjustment from the basket.

This endpoint may return the following faults:

*   400 - InvalidPriceAdjustmentItemIdException - Indicates that the priceAdjustmentId is missing, empty or whitespace.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `price_adjustment_id` (path, string, required) the uuid of the adjustment to be removed  
    Minimum length: 1.

#### Responses

*   **400** `InvalidPriceAdjustmentItemIdException` - Indicates that the priceAdjustmentId is missing, empty or whitespace.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH Updates a price adjustment on a basket

`PATCH /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

Operation ID: `Updates a price adjustment on a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates a custom manual price adjustment on the basket. Only the following PATH values are considered for the update: discount, item\_text, reason\_code and custom properties; all other attributes are ignored. The discount type of a price adjustment cannot be updated and therefore, the value of the existing type must be passed. For an adjustment of type PERCENTAGE, the 'percentage' attribute is mandatory. For adjustments of type AMOUNT and FIXED\_PRICE, the 'amount' attribute is mandatory.

This endpoint may return the following faults:

*   400 - PriceAdjustmentLimitExceededException - Indicates that the price adjustment limit is exceeded.
*   400 - PriceAdjustmentUpdateAttributeMissingException - Indicates that the expected attributes are missing in the input.
*   400 - PriceAdjustmentUpdateNotManualException - Indicates that the price adjustment is not manual and cannot be updated.
*   400 - PriceAdjustmentUpdateTypeMismatchException - Indicates that the type of a price adjustment does not match the adjustment type of the input data.
*   404 - PriceAdjustmentIdNotFoundException - Indicates that the priceAdjustmentId is not found.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `price_adjustment_id` (path, string, required) the uuid of the adjustment to be updated  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `PriceAdjustmentLimitExceededException` - Indicates that the price adjustment limit is exceeded. or `PriceAdjustmentUpdateAttributeMissingException` - Indicates that the expected attributes are missing in the input. or `PriceAdjustmentUpdateNotManualException` - Indicates that the price adjustment is not manual and cannot be updated. or `PriceAdjustmentUpdateTypeMismatchException` - Indicates that the type of a price adjustment does not match the adjustment type of the input data.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `PriceAdjustmentIdNotFoundException` - Indicates that the priceAdjustmentId is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### POST Create shipment for a basket

`POST /baskets/{basket_id}/shipments`

Operation ID: `Create shipment for a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Creates a new shipment for a basket.

The created shipment is initialized with values provided in the body document and can be updated with further data API calls. Considered from the body are the following properties if specified:

*   the id
    
*   the shipping address
    
*   the shipping method
    
*   gift boolean flag
    
*   gift message
    
*   custom properties
    

This endpoint may return the following faults:

*   400 - DuplicateShipmentIdException - Indicates that a shipment with the provided id already exists for the basket.
*   400 - DuplicateShipmentNoException - Indicates that a shipment with the provided shipment number already exists for the basket.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidShippingMethodIdException - Indicates that a shipping method with an id was specified which is not a valid shipping method id.
*   400 - MissingShipmentIdException - Indicates that a shipment id is not provided.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `DuplicateShipmentIdException` - Indicates that a shipment with the provided id already exists for the basket. or `DuplicateShipmentNoException` - Indicates that a shipment with the provided shipment number already exists for the basket. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidShippingMethodIdException` - Indicates that a shipping method with an id was specified which is not a valid shipping method id. or `MissingShipmentIdException` - Indicates that a shipment id is not provided.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### DELETE Remove shipment from basket

`DELETE /baskets/{basket_id}/shipments/{shipment_id}`

Operation ID: `Remove shipment from basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Removes a specified shipment and all associated product, gift certificate, shipping and price adjustment line items from a basket. You can't remove a default shipment (id = "me").

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidShipmentIdException - Indicates that the given shipment id is invalid.
*   403 - DefaultShipmentDeletionForbiddenException - Indicates that the given shipment id corresponds to the default shipment (shipment ID always set to "me") and cannot be removed.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `shipment_id` (path, string, required) the id of the shipment to be deleted  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidShipmentIdException` - Indicates that the given shipment id is invalid.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **403** `DefaultShipmentDeletionForbiddenException` - Indicates that the given shipment id corresponds to the default shipment (shipment ID always set to "me") and cannot be removed.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PATCH Update shipment for a basket

`PATCH /baskets/{basket_id}/shipments/{shipment_id}`

Operation ID: `Update shipment for a basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Updates a shipment for a basket. The body can include updated values for the following properties:

*   the id
    
*   the shipping address
    
*   the shipping method
    
*   gift boolean flag
    
*   gift message
    
*   custom properties
    

This endpoint may return the following faults:

*   400 - DuplicateShipmentIdException - Indicates that a shipment with the provided id already exists for the basket.
*   400 - DuplicateShipmentNoException - Indicates that a shipment with the provided shipment number already exists for the basket.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidShipmentIdException - Indicates that the given shipment id was invalid.
*   400 - InvalidShippingMethodIdException - Indicates an invalid shipping method.
*   400 - MissingShippingMethodIdException - Indicates a missing shipping method.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `shipment_id` (path, string, required) the id of the shipment to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `DuplicateShipmentIdException` - Indicates that a shipment with the provided id already exists for the basket. or `DuplicateShipmentNoException` - Indicates that a shipment with the provided shipment number already exists for the basket. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidShipmentIdException` - Indicates that the given shipment id was invalid. or `InvalidShippingMethodIdException` - Indicates an invalid shipping method. or `MissingShippingMethodIdException` - Indicates a missing shipping method.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PUT Sets the shipping address of a shipment

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address`

Operation ID: `Sets the shipping address of a shipment`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Sets a shipping address of a specific shipment of a basket.

This endpoint may return the following faults:

*   400 - CustomerAddressIdNotApplicableException - Indicates that both customer\_address\_id and address body was provided.
*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT (not relevant when using OAuth).
*   400 - InvalidShipmentIdException - Thrown if the shipment with the given shipment id is unknown.
*   404 - AddressNotFoundException - Indicates that the address specified by customer\_address\_id is unknown.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) The id of the basket to be modified.  
    Minimum length: 1.
*   `shipment_id` (path, string, required) The id of the shipment to be modified.  
    Minimum length: 1.
*   `use_as_billing` (query, boolean) The flag indicating whether the given address will also be used as billing address.
*   `customer_address_id` (query, string) The id of the customer address to be set as shipping address. Cannot be used together with an existing body.  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `CustomerAddressIdNotApplicableException` - Indicates that both customer\_address\_id and address body was provided. or `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT (not relevant when using OAuth). or `InvalidShipmentIdException` - Thrown if the shipment with the given shipment id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `AddressNotFoundException` - Indicates that the address specified by customer\_address\_id is unknown. or `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### PUT Set shipping method to shipment

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method`

Operation ID: `Set shipping method to shipment`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Sets a shipping method to a specific shipment of a basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   400 - InvalidShippingMethodIdException - Indicates that a shipping method with an id was specified which is not a valid shipping method id.
*   400 - MissingShippingMethodIdException - Indicates that the id of the shipping method is missing.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket to be modified  
    Minimum length: 1.
*   `shipment_id` (path, string, required) the id of the shipment to be modified  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth. or `InvalidShippingMethodIdException` - Indicates that a shipping method with an id was specified which is not a valid shipping method id. or `MissingShippingMethodIdException` - Indicates that the id of the shipping method is missing.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

### GET Get applicable shipping methods for certain shipment of basket

`GET /baskets/{basket_id}/shipments/{shipment_id}/shipping_methods`

Operation ID: `Get applicable shipping methods for certain shipment of basket`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Gets the applicable shipping methods for a certain shipment of a basket.

This endpoint may return the following faults:

*   400 - InvalidCustomerException - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.
*   404 - ShipmentNotFoundException - Indicates that the shipment with the given shipment id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the id of the basket  
    Minimum length: 1.
*   `shipment_id` (path, string, required) the id of the shipment  
    Minimum length: 1.

#### Responses

*   **400** `InvalidCustomerException` - Indicates that the customer assigned to the basket does not match the verified customer represented by the JWT, not relevant when using OAuth.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown. or `ShipmentNotFoundException` - Indicates that the shipment with the given shipment id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `shipping_method_result`.
    

### PUT Put a basket as storefront basket.

`PUT /baskets/{basket_id}/storefront`

Operation ID: `Put a basket as storefront basket.`. Tags: baskets. Security: customers\_auth; oauth2\_application; client\_id.

Marks a basket as storefront basket.

This endpoint may return the following faults:

*   400 - CustomerBasketsQuotaExceededException - Thrown if a storefront basket already exists and exchange is `false` .
*   404 - BasketNotFoundException - Indicates that the basket with the given basket id is unknown.

#### Parameters

*   `basket_id` (path, string, required) the basket id  
    Minimum length: 1.
*   `exchange` (query, boolean) if `true` an existing storefront basket will be exchanged and marked as agent basket. if `false` a CustomerBasketsQuotaExceededException will be thrown.

#### Responses

*   **400** `CustomerBasketsQuotaExceededException` - Thrown if a storefront basket already exists and exchange is `false` .
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `BasketNotFoundException` - Indicates that the basket with the given basket id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `basket`.
    

## Schemas

### basket

Document representing a basket.

The following flashes are used to indicate the invalidity of a basket:

*   InvalidProductItem - a product item (or bundled product item) refers to a product which no longer exists, is offline, or the product is no longer assigned to a site catalog.
    
*   InvalidOptionItem - indicates that an option item refers to an option id or option value which no longer exists.
    
*   OptionItemWithoutPrice - indicates an option item without a price.
    
*   InvalidCouponCode (until 17.2) - indicates a coupon item became invalid, for example because its redemption limit is reached.
    
*   ProductItemNotAvailable - indicates too little available inventory to support the item quantity.
    
*   ProductItemWithoutPrice - indicates that the item has no price.
    
*   CustomerEmailRequired (until 17.2) - indicates the need to specify a customer email.
    
*   ShippingAddressRequired - indicates the need to specify a shipping address.
    
*   BillingAddressRequired - indicates the need to specify a billing address.
    
*   ShippingMethodRequired - indicates the need to specify a shipping method.
    
*   ShippingMethodNotApplicable - indicates that the currently specified shipping method is not applicable for the given addresses or product items.
    
*   PaymentMethodRequired - indicates the need to specify a payment method.
    
*   PaymentMethodNotApplicable - the currently specified payment method is not applicable for the given addresses or product items.
    
*   OrderTotalNotSet - the basket calculation could not be completed for some reason.
    
*   ProductItemAdjustedPriceLessThanZero - a price adjustment reduces an item price to a value below zero and should be corrected.
    

*   `adjusted_merchandize_total_tax` (_number (double)_)
    
    The products tax after discounts applying in purchase currency.
    
    Adjusted merchandize prices represent the sum of product prices before services such as shipping have been added, but after adjustment from promotions have been added.
    
*   `adjusted_shipping_total_tax` (_number (double)_) The tax of all shipping line items of the line item container after shipping adjustments have been applied.
*   `agent_basket` (_boolean_) Is the basket created by an agent?
*   `basket_id` (_string_) The unique identifier for the basket.
*   `billing_address` (_order\_address_) The billing address. This property is part of basket checkout information only.
*   `bonus_discount_line_items` (_array of bonus\_discount\_line\_item_) The bonus discount line items of the line item container.
*   `channel_type` (_string_, read-only)
    
    The sales channel for the order.
    
    This is a read-only attribute that can't be modified by an OCAPI call. For OCAPI, the sales channel is determined based on the client ID and token used for the OCAPI call. Usually, a customer-based authentication sets the channel to Storefront, and an agent-based authentication sets it to CallCenter. Using applications that use other client IDs for OCAPI calls, like Customer Service Center, will set different channel types. To modify the channel type in OCAPI, use a hook. \*
    
      
    Allowed values: `storefront`, `callcenter`, `marketplace`, `dss`, `store`, `pinterest`, `twitter`, `facebookads`, `subscriptions`, `onlinereservation`, `customerservicecenter`, `instagramcommerce`, `google`, `tiktok`, `snapchat`, `youtube`, `whatsapp`.
*   `coupon_items` (_array of coupon\_item_) The sorted array of coupon items. This array can be empty.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `currency` (_string_) The ISO 4217 mnemonic code of the currency.
*   `customer_info` (_customer\_info_) The customer information for logged in customers. This property is part of basket checkout information only.
*   `gift_certificate_items` (_array of gift\_certificate\_item_) The sorted array of gift certificate line items. This array can be empty.
*   `grouped_tax_items` (_array of grouped\_tax_) Tax values that are summed and grouped based on the tax rate. The tax totals of the line items with the same tax rate will be grouped together and summed up. This will not affect calculation in any way.
*   `inventory_reservation_expiry` (_string (date-time)_)
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `merchandize_total_tax` (_number (double)_)
    
    The products total tax in purchase currency.
    
    Merchandize total prices represent the sum of product prices before services such as shipping or adjustment from promotions have been added.
    
*   `notes` (_simple\_link_) The notes for the line item container.
*   `order_price_adjustments` (_array of price\_adjustment_) The array of order level price adjustments. This array can be empty.
*   `order_total` (_number (double)_) The total price of the order, including products, shipping and tax. This property is part of basket checkout information only.
*   `payment_instruments` (_array of order\_payment\_instrument_) The payment instruments list for the order.
*   `product_items` (_array of product\_item_) The sorted array of product items (up to a maximum of 50 items by default). This array can be empty.
*   `product_sub_total` (_number (double)_) The total price of all product items after all product discounts. Depending on taxation policy the returned price is net or gross.
*   `product_total` (_number (double)_) The total price of all product items after all product and order discounts. Depending on taxation policy the returned price is net or gross.
*   `shipments` (_array of shipment_) The array of shipments. This property is part of basket checkout information only.
*   `shipping_items` (_array of shipping\_item_) The sorted array of shipping items. This array can be empty.
*   `shipping_total` (_number (double)_)
    
    The total shipping price of the order after all shipping discounts. Excludes tax if taxation policy is net. Includes tax if taxation policy is gross. This property is part of basket checkout information only.
    
    ```
         Includes tax if taxation policy is gross.
    ```
    
*   `shipping_total_tax` (_number (double)_) The tax of all shipping line items of the line item container before shipping adjustments have been applied.
*   `source_code` (_string_) Gets the source code assigned to this basket.
*   `tax_rounded_at_group` (_boolean_) If the tax is rounded at group level then this is set to true, false if the tax is rounded at item or unit level
*   `tax_total` (_number (double)_) The total tax amount of the order. This property is part of basket checkout information only.
*   `taxation` (_string_) The taxation the line item container is based on.  
    Allowed values: `gross`, `net`.
*   `temporary_basket` (_boolean_) Is the basket created a temporary basket?

_Example_

```
{
  "basket_id": "bczFTaOjgEqUkaaadkvHwbgrP5",
  "currency": "USD",
  "customer_info": {
    "customer_id": "adNJrbxJovaT5DPxUSfOywk6Et",
    "email": ""
  },
  "order_total": 0,
  "product_sub_total": 0,
  "product_total": 0,
  "shipments": [
    {
      "id": "me",
      "shipment_id": "bc5OTaOjgEqUoaaadkvHwbgrP5"
    }
  ],
  "shipping_items": [
    {
      "item_id": "bcwsbaOjgEqUsaaadkvHwbgrP5",
      "shipment_id": "me"
    }
  ],
  "shipping_total": 0,
  "shipping_total_tax": 0,
  "tax_total": 0,
  "taxation": "net"
}
```

### 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.

### basket\_reference

Reference to a basket.

*   `basket_id` (_string_, required) The unique identifier for the basket.
*   `customer_id` (_string_, required) The unique identifier for the customer.  
    Maximum length: 100.

_Example_

```
{
  "basket_id": "tczFTaOjgEqUkacedkvHwbgrP3",
  "customer_id": "dlNJrbxJovaT5TPxUSfOywk6as"
}
```

### approaching\_discount\_result

A result of a approaching discount request.

*   `approaching_discounts` (_array of approaching\_discount_) Lists approaching discounts.

_Example_

```
{
  "approaching_discounts": [
    {
      "_type": "approaching_discount",
      "condition_threshold": 100,
      "type": "order"
    }
  ]
}
```

### order\_address

Document representing an order address.

*   `address1` (_string_) The first address.
*   `address2` (_string_) The second address.
*   `city` (_string_) The city.
*   `company_name` (_string_) The company name.
*   `country_code` (_string_) The two-letter ISO 3166-1 (Alpha-2) country code.  
    Allowed values: `CA`, `DE`, `US`. Value meanings: `CA`: Canada; `DE`: Germany; `US`: United States.
*   `first_name` (_string_) The first name.
*   `full_name` (_string_) The full name.
*   `id` (_string_) Id used to identify this address
*   `job_title` (_string_) The job title.
*   `last_name` (_string_) The last name.
*   `phone` (_string_) The phone number.
*   `post_box` (_string_) The post box.
*   `postal_code` (_string_) The postal code.
*   `salutation` (_string_) The salutation.
*   `second_name` (_string_) The second name.
*   `state_code` (_string_) The state code.
*   `suffix` (_string_) The suffix.
*   `suite` (_string_) The suite.
*   `title` (_string_) The title.

_Example_

```
{
  "city": "Boston",
  "country_code": "US",
  "first_name": "John",
  "last_name": "Smith"
}
```

### coupon\_item

Document representing a coupon item.

*   `code` (_string_, required) The coupon code.  
    Maximum length: 256.
*   `coupon_item_id` (_string_) The coupon item id.
*   `status_code` (_string_) The status of the coupon item.  
    Allowed values: `coupon_code_already_in_basket`, `coupon_code_already_redeemed`, `coupon_code_unknown`, `coupon_disabled`, `redemption_limit_exceeded`, `customer_redemption_limit_exceeded`, `timeframe_redemption_limit_exceeded`, `no_active_promotion`, `coupon_already_in_basket`, `no_applicable_promotion`, `applied`, `adhoc`.
*   `valid` (_boolean_) A flag indicating whether the coupon item is valid. A coupon line item is valid if the status code is 'applied' or 'no\_applicable\_promotion'.

_Example_

```
{
  "code": "the99coupon"
}
```

### customer\_info

Document representing information used to identify a customer.

*   `customer_id` (_string_) The customer's number (id).  
    Maximum length: 100.
*   `customer_name` (_string_)
*   `customer_no` (_string_) The customer's number (id).  
    Maximum length: 100.
*   `email` (_string (email)_, required) The customer's email address.

_Example_

```
{
  "customer_no": "customer0012",
  "email": "valid@email.com"
}
```

### gift\_certificate\_item

A gift certificate item.

*   `amount` (_number (double)_, required) The certificate item amount.
*   `gift_certificate_item_id` (_string_) Id used to identify this item
*   `message` (_string_) The certificate's message.  
    Maximum length: 4000.
*   `recipient_email` (_string_, required) The recipient's email.  
    Minimum length: 1.
*   `recipient_name` (_string_) The recipient's name.
*   `sender_name` (_string_) The sender's name.
*   `shipment_id` (_string_) The shipment id.

_Example_

```
{
  "amount": 200,
  "message": "Present from your brother",
  "recipient_email": "peter@example.com",
  "recipient_name": "Peter Doe",
  "sender_name": "John Doe"
}
```

### product\_item

Document representing a product item.

*   `adjusted_tax` (_number (double)_) The tax of the product item after adjustments applying.
*   `base_price` (_number (double)_) The base price for the line item, which is the price of the unit before applying adjustments, in the purchase currency. The base price may be net or gross of tax depending on the configured taxation policy.
*   `bonus_discount_line_item_id` (_string_) The id of the bonus discount line item this bonus product relates to.
*   `bonus_product_line_item` (_boolean_) A flag indicating whether the product item is a bonus.
*   `bundled_product_items` (_array of product\_item_) The array of bundled product items. Can be empty.
*   `gift` (_boolean_) Returns true if the item is a gift.
*   `gift_message` (_string_) The gift message.
*   `inventory_id` (_string_) The inventory list id associated with this item.  
    Maximum length: 256.
*   `item_id` (_string_) The item identifier. Use this to identify an item when updating the item quantity or creating a custom price adjustment for an item.
*   `item_text` (_string_) The text describing the item in more detail.
*   `option_items` (_array of option\_item_) The array of option items. This array can be empty.
*   `price` (_number (double)_) The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned.
*   `price_adjustments` (_array of price\_adjustment_) Array of price adjustments. Can be empty.
*   `price_after_item_discount` (_number (double)_) The price of the product line item after applying all product-level adjustments. For net pricing the adjusted net price is returned. For gross pricing, the adjusted gross price is returned.
*   `price_after_order_discount` (_number (double)_) The price of this product line item after considering all dependent price adjustments and prorating all order-level price adjustments. For net pricing the net price is returned. For gross pricing, the gross price is returned.
*   `product_id` (_string_) The id (SKU) of the product.  
    Maximum length: 100.
*   `product_list_item` (_product\_list\_item\_reference_)
*   `product_name` (_string_) The name of the product.
*   `quantity` (_number (double)_, required) The quantity of the products represented by this item.  
    Minimum: 0.
*   `shipment_id` (_string_) The id of the shipment which includes the product item.
*   `shipping_item_id` (_string_) The reference to the related shipping item if it exists. This is the case if for example when a surcharge is defined for individual products using a particular a shipping method.
*   `tax` (_number (double)_) The tax of the product item before adjustments applying.
*   `tax_basis` (_number (double)_)
    
    The price used to calculate the tax for this product item.
    
    ```
         null if tax has not been set for this product item yet
    ```
    
*   `tax_class_id` (_string_)
    
    The tax class ID for the product item or null if no tax class ID is associated with the product item.
    
    if no tax class ID is associated with the product item
    
*   `tax_rate` (_number (double)_) The tax rate, which is the decimal tax rate to be applied to the product represented by this item.

_Example_

```
{
  "adjusted_tax": 5,
  "base_price": 16.49,
  "bonus_product_line_item": false,
  "item_id": "cdHBEiWbNV9ZcaaadhrCk35gtp",
  "item_text": "Simple Product",
  "price": 16.49,
  "price_after_item_discount": 16.49,
  "price_after_order_discount": 1,
  "product_id": "SimpleProduct",
  "product_name": "Simple Product",
  "quantity": 1,
  "tax": 5,
  "tax_basis": 16.49,
  "tax_class_id": null,
  "tax_rate": 0.05,
  "c_strValue": "Test"
}
```

### notes\_result

A result of a note request.

Contains notes for an object - for example, for a basket.

*   `notes` (_array of note_) The notes for an object.

_Example_

```
{
  "notes": [
    {
      "subject": "Unhappy customer",
      "text": "The customer was not very happy due to a delay."
    },
    {
      "subject": "Happy customer",
      "text": "The customer is already happy!"
    }
  ]
}
```

### note

Document representing a note to an object.

*   `created_by` (_string_) The author of the note.
*   `creation_date` (_string (date-time)_) The creation date of the note.
*   `id` (_string_) The ID of the note.
*   `subject` (_string_) The note's subject.  
    Maximum length: 256.
*   `text` (_string_) The note's text.  
    Maximum length: 4000.

_Example_

```
{
  "subject": "this is an example subject",
  "text": "This is a note because the customer was not very happy."
}
```

### basket\_payment\_instrument\_request

Document representing a basket payment instrument request.

*   `amount` (_number (double)_) The payment transaction amount.
*   `bank_routing_number` (_string_) The bank routing number.  
    Maximum length: 256.
*   `customer_payment_instrument_id` (_string_) The id of a customer payment instrument.
*   `gift_certificate_code` (_string_) The gift certificate code.  
    Maximum length: 256.
*   `payment_bank_account` (_payment\_bank\_account\_request_) The payment bank account request data.
*   `payment_card` (_order\_payment\_card\_request_) The payment card.
*   `payment_method_id` (_string_) The payment method id. Optional if a customer payment instrument id is specified.  
    Maximum length: 256.

_Example_

```
{
  "amount": 1,
  "payment_card": {
    "card_type": "Visa",
    "expiration_month": 1,
    "expiration_year": 2021,
    "holder": "John Doe",
    "number": "411111111111111",
    "security_code": "121"
  },
  "payment_method_id": "CREDIT_CARD"
}
```

### payment\_method\_result

Result document of payment methods applicable for a basket.

*   `applicable_payment_methods` (_array of payment\_method_) The applicable payment methods.

_Example_

```
{
  "applicable_payment_methods": [
    {
      "id": "BANK_TRANSFER",
      "name": "Bank Transfer"
    },
    {
      "cards": [
        {
          "card_type": "Visa",
          "checksum_verification_enabled": true,
          "id": "CREDIT_CARD.Visa",
          "name": "Visa",
          "number_lengths": [
            "13",
            "16"
          ],
          "number_prefixes": [
            "4"
          ],
          "security_code_length": 3
        },
        {
          "card_type": "Master",
          "checksum_verification_enabled": true,
          "id": "CREDIT_CARD.Master",
          "name": "Mastercard",
          "number_lengths": [
            "16"
          ],
          "number_prefixes": [
            "2221-2720",
            "51-55"
          ],
          "security_code_length": 3
        },
        {
          "card_type": "Amex",
          "checksum_verification_enabled": true,
          "id": "CREDIT_CARD.Amex",
          "name": "American Express",
          "number_lengths": [
            "15"
          ],
          "number_prefixes": [
            "34",
            "37"
          ],
          "security_code_length": 4
        }
      ],
      "id": "CREDIT_CARD",
      "name": "Credit Card",
      "c_somestring": "PaymentMethod String Value"
    },
    {
      "description": "A conditional payment method on customer group 'Unregistered'.",
      "id": "OCAPI_Payment_Unregistered",
      "image": "https://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites/default/v1426675691129/office.jpg",
      "name": "OCAPI Payment (Unregistered)"
    },
    {
      "description": "A conditional payment method on country 'DE'.",
      "id": "OCAPI_Payment_DE",
      "image": "https://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites/default/v1426675691129/office.jpg",
      "name": "OCAPI Payment (DE)"
    },
    {
      "description": "A simple payment method without any conditions.",
      "id": "OCAPI_Payment_Simple",
      "image": "https://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites/default/v1426675691129/office.jpg",
      "name": "OCAPI Payment (Simple)"
    }
  ]
}
```

### price\_adjustment\_request

Document representing a price adjustment request.

Use the `level` and `item_id` properties to specify where you want the price adjustment to be added:

*   If you specify **order** as the level, you do not have to specify an `item_id` . This indicates that the price adjustment should be added directly to basket.
    
*   If you specify **product** as the level, the `item_id` that you specify is the `item_id` of the product item. This indicates that the price adjustment should be added to the product item.
    
*   If you specify **shipping** as the level, `item_id` that you specify is the `item_id` of the shipping item. This indicates that the price adjustment is added to the shipping item.
    

You can use the `item_text` and `reason_code` properties to describe the price adjustment.

The `promotion_id` property is optional. If you do not specify an id, one is automatically assigned (in the format 'dw.manual\[n\]', where \[n\] is 1, 2, 3...). If you specify an id, make sure that it is not already used for a price adjustment in the basket or for a promotion in the promotion engine.

You need to specify the value of the price adjustment by defining a `discount` from which the price adjustment is calculated. The discount definition consists of a `type` and a `value` .

The type **amount** describes a (unit) price discount, and its corresponding `value` (positive) defines the amount each unit is to be reduced. For example, for a $10 discount:

`{ "discount" : {"type" : "amount", "value" : 10.00 }, ... }`

The type **percentage** describes a percentage discount, and its corresponding `value` (positive) defines the percentage reduction. For example, for a 5% discount:

`{ "discount" : {"type" : "percentage", "value" : 5 }, ... }` The type **fixed\_price** describes a fixed price discount, and its corresponding `value` (positive) defines the resulting fixed price for the item. Only one **fixed\_price** discount can be set for each item. For example, to fix a $15 price for the item:

`{ "discount" : {"type" : "fixed_price", "value" : 15.00 }, ... }`

The type **fixed\_price** is not applicable at the **order** level.

*   `discount` (_discount\_request_) A discount that you can specify instead of a `price`. When defining a discount, you must specify a `type` and a `value`.
*   `item_id` (_string_) The item to which the price adjustment should be added, depending on the specified level. If the level is 'order', you need not specify an item id. If 'shipping', specify the uuid of the shipping item. If 'product', specify the uuid of the product item.
*   `item_text` (_string_) The text describing the item in more detail.
*   `level` (_string_, required) The level at which the adjustment is applied. When a product or shipping level is specified, you must also specify the item id.  
    Allowed values: `product`, `shipping`, `order`.
*   `promotion_id` (_string_) The id of the related promotion. Custom price adjustments can be assigned any promotion id so long it is not used by a price adjustment belonging to the same item and is not used by promotion defined in the promotion engine. If not specified, a promotion id is generated.
*   `reason_code` (_string_) The reason why this price adjustment was made.  
    Allowed values: `BACKORDER`, `EVEN_EXCHANGE`, `PRICE_MATCH`. Value meanings: `BACKORDER`: Backorder; `EVEN_EXCHANGE`: Even Exchange; `PRICE_MATCH`: Price Match.

_Example_

```
{
  "discount": {
    "type": "percentage",
    "value": 5
  },
  "item_text": "MyOrderAdjustment",
  "level": "order",
  "promotion_id": "manual adjustment"
}
```

### price\_adjustment

Document representing a price adjustment within a basket or order. Price adjustments can be assigned at the order, product, or shipping level. They can be created by the promotion engine (if the custom flag is set to false) or can be added by custom logic (if the custom flag is set to true). For custom price adjustments created by a user, the manual flag should be set to true; this is always the case for price adjustments created using OCAPI.

A price adjustment created by custom logic can either define a price that defines the absolute price reduction or define a discount from which a price reduction is calculated (amount, percentage, and fixed\_price discounts are supported). The applied\_discount property describes the discount applied to create the price-adjustment.

*   `applied_discount` (_discount_) A price adjustment that provides details of the discount that was applied. This is `null` for custom price adjustments created without discount details.
*   `coupon_code` (_string_) The coupon code that triggered the promotion, provided the price adjustment was created as the result of a promotion being triggered by a coupon.
*   `created_by` (_string_) The user who created the price adjustment.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `custom` (_boolean_) A flag indicating whether this price adjustment was created by custom logic. This flag is set to true unless the price adjustment was created by the promotion engine.
*   `item_text` (_string_) The text describing the item in more detail.
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `manual` (_boolean_)
    
    A flag indicating whether this price adjustment was created in a manual process.
    
    For custom price adjustments created using the shop API, this _always_ returns `true`. Using the scripting API, however, it is possible to set this to `true` or `false`, according to the use case.
    
*   `price` (_number (double)_) The adjustment price.
*   `price_adjustment_id` (_string_) The price adjustment id (uuid).
*   `promotion_id` (_string_) The id of the related promotion. Custom price adjustments can be assigned any promotion id so long it is not used by a price adjustment belonging to the same item and is not used by promotion defined in the promotion engine. If not specified, a promotion id is generated.
*   `promotion_link` (_string_) The URL addressing the related promotion.
*   `reason_code` (_string_) The reason why this price adjustment was made.  
    Allowed values: `BACKORDER`, `EVEN_EXCHANGE`, `PRICE_MATCH`. Value meanings: `BACKORDER`: Backorder; `EVEN_EXCHANGE`: Even Exchange; `PRICE_MATCH`: Price Match.

### shipment

Document representing a shipment.

*   `adjusted_merchandize_total_tax` (_number (double)_)
    
    The products tax after discounts applying in purchase currency. Adjusted merchandize prices represent the sum of product prices before services such as shipping have been added, but after adjustment from promotions have been added.
    
    Note that order level adjustments are considered if Discount Taxation preference is set to "Tax Products and Shipping Only Based on Adjusted Price".
    
*   `adjusted_shipping_total_tax` (_number (double)_) The tax of all shipping line items of the line item container after shipping adjustments have been applied.
*   `gift` (_boolean_) A flag indicating whether the shipment is a gift.
*   `gift_message` (_string_) The gift message.
*   `merchandize_total_tax` (_number (double)_) The products total tax in purchase currency. Merchandize total prices represent the sum of product prices before services such as shipping or adjustment from promotions have been added.
*   `product_sub_total` (_number (double)_) The total price of all product items after all product discounts. Depending on taxation policy the returned price is net or gross.
*   `product_total` (_number (double)_) The total price of all product items after all product and order discounts. Depending on taxation policy the returned price is net or gross.
*   `shipment_id` (_string_) The order specific id to identify the shipment.
*   `shipment_no` (_string_)
    
    Returns the shipment number for this shipment.
    
    This number is automatically generated.
    
*   `shipment_total` (_number (double)_)
    
    The total price of the shipment, including products, shipping and tax.
    
    Note that order level adjustments are not considered.
    
*   `shipping_address` (_order\_address_) The shipping address.
*   `shipping_method` (_shipping\_method_) The shipping method.
*   `shipping_status` (_string_) The shipping status of the shipment.  
    Allowed values: `not_shipped`, `shipped`.
*   `shipping_total` (_number (double)_)
    
    The total shipping price of the shipment after all shipping discounts. Excludes tax if taxation policy is net. Includes tax if taxation policy is gross.
    
    ```
         net. Includes tax if taxation policy is gross.
    ```
    
*   `shipping_total_tax` (_number (double)_) The tax of all shipping line items of the line item container before shipping adjustments have been applied.
*   `tax_total` (_number (double)_)
    
    The total tax amount of the shipment.
    
    Note that order level adjustments are considered if Discount Taxation preference is set to "Tax Products and Shipping Only Based on Adjusted Price".
    
*   `tracking_number` (_string_) The tracking number of the shipment.

_Example_

```
{
  "gift": true,
  "gift_message": "Happy Birthday, Sværre",
  "id": "StandardShipping",
  "shipping_address": {
    "city": "Boston",
    "country_code": "US",
    "first_name": "John",
    "last_name": "Smith"
  },
  "shipping_method": {
    "id": "BaseShippingMethod"
  }
}
```

### shipping\_method

Document representing a shipping method.

*   `description` (_string_) The localized description of the shipping method.
*   `external_shipping_method` (_string_) The external shipping method.
*   `id` (_string_, required) The shipping method id.  
    Maximum length: 256.
*   `name` (_string_) The localized name of the shipping method.
*   `price` (_number (double)_) The shipping cost total, including shipment level costs and product level fix and surcharge costs.
*   `shipping_promotions` (_array of shipping\_promotion_) The array of active customer shipping promotions for this shipping method. This array can be empty.

_Example_

```
{
  "id": "BaseShippingMethod"
}
```

### shipping\_method\_result

Result document containing shipping methods.

*   `applicable_shipping_methods` (_array of shipping\_method_) The applicable shipping method documents.
*   `default_shipping_method_id` (_string_) The default shipping method.

_Example_

```
{
  "applicable_shipping_methods": [
    {
      "description": "The default shipping method.",
      "id": "DefaultShippingMethod",
      "name": "Default Shipping Method",
      "price": 5.55
    },
    {
      "description": "The base shipping method.",
      "id": "BaseShippingMethod",
      "name": "Base Shipping Method",
      "price": 0.99
    },
    {
      "description": "A shipping method that contains product level shipping costs.",
      "id": "ProductLevelShippingCostsShippingMethod",
      "name": "Product Level Shipping Costs Shipping Method",
      "price": 0.1
    }
  ],
  "default_shipping_method_id": "DefaultShippingMethod"
}
```

### bonus\_discount\_line\_item

Document representing a bonus discount line item

*   `bonus_products` (_array of product\_details\_link_) The list of links to the bonus products the customer can choose from.
*   `coupon_code` (_string_) The coupon code that triggered the promotion, if applicable.
*   `id` (_string_) The ID of the line item.
*   `max_bonus_items` (_integer (int32)_) The maximum number of bonus items the user can select for this promotion.
*   `promotion_id` (_string_) The ID of the promotion which triggered the creation of the line item.

### grouped\_tax

Document representing a tax rate with it's summed up tax values

*   `tax_rate` (_number (double)_) The tax rate
*   `tax_value` (_number (double)_) The summed up tax total for the tax rate

### simple\_link

Document representing a link to another resource.

*   `link` (_string_) The link to the resource.

_Example_

```
{
  "link": "https://example.com/dw/shop/{version}/orders/bc0KwiWexX0ZQaaadqRTwMZFga/notes"
}
```

### order\_payment\_instrument

Document representing an order payment instrument.

*   `amount` (_number (double)_) The payment transaction amount.
*   `authorization_status` (_status_) The authorization status of the payment transaction.
*   `bank_routing_number` (_string_) The bank routing number.  
    Maximum length: 256.
*   `masked_gift_certificate_code` (_string_) The masked gift certificate code.
*   `payment_bank_account` (_payment\_bank\_account_) The payment bank account.
*   `payment_card` (_payment\_card_) The payment card.
*   `payment_instrument_id` (_string_) The payment instrument ID.
*   `payment_method_id` (_string_) The payment method id. Optional if a customer payment instrument id is specified.  
    Maximum length: 256.

_Example_

```
{
  "amount": 1,
  "payment_card": {
    "card_type": "Visa",
    "credit_card_expired": false,
    "expiration_month": 1,
    "expiration_year": 2021,
    "holder": "John Doe",
    "masked_number": "***********1111",
    "number_last_digits": "1111"
  },
  "payment_instrument_id": "ceDUYiWbN1IkkaaadkYHRkclwC",
  "payment_method_id": "CREDIT_CARD",
  "c_strValue": "any custom value"
}
```

### shipping\_item

Document representing a shipping item.

*   `adjusted_tax` (_number (double)_) The tax of the product item after adjustments applying.
*   `base_price` (_number (double)_) The base price for the line item, which is the price of the unit before applying adjustments, in the purchase currency. The base price may be net or gross of tax depending on the configured taxation policy.
*   `item_id` (_string_) The item identifier. Use this to identify an item when updating the item quantity or creating a custom price adjustment for an item.
*   `item_text` (_string_) The text describing the item in more detail.
*   `price` (_number (double)_) The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned.
*   `price_adjustments` (_array of price\_adjustment_) Array of price adjustments. Can be empty.
*   `price_after_item_discount` (_number (double)_) The price of the product line item after applying all product-level adjustments. For net pricing the adjusted net price is returned. For gross pricing, the adjusted gross price is returned.
*   `shipment_id` (_string_) The identifier of the shipment to which this item belongs.
*   `tax` (_number (double)_) The tax of the product item before adjustments applying.
*   `tax_basis` (_number (double)_)
    
    The price used to calculate the tax for this product item.
    
    ```
         null if tax has not been set for this product item yet
    ```
    
*   `tax_class_id` (_string_)
    
    The tax class ID for the product item or null if no tax class ID is associated with the product item.
    
    if no tax class ID is associated with the product item
    
*   `tax_rate` (_number (double)_) The tax rate, which is the decimal tax rate to be applied to the product represented by this item.

_Example_

```
{
  "adjusted_tax": 0,
  "base_price": 0.01,
  "item_id": "devgoiWbNVc92aaadhrSk35gtp",
  "item_text": "Shipping",
  "price": 0.01,
  "price_after_item_discount": 0.01,
  "shipment_id": "me",
  "tax": 0,
  "tax_basis": 0.01,
  "tax_class_id": "DefaultTaxClass",
  "tax_rate": 0.05
}
```

### cause

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

### approaching\_discount

Document representing a note to an object.

*   `condition_threshold` (_number (double)_) The total amount needed to receive the discount.
*   `discount` (_discount_) The discount the customer can receive if eligible.
*   `merchandise_total` (_number (double)_) The amount the customer basket contributes towards the purchase condition.
*   `promotion_link` (_promotion\_link_) The link to details of the promotion associated with this discount.
*   `shipment_id` (_string_) The unique id of the shipment the discount relates to.
*   `shipping_methods` (_array of shipping\_method_) The shipping methods the promotion relates to.
*   `type` (_string_) The type of the approaching discount ("order" or "shipping").

_Example_

```
{
  "condition_threshold": 100,
  "type": "order"
}
```

### option\_item

Document representing an option item.

*   `adjusted_tax` (_number (double)_) The tax of the product item after adjustments applying.
*   `base_price` (_number (double)_) The base price for the line item, which is the price of the unit before applying adjustments, in the purchase currency. The base price may be net or gross of tax depending on the configured taxation policy.
*   `bonus_discount_line_item_id` (_string_) The id of the bonus discount line item this bonus product relates to.
*   `bonus_product_line_item` (_boolean_) A flag indicating whether the product item is a bonus.
*   `bundled_product_items` (_array of product\_item_) The array of bundled product items. Can be empty.
*   `gift` (_boolean_) Returns true if the item is a gift.
*   `gift_message` (_string_) The gift message.
*   `inventory_id` (_string_) The inventory list id associated with this item.  
    Maximum length: 256.
*   `item_id` (_string_) The item identifier. Use this to identify an item when updating the item quantity or creating a custom price adjustment for an item.
*   `item_text` (_string_) The text describing the item in more detail.
*   `option_id` (_string_, required) The id of the option.  
    Maximum length: 256.
*   `option_items` (_array of option\_item_) The array of option items. This array can be empty.
*   `option_value_id` (_string_, required) The id of the option value.  
    Maximum length: 256.
*   `price` (_number (double)_) The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned.
*   `price_adjustments` (_array of price\_adjustment_) Array of price adjustments. Can be empty.
*   `price_after_item_discount` (_number (double)_) The price of the product line item after applying all product-level adjustments. For net pricing the adjusted net price is returned. For gross pricing, the adjusted gross price is returned.
*   `price_after_order_discount` (_number (double)_) The price of this product line item after considering all dependent price adjustments and prorating all order-level price adjustments. For net pricing the net price is returned. For gross pricing, the gross price is returned.
*   `product_id` (_string_) The id (SKU) of the product.  
    Maximum length: 100.
*   `product_list_item` (_product\_list\_item\_reference_)
*   `product_name` (_string_) The name of the product.
*   `quantity` (_number (double)_) The quantity of the products represented by this item.  
    Minimum: 0.
*   `shipment_id` (_string_) The id of the shipment which includes the product item.
*   `shipping_item_id` (_string_) The reference to the related shipping item if it exists. This is the case if for example when a surcharge is defined for individual products using a particular a shipping method.
*   `tax` (_number (double)_) The tax of the product item before adjustments applying.
*   `tax_basis` (_number (double)_)
    
    The price used to calculate the tax for this product item.
    
    ```
         null if tax has not been set for this product item yet
    ```
    
*   `tax_class_id` (_string_)
    
    The tax class ID for the product item or null if no tax class ID is associated with the product item.
    
    if no tax class ID is associated with the product item
    
*   `tax_rate` (_number (double)_) The tax rate, which is the decimal tax rate to be applied to the product represented by this item.

_Example_

```
{
  "option_id": "Warranty",
  "option_value_id": "oneYear"
}
```

### product\_list\_item\_reference

*   `id` (_string_, required) The id of the product list item.
*   `priority` (_integer (int32)_)
*   `product_details_link` (_product\_details\_link_)
*   `product_list` (_product\_list\_link_) The link of the product list, the item is assigned
*   `public` (_boolean_)
*   `purchased_quantity` (_number (double)_)
*   `quantity` (_number (double)_)  
    Minimum: 0.
*   `type` (_string_)  
    Allowed values: `product`, `gift_certificate`.

### payment\_bank\_account\_request

Document representing a payment bank account request.

*   `drivers_license` (_string_) The drivers license.  
    Maximum length: 256.
*   `drivers_license_state_code` (_string_) The driver license state code.  
    Maximum length: 256.
*   `holder` (_string_) The holder of the bank account.  
    Maximum length: 256.
*   `number` (_string_) The payment bank account number.  
    Maximum length: 256.

### order\_payment\_card\_request

Document representing an order payment card request.

*   `card_type` (_string_) The payment card type (for example, 'Visa').  
    Maximum length: 256.
*   `credit_card_expired` (_boolean_) A flag indicating if the credit card is expired.
*   `credit_card_token` (_string_) A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data at the token store.
*   `expiration_month` (_integer (int32)_) The month when the payment card expires.
*   `expiration_year` (_integer (int32)_) The year when the payment card expires.
*   `holder` (_string_) The payment card holder.  
    Maximum length: 256.
*   `issue_number` (_string_) The payment card issue number.  
    Maximum length: 256.
*   `number` (_string_) The payment card number.  
    Maximum length: 4000.
*   `security_code` (_string_) The security code for the payment card.  
    Maximum length: 4.
*   `valid_from_month` (_integer (int32)_) The payment card valid from month.  
    Minimum: 1. Maximum: 12.
*   `valid_from_year` (_integer (int32)_) The payment card valid from year.

### payment\_method

Document representing a payment method.

*   `cards` (_array of payment\_card\_spec_) The sorted array of payment cards (included only when the system payment method is CREDIT\_CARD).
*   `description` (_string_) The localized description of the payment method or card.
*   `id` (_string_, required) The id of the payment method or card.  
    Maximum length: 256.
*   `image` (_string_) The URL to the image that represents the payment method or card.
*   `name` (_string_) The localized name of the payment method or card.
*   `payment_processor_id` (_string_) The payment processor ID.

_Example_

```
{
  "cards": [
    {
      "card_type": "Visa",
      "checksum_verification_enabled": true,
      "id": "CREDIT_CARD.Visa",
      "name": "Visa",
      "number_lengths": [
        "13",
        "16"
      ],
      "number_prefixes": [
        "4"
      ],
      "security_code_length": 3
    },
    {
      "card_type": "Master",
      "checksum_verification_enabled": true,
      "id": "CREDIT_CARD.Master",
      "name": "Mastercard",
      "number_lengths": [
        "16"
      ],
      "number_prefixes": [
        "2221-2720",
        "51-55"
      ],
      "security_code_length": 3
    },
    {
      "card_type": "Amex",
      "checksum_verification_enabled": true,
      "id": "CREDIT_CARD.Amex",
      "name": "American Express",
      "number_lengths": [
        "15"
      ],
      "number_prefixes": [
        "34",
        "37"
      ],
      "security_code_length": 4
    }
  ],
  "id": "CREDIT_CARD",
  "name": "Credit Card",
  "c_somestring": "PaymentMethod String Value"
}
```

### discount\_request

Document representing a discount to be applied to a custom price adjustment. The properties `type` and `value` are mandatory.

The type amount describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced. For example, for a $10 discount:

{ "discount" : {"type" : "amount", "value" : 10.00 }, ... }

The type percentage describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. For example, for a 5% discount:

{ "discount" : {"type" : "percentage", "value" : 5 }, ... }

The type fixed\_price describes a fixed price discount, and its corresponding value (positive) defines the resulting fixed price for the item. Only one fixed\_price discount can be set for each item. For example, to set a fixed price of $15 for the item:

{ "discount" : {"type" : "fixed\_price", "value" : 15.00 }, ... }

The type `fixed_price` is not supported at the order level.

*   `type` (_string_, required) The type of discount.  
    Allowed values: `percentage`, `fixed_price`, `amount`.
*   `value` (_number (double)_, required) The amount of the discount.

### discount

Document representing a discount that was _either_ optionally applied when creating a custom price adjustment _or_ applied by the promotion engine. The property `type` is mandatory; the properties `amount` and `priceBookId` are used only in association with specific types. Some examples:

*   Type `percentage` with percentage `15.00` : a 15% discount was applied.
    
*   Type `amount` with amount `5.99` : a discount was applied to reduce the (unit) price by 5.99.
    
*   Type `fixed_price` with amount `49.99` : a discount was applied to reduce the price to 49.99.
    
*   Type `free` : a discount was applied to reduce the price to zero.
    
*   Type `price_book_price` with price\_book\_id `MyPriceBook` : a discount was applied to set the price to that defined in MyPriceBook.
    

*   `amount` (_number (double)_) The amount that is used with the amount and fixed price types.
*   `percentage` (_number (double)_) The percentage that is used with percentage types.
*   `price_book_id` (_string_) The price book id that is used with some types.
*   `type` (_string_, required) The type of discount.  
    Allowed values: `percentage`, `fixed_price`, `amount`, `free`, `price_book_price`, `bonus`, `total_fixed_price`, `bonus_choice`, `percentage_off_options`.

_Example_

```
{
  "amount": 15,
  "type": "amount"
}
```

### shipping\_promotion

Document representing a shipping promotion.

*   `callout_msg` (_string_) The localized call-out message of the promotion.
*   `link` (_string_) The URL addressing the promotion.
*   `promotion_id` (_string_) The unique id of the promotion.
*   `promotion_name` (_string_) The localized promotion name.

### product\_details\_link

Document representing a link to the resource for product details.

*   `link` (_string_) The target of the link.
*   `product_description` (_string_) The description of the product.
*   `product_id` (_string_, required) The id of the product.
*   `product_name` (_string_) The name of the product.
*   `title` (_string_) The link title.

_Example_

```
{
  "link": "https://example.com/dw/shop/{version}/products/BlueJeansType1",
  "product_id": "BlueJeansType1",
  "product_name": "Product w/- Local Option",
  "title": "Product w/- Local Option"
}
```

### status

Document representing a status of an object.

*   `code` (_string_) The status code.
*   `message` (_string_) The status message.
*   `status` (_integer (int32)_)
    
    The status.
    
    For more information on the status values see dw.system.Status.OK and dw.system.Status.ERROR.
    

### payment\_bank\_account

Document representing a payment bank account.

*   `drivers_license_last_digits` (_string_) The last 4 characters of the decrypted driver's license number of the bank account associated with this payment instrument.  
    Maximum length: 256.
*   `drivers_license_state_code` (_string_) The driver license state code.  
    Maximum length: 256.
*   `holder` (_string_) The holder of the bank account.  
    Maximum length: 256.
*   `masked_drivers_license` (_string_)
    
    The decrypted driver's license number of the bank account with all but the last 4 characters replaced with a '\*' character.
    
    ```
         with a '*' character.
    ```
    
      
    Maximum length: 256.
*   `masked_number` (_string_) The bank account masked number.  
    Maximum length: 256.
*   `number_last_digits` (_string_) The last digits of the bank account number.  
    Maximum length: 256.

_Example_

```
{
  "drivers_license_last_digits": "ense",
  "drivers_license_masked": "**************ense",
  "number_last_digits": "mber",
  "number_masked": "*************mber"
}
```

### payment\_card

Document representing a payment card.

*   `card_type` (_string_) The payment card type (for example, 'Visa').  
    Maximum length: 256.
*   `credit_card_expired` (_boolean_) A flag indicating if the credit card is expired.
*   `credit_card_token` (_string_) A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data at the token store.
*   `expiration_month` (_integer (int32)_) The month when the payment card expires.
*   `expiration_year` (_integer (int32)_) The year when the payment card expires.
*   `holder` (_string_) The payment card holder.  
    Maximum length: 256.
*   `issue_number` (_string_) The payment card issue number.  
    Maximum length: 256.
*   `masked_number` (_string_) The masked credit card number.  
    Maximum length: 4000.
*   `number_last_digits` (_string_) The last digits of credit card number.  
    Maximum length: 4000.
*   `valid_from_month` (_integer (int32)_) The payment card valid from month.  
    Minimum: 1. Maximum: 12.
*   `valid_from_year` (_integer (int32)_) The payment card valid from year.

_Example_

```
{
  "card_type": "Visa",
  "credit_card_expired": false,
  "expiration_month": 2,
  "expiration_year": 2022,
  "holder": "John Smith",
  "masked_number": "***********ber2",
  "number_last_digits": "ber2"
}
```

### promotion\_link

Document representing a promotion link.

*   `callout_msg` (_string (html)_) The localized call-out message of the promotion.
*   `link` (_string_)
*   `name` (_string_) The localized name of the promotion.
*   `promotion_id` (_string_) The unique id of the promotion.
*   `title` (_string_)

### product\_list\_link

Document representing a link to a product list.

*   `description` (_string_) The description of this product list.
*   `link` (_string_) The target of the link.
*   `name` (_string_) The name of this product list.
*   `public` (_boolean_) A flag indicating whether the owner made this product list available for access by other customers.
*   `title` (_string_) The link title.
*   `type` (_string_) The type of the product list.  
    Allowed values: `wish_list`, `gift_registry`, `shopping_list`, `custom_1`, `custom_2`, `custom_3`.

### payment\_card\_spec

Document representing the specification for a payment card.

The information in the specification can be used to verify data entered by a customer before sending to the payment authorization. The configuration can be made in the payment methods section in Business Manager.

*   `card_type` (_string_) The type of the payment card.
*   `checksum_verification_enabled` (_boolean_)
    
    A flag indicating whether the card number is verified using the Luhn checksum algorithm.
    
    ```
         <code>false</code>
    ```
    
*   `description` (_string_) The localized description of the payment card.
*   `image` (_string_) The URL to the image that represents the payment card.
*   `name` (_string_) The localized name of the payment card.
*   `number_lengths` (_array of string_) The sorted list of number lengths (individual lengths as well as length ranges).
*   `number_prefixes` (_array of string_) The sorted list of number prefixes (individual prefixes as well as prefix ranges).
*   `security_code_length` (_integer (int32)_) The length of the security code for this card.

_Example_

```
{
  "card_type": "Visa",
  "checksum_verification_enabled": true,
  "id": "CREDIT_CARD.Visa",
  "name": "Visa",
  "number_lengths": [
    "13",
    "16"
  ],
  "number_prefixes": [
    "4"
  ],
  "security_code_length": 3
}
```