diff --git a/apis/shopper-baskets-oas-1.8.24/.metadata.json b/apis/shopper-baskets-oas-1.8.24/.metadata.json new file mode 100644 index 00000000..9a6c0350 --- /dev/null +++ b/apis/shopper-baskets-oas-1.8.24/.metadata.json @@ -0,0 +1,9 @@ +{ + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.8.24", + "name": "Shopper Baskets OAS", + "description": "", + "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", + "assetId": "shopper-baskets-oas", + "version": "1.8.24", + "categories": {} +} diff --git a/apis/shopper-baskets-oas-1.8.24/exchange.json b/apis/shopper-baskets-oas-1.8.24/exchange.json new file mode 100644 index 00000000..8240ce0f --- /dev/null +++ b/apis/shopper-baskets-oas-1.8.24/exchange.json @@ -0,0 +1,12 @@ +{ + "main": "shopper-baskets-oas-v1-public.yaml", + "name": "Shopper Baskets OAS", + "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", + "assetId": "shopper-baskets-oas", + "version": "1.8.24", + "classifier": "oas", + "tags": [], + "descriptorVersion": "1.0.0", + "organizationId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", + "apiVersion": "v1" +} \ No newline at end of file diff --git a/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-internal.yaml b/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-internal.yaml new file mode 100644 index 00000000..f179b4cb --- /dev/null +++ b/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-internal.yaml @@ -0,0 +1,6591 @@ +openapi: 3.0.3 +info: + title: Shopper Baskets + version: v1 + description: |- + # API Overview + + Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout. + + To create a basket, start with the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets?meta=createBasket) endpoint. The endpoint creates the basket in the B2C Commerce system and returns a JSON representation of the basket with a `basketId` property. + + If you provide the JSON for a prepopulated basket to the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets?meta=createBasket) endpoint, you can create a basket using a single API request. + + You can also create a basket and gradually populate it with data using subsequent API requests that reference the same `basketId`. The gradual approach allows you to validate the input data as you go. + + The Shopper Baskets API includes endpoints to populate each part of a basket separately, including: + + - Billing address + - Customer information + - Line items + - Products + - Coupons + - Gift certificates + - Payment methods + - Price books + - Shipments + - Taxation (for items and the basket itself) + + In addition to creating a basket, the main `/baskets` resource offers endpoints to get, transfer, merge, and delete baskets, depending on the HTTP method that you use and the parameters that you supply. These endpoints can you help you handle a variety of complex scenarios, such as when a user starts shopping as a guest and then logs in before checkout. + + You can also use the main `/baskets` resource to add custom properties to your basket, prefixed with `c_` (example: `c_faxNumber`). + + When your basket is fully populated, you can use its `basketId` property to create an order with the [Shopper Orders API](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=Summary). + + For more detail on building baskets, see [Build Baskets and Place Orders](https://developer.salesforce.com/docs/commerce/commerce-api/guide/work-with-baskets-orders.html). + + ## Authentication & Authorization + + The client requesting the basket information must have access to the `/baskets` resource. The Shopper Baskets API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + The following resources require an Account Manager OAuth token with a client ID: + + - `/baskets/{basketId}/taxes` + - `/baskets/{basketId}/items/{itemId}/taxes` + - `/baskets/{basketId}/price-books` + + ## Use Cases + + ### Use Hooks + + For details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + + ## Basket Calculation + + Unless you’re using [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), each modification to a basket triggers the following calculations: + + 1. Calculate product prices: + - Iterate through the product line items and determine the base price of each using its price model. If multiple price books apply to a product, the lowest price is used. + - Calculate product option line item prices using the product option model. + - For bonus products, check dependent adjustments in the basket to determine the price. + 2. Iterate through the gift certificate line items and calculate the price of each by multiplying the base price by the quantity. + 3. Recalculate for all promotions, adding and removing them as appropriate. + 4. Apply product-specific shipping costs. + 5. Calculate the total shipping cost. + 6. Recalculate for all promotions, adding and removing them as appropriate. + 7. Calculate prices for products added by the promotion engine. + 8. Calculate taxes using line item tax class codes. + - For internal tax mode, use the tax tables. + - For external tax mode, use the tax rates returned by the tax API endpoints. + 9. Calculate the order’s net, tax, and gross totals by adding up the line totals. + + ## External Taxation + + The B2C Commerce API calculates taxes internally using tax tables. If you want to integrate with a third-party tax provider, or calculate tax on your own, you can use the external taxation feature to add a taxation rate and optional taxation value. When setting a taxation rate, the taxation is calculated for this specific rate. If you pass a value, this value is used as taxation value, as well, without recalculation. To use this feature, set the `taxMode` parameter to `external` when creating the basket. + + When using external taxation, you must set a tax rate either in one request to the `/baskets/{basketId}/taxes` or with separate requests for each line item, using `/baskets/{basketId}/items/{lineItemId}/taxes`. + + If the tax mode of a basket is set to `external`, a tax item is required for all line items even for zero-tax items to avoid oversights. + + ### External Taxation with Hooks Enabled + + To use external tax calculation with [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), use the following API methods in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + - `dw.order.LineItemCtnr#isExternallyTaxed`: Returns true if the basket was created with `taxMode = external` + - `dw.order.TaxMgr#applyExternalTax`: Applies externally set tax rates to the given basket. Only use when `dw.order.LineItemCtnr#isExternallyTaxed` returns true. + + The following example shows an implementation of external tax calculation with hooks enabled in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + + exports.calculate = function (basket) { + if ( basket.isExternallyTaxed() ) + { + TaxMgr.applyExternalTaxation( basket ); // apply the external tax calculation based on the tax rates set by the SCAPI external taxation APIs + } + else + { + // calculation with tax tables or customization + } + } +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/baskets: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + description: |- + Creates a new basket. + + The created basket is initialized with default values. Optional JSON data provided in the request body is populated into the created basket. It can be updated with other endpoints offered by the Shopper Baskets API. + + Each customer can have just one open basket. When a basket is created, it is said to be open. It remains open until either an order is created from it or it is deleted. + operationId: createBasket + summary: Create a new basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '200': + description: The initialized basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customerId URL parameter does not match the verified customer + represented by the JSON Web Token (JWT). + - a new basket cannot be created because the maximum number + of baskets per customer would be exceeded. + - the same shipment ID appeared twice in the body. + - the coupon number is not provided. + - a fixed price adjustment was added at order level which is disallowed. + - a promotion ID was + used twice, while attempting to add a price adjustment. + - a system promotion + ID was used as a manual promotion ID, while attempting to add a price adjustment. + - more than one hundred price adjustments would have been + created. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: Thrown if the shipment with the given shipment ID is unknown. + content: + application/problem+json: + examples: + ShipmentNotFound: + $ref: '#/components/examples/ShipmentNotFound' + requestBody: + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketPost' + schema: + $ref: '#/components/schemas/Basket' + required: true + parameters: + - $ref: '#/components/parameters/taxMode' + - $ref: '#/components/parameters/locale' + /organizations/{organizationId}/baskets/actions/transfer: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + description: |- + Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. + + A success response contains the transferred basket. + + If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: + - Keep the current shopper's active basket. + - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. + - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + operationId: transferBasket + summary: Transfer an existing basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/overrideExisting' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The transferred basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketTransferException: + $ref: '#/components/examples/BasketTransferException' + /organizations/{organizationId}/baskets/actions/merge: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + operationId: mergeBasket + summary: Merge baskets. + description: |- + Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. + + The following information is merged: + - custom attributes on the basket and on all copied records + - product items + - gift certificate items + - coupon items + - shipments + - ad-hoc price adjustments + + To control the merging of products that exist in both baskets, use the `productItemMergeMode` parameter. By default, the higher of the two basket quantities is used for each product. Products in both baskets are considered to be the same when all of the following values match (if one product doesn't have a value, the other product is a match only if it also doesn't have that value): + - shipment + - productId + - option values + - wishlist reference + - inventory list id + - gift flag & message + - ad-hoc price adjustments + + If any of the listed values don't match, then the item in the previous shopper's basket is copied to a new line item in the current shopper's basket. If the listed values all match, but the matching products have different values for any custom attribute, the merged line item keeps the custom attribute value from the current shopper's basket. + + A success response contains the current shopper's active basket. The previous guest shopper's active basket is deleted. + + If the current shopper doesn't have an active basket, and the createDestinationBasket request parameter is false, then the merge request returns a BasketMergeException (HTTP status 409). You can proceed with one of these options: + - Transfer the previous shopper's active basket to the current logged-in shopper by calling the `baskets/transfer` endpoint. + - Force the merge by calling the `baskets/merge` endpoint again, with the parameter `createDestinationBasket=true`. Forcing the merge creates a new basket for the current shopper and copies information from the previous shopper's basket into it. Because the merge doesn't copy all basket data, a forced merge is not the same as a transfer. For example, the new basket doesn't contain any Personally Identifiable Information (PII) from the previous basket. + + ### before merge + | Previous Shopper's Basket, SKU: Quantity, Custom Attributes | Current Shopper's Basket, SKU: Quantity, Custom Attributes | + |-------------------------------------------------------------|-------------------------------------------------------------| + | SKU_A: 5
SKU_B: 3
SKU_C: 4
c_customAttr_1: 'ABC'
c_customAttr_2: 'DEF' | SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_3: 'XYZ' | + + ### after merge - (previous shopper's basket is deleted) + | productItemMergeMode | Current Shopper's Basket - SKU: Quantity, Custom Attributes | + |----------------------|--------------------------------------------------------------| + | sum_quantities | SKU_A: 7
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | higher_quantity | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | saved_quantity | SKU_A: 2
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | separate_item | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/createDestinationBasket' + - $ref: '#/components/parameters/productItemMergeMode' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The current shopper's active basket, including items merged from the previous shopper's basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has no active basket and the `createDestinationBasket` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketMergeException: + $ref: '#/components/examples/BasketMergeException' + /organizations/{organizationId}/baskets/{basketId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + delete: + description: Removes a basket. + summary: Delete a basket. + operationId: deleteBasket + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '204': + description: Success, without a body. + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + get: + description: Gets a basket. + operationId: getBasket + summary: Retrieve an existing basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the retrieved basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GetBasket: + $ref: '#/components/examples/BasketGet' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + patch: + description: |- + Updates a basket. Only the currency of the basket, source code, the custom + properties of the basket, and the shipping items will be considered. + operationId: updateBasket + summary: Update a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/BasketPatch' + responses: + '200': + description: Success, the response body contains the updated basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/examples-BasketPatch' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the basket cannot be updated because the + requested currency is not supported by the site. + - the given shipping item ID is null or empty. + - a few shipping items with the same item ID are + provided. + - the provided code is not currently active. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipping item with the given item ID is + unknown for the basket. + - the provided code was not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/agent: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Marks a basket as an agent basket. + operationId: updateAsAgentBasket + summary: Designate a basket as an agent basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains basket that is set as an agent basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutAgent: + $ref: '#/components/examples/BasketPutAgent' + '400': + description: Marking this basket as an agent basket would exceed the open agent basket limit for the basket customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/billing-address: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Sets the billing address of a basket. + operationId: updateBillingAddressForBasket + summary: Add a billing address to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/useAsShipping' + - $ref: '#/components/parameters/removeExternalTax' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OrderAddress' + examples: + BillingAddressPut: + $ref: '#/components/examples/BillingAddressPut' + responses: + '200': + description: Success, the response body contains basket with the added billing address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-BillingAddressPut' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/coupons: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + post: + description: Adds a coupon to an existing basket. + operationId: addCouponToBasket + summary: Add a coupon to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CouponItem' + examples: + CouponCodePost: + $ref: '#/components/examples/CouponCodePost' + responses: + '200': + description: Success, the response body contains the basket with the added coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + CouponCodePost: + $ref: '#/components/examples/examples-CouponCodePost' + '400': + description: |- + Possible Reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the coupon number is not provided. + - the coupon code specified is invalid. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/couponItemId' + delete: + description: Removes a coupon from the basket. + operationId: removeCouponFromBasket + summary: Remove a coupon from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + Basket: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the couponItemId URL parameter does not match any + coupon item ID in the basket. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/customer: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Sets customer information for an existing basket. + operationId: updateCustomerForBasket + summary: Add shopper information to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInfo' + examples: + BillingAddressPut: + $ref: '#/components/examples/CustomerPut' + responses: + '200': + description: Success, the response body contains the basket with the added customer information. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-CustomerPut' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the customer cannot be set to the basket because the + max number of baskets per customer would be exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the customer with the given customer number is unknown. + - the basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + post: + description: Adds a gift certificate item to an existing basket. + operationId: addGiftCertificateItemToBasket + summary: Add a gift certificate to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket with the added gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPost: + $ref: '#/components/examples/examples-GiftCertPost' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + requestBody: + content: + application/json: + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPost' + schema: + $ref: '#/components/schemas/GiftCertificateItem' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/giftCertificateItemId' + delete: + description: Deletes a gift certificate item from an existing basket. + operationId: removeGiftCertificateItemFromBasket + summary: Remove a gift certificate from a basket. + parameters: + - $ref: '#/components/parameters/locale' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '200': + description: Success, the response body contains the basket without the deleted gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + patch: + description: Updates a gift certificate item of an existing basket. + operationId: updateGiftCertificateItemInBasket + summary: Update gift certificate information for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket with the updated gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPatch: + $ref: '#/components/examples/examples-GiftCertPatch' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + requestBody: + content: + application/json: + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPatch' + schema: + $ref: '#/components/schemas/GiftCertificateItem' + /organizations/{organizationId}/baskets/{basketId}/items: + post: + responses: + '200': + description: Success, the response body contains the basket with the added items. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given product ID is null or invalid. + - 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. + - a null quantity value. + - the requested product quantity is not available. + - the product cannot be added to the basket because of its type. + - an option with the specified option ID is unknown. + - an option with the specified option value ID is + unknown. + - the maximum allowed number of products added to the basket, + has been exceeded. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the provided bonus discount line item ID is not + present in the current basket. + - 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. + - the selected bonus product is not an applicable product for + the bonus discount line item provided. + body: + application/problem+json: + type: ErrorResponse + examples: + dataTypes.ErrorResponse: !include exchange_modules/893f605e-10e2-423a-bdb4-f952f56eb6d8/checkout-data-types/2.0.6/examples/error/bad-request-example.raml + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the basket does not contain a shipment with the given shipment ID. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + 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: + + - productId: 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. + - shipmentId: 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. + - inventoryId: a valid inventory ID (optional). This is the ID of the inventory from which the item is + allocated. + - bonusDiscountLineItemId: 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. + - optionItems/optionValueId: 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 optionItems + property. These option items must contain optionId and optionValueId. 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_: the custom property must correspond to a custom + attribute () defined for ProductLineItem. The value of this property must be valid for the + type of custom attribute defined for ProductLineItem. + operationId: addItemToBasket + summary: Add an item to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemPost: + $ref: '#/components/examples/ItemPost' + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - no product item with a given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with a specified option ID is unknown. + - an option with a specified option value ID is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: 'Possible reasons: basket not found' + description: "Updates multiple items in a basket. This behaviour matches that of updating a \nsingle item, but the body contains an array of ProductItems to be updated that are identified by `itemId`.\nThe items to update can include bundled product items, although the \nkind of update supported for bundled product items is limited to `productId`, `gift`, `giftMessage`\nand custom properties.\nThe following values in the request body are considered by the server:\n\n- `itemId` (mandatory): identifies an item to be updated.\n- `productId`: a valid product ID. The purpose of this\nvalue is to change the variation of a variation product.\n- `shipmentId`: a valid shipment ID. The purpose of\nthis value is to move a product item to another shipment.\n- `quantity`: a number between 0 and 999. The purpose of\nthis value is to change the quantity of the product item. If the quantity is 0,\nthe product item is removed.\n- `optionItems`/`optionValueId`: a valid option value\nID. The purpose of this value is to exchange an option value for an\noption item of an option product.\nThis is only possible if the product item is an option product. To change\noption values, a collection of the option items to be changed must be\nprovided in the property `optionItems`. Those\n`optionItems` must contain `optionId`\nand `optionValueId`. The provided values must be valid\nfor the option product that this product item represents. Otherwise,\n`InvalidProductOptionItemException` or\n`InvalidProductOptionValueItemException` is thrown.\n- custom properties `c_`: a\nvalue corresponding to the type defined for custom attribute\n`` of the ProductLineItem. The purpose of this value is to\nadd or change the value of a custom attribute defined for the\nProductLineItem.\n- `gift`: a boolean value that specifies whether the item is a gift.\n- `giftMessage`: a message to include with the gift." + operationId: updateItemsInBasket + summary: Update a basket item. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemsPatch: + $ref: '#/components/examples/ItemsPatch' + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a product item from the basket. + operationId: removeItemFromBasket + summary: Remove an item from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ItemPatchSuccess: + $ref: '#/components/examples/examples-ItemPatch' + '400': + description: |- + Possible reasons: + - no product item with given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with the specified option id is unknown. + - an option with the specified option value id is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not. + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - a shipment with it's given ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Possible reasons: + - no product item with given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with the specified option id is unknown. + - an option with the specified option value id is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not. + match the verified customer represented by the JWT token. + operationId: updateItemInBasket + summary: Update an item in a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemPatch: + $ref: '#/components/examples/ItemPatch' + schema: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes: + put: + responses: + '204': + description: Success, without body. + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The item with the given item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: "Possible Reasons:\n- The tax mode of the referenced basket is not set to EXTERNAL. " + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + description: This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for a specific taxable line item. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasketItem + summary: Add taxation information for a basket item. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + BasketItemTaxPut: + $ref: '#/components/examples/BasketItemTaxPut' + schema: + $ref: '#/components/schemas/TaxItems' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments: + post: + responses: + '200': + description: Success, the response body contains the basket with the added payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Adds a payment instrument to a basket. + operationId: addPaymentInstrumentToBasket + summary: Add a payment instrument to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PaymentInstrumentPost: + $ref: '#/components/examples/PaymentInstrumentPost' + schema: + $ref: '#/components/schemas/BasketPaymentInstrumentRequest' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument with the given basket payment + instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a payment instrument of a basket. + operationId: removePaymentInstrumentFromBasket + summary: Remove a payment instrument from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/examples-PaymentInstrumentPatch' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the basket payment intsrument with the given id is already permanently masked. + - The customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument item with the given payment instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Updates payment instrument of an existing basket. + operationId: updatePaymentInstrumentInBasket + summary: Update a payment instrument for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/PaymentInstrumentPatch' + schema: + $ref: '#/components/schemas/OrderPaymentInstrument' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-methods: + get: + responses: + '200': + description: Success, the response body contains the applicable payment methods for the basket. + content: + application/json: + examples: + PaymentMethodsGet: + $ref: '#/components/examples/PaymentMethodsGet' + schema: + $ref: '#/components/schemas/PaymentMethodResult' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Gets applicable payment methods for an existing basket considering the open payment amount only. + operationId: getPaymentMethodsForBasket + summary: Retrieve payment instruments for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments: + post: + responses: + '200': + description: Success, the response body contains the basket with added price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/examples-PriceAdjustmentPost' + '400': + description: |- + Possible reasons: + - a fixed price adjustment was already created for the given level. + - a fixed price adjustment was added at `order` level. + - a promotion ID was used twice. + - a system promotion ID was used as a manual promotion ID. + - more than one hundred price adjustments would have been created. + - the price adjustment limit had exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Adds a custom manual price adjustment to the basket. + operationId: addPriceAdjustmentToBasket + summary: Add a price adjustment to a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/PriceAdjustmentPost' + schema: + $ref: '#/components/schemas/PriceAdjustmentRequest' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: The priceAdjustmentId is missing, empty or whitespace. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a custom manual price adjustment from the basket. + operationId: removePriceAdjustmentFromBasket + summary: Remove a price adjustment from a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/examples-PriceAdjustmentPatch' + '400': + description: |- + Possible reasons: + - the price adjustment is not manual and cannot be updated. + - the expected attributes are missing in the input. + - the type of a price adjustment does not match the adjustment type of the input data. + - the price adjustment limit is exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The price adjustment ID is not found. + content: + application/problem+json: + examples: + PriceAdjustmentIdNotFoundException: + $ref: '#/components/examples/PriceAdjustmentIdNotFoundException' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored.\n- `discount` \n- `itemText`\n- `reasonCode`\n- `custom properties` \nThe 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." + operationId: updatePriceAdjustmentInBasket + summary: Update a price adjustment for a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/PriceAdjustmentPatch' + schema: + $ref: '#/components/schemas/PriceAdjustment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/priceAdjustmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-books: + get: + responses: + '200': + description: Success, the response body contains the priceBookIds for the basket. + content: + application/json: + examples: + PriceBooksGet: + $ref: '#/components/examples/PriceBooksGet' + schema: + $ref: '#/components/schemas/PriceBookIds' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: "( DEPRECATED ) Gets applicable price books for an existing basket. This endpoint is deprecated. \nUse [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary), \nhooks or `dw.catalog.PriceBookMgr#getApplicablePriceBooks()` instead." + operationId: getPriceBooksForBasket + summary: Retrieve price books for a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + put: + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown or contains a price book ID that does not correspond to an existing price book. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: ( DEPRECATED ) This method allows you to put an array of priceBookIds to an existing basket, which will be used for basket calculation. This endpoint is deprecated. Use [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary), hooks or `dw.catalog.PriceBookMgr#setApplicablePriceBooks()` instead. + operationId: addPriceBooksToBasket + summary: Add price books to a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceBooksPut: + $ref: '#/components/examples/PriceBooksPut' + schema: + $ref: '#/components/schemas/PriceBookIds' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments: + post: + responses: + '200': + description: Success, the response body contains the basket with added shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPost: + $ref: '#/components/examples/examples-ShipmentsPost' + '400': + description: |- + Possible reasons: + - a shipment id is not provided. + - a shipment with the provided ID already. + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + 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 + operationId: createShipmentForBasket + summary: Create a shipment for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsPost: + $ref: '#/components/examples/ShipmentsPost' + schema: + $ref: '#/components/schemas/Shipment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given shipment ID is invalid. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '403': + description: |- + The given shipment ID corresponds to the + default shipment and cannot be removed. + content: + application/problem+json: + examples: + BadRequest: + $ref: '#/components/examples/Forbidden' + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Removes a specified shipment and all associated product, gift certificate, + shipping, and price adjustment line items from a basket. + It is not allowed to remove the default shipment. + operationId: removeShipmentFromBasket + summary: Remove a shipment from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPatch: + $ref: '#/components/examples/examples-ShipmentsPatch' + '400': + description: |- + Possible reasons: + - the given shipment ID was invalid. + - a shipment with the provided ID already + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a missing shipping method. + - an invalid shipping method. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Updates a shipment for a basket. + + The 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 + operationId: updateShipmentForBasket + summary: Update a shipment for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsPatch: + $ref: '#/components/examples/ShipmentsPatch' + schema: + $ref: '#/components/schemas/Shipment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address: + put: + responses: + '200': + description: Success, the response body contains the basket with the added shipping address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/examples-ShipmentsAddressPut' + '400': + description: |- + Possible reasons: + - the shipment with the given shipment ID is unknown. + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Sets a shipping address of a specific shipment of a basket. + operationId: updateShippingAddressForShipment + summary: Update the shipping address for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/ShipmentsAddressPut' + schema: + $ref: '#/components/schemas/OrderAddress' + required: true + parameters: + - $ref: '#/components/parameters/useAsBilling' + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method: + put: + responses: + '200': + description: Success, the response body contains the basket with the added shipping method. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/examples-ShipmentsMethodPut' + '400': + description: |- + Possible reasons: + - the id of the shipping method is missing. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Sets a shipping method to a specific shipment of a basket. + operationId: updateShippingMethodForShipment + summary: Update the shipping method for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/ShipmentsMethodPut' + schema: + $ref: '#/components/schemas/ShippingMethod' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods: + get: + responses: + '200': + description: Success, the response body contains the applicable shipping methods for a certain shipment of the basket. + content: + application/json: + examples: + ShipmentsMethodGet: + $ref: '#/components/examples/ShipmentsMethodGet' + schema: + $ref: '#/components/schemas/ShippingMethodResult' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Gets the applicable shipping methods for a certain shipment of a basket. + operationId: getShippingMethodsForShipment + summary: Retrieve the shipping methods for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/storefront: + put: + responses: + '200': + description: Success, the response body contains a basket that is set as a storefront basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutStorefront: + $ref: '#/components/examples/BasketPutStorefront' + '400': + description: Thrown if a storefront basket already exists and the query parameter `exchange` is false. + content: + application/problem+json: + examples: + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Marks a basket as a storefront basket. + operationId: updateAsStorefrontBasket + summary: Designate a basket as a storefront basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/exchange' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/taxes: + get: + responses: + '200': + description: Success, the response body contains the external taxation from all line items from the referenced basket. + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketTaxGet' + schema: + $ref: '#/components/schemas/Taxes' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/json: + examples: + InvalidTaxMode: + $ref: '#/components/examples/InvalidTaxMode' + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: This method gives you the external taxation data set by the PUT taxes API. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: getTaxesFromBasket + summary: Retrieve the external taxation information for a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + put: + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + description: |- + This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. + This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasket + summary: Add external taxation information to a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketTaxPut' + schema: + $ref: '#/components/schemas/Taxes' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + ShopperTokenTaob: + type: oauth2 + description: "`ShopperTokenTaob` (Taob = trusted agent on behalf) is a child of the `ShopperToken` security scheme and extends the functionality of `ShopperToken` for specific use cases. \nA token of type `ShopperTokenTaob` allows you to access Shopper API endpoints, including OCAPI and Salesforce Commerce API for headless applications. Besides endpoints that require this specific subtype, all other endpoints secured by the `ShopperToken` parent scheme can be accessed with a `ShopperTokenTaob`.\nTo get a `ShopperTokenTaob` token, a `Taob` session needs to be created first (see [getTrustedAgentAuthorizationToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAuthorizationToken)). \nAfterwards the `ShopperTokenTaob` token can be gained (see [getTrustedAgentAccessToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAccessToken)).\nFor more information regarding the `Taob` flow see also [Trusted Agent Authorization](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-trusted-agent.html).\n" + flows: + clientCredentials: + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/trusted-agent/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + AmOAuth2: + type: oauth2 + description: AccountManager OAuth 2.0 bearer token Authentication. + flows: + clientCredentials: + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + schemas: + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + OrderAddress: + description: Document representing an order address. + properties: + address1: + description: The first address line. + example: 45 Main Rd. + type: string + address2: + description: The second address line. + example: Apartment 204 + type: string + city: + description: The city. + example: Boston + type: string + companyName: + description: The company name. + example: Salesforce + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + firstName: + description: The first name. + example: Max + type: string + fullName: + description: The full name. + example: Max Mustermann + type: string + id: + description: The ID of the address. + example: me + type: string + jobTitle: + description: The job title. + example: Software Engineer + type: string + lastName: + description: The last name. + example: Mustermann + type: string + phone: + description: The phone number. + example: '6175555555' + type: string + postBox: + description: The post office box. + example: PO BOX 109 + type: string + postalCode: + description: The postal code. + example: '05408' + type: string + salutation: + description: The salutation. + example: Mr + type: string + secondName: + description: The second name. + type: string + stateCode: + description: The state code. + example: MA + type: string + suffix: + description: The suffix. + example: Sr + type: string + suite: + description: The suite. + example: 24A + type: string + title: + description: The title. + example: Dr. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + ProductDetailsLink: + description: Document representing a link to the resource for product details. + properties: + productDescription: + description: The description of the product. + example: Nintendo DS revolutionizes handheld gameplay. + type: string + productId: + $ref: '#/components/schemas/ProductId' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + title: + description: The link title. + example: Nintendo DS Game Console + type: string + type: object + required: + - productId + additionalProperties: false + BonusDiscountLineItem: + description: Document representing a bonus discount line item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + bonusProducts: + description: The bonus products the customer can choose from. + type: array + items: + $ref: '#/components/schemas/ProductDetailsLink' + couponCode: + description: The coupon code that triggered the promotion, if applicable. + example: 5ties + type: string + id: + description: The ID of the line item. It is read only. + example: 91f4dd8bfa0653d58b7783b04f + type: string + maxBonusItems: + format: int32 + description: The maximum number of bonus items the user can select for this promotion. + type: integer + promotionId: + description: The ID of the promotion that triggered the creation of the line item. + example: Buy1Get2 + type: string + CouponItemId: + minLength: 1 + type: string + description: The coupon item ID + example: d4c9c0141e9c74c150225580f3 + CouponItem: + description: Document representing a coupon item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + code: + maxLength: 256 + description: The coupon code. + example: 5ties + type: string + couponItemId: + description: The coupon item ID. It is read only. + allOf: + - $ref: '#/components/schemas/CouponItemId' + statusCode: + description: The status of the coupon item. It is read only. + example: no_applicable_promotion + enum: + - 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 + type: string + valid: + description: |- + 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". It is read only. + example: true + type: boolean + required: + - code + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CustomerInfo: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: The customer information for guest or logged-in customers. + type: object + properties: + customerId: + maxLength: 100 + description: The customer ID. It is read only. + example: abMKqMaNYOBMnNdDNzyC5oNTi5 + type: string + customerName: + description: The customer name. + example: Max Mustermann + type: string + customerNo: + maxLength: 100 + description: The customer number. + example: '0002352' + type: string + email: + description: The customer's email address. + example: no-reply@salesforce.com + type: string + required: + - email + GiftCertificateItemId: + example: 629dea6e7b61e58da629b57b21 + type: string + minLength: 1 + GiftCertificateItem: + description: A gift certificate item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate item amount. + example: 20 + type: number + giftCertificateItemId: + description: The item ID. It is read only. + allOf: + - $ref: '#/components/schemas/GiftCertificateItemId' + message: + maxLength: 4000 + description: The gift certificate message. + example: Birthday present. + type: string + recipientEmail: + minLength: 1 + description: The recipient email. + example: no-reply@salesforce.com + type: string + recipientName: + description: The recipient's name. + example: Daniel Mustermann + type: string + senderName: + description: The sender's name. + example: Max Mustermann + type: string + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + required: + - amount + - recipientEmail + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. + type: object + properties: + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b + type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + Status: + description: Document representing an object status. + properties: + code: + description: The status code. + type: string + message: + description: The status message. + type: string + status: + format: int32 + description: |- + The status. + For more information on the status values see Status.OK and Status.ERROR. + type: integer + type: object + additionalProperties: false + PaymentCard: + additionalProperties: false + description: Document representing a payment card. + type: object + properties: + cardType: + maxLength: 256 + description: The payment card type. + example: Visa + type: string + creditCardExpired: + description: A flag indicating if the credit card is expired. It is read only. + example: true + type: boolean + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + maxLength: 4000 + description: The masked payment card number. + example: '*********4422' + type: string + numberLastDigits: + maxLength: 4000 + description: The last digits of the payment card number. It is read only. + example: '4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2015 + type: integer + PaymentInstrumentId: + description: The payment instrument ID + example: ba248424e3eee797f062162f8b + type: string + OrderPaymentInstrument: + description: Document representing an order payment instrument. + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + authorizationStatus: + description: The authorization status of the payment transaction. It is read only. + allOf: + - $ref: '#/components/schemas/Status' + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + maskedGiftCertificateCode: + description: The gift certificate code with the last 4 characters not masked. + example: '******Gzzy' + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/PaymentCard' + paymentInstrumentId: + description: The payment instrument ID. It is read only. + allOf: + - $ref: '#/components/schemas/PaymentInstrumentId' + paymentMethodId: + maxLength: 256 + description: The payment method ID. It is read only. + example: CREDIT_CARD + type: string + type: object + ProductItem: + description: Document representing a product item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including + adjustments. If the taxation policy is net, it doesn't include tax. If the + taxation policy is gross, it includes tax. It is read only. + example: 130 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. + example: true + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. + example: inventory + type: string + itemId: + description: |- + The product item ID. Use it to identify this item when updating its quantity or + creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not + including order-level adjustments or shipping charges. If the taxation policy is + net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 20.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation + policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 15.5 + type: number + productId: + maxLength: 100 + description: The ID of the product. + example: nintendo-ds-console + type: string + productListItem: + description: |- + If this product line item was added from a product list, this value is a reference + to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A + related shipping item represents a surcharge applied to individual products using + a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax for the product item, not including price adjustments. It is read only. + example: 0.3 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this product item. It is read only. + example: 30 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.9 + type: number + ItemId: + description: The item id. + example: 430ef5aad3a24de59378458434 + type: string + OptionItem: + description: |- + An option item represents an optional purchase related to a product item, and is always associated with that parent product + item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + example: ba248414e3eee797f062162f8b + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. It is read only. + example: false + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: false + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. It is read only. + example: inventory + type: string + itemId: + description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + example: The item text. + type: string + optionId: + maxLength: 256 + description: The ID of the option. It is read only. + example: consoleWarranty + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + optionValueId: + maxLength: 256 + description: The ID of the option value. It is read only. + example: '000' + type: string + price: + format: double + description: |- + The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 150.99 + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not including order-level adjustments or + shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated order-level adjustments, but not + including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 40.5 + type: number + productId: + $ref: '#/components/schemas/ProductId' + productListItem: + description: If this product line item was added from a product list, this value is a reference to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The ordered quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A related shipping item represents a + surcharge applied to individual products using a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax on the line item before applying any adjustments. It is read only. + example: 0 + type: number + taxBasis: + format: double + description: The amount used to calculate the tax for this item. It is read only. + example: 50 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.19 + type: number + required: + - optionId + - optionValueId + ProductListLink: + description: Document representing a link to a product list. + properties: + description: + description: The description of this product list. + type: string + name: + description: The name of this product list. + type: string + public: + description: |- + A flag indicating whether the owner made this product list available for access + by other customers. It is read only. + example: true + type: boolean + title: + description: The link title. + type: string + type: + description: The type of the product list. + example: shopping_list + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + type: string + type: object + additionalProperties: false + ProductListItemReference: + description: Document representing product list item details. + type: object + additionalProperties: false + properties: + id: + description: The ID of the product list item. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + priority: + format: int32 + description: The priority of the product list item. + example: 1 + type: integer + productDetailsLink: + $ref: '#/components/schemas/ProductDetailsLink' + productList: + description: A reference to the associated product list. It is read only. + allOf: + - $ref: '#/components/schemas/ProductListLink' + public: + example: false + type: boolean + purchasedQuantity: + format: double + description: The total quantity of this item purchased from the product list. + example: 0 + type: number + quantity: + minimum: 0 + format: double + description: The number of products or gift certificates that get shipped when purchasing this product list item. + example: 1 + type: number + type: + description: Specifies whether the item is a product or a gift certificate. + example: product + enum: + - product + - gift_certificate + type: string + required: + - id + ShipmentId: + minLength: 1 + type: string + example: me + description: The identifier of the shipment + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id + Shipment: + description: Document representing a shipment. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not including + service charges such as shipping. If the Discount Taxation preference is set to Tax Products and + Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + gift: + description: A flag indicating whether the shipment is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + merchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, not including price adjustments or service charges such as + shipping. It is read only. + example: 4.95 + type: number + productSubTotal: + format: double + description: |- + The total price of all products in the shipment, including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If + the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + shipmentId: + description: The order-specific ID of the shipment. The default value is 'me'. + default: me + allOf: + - $ref: '#/components/schemas/ShipmentId' + shipmentNo: + description: The shipment number of this shipment. This number is automatically generated. It is read only. + type: string + shipmentTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments, shipping charges, + and tax. It is read only. + example: 39.99 + type: number + shippingAddress: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + shippingMethod: + $ref: '#/components/schemas/ShippingMethod' + shippingStatus: + description: The shipping status of the shipment. + example: shipped + enum: + - not_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges in the shipment, including shipping adjustments. If the + taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. + example: 0.3 + type: number + taxTotal: + format: double + description: |- + The total tax on the shipment, including item-level price adjustments and service charges such as + shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on + Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 1.8 + type: number + trackingNumber: + description: The tracking number of the shipment. + example: 1Z204E380338943508 + type: string + type: object + ShippingItem: + description: Document representing a shipping item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax for the shipping item, including price adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the shipping item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + itemId: + description: |- + The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a + custom price adjustment for it. It is read only. + example: 430ef5aad3a24de59378458434 + type: string + itemText: + description: The text describing the shipping item. + example: Shipping + type: string + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the shipping item including item-level adjustments, but not including order-level + adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + type: number + shipmentId: + description: The identifier of the shipment to which this item belongs. + allOf: + - $ref: '#/components/schemas/ShipmentId' + tax: + format: double + description: The tax on the product item, not including adjustments. It is read only. + example: 0.19 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this shipping item. It is read only. + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. + type: number + type: object + Basket: + description: Document representing a basket. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not + including service charges such as shipping. If the Discount Taxation preference is set to Tax + Products and Shipping Only Based on Adjusted Price, this amount also includes prorated + order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + agentBasket: + description: Is the basket created by an agent? It is read only. + example: true + type: boolean + basketId: + description: The unique identifier for the basket. It is read only. + example: e78aa5646a8efebdd9cdd38be7 + type: string + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + couponItems: + description: The coupon items. + type: array + items: + $ref: '#/components/schemas/CouponItem' + creationDate: + description: The timestamp when the basket was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information, if the customer is logged in. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + giftCertificateItems: + description: The gift certificate line items. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + inventoryReservationExpiry: + description: The expiration datetime of the inventory reservation. It is read only. + example: '2015-05-19T15:30:18.000Z' + type: string + format: date-time + lastModified: + description: The timestamp when the basket was last modified. It is read only. + example: '2015-05-19T15:25:18.000Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. + Merchandise total price represents the sum of the product prices before + services (such as shipping) or adjustments from promotions have + been added. It is read only. + example: 4.95 + type: number + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderTotal: + format: double + description: The total price, including products, shipping and tax. It is read only. + example: 110.24 + type: number + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + productItems: + description: The product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including order-level adjustments or shipping + charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 88 + type: number + shipments: + description: The shipments. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + sourceCode: + description: The source code assigned to the basket. It is read only. + example: OUTDOOR1 + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + required: + - id + - rate + additionalProperties: false + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' + OrderPaymentCardRequest: + description: Document representing an order payment card request. + type: object + properties: + cardType: + maxLength: 256 + description: 'The payment card type (for example: Visa).' + example: Visa + type: string + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + pattern: ^[0-9 -]{0,7}\D{6,15}\d{0,4}$ + maxLength: 25 + description: The masked payment card number. + example: '*********4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2019 + type: integer + BasketPaymentInstrumentRequest: + description: Document representing a basket payment instrument request. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + giftCertificateCode: + maxLength: 256 + description: The gift certificate code. + example: AFGRTUZ + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/OrderPaymentCardRequest' + paymentMethodId: + maxLength: 256 + description: The payment method ID. + example: CREDIT_CARD + type: string + PaymentCardSpec: + description: Document representing the specification for a payment card. + type: object + properties: + cardType: + description: The payment card type. It is read only. + example: Visa + type: string + checksumVerificationEnabled: + description: A flag indicating whether the card number is verified using the Luhn checksum algorithm. It is read only. + example: true + type: boolean + description: + description: The localized description of the payment card. It is read only. + type: string + image: + description: The URL to the image that represents the payment card. It is read only. + type: string + name: + description: The localized name of the payment card. It is read only. + type: string + numberLengths: + description: |- + The sorted list of number lengths (individual lengths as well as + length ranges). It is read only. + type: array + items: + type: string + numberPrefixes: + description: |- + The sorted list of number prefixes (individual prefixes as well + as prefix ranges). It is read only. + type: array + items: + type: string + securityCodeLength: + format: int32 + description: The length of the security code for this card. It is read only. + type: integer + PaymentMethod: + description: Document representing a payment method. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + cards: + description: The sorted array of payment cards (included only when the system payment method is CREDIT_CARD). It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentCardSpec' + description: + description: The localized description of the payment method or card. It is read only. + type: string + id: + maxLength: 256 + description: The ID of the payment method or card. It is read only. + type: string + image: + description: The URL to the image that represents the payment method or card. It is read only. + type: string + name: + description: The localized name of the payment method or card. It is read only. + type: string + paymentProcessorId: + description: The payment processor ID. It is read only. It is read only. + type: string + required: + - id + PaymentMethodResult: + description: Result document of payment methods applicable for a basket. + properties: + applicablePaymentMethods: + description: The applicable payment methods. It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentMethod' + type: object + DiscountRequest: + description: Request that represents a discount to be applied to a custom price adjustment. + type: object + additionalProperties: false + properties: + type: + description: |- + The type of discount. + - `amount` describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced by. Example: For a $10 discount, set `type` to `amount` and `value` to `10.00`. + - `percentage` describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. Example: For a 5% discount, set `type` to `percentage` and `value` to `5.00`. + - `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. Example: To set a fixed price of $15, set `type` to `fixed_price` and `value` to `15.00`. **Important**: Setting `type` to `fixed_price` is not supported when `level` is set to `order`. + example: percentage + enum: + - percentage + - fixed_price + - amount + type: string + value: + format: double + description: The amount of the discount. + example: 20 + type: number + required: + - type + - value + PriceAdjustmentRequest: + description: Request that represents a price adjustment. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + discount: + description: A discount that can be specified instead of a price. + allOf: + - $ref: '#/components/schemas/DiscountRequest' + itemId: + description: The item to which the price adjustment should be added, depending on the specified level. If the level is ´order´, item id is not needed. If `shipping`, specify the UUID of the shipping item. If `product`, specify the UUID of the product item. + example: 93196fae953cbedbe54d67e760 + type: string + itemText: + description: The text describing the item in more detail. + example: A discounted item + type: string + level: + description: |- + The level at which the adjustment is applied. + - `order` indicates that the price adjustment should be added directly to basket. + - `product` indicates that the price adjustment should be added to the product item. + - `shipping` indicates that the price adjustment is added to the shipping item. + example: order + enum: + - product + - shipping + - order + type: string + promotionId: + description: The ID of the related promotion. Custom price adjustments can be assigned any promotion ID as long as it's not used by a price adjustment belonging to the same item and isn't used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated. + example: Shipping100 + type: string + reasonCode: + description: The reason for the price adjustment. + example: Shipping promotion on order above $1,000 USD + type: string + required: + - level + PriceBookIds: + maxItems: 10 + description: Array of price book IDs to use for the basket calculation. + type: array + items: + maxLength: 256 + type: string + ShippingMethodResult: + description: Result document containing shipping methods. + properties: + applicableShippingMethods: + description: The applicable shipping method documents. It is read only. + type: array + items: + $ref: '#/components/schemas/ShippingMethod' + defaultShippingMethodId: + description: The default shipping method. It is read only. + example: me + type: string + type: object + Taxes: + description: Document representing the tax rates and (optionally) amounts for all items in a basket. + properties: + taxes: + description: 'Map containing the TaxItems for the line item ids: Map' + type: object + additionalProperties: + $ref: '#/components/schemas/TaxItems' + type: object + required: + - taxes + additionalProperties: false + parameters: + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + taxMode: + name: taxMode + in: query + description: "Determines how taxes are calculated. \n\nThe default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. \nExternal tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. \nGift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. \nDepending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket." + schema: + default: internal + enum: + - internal + - external + type: string + example: external + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + overrideExisting: + name: overrideExisting + in: query + description: |- + If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior: + - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change. + - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200). + schema: + default: false + type: boolean + example: false + createDestinationBasket: + name: createDestinationBasket + in: query + description: |- + If the current shopper has an active basket, this parameter is ignored. If the current shopper has no active basket, this parameter controls the behavior: + - `false` (default): Return a BasketMergeException (HTTP status 409). + - `true`: Force the merge by creating a basket for the current shopper and copying information from the previous shopper's basket into it. Return success (HTTP status 200). + schema: + default: false + type: boolean + productItemMergeMode: + name: productItemMergeMode + in: query + description: |- + This parameter controls the quantity calculation for products that exist in both baskets. + - higher_quantity (default): Compare the product's quantities in each basket, and use the higher value. + - sum_quantities: Use the sum of the product's quantities from both baskets. + - saved_quantity: Use the product's quantity in the current shopper's active basket. Ignore the quantity from the previous shopper's basket. + - separate_item: Add a separate product item to the current shopper's basket for the quantity in the previous shopper's basket. + schema: + default: higher_quantity + enum: + - higher_quantity + - sum_quantities + - saved_quantity + - separate_item + type: string + basketId: + name: basketId + in: path + required: true + schema: + minLength: 1 + type: string + description: The ID of the basket to be modified. + removeExternalTax: + name: removeExternalTax + in: query + description: 'If `true` (default value), the external tax rates are removed from the basket and set to null. To add external tax rates to a basket, use the `addTaxesForBasket` or `addTaxesForBasketItem` endpoint. The removal of external tax rates depends on the update performed on the basket, for example: an update to the `currency` triggers a removal. Set this parameter to `false` to disable the removal of external tax rates/values.' + schema: + default: true + type: boolean + useAsShipping: + name: useAsShipping + in: query + example: true + schema: + type: boolean + couponItemId: + name: couponItemId + in: path + required: true + schema: + $ref: '#/components/schemas/CouponItemId' + description: The ID of the coupon item. + giftCertificateItemId: + name: giftCertificateItemId + in: path + required: true + schema: + $ref: '#/components/schemas/GiftCertificateItemId' + description: the ID of the gift certificate item to be updated. + itemId: + name: itemId + in: path + required: true + schema: + $ref: '#/components/schemas/ItemId' + description: The ID of the item to be updated. + paymentInstrumentId: + name: paymentInstrumentId + in: path + required: true + schema: + $ref: '#/components/schemas/PaymentInstrumentId' + priceAdjustmentId: + name: priceAdjustmentId + in: path + required: true + schema: + $ref: '#/components/schemas/PriceAdjustmentId' + shipmentId: + name: shipmentId + in: path + required: true + schema: + $ref: '#/components/schemas/ShipmentId' + description: The ID of the shipment to be modified. + useAsBilling: + name: useAsBilling + in: query + example: true + schema: + type: boolean + exchange: + name: exchange + in: query + description: If true, an existing storefront basket is exchanged and marked as an agent basket. If false, a `CustomerBasketsQuotaExceededException` is thrown. + schema: + type: boolean + examples: + BasketPost: + value: + customerInfo: + email: shopper@salesforce-test.com + customerNo: '000000001' + billingAddress: + firstName: Stephanie + lastName: Miller + address1: 104 Presidential Way + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + shipments: + - shippingMethod: + id: '001' + shippingAddress: + firstName: Agustin + lastName: Estes + address1: 4162 Turkey Pen Road + city: New York + postalCode: '10016' + stateCode: NY + countryCode: US + paymentInstruments: + - paymentMethodId: CREDIT_CARD + paymentCard: + cardType: Visa + couponItems: + - code: 5ties + productItems: + - productId: green-umbrella + quantity: 3 + examples-BasketPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BadRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: Decoding of the property with path '$.failedExample.[1].intProperty' failed because the expected type is 'Integer|Decimal' but the actual type was 'String'. + CustomerBasketQuotaExceededException: + value: + title: Customer Baskets Quota Exceeded + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/customer-baskets-quota-exceeded + detail: The maximum number of baskets per customer was exceeded. Please reuse or delete one of the existing baskets (40e91e04aba6e42a6836f79308). + basketIds: 40e91e04aba6e42a6836f79308 + ShipmentNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/shipment-not-found + title: Shipment Not Found + detail: The shipping method with ID '123' is unknown or can't be applied to the basket. + ForbiddenMissingPrevCustomerInfo: + value: + title: Forbidden + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + detail: Your access-token is valid, but it contains no previous customer to process this action. + SourceBasketException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/no-source-basket-exception + title: Conflict + detail: The previous customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketTransferException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-transfer-basket-already-exists-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has an active basket. + BasketMergeException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-merge-no-current-basket-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketGet: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerInfoJwtMismatch: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: The customer is invalid. + BasketNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-not-found + title: Basket Not Found + detail: No basket with ID '123' could be found. + BasketPatch: + value: + c_textValue: oak + examples-BasketPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + c_textValue: oak + BasketPutAgent: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: true + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BillingAddressPut: + value: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-BillingAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 385 Prospect Valley Road + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CouponCodePost: + value: + code: 10_percent_off + examples-CouponCodePost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + - code: 10_percent_off + couponItemId: 9372d0f511dac8caf77afc4kj2 + statusCode: applied + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerPut: + value: + email: shopperUpdate@salesforce-test.com + examples-CustomerPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPost: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + shipmentId: me + examples-GiftCertPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 2 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPatch: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + examples-GiftCertPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ItemPost: + value: + - productId: green-bag + quantity: 1 + ItemsPatch: + value: + - itemId: 051e908cca031ebf8ee80cbb0a + productId: green-bag + quantity: 1 + - itemId: 078a492cca031ebf8ee80739ab + optionItems: + - optionId: Option1 + optionValueId: ValueA + quantity: 1 + ItemPatch: + value: + quantity: 1 + examples-ItemPatch: + value: + adjustedMerchandizeTotalTax: 10 + adjustedShippingTotalTax: 0.4 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:58:39.498Z' + merchandizeTotalTax: 10 + orderTotal: 218.38 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 10 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATre + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 1 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 199.99 + priceAfterItemDiscount: 199.99 + priceAfterOrderDiscount: 199.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 1 + shipmentId: me + tax: 10 + taxBasis: 199.99 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 199.99 + productTotal: 199.99 + shipments: + - adjustedMerchandizeTotalTax: 10 + adjustedShippingTotalTax: 0.4 + gift: false + merchandizeTotalTax: 10 + productSubTotal: 199.99 + productTotal: 199.99 + shipmentId: me + shipmentTotal: 218.38 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 7.99 + shippingStatus: not_shipped + shippingTotal: 7.99 + shippingTotalTax: 0.4 + taxTotal: 10.4 + shippingItems: + - adjustedTax: 0.4 + basePrice: 7.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 7.99 + priceAfterItemDiscount: 7.99 + shipmentId: me + tax: 0.4 + taxBasis: 7.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 7.99 + shippingTotalTax: 0.4 + taxation: net + taxTotal: 10.4 + BasketItemTaxPut: + value: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + UnsupportedRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-request-if-scapi-hooks-enabled + title: Unsupported Request If SCAPI Hooks Enabled + detail: You can't call this endpoint because Salesforce Commerce API hook execution is enabled. + PaymentInstrumentPost: + value: + amount: 1 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '*********1234' + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + PaymentInstrumentPatch: + value: + amount: 0 + paymentCard: + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + examples-PaymentInstrumentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + holder: Miller + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PaymentMethodsGet: + value: + applicablePaymentMethods: + - id: GIFT_CERTIFICATE + name: Gift Certificate + paymentProcessorId: BASIC_GIFT_CERTIFICATE + - cards: + - cardType: Visa + checksumVerificationEnabled: true + name: Visa + numberLengths: + - '13' + - '16' + numberPrefixes: + - '4' + - cardType: Amex + checksumVerificationEnabled: true + name: American Express + numberLengths: + - '15' + numberPrefixes: + - '34' + - '37' + - cardType: Master Card + checksumVerificationEnabled: true + name: MasterCard + numberLengths: + - '16' + numberPrefixes: + - 51-55 + - cardType: Discover + checksumVerificationEnabled: true + name: Discover + numberLengths: + - '16' + numberPrefixes: + - '6011' + - 622126-622925 + - 644-649 + - '65' + id: CREDIT_CARD + name: Credit Card + paymentProcessorId: BASIC_CREDIT + - id: PayPal + name: Pay Pal + paymentProcessorId: PAYPAL_EXPRESS + - id: BML + name: Bill Me Later + paymentProcessorId: CYBERSOURCE_BML + PriceAdjustmentPost: + value: + discount: + value: 5 + type: percentage + itemText: MyOrderAdjustment + level: order + promotionId: manual adjustment + examples-PriceAdjustmentPost: + value: + adjustedMerchandizeTotalTax: 28.45 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 0.05 + percentage: 5 + type: percentage + createdBy: testAgent + creationDate: '2015-05-25T09:13:10.942Z' + custom: true + itemText: MyOrderAdjustment + manual: true + price: -30 + promotionId: manual adjustment + priceAdjustmentId: cdzoAiWbOmbiUaaadlfSpMDgNw + orderTotal: 615.21 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 569.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 569.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 569.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentPatch: + value: + appliedDiscount: + amount: 15 + type: amount + itemText: AgentOrderAdjustment + reasonCode: override manual promo + examples-PriceAdjustmentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 15 + type: amount + createdBy: testWapiAgent + creationDate: '2017-03-14T09:15:35.543Z' + custom: true + itemText: MyOrderAdjustment + lastModified: '2017-03-14T09:15:35.594Z' + manual: true + price: -15 + priceAdjustmentId: e397cd21f9a9c0643277ba1011 + promotionId: manual adjustment + reasonCode: override manual promo + orderTotal: 631.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentIdNotFoundException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/price-adjustment-not-found + title: Price Adjustment Not Found + detail: No price adjustment with ID '453599643347eac5e4ebd85b49' could be found. + PriceBooksGet: + value: + - price-book-id1 + - price-book-id2 + PriceBooksPut: + value: + - price-book-id1 + - price-book-id2 + ShipmentsPost: + value: + shipmentId: me2 + shippingMethod: + id: '001' + shippingAddress: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-ShipmentsPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + - adjustedMerchandizeTotalTax: 35 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 35 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me2 + shipmentTotal: 646.76 + shippingAddress: + address1: 385 Prospect Valley Road + city: Woburn + stateCode: MA + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 84f06786daa68ae33af7e21ec6 + lastName: Miller + shippingMethod: + description: Order received in 2 business days + id: '001' + name: 2-Day Express + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 35 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 6fea9966277c94e06b482a5c43 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 36.98 + shippingTotalTax: 1.35 + taxation: net + taxTotal: 36.35 + Forbidden: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + title: Forbidden + detail: The shipment with ID 'me' corresponds to the default shipment and can't be deleted. + ShipmentsPatch: + value: + shipmentId: me + shipmentNo: ignored shipment no + shippingMethod: + id: '003' + shippingAddress: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + c_wapi-string: shipment_custom_property + examples-ShipmentsPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxation: net + taxTotal: 36.05 + ShipmentsAddressPut: + value: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + examples-ShipmentsAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ShipmentsMethodPut: + value: + id: '003' + examples-ShipmentsMethodPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + shippingStatus: not_shipped + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxTotal: 36.5 + shippingItems: + - adjustedTax: 1.5 + basePrice: 29.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 29.99 + priceAfterItemDiscount: 29.99 + shipmentId: me + tax: 1.5 + taxBasis: 29.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxation: net + taxTotal: 36.5 + ShipmentsMethodGet: + value: + applicableShippingMethods: + - description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + - description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + - description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + - description: Store Pickup + id: '005' + name: Store Pickup + price: 0 + c_storePickupEnabled: true + defaultShippingMethodId: '001' + BasketPutStorefront: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: callcenter + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BasketTaxGet: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 + InvalidTaxMode: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-tax-mode + title: Invalid Tax Mode + detail: Basket with ID 'a10ff320829cb0eef93ca5310a' has invalid tax mode. + BasketTaxPut: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 +x-sdk-classname: ShopperBasketsV1 diff --git a/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-public.yaml b/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-public.yaml new file mode 100644 index 00000000..8bb23f27 --- /dev/null +++ b/apis/shopper-baskets-oas-1.8.24/shopper-baskets-oas-v1-public.yaml @@ -0,0 +1,6590 @@ +openapi: 3.0.3 +info: + title: Shopper Baskets + version: v1 + description: |- + # API Overview + + Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout. + + To create a basket, start with the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets?meta=createBasket) endpoint. The endpoint creates the basket in the B2C Commerce system and returns a JSON representation of the basket with a `basketId` property. + + If you provide the JSON for a prepopulated basket to the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets?meta=createBasket) endpoint, you can create a basket using a single API request. + + You can also create a basket and gradually populate it with data using subsequent API requests that reference the same `basketId`. The gradual approach allows you to validate the input data as you go. + + The Shopper Baskets API includes endpoints to populate each part of a basket separately, including: + + - Billing address + - Customer information + - Line items + - Products + - Coupons + - Gift certificates + - Payment methods + - Price books + - Shipments + - Taxation (for items and the basket itself) + + In addition to creating a basket, the main `/baskets` resource offers endpoints to get, transfer, merge, and delete baskets, depending on the HTTP method that you use and the parameters that you supply. These endpoints can you help you handle a variety of complex scenarios, such as when a user starts shopping as a guest and then logs in before checkout. + + You can also use the main `/baskets` resource to add custom properties to your basket, prefixed with `c_` (example: `c_faxNumber`). + + When your basket is fully populated, you can use its `basketId` property to create an order with the [Shopper Orders API](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=Summary). + + For more detail on building baskets, see [Build Baskets and Place Orders](https://developer.salesforce.com/docs/commerce/commerce-api/guide/work-with-baskets-orders.html). + + ## Authentication & Authorization + + The client requesting the basket information must have access to the `/baskets` resource. The Shopper Baskets API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + The following resources require an Account Manager OAuth token with a client ID: + + - `/baskets/{basketId}/taxes` + - `/baskets/{basketId}/items/{itemId}/taxes` + - `/baskets/{basketId}/price-books` + + ## Use Cases + + ### Use Hooks + + For details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + + ## Basket Calculation + + Unless you’re using [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), each modification to a basket triggers the following calculations: + + 1. Calculate product prices: + - Iterate through the product line items and determine the base price of each using its price model. If multiple price books apply to a product, the lowest price is used. + - Calculate product option line item prices using the product option model. + - For bonus products, check dependent adjustments in the basket to determine the price. + 2. Iterate through the gift certificate line items and calculate the price of each by multiplying the base price by the quantity. + 3. Recalculate for all promotions, adding and removing them as appropriate. + 4. Apply product-specific shipping costs. + 5. Calculate the total shipping cost. + 6. Recalculate for all promotions, adding and removing them as appropriate. + 7. Calculate prices for products added by the promotion engine. + 8. Calculate taxes using line item tax class codes. + - For internal tax mode, use the tax tables. + - For external tax mode, use the tax rates returned by the tax API endpoints. + 9. Calculate the order’s net, tax, and gross totals by adding up the line totals. + + ## External Taxation + + The B2C Commerce API calculates taxes internally using tax tables. If you want to integrate with a third-party tax provider, or calculate tax on your own, you can use the external taxation feature to add a taxation rate and optional taxation value. When setting a taxation rate, the taxation is calculated for this specific rate. If you pass a value, this value is used as taxation value, as well, without recalculation. To use this feature, set the `taxMode` parameter to `external` when creating the basket. + + When using external taxation, you must set a tax rate either in one request to the `/baskets/{basketId}/taxes` or with separate requests for each line item, using `/baskets/{basketId}/items/{lineItemId}/taxes`. + + If the tax mode of a basket is set to `external`, a tax item is required for all line items even for zero-tax items to avoid oversights. + + ### External Taxation with Hooks Enabled + + To use external tax calculation with [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), use the following API methods in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + - `dw.order.LineItemCtnr#isExternallyTaxed`: Returns true if the basket was created with `taxMode = external` + - `dw.order.TaxMgr#applyExternalTax`: Applies externally set tax rates to the given basket. Only use when `dw.order.LineItemCtnr#isExternallyTaxed` returns true. + + The following example shows an implementation of external tax calculation with hooks enabled in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + + exports.calculate = function (basket) { + if ( basket.isExternallyTaxed() ) + { + TaxMgr.applyExternalTaxation( basket ); // apply the external tax calculation based on the tax rates set by the SCAPI external taxation APIs + } + else + { + // calculation with tax tables or customization + } + } +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/baskets: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + description: |- + Creates a new basket. + + The created basket is initialized with default values. Optional JSON data provided in the request body is populated into the created basket. It can be updated with other endpoints offered by the Shopper Baskets API. + + Each customer can have just one open basket. When a basket is created, it is said to be open. It remains open until either an order is created from it or it is deleted. + operationId: createBasket + summary: Create a new basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '200': + description: The initialized basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customerId URL parameter does not match the verified customer + represented by the JSON Web Token (JWT). + - a new basket cannot be created because the maximum number + of baskets per customer would be exceeded. + - the same shipment ID appeared twice in the body. + - the coupon number is not provided. + - a fixed price adjustment was added at order level which is disallowed. + - a promotion ID was + used twice, while attempting to add a price adjustment. + - a system promotion + ID was used as a manual promotion ID, while attempting to add a price adjustment. + - more than one hundred price adjustments would have been + created. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: Thrown if the shipment with the given shipment ID is unknown. + content: + application/problem+json: + examples: + ShipmentNotFound: + $ref: '#/components/examples/ShipmentNotFound' + requestBody: + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketPost' + schema: + $ref: '#/components/schemas/Basket' + required: true + parameters: + - $ref: '#/components/parameters/taxMode' + - $ref: '#/components/parameters/locale' + /organizations/{organizationId}/baskets/actions/transfer: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + description: |- + Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. + + A success response contains the transferred basket. + + If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: + - Keep the current shopper's active basket. + - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. + - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + operationId: transferBasket + summary: Transfer an existing basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/overrideExisting' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The transferred basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketTransferException: + $ref: '#/components/examples/BasketTransferException' + /organizations/{organizationId}/baskets/actions/merge: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + post: + operationId: mergeBasket + summary: Merge baskets. + description: |- + Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. + + The following information is merged: + - custom attributes on the basket and on all copied records + - product items + - gift certificate items + - coupon items + - shipments + - ad-hoc price adjustments + + To control the merging of products that exist in both baskets, use the `productItemMergeMode` parameter. By default, the higher of the two basket quantities is used for each product. Products in both baskets are considered to be the same when all of the following values match (if one product doesn't have a value, the other product is a match only if it also doesn't have that value): + - shipment + - productId + - option values + - wishlist reference + - inventory list id + - gift flag & message + - ad-hoc price adjustments + + If any of the listed values don't match, then the item in the previous shopper's basket is copied to a new line item in the current shopper's basket. If the listed values all match, but the matching products have different values for any custom attribute, the merged line item keeps the custom attribute value from the current shopper's basket. + + A success response contains the current shopper's active basket. The previous guest shopper's active basket is deleted. + + If the current shopper doesn't have an active basket, and the createDestinationBasket request parameter is false, then the merge request returns a BasketMergeException (HTTP status 409). You can proceed with one of these options: + - Transfer the previous shopper's active basket to the current logged-in shopper by calling the `baskets/transfer` endpoint. + - Force the merge by calling the `baskets/merge` endpoint again, with the parameter `createDestinationBasket=true`. Forcing the merge creates a new basket for the current shopper and copies information from the previous shopper's basket into it. Because the merge doesn't copy all basket data, a forced merge is not the same as a transfer. For example, the new basket doesn't contain any Personally Identifiable Information (PII) from the previous basket. + + ### before merge + | Previous Shopper's Basket, SKU: Quantity, Custom Attributes | Current Shopper's Basket, SKU: Quantity, Custom Attributes | + |-------------------------------------------------------------|-------------------------------------------------------------| + | SKU_A: 5
SKU_B: 3
SKU_C: 4
c_customAttr_1: 'ABC'
c_customAttr_2: 'DEF' | SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_3: 'XYZ' | + + ### after merge - (previous shopper's basket is deleted) + | productItemMergeMode | Current Shopper's Basket - SKU: Quantity, Custom Attributes | + |----------------------|--------------------------------------------------------------| + | sum_quantities | SKU_A: 7
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | higher_quantity | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | saved_quantity | SKU_A: 2
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | separate_item | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/createDestinationBasket' + - $ref: '#/components/parameters/productItemMergeMode' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The current shopper's active basket, including items merged from the previous shopper's basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has no active basket and the `createDestinationBasket` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketMergeException: + $ref: '#/components/examples/BasketMergeException' + /organizations/{organizationId}/baskets/{basketId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + delete: + description: Removes a basket. + summary: Delete a basket. + operationId: deleteBasket + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '204': + description: Success, without a body. + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + get: + description: Gets a basket. + operationId: getBasket + summary: Retrieve an existing basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the retrieved basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GetBasket: + $ref: '#/components/examples/BasketGet' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + patch: + description: |- + Updates a basket. Only the currency of the basket, source code, the custom + properties of the basket, and the shipping items will be considered. + operationId: updateBasket + summary: Update a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/BasketPatch' + responses: + '200': + description: Success, the response body contains the updated basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/examples-BasketPatch' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the basket cannot be updated because the + requested currency is not supported by the site. + - the given shipping item ID is null or empty. + - a few shipping items with the same item ID are + provided. + - the provided code is not currently active. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipping item with the given item ID is + unknown for the basket. + - the provided code was not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/agent: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Marks a basket as an agent basket. + operationId: updateAsAgentBasket + summary: Designate a basket as an agent basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains basket that is set as an agent basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutAgent: + $ref: '#/components/examples/BasketPutAgent' + '400': + description: Marking this basket as an agent basket would exceed the open agent basket limit for the basket customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/billing-address: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Sets the billing address of a basket. + operationId: updateBillingAddressForBasket + summary: Add a billing address to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/useAsShipping' + - $ref: '#/components/parameters/removeExternalTax' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OrderAddress' + examples: + BillingAddressPut: + $ref: '#/components/examples/BillingAddressPut' + responses: + '200': + description: Success, the response body contains basket with the added billing address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-BillingAddressPut' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/coupons: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + post: + description: Adds a coupon to an existing basket. + operationId: addCouponToBasket + summary: Add a coupon to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CouponItem' + examples: + CouponCodePost: + $ref: '#/components/examples/CouponCodePost' + responses: + '200': + description: Success, the response body contains the basket with the added coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + CouponCodePost: + $ref: '#/components/examples/examples-CouponCodePost' + '400': + description: |- + Possible Reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the coupon number is not provided. + - the coupon code specified is invalid. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/couponItemId' + delete: + description: Removes a coupon from the basket. + operationId: removeCouponFromBasket + summary: Remove a coupon from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + Basket: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the couponItemId URL parameter does not match any + coupon item ID in the basket. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/customer: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + put: + description: Sets customer information for an existing basket. + operationId: updateCustomerForBasket + summary: Add shopper information to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInfo' + examples: + BillingAddressPut: + $ref: '#/components/examples/CustomerPut' + responses: + '200': + description: Success, the response body contains the basket with the added customer information. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-CustomerPut' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the customer cannot be set to the basket because the + max number of baskets per customer would be exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the customer with the given customer number is unknown. + - the basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + post: + description: Adds a gift certificate item to an existing basket. + operationId: addGiftCertificateItemToBasket + summary: Add a gift certificate to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket with the added gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPost: + $ref: '#/components/examples/examples-GiftCertPost' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + requestBody: + content: + application/json: + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPost' + schema: + $ref: '#/components/schemas/GiftCertificateItem' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}: + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/giftCertificateItemId' + delete: + description: Deletes a gift certificate item from an existing basket. + operationId: removeGiftCertificateItemFromBasket + summary: Remove a gift certificate from a basket. + parameters: + - $ref: '#/components/parameters/locale' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + responses: + '200': + description: Success, the response body contains the basket without the deleted gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + patch: + description: Updates a gift certificate item of an existing basket. + operationId: updateGiftCertificateItemInBasket + summary: Update gift certificate information for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket with the updated gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPatch: + $ref: '#/components/examples/examples-GiftCertPatch' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + requestBody: + content: + application/json: + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPatch' + schema: + $ref: '#/components/schemas/GiftCertificateItem' + /organizations/{organizationId}/baskets/{basketId}/items: + post: + responses: + '200': + description: Success, the response body contains the basket with the added items. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given product ID is null or invalid. + - 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. + - a null quantity value. + - the requested product quantity is not available. + - the product cannot be added to the basket because of its type. + - an option with the specified option ID is unknown. + - an option with the specified option value ID is + unknown. + - the maximum allowed number of products added to the basket, + has been exceeded. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the provided bonus discount line item ID is not + present in the current basket. + - 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. + - the selected bonus product is not an applicable product for + the bonus discount line item provided. + body: + application/problem+json: + type: ErrorResponse + examples: + dataTypes.ErrorResponse: !include exchange_modules/893f605e-10e2-423a-bdb4-f952f56eb6d8/checkout-data-types/2.0.6/examples/error/bad-request-example.raml + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the basket does not contain a shipment with the given shipment ID. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + 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: + + - productId: 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. + - shipmentId: 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. + - inventoryId: a valid inventory ID (optional). This is the ID of the inventory from which the item is + allocated. + - bonusDiscountLineItemId: 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. + - optionItems/optionValueId: 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 optionItems + property. These option items must contain optionId and optionValueId. 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_: the custom property must correspond to a custom + attribute () defined for ProductLineItem. The value of this property must be valid for the + type of custom attribute defined for ProductLineItem. + operationId: addItemToBasket + summary: Add an item to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemPost: + $ref: '#/components/examples/ItemPost' + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - no product item with a given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with a specified option ID is unknown. + - an option with a specified option value ID is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: 'Possible reasons: basket not found' + description: "Updates multiple items in a basket. This behaviour matches that of updating a \nsingle item, but the body contains an array of ProductItems to be updated that are identified by `itemId`.\nThe items to update can include bundled product items, although the \nkind of update supported for bundled product items is limited to `productId`, `gift`, `giftMessage`\nand custom properties.\nThe following values in the request body are considered by the server:\n\n- `itemId` (mandatory): identifies an item to be updated.\n- `productId`: a valid product ID. The purpose of this\nvalue is to change the variation of a variation product.\n- `shipmentId`: a valid shipment ID. The purpose of\nthis value is to move a product item to another shipment.\n- `quantity`: a number between 0 and 999. The purpose of\nthis value is to change the quantity of the product item. If the quantity is 0,\nthe product item is removed.\n- `optionItems`/`optionValueId`: a valid option value\nID. The purpose of this value is to exchange an option value for an\noption item of an option product.\nThis is only possible if the product item is an option product. To change\noption values, a collection of the option items to be changed must be\nprovided in the property `optionItems`. Those\n`optionItems` must contain `optionId`\nand `optionValueId`. The provided values must be valid\nfor the option product that this product item represents. Otherwise,\n`InvalidProductOptionItemException` or\n`InvalidProductOptionValueItemException` is thrown.\n- custom properties `c_`: a\nvalue corresponding to the type defined for custom attribute\n`` of the ProductLineItem. The purpose of this value is to\nadd or change the value of a custom attribute defined for the\nProductLineItem.\n- `gift`: a boolean value that specifies whether the item is a gift.\n- `giftMessage`: a message to include with the gift." + operationId: updateItemsInBasket + summary: Update a basket item. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemsPatch: + $ref: '#/components/examples/ItemsPatch' + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a product item from the basket. + operationId: removeItemFromBasket + summary: Remove an item from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ItemPatchSuccess: + $ref: '#/components/examples/examples-ItemPatch' + '400': + description: |- + Possible reasons: + - no product item with given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with the specified option id is unknown. + - an option with the specified option value id is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not. + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - a shipment with it's given ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Possible reasons: + - no product item with given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with the specified option id is unknown. + - an option with the specified option value id is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not. + match the verified customer represented by the JWT token. + operationId: updateItemInBasket + summary: Update an item in a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ItemPatch: + $ref: '#/components/examples/ItemPatch' + schema: + $ref: '#/components/schemas/ProductItem' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes: + put: + responses: + '204': + description: Success, without body. + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The item with the given item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: "Possible Reasons:\n- The tax mode of the referenced basket is not set to EXTERNAL. " + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + description: This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for a specific taxable line item. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasketItem + summary: Add taxation information for a basket item. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + BasketItemTaxPut: + $ref: '#/components/examples/BasketItemTaxPut' + schema: + $ref: '#/components/schemas/TaxItems' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments: + post: + responses: + '200': + description: Success, the response body contains the basket with the added payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Adds a payment instrument to a basket. + operationId: addPaymentInstrumentToBasket + summary: Add a payment instrument to a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PaymentInstrumentPost: + $ref: '#/components/examples/PaymentInstrumentPost' + schema: + $ref: '#/components/schemas/BasketPaymentInstrumentRequest' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument with the given basket payment + instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a payment instrument of a basket. + operationId: removePaymentInstrumentFromBasket + summary: Remove a payment instrument from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/examples-PaymentInstrumentPatch' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the basket payment intsrument with the given id is already permanently masked. + - The customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument item with the given payment instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Updates payment instrument of an existing basket. + operationId: updatePaymentInstrumentInBasket + summary: Update a payment instrument for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/PaymentInstrumentPatch' + schema: + $ref: '#/components/schemas/OrderPaymentInstrument' + required: true + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-methods: + get: + responses: + '200': + description: Success, the response body contains the applicable payment methods for the basket. + content: + application/json: + examples: + PaymentMethodsGet: + $ref: '#/components/examples/PaymentMethodsGet' + schema: + $ref: '#/components/schemas/PaymentMethodResult' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Gets applicable payment methods for an existing basket considering the open payment amount only. + operationId: getPaymentMethodsForBasket + summary: Retrieve payment instruments for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments: + post: + responses: + '200': + description: Success, the response body contains the basket with added price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/examples-PriceAdjustmentPost' + '400': + description: |- + Possible reasons: + - a fixed price adjustment was already created for the given level. + - a fixed price adjustment was added at `order` level. + - a promotion ID was used twice. + - a system promotion ID was used as a manual promotion ID. + - more than one hundred price adjustments would have been created. + - the price adjustment limit had exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Adds a custom manual price adjustment to the basket. + operationId: addPriceAdjustmentToBasket + summary: Add a price adjustment to a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/PriceAdjustmentPost' + schema: + $ref: '#/components/schemas/PriceAdjustmentRequest' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: The priceAdjustmentId is missing, empty or whitespace. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Removes a custom manual price adjustment from the basket. + operationId: removePriceAdjustmentFromBasket + summary: Remove a price adjustment from a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/examples-PriceAdjustmentPatch' + '400': + description: |- + Possible reasons: + - the price adjustment is not manual and cannot be updated. + - the expected attributes are missing in the input. + - the type of a price adjustment does not match the adjustment type of the input data. + - the price adjustment limit is exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The price adjustment ID is not found. + content: + application/problem+json: + examples: + PriceAdjustmentIdNotFoundException: + $ref: '#/components/examples/PriceAdjustmentIdNotFoundException' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored.\n- `discount` \n- `itemText`\n- `reasonCode`\n- `custom properties` \nThe 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." + operationId: updatePriceAdjustmentInBasket + summary: Update a price adjustment for a basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/PriceAdjustmentPatch' + schema: + $ref: '#/components/schemas/PriceAdjustment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/priceAdjustmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-books: + get: + responses: + '200': + description: Success, the response body contains the priceBookIds for the basket. + content: + application/json: + examples: + PriceBooksGet: + $ref: '#/components/examples/PriceBooksGet' + schema: + $ref: '#/components/schemas/PriceBookIds' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: "( DEPRECATED ) Gets applicable price books for an existing basket. This endpoint is deprecated. \nUse [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary), \nhooks or `dw.catalog.PriceBookMgr#getApplicablePriceBooks()` instead." + operationId: getPriceBooksForBasket + summary: Retrieve price books for a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + put: + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown or contains a price book ID that does not correspond to an existing price book. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: ( DEPRECATED ) This method allows you to put an array of priceBookIds to an existing basket, which will be used for basket calculation. This endpoint is deprecated. Use [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary), hooks or `dw.catalog.PriceBookMgr#setApplicablePriceBooks()` instead. + operationId: addPriceBooksToBasket + summary: Add price books to a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PriceBooksPut: + $ref: '#/components/examples/PriceBooksPut' + schema: + $ref: '#/components/schemas/PriceBookIds' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments: + post: + responses: + '200': + description: Success, the response body contains the basket with added shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPost: + $ref: '#/components/examples/examples-ShipmentsPost' + '400': + description: |- + Possible reasons: + - a shipment id is not provided. + - a shipment with the provided ID already. + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + 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 + operationId: createShipmentForBasket + summary: Create a shipment for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsPost: + $ref: '#/components/examples/ShipmentsPost' + schema: + $ref: '#/components/schemas/Shipment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}: + delete: + responses: + '200': + description: Success, the response body contains the basket without the deleted shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given shipment ID is invalid. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '403': + description: |- + The given shipment ID corresponds to the + default shipment and cannot be removed. + content: + application/problem+json: + examples: + BadRequest: + $ref: '#/components/examples/Forbidden' + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Removes a specified shipment and all associated product, gift certificate, + shipping, and price adjustment line items from a basket. + It is not allowed to remove the default shipment. + operationId: removeShipmentFromBasket + summary: Remove a shipment from a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + patch: + responses: + '200': + description: Success, the response body contains the basket with the updated shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPatch: + $ref: '#/components/examples/examples-ShipmentsPatch' + '400': + description: |- + Possible reasons: + - the given shipment ID was invalid. + - a shipment with the provided ID already + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a missing shipping method. + - an invalid shipping method. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: |- + Updates a shipment for a basket. + + The 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 + operationId: updateShipmentForBasket + summary: Update a shipment for a basket. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsPatch: + $ref: '#/components/examples/ShipmentsPatch' + schema: + $ref: '#/components/schemas/Shipment' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address: + put: + responses: + '200': + description: Success, the response body contains the basket with the added shipping address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/examples-ShipmentsAddressPut' + '400': + description: |- + Possible reasons: + - the shipment with the given shipment ID is unknown. + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Sets a shipping address of a specific shipment of a basket. + operationId: updateShippingAddressForShipment + summary: Update the shipping address for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/ShipmentsAddressPut' + schema: + $ref: '#/components/schemas/OrderAddress' + required: true + parameters: + - $ref: '#/components/parameters/useAsBilling' + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method: + put: + responses: + '200': + description: Success, the response body contains the basket with the added shipping method. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/examples-ShipmentsMethodPut' + '400': + description: |- + Possible reasons: + - the id of the shipping method is missing. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Sets a shipping method to a specific shipment of a basket. + operationId: updateShippingMethodForShipment + summary: Update the shipping method for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/ShipmentsMethodPut' + schema: + $ref: '#/components/schemas/ShippingMethod' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods: + get: + responses: + '200': + description: Success, the response body contains the applicable shipping methods for a certain shipment of the basket. + content: + application/json: + examples: + ShipmentsMethodGet: + $ref: '#/components/examples/ShipmentsMethodGet' + schema: + $ref: '#/components/schemas/ShippingMethodResult' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Gets the applicable shipping methods for a certain shipment of a basket. + operationId: getShippingMethodsForShipment + summary: Retrieve the shipping methods for a shipment. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/storefront: + put: + responses: + '200': + description: Success, the response body contains a basket that is set as a storefront basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutStorefront: + $ref: '#/components/examples/BasketPutStorefront' + '400': + description: Thrown if a storefront basket already exists and the query parameter `exchange` is false. + content: + application/problem+json: + examples: + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + description: Marks a basket as a storefront basket. + operationId: updateAsStorefrontBasket + summary: Designate a basket as a storefront basket. + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/exchange' + - $ref: '#/components/parameters/locale' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/taxes: + get: + responses: + '200': + description: Success, the response body contains the external taxation from all line items from the referenced basket. + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketTaxGet' + schema: + $ref: '#/components/schemas/Taxes' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/json: + examples: + InvalidTaxMode: + $ref: '#/components/examples/InvalidTaxMode' + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: This method gives you the external taxation data set by the PUT taxes API. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: getTaxesFromBasket + summary: Retrieve the external taxation information for a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-baskets-orders + parameters: + - $ref: '#/components/parameters/siteId' + put: + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + description: |- + This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. + This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasket + summary: Add external taxation information to a basket. + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + requestBody: + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketTaxPut' + schema: + $ref: '#/components/schemas/Taxes' + required: true + parameters: + - $ref: '#/components/parameters/siteId' + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + ShopperTokenTaob: + type: oauth2 + description: "`ShopperTokenTaob` (Taob = trusted agent on behalf) is a child of the `ShopperToken` security scheme and extends the functionality of `ShopperToken` for specific use cases. \nA token of type `ShopperTokenTaob` allows you to access Shopper API endpoints, including OCAPI and Salesforce Commerce API for headless applications. Besides endpoints that require this specific subtype, all other endpoints secured by the `ShopperToken` parent scheme can be accessed with a `ShopperTokenTaob`.\nTo get a `ShopperTokenTaob` token, a `Taob` session needs to be created first (see [getTrustedAgentAuthorizationToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAuthorizationToken)). \nAfterwards the `ShopperTokenTaob` token can be gained (see [getTrustedAgentAccessToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAccessToken)).\nFor more information regarding the `Taob` flow see also [Trusted Agent Authorization](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-trusted-agent.html).\n" + flows: + clientCredentials: + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/trusted-agent/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + AmOAuth2: + type: oauth2 + description: AccountManager OAuth 2.0 bearer token Authentication. + flows: + clientCredentials: + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + schemas: + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + OrderAddress: + description: Document representing an order address. + properties: + address1: + description: The first address line. + example: 45 Main Rd. + type: string + address2: + description: The second address line. + example: Apartment 204 + type: string + city: + description: The city. + example: Boston + type: string + companyName: + description: The company name. + example: Salesforce + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + firstName: + description: The first name. + example: Max + type: string + fullName: + description: The full name. + example: Max Mustermann + type: string + id: + description: The ID of the address. + example: me + type: string + jobTitle: + description: The job title. + example: Software Engineer + type: string + lastName: + description: The last name. + example: Mustermann + type: string + phone: + description: The phone number. + example: '6175555555' + type: string + postBox: + description: The post office box. + example: PO BOX 109 + type: string + postalCode: + description: The postal code. + example: '05408' + type: string + salutation: + description: The salutation. + example: Mr + type: string + secondName: + description: The second name. + type: string + stateCode: + description: The state code. + example: MA + type: string + suffix: + description: The suffix. + example: Sr + type: string + suite: + description: The suite. + example: 24A + type: string + title: + description: The title. + example: Dr. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + ProductDetailsLink: + description: Document representing a link to the resource for product details. + properties: + productDescription: + description: The description of the product. + example: Nintendo DS revolutionizes handheld gameplay. + type: string + productId: + $ref: '#/components/schemas/ProductId' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + title: + description: The link title. + example: Nintendo DS Game Console + type: string + type: object + required: + - productId + additionalProperties: false + BonusDiscountLineItem: + description: Document representing a bonus discount line item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + bonusProducts: + description: The bonus products the customer can choose from. + type: array + items: + $ref: '#/components/schemas/ProductDetailsLink' + couponCode: + description: The coupon code that triggered the promotion, if applicable. + example: 5ties + type: string + id: + description: The ID of the line item. It is read only. + example: 91f4dd8bfa0653d58b7783b04f + type: string + maxBonusItems: + format: int32 + description: The maximum number of bonus items the user can select for this promotion. + type: integer + promotionId: + description: The ID of the promotion that triggered the creation of the line item. + example: Buy1Get2 + type: string + CouponItemId: + minLength: 1 + type: string + description: The coupon item ID + example: d4c9c0141e9c74c150225580f3 + CouponItem: + description: Document representing a coupon item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + code: + maxLength: 256 + description: The coupon code. + example: 5ties + type: string + couponItemId: + description: The coupon item ID. It is read only. + allOf: + - $ref: '#/components/schemas/CouponItemId' + statusCode: + description: The status of the coupon item. It is read only. + example: no_applicable_promotion + enum: + - 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 + type: string + valid: + description: |- + 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". It is read only. + example: true + type: boolean + required: + - code + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CustomerInfo: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: The customer information for guest or logged-in customers. + type: object + properties: + customerId: + maxLength: 100 + description: The customer ID. It is read only. + example: abMKqMaNYOBMnNdDNzyC5oNTi5 + type: string + customerName: + description: The customer name. + example: Max Mustermann + type: string + customerNo: + maxLength: 100 + description: The customer number. + example: '0002352' + type: string + email: + description: The customer's email address. + example: no-reply@salesforce.com + type: string + required: + - email + GiftCertificateItemId: + example: 629dea6e7b61e58da629b57b21 + type: string + minLength: 1 + GiftCertificateItem: + description: A gift certificate item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate item amount. + example: 20 + type: number + giftCertificateItemId: + description: The item ID. It is read only. + allOf: + - $ref: '#/components/schemas/GiftCertificateItemId' + message: + maxLength: 4000 + description: The gift certificate message. + example: Birthday present. + type: string + recipientEmail: + minLength: 1 + description: The recipient email. + example: no-reply@salesforce.com + type: string + recipientName: + description: The recipient's name. + example: Daniel Mustermann + type: string + senderName: + description: The sender's name. + example: Max Mustermann + type: string + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + required: + - amount + - recipientEmail + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. + type: object + properties: + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b + type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + Status: + description: Document representing an object status. + properties: + code: + description: The status code. + type: string + message: + description: The status message. + type: string + status: + format: int32 + description: |- + The status. + For more information on the status values see Status.OK and Status.ERROR. + type: integer + type: object + additionalProperties: false + PaymentCard: + additionalProperties: false + description: Document representing a payment card. + type: object + properties: + cardType: + maxLength: 256 + description: The payment card type. + example: Visa + type: string + creditCardExpired: + description: A flag indicating if the credit card is expired. It is read only. + example: true + type: boolean + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + maxLength: 4000 + description: The masked payment card number. + example: '*********4422' + type: string + numberLastDigits: + maxLength: 4000 + description: The last digits of the payment card number. It is read only. + example: '4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2015 + type: integer + PaymentInstrumentId: + description: The payment instrument ID + example: ba248424e3eee797f062162f8b + type: string + OrderPaymentInstrument: + description: Document representing an order payment instrument. + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + authorizationStatus: + description: The authorization status of the payment transaction. It is read only. + allOf: + - $ref: '#/components/schemas/Status' + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + maskedGiftCertificateCode: + description: The gift certificate code with the last 4 characters not masked. + example: '******Gzzy' + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/PaymentCard' + paymentInstrumentId: + description: The payment instrument ID. It is read only. + allOf: + - $ref: '#/components/schemas/PaymentInstrumentId' + paymentMethodId: + maxLength: 256 + description: The payment method ID. It is read only. + example: CREDIT_CARD + type: string + type: object + ProductItem: + description: Document representing a product item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including + adjustments. If the taxation policy is net, it doesn't include tax. If the + taxation policy is gross, it includes tax. It is read only. + example: 130 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. + example: true + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. + example: inventory + type: string + itemId: + description: |- + The product item ID. Use it to identify this item when updating its quantity or + creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not + including order-level adjustments or shipping charges. If the taxation policy is + net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 20.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation + policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 15.5 + type: number + productId: + maxLength: 100 + description: The ID of the product. + example: nintendo-ds-console + type: string + productListItem: + description: |- + If this product line item was added from a product list, this value is a reference + to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A + related shipping item represents a surcharge applied to individual products using + a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax for the product item, not including price adjustments. It is read only. + example: 0.3 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this product item. It is read only. + example: 30 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.9 + type: number + ItemId: + description: The item id. + example: 430ef5aad3a24de59378458434 + type: string + OptionItem: + description: |- + An option item represents an optional purchase related to a product item, and is always associated with that parent product + item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + example: ba248414e3eee797f062162f8b + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. It is read only. + example: false + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: false + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. It is read only. + example: inventory + type: string + itemId: + description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + example: The item text. + type: string + optionId: + maxLength: 256 + description: The ID of the option. It is read only. + example: consoleWarranty + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + optionValueId: + maxLength: 256 + description: The ID of the option value. It is read only. + example: '000' + type: string + price: + format: double + description: |- + The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 150.99 + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not including order-level adjustments or + shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated order-level adjustments, but not + including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 40.5 + type: number + productId: + $ref: '#/components/schemas/ProductId' + productListItem: + description: If this product line item was added from a product list, this value is a reference to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The ordered quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A related shipping item represents a + surcharge applied to individual products using a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax on the line item before applying any adjustments. It is read only. + example: 0 + type: number + taxBasis: + format: double + description: The amount used to calculate the tax for this item. It is read only. + example: 50 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.19 + type: number + required: + - optionId + - optionValueId + ProductListLink: + description: Document representing a link to a product list. + properties: + description: + description: The description of this product list. + type: string + name: + description: The name of this product list. + type: string + public: + description: |- + A flag indicating whether the owner made this product list available for access + by other customers. It is read only. + example: true + type: boolean + title: + description: The link title. + type: string + type: + description: The type of the product list. + example: shopping_list + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + type: string + type: object + additionalProperties: false + ProductListItemReference: + description: Document representing product list item details. + type: object + additionalProperties: false + properties: + id: + description: The ID of the product list item. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + priority: + format: int32 + description: The priority of the product list item. + example: 1 + type: integer + productDetailsLink: + $ref: '#/components/schemas/ProductDetailsLink' + productList: + description: A reference to the associated product list. It is read only. + allOf: + - $ref: '#/components/schemas/ProductListLink' + public: + example: false + type: boolean + purchasedQuantity: + format: double + description: The total quantity of this item purchased from the product list. + example: 0 + type: number + quantity: + minimum: 0 + format: double + description: The number of products or gift certificates that get shipped when purchasing this product list item. + example: 1 + type: number + type: + description: Specifies whether the item is a product or a gift certificate. + example: product + enum: + - product + - gift_certificate + type: string + required: + - id + ShipmentId: + minLength: 1 + type: string + example: me + description: The identifier of the shipment + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id + Shipment: + description: Document representing a shipment. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not including + service charges such as shipping. If the Discount Taxation preference is set to Tax Products and + Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + gift: + description: A flag indicating whether the shipment is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + merchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, not including price adjustments or service charges such as + shipping. It is read only. + example: 4.95 + type: number + productSubTotal: + format: double + description: |- + The total price of all products in the shipment, including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If + the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + shipmentId: + description: The order-specific ID of the shipment. The default value is 'me'. + default: me + allOf: + - $ref: '#/components/schemas/ShipmentId' + shipmentNo: + description: The shipment number of this shipment. This number is automatically generated. It is read only. + type: string + shipmentTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments, shipping charges, + and tax. It is read only. + example: 39.99 + type: number + shippingAddress: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + shippingMethod: + $ref: '#/components/schemas/ShippingMethod' + shippingStatus: + description: The shipping status of the shipment. + example: shipped + enum: + - not_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges in the shipment, including shipping adjustments. If the + taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. + example: 0.3 + type: number + taxTotal: + format: double + description: |- + The total tax on the shipment, including item-level price adjustments and service charges such as + shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on + Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 1.8 + type: number + trackingNumber: + description: The tracking number of the shipment. + example: 1Z204E380338943508 + type: string + type: object + ShippingItem: + description: Document representing a shipping item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax for the shipping item, including price adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the shipping item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + itemId: + description: |- + The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a + custom price adjustment for it. It is read only. + example: 430ef5aad3a24de59378458434 + type: string + itemText: + description: The text describing the shipping item. + example: Shipping + type: string + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the shipping item including item-level adjustments, but not including order-level + adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + type: number + shipmentId: + description: The identifier of the shipment to which this item belongs. + allOf: + - $ref: '#/components/schemas/ShipmentId' + tax: + format: double + description: The tax on the product item, not including adjustments. It is read only. + example: 0.19 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this shipping item. It is read only. + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. + type: number + type: object + Basket: + description: Document representing a basket. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not + including service charges such as shipping. If the Discount Taxation preference is set to Tax + Products and Shipping Only Based on Adjusted Price, this amount also includes prorated + order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + agentBasket: + description: Is the basket created by an agent? It is read only. + example: true + type: boolean + basketId: + description: The unique identifier for the basket. It is read only. + example: e78aa5646a8efebdd9cdd38be7 + type: string + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + couponItems: + description: The coupon items. + type: array + items: + $ref: '#/components/schemas/CouponItem' + creationDate: + description: The timestamp when the basket was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information, if the customer is logged in. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + giftCertificateItems: + description: The gift certificate line items. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + inventoryReservationExpiry: + description: The expiration datetime of the inventory reservation. It is read only. + example: '2015-05-19T15:30:18.000Z' + type: string + format: date-time + lastModified: + description: The timestamp when the basket was last modified. It is read only. + example: '2015-05-19T15:25:18.000Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. + Merchandise total price represents the sum of the product prices before + services (such as shipping) or adjustments from promotions have + been added. It is read only. + example: 4.95 + type: number + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderTotal: + format: double + description: The total price, including products, shipping and tax. It is read only. + example: 110.24 + type: number + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + productItems: + description: The product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including order-level adjustments or shipping + charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 88 + type: number + shipments: + description: The shipments. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + sourceCode: + description: The source code assigned to the basket. It is read only. + example: OUTDOOR1 + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + required: + - id + - rate + additionalProperties: false + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' + OrderPaymentCardRequest: + description: Document representing an order payment card request. + type: object + properties: + cardType: + maxLength: 256 + description: 'The payment card type (for example: Visa).' + example: Visa + type: string + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + pattern: ^[0-9 -]{0,7}\D{6,15}\d{0,4}$ + maxLength: 25 + description: The masked payment card number. + example: '*********4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2019 + type: integer + BasketPaymentInstrumentRequest: + description: Document representing a basket payment instrument request. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + giftCertificateCode: + maxLength: 256 + description: The gift certificate code. + example: AFGRTUZ + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/OrderPaymentCardRequest' + paymentMethodId: + maxLength: 256 + description: The payment method ID. + example: CREDIT_CARD + type: string + PaymentCardSpec: + description: Document representing the specification for a payment card. + type: object + properties: + cardType: + description: The payment card type. It is read only. + example: Visa + type: string + checksumVerificationEnabled: + description: A flag indicating whether the card number is verified using the Luhn checksum algorithm. It is read only. + example: true + type: boolean + description: + description: The localized description of the payment card. It is read only. + type: string + image: + description: The URL to the image that represents the payment card. It is read only. + type: string + name: + description: The localized name of the payment card. It is read only. + type: string + numberLengths: + description: |- + The sorted list of number lengths (individual lengths as well as + length ranges). It is read only. + type: array + items: + type: string + numberPrefixes: + description: |- + The sorted list of number prefixes (individual prefixes as well + as prefix ranges). It is read only. + type: array + items: + type: string + securityCodeLength: + format: int32 + description: The length of the security code for this card. It is read only. + type: integer + PaymentMethod: + description: Document representing a payment method. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + cards: + description: The sorted array of payment cards (included only when the system payment method is CREDIT_CARD). It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentCardSpec' + description: + description: The localized description of the payment method or card. It is read only. + type: string + id: + maxLength: 256 + description: The ID of the payment method or card. It is read only. + type: string + image: + description: The URL to the image that represents the payment method or card. It is read only. + type: string + name: + description: The localized name of the payment method or card. It is read only. + type: string + paymentProcessorId: + description: The payment processor ID. It is read only. It is read only. + type: string + required: + - id + PaymentMethodResult: + description: Result document of payment methods applicable for a basket. + properties: + applicablePaymentMethods: + description: The applicable payment methods. It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentMethod' + type: object + DiscountRequest: + description: Request that represents a discount to be applied to a custom price adjustment. + type: object + additionalProperties: false + properties: + type: + description: |- + The type of discount. + - `amount` describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced by. Example: For a $10 discount, set `type` to `amount` and `value` to `10.00`. + - `percentage` describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. Example: For a 5% discount, set `type` to `percentage` and `value` to `5.00`. + - `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. Example: To set a fixed price of $15, set `type` to `fixed_price` and `value` to `15.00`. **Important**: Setting `type` to `fixed_price` is not supported when `level` is set to `order`. + example: percentage + enum: + - percentage + - fixed_price + - amount + type: string + value: + format: double + description: The amount of the discount. + example: 20 + type: number + required: + - type + - value + PriceAdjustmentRequest: + description: Request that represents a price adjustment. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + discount: + description: A discount that can be specified instead of a price. + allOf: + - $ref: '#/components/schemas/DiscountRequest' + itemId: + description: The item to which the price adjustment should be added, depending on the specified level. If the level is ´order´, item id is not needed. If `shipping`, specify the UUID of the shipping item. If `product`, specify the UUID of the product item. + example: 93196fae953cbedbe54d67e760 + type: string + itemText: + description: The text describing the item in more detail. + example: A discounted item + type: string + level: + description: |- + The level at which the adjustment is applied. + - `order` indicates that the price adjustment should be added directly to basket. + - `product` indicates that the price adjustment should be added to the product item. + - `shipping` indicates that the price adjustment is added to the shipping item. + example: order + enum: + - product + - shipping + - order + type: string + promotionId: + description: The ID of the related promotion. Custom price adjustments can be assigned any promotion ID as long as it's not used by a price adjustment belonging to the same item and isn't used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated. + example: Shipping100 + type: string + reasonCode: + description: The reason for the price adjustment. + example: Shipping promotion on order above $1,000 USD + type: string + required: + - level + PriceBookIds: + maxItems: 10 + description: Array of price book IDs to use for the basket calculation. + type: array + items: + maxLength: 256 + type: string + ShippingMethodResult: + description: Result document containing shipping methods. + properties: + applicableShippingMethods: + description: The applicable shipping method documents. It is read only. + type: array + items: + $ref: '#/components/schemas/ShippingMethod' + defaultShippingMethodId: + description: The default shipping method. It is read only. + example: me + type: string + type: object + Taxes: + description: Document representing the tax rates and (optionally) amounts for all items in a basket. + properties: + taxes: + description: 'Map containing the TaxItems for the line item ids: Map' + type: object + additionalProperties: + $ref: '#/components/schemas/TaxItems' + type: object + required: + - taxes + additionalProperties: false + parameters: + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + taxMode: + name: taxMode + in: query + description: "Determines how taxes are calculated. \n\nThe default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. \nExternal tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. \nGift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. \nDepending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket." + schema: + default: internal + enum: + - internal + - external + type: string + example: external + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + overrideExisting: + name: overrideExisting + in: query + description: |- + If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior: + - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change. + - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200). + schema: + default: false + type: boolean + example: false + createDestinationBasket: + name: createDestinationBasket + in: query + description: |- + If the current shopper has an active basket, this parameter is ignored. If the current shopper has no active basket, this parameter controls the behavior: + - `false` (default): Return a BasketMergeException (HTTP status 409). + - `true`: Force the merge by creating a basket for the current shopper and copying information from the previous shopper's basket into it. Return success (HTTP status 200). + schema: + default: false + type: boolean + productItemMergeMode: + name: productItemMergeMode + in: query + description: |- + This parameter controls the quantity calculation for products that exist in both baskets. + - higher_quantity (default): Compare the product's quantities in each basket, and use the higher value. + - sum_quantities: Use the sum of the product's quantities from both baskets. + - saved_quantity: Use the product's quantity in the current shopper's active basket. Ignore the quantity from the previous shopper's basket. + - separate_item: Add a separate product item to the current shopper's basket for the quantity in the previous shopper's basket. + schema: + default: higher_quantity + enum: + - higher_quantity + - sum_quantities + - saved_quantity + - separate_item + type: string + basketId: + name: basketId + in: path + required: true + schema: + minLength: 1 + type: string + description: The ID of the basket to be modified. + removeExternalTax: + name: removeExternalTax + in: query + description: 'If `true` (default value), the external tax rates are removed from the basket and set to null. To add external tax rates to a basket, use the `addTaxesForBasket` or `addTaxesForBasketItem` endpoint. The removal of external tax rates depends on the update performed on the basket, for example: an update to the `currency` triggers a removal. Set this parameter to `false` to disable the removal of external tax rates/values.' + schema: + default: true + type: boolean + useAsShipping: + name: useAsShipping + in: query + example: true + schema: + type: boolean + couponItemId: + name: couponItemId + in: path + required: true + schema: + $ref: '#/components/schemas/CouponItemId' + description: The ID of the coupon item. + giftCertificateItemId: + name: giftCertificateItemId + in: path + required: true + schema: + $ref: '#/components/schemas/GiftCertificateItemId' + description: the ID of the gift certificate item to be updated. + itemId: + name: itemId + in: path + required: true + schema: + $ref: '#/components/schemas/ItemId' + description: The ID of the item to be updated. + paymentInstrumentId: + name: paymentInstrumentId + in: path + required: true + schema: + $ref: '#/components/schemas/PaymentInstrumentId' + priceAdjustmentId: + name: priceAdjustmentId + in: path + required: true + schema: + $ref: '#/components/schemas/PriceAdjustmentId' + shipmentId: + name: shipmentId + in: path + required: true + schema: + $ref: '#/components/schemas/ShipmentId' + description: The ID of the shipment to be modified. + useAsBilling: + name: useAsBilling + in: query + example: true + schema: + type: boolean + exchange: + name: exchange + in: query + description: If true, an existing storefront basket is exchanged and marked as an agent basket. If false, a `CustomerBasketsQuotaExceededException` is thrown. + schema: + type: boolean + examples: + BasketPost: + value: + customerInfo: + email: shopper@salesforce-test.com + customerNo: '000000001' + billingAddress: + firstName: Stephanie + lastName: Miller + address1: 104 Presidential Way + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + shipments: + - shippingMethod: + id: '001' + shippingAddress: + firstName: Agustin + lastName: Estes + address1: 4162 Turkey Pen Road + city: New York + postalCode: '10016' + stateCode: NY + countryCode: US + paymentInstruments: + - paymentMethodId: CREDIT_CARD + paymentCard: + cardType: Visa + couponItems: + - code: 5ties + productItems: + - productId: green-umbrella + quantity: 3 + examples-BasketPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BadRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: Decoding of the property with path '$.failedExample.[1].intProperty' failed because the expected type is 'Integer|Decimal' but the actual type was 'String'. + CustomerBasketQuotaExceededException: + value: + title: Customer Baskets Quota Exceeded + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/customer-baskets-quota-exceeded + detail: The maximum number of baskets per customer was exceeded. Please reuse or delete one of the existing baskets (40e91e04aba6e42a6836f79308). + basketIds: 40e91e04aba6e42a6836f79308 + ShipmentNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/shipment-not-found + title: Shipment Not Found + detail: The shipping method with ID '123' is unknown or can't be applied to the basket. + ForbiddenMissingPrevCustomerInfo: + value: + title: Forbidden + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + detail: Your access-token is valid, but it contains no previous customer to process this action. + SourceBasketException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/no-source-basket-exception + title: Conflict + detail: The previous customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketTransferException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-transfer-basket-already-exists-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has an active basket. + BasketMergeException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-merge-no-current-basket-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketGet: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerInfoJwtMismatch: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: The customer is invalid. + BasketNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-not-found + title: Basket Not Found + detail: No basket with ID '123' could be found. + BasketPatch: + value: + c_textValue: oak + examples-BasketPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + c_textValue: oak + BasketPutAgent: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: true + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BillingAddressPut: + value: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-BillingAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 385 Prospect Valley Road + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CouponCodePost: + value: + code: 10_percent_off + examples-CouponCodePost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + - code: 10_percent_off + couponItemId: 9372d0f511dac8caf77afc4kj2 + statusCode: applied + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerPut: + value: + email: shopperUpdate@salesforce-test.com + examples-CustomerPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPost: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + shipmentId: me + examples-GiftCertPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 2 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPatch: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + examples-GiftCertPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ItemPost: + value: + - productId: green-bag + quantity: 1 + ItemsPatch: + value: + - itemId: 051e908cca031ebf8ee80cbb0a + productId: green-bag + quantity: 1 + - itemId: 078a492cca031ebf8ee80739ab + optionItems: + - optionId: Option1 + optionValueId: ValueA + quantity: 1 + ItemPatch: + value: + quantity: 1 + examples-ItemPatch: + value: + adjustedMerchandizeTotalTax: 10 + adjustedShippingTotalTax: 0.4 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:58:39.498Z' + merchandizeTotalTax: 10 + orderTotal: 218.38 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 10 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATre + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 1 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 199.99 + priceAfterItemDiscount: 199.99 + priceAfterOrderDiscount: 199.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 1 + shipmentId: me + tax: 10 + taxBasis: 199.99 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 199.99 + productTotal: 199.99 + shipments: + - adjustedMerchandizeTotalTax: 10 + adjustedShippingTotalTax: 0.4 + gift: false + merchandizeTotalTax: 10 + productSubTotal: 199.99 + productTotal: 199.99 + shipmentId: me + shipmentTotal: 218.38 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 7.99 + shippingStatus: not_shipped + shippingTotal: 7.99 + shippingTotalTax: 0.4 + taxTotal: 10.4 + shippingItems: + - adjustedTax: 0.4 + basePrice: 7.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 7.99 + priceAfterItemDiscount: 7.99 + shipmentId: me + tax: 0.4 + taxBasis: 7.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 7.99 + shippingTotalTax: 0.4 + taxation: net + taxTotal: 10.4 + BasketItemTaxPut: + value: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + UnsupportedRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-request-if-scapi-hooks-enabled + title: Unsupported Request If SCAPI Hooks Enabled + detail: You can't call this endpoint because Salesforce Commerce API hook execution is enabled. + PaymentInstrumentPost: + value: + amount: 1 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '*********1234' + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + PaymentInstrumentPatch: + value: + amount: 0 + paymentCard: + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + examples-PaymentInstrumentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + holder: Miller + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PaymentMethodsGet: + value: + applicablePaymentMethods: + - id: GIFT_CERTIFICATE + name: Gift Certificate + paymentProcessorId: BASIC_GIFT_CERTIFICATE + - cards: + - cardType: Visa + checksumVerificationEnabled: true + name: Visa + numberLengths: + - '13' + - '16' + numberPrefixes: + - '4' + - cardType: Amex + checksumVerificationEnabled: true + name: American Express + numberLengths: + - '15' + numberPrefixes: + - '34' + - '37' + - cardType: Master Card + checksumVerificationEnabled: true + name: MasterCard + numberLengths: + - '16' + numberPrefixes: + - 51-55 + - cardType: Discover + checksumVerificationEnabled: true + name: Discover + numberLengths: + - '16' + numberPrefixes: + - '6011' + - 622126-622925 + - 644-649 + - '65' + id: CREDIT_CARD + name: Credit Card + paymentProcessorId: BASIC_CREDIT + - id: PayPal + name: Pay Pal + paymentProcessorId: PAYPAL_EXPRESS + - id: BML + name: Bill Me Later + paymentProcessorId: CYBERSOURCE_BML + PriceAdjustmentPost: + value: + discount: + value: 5 + type: percentage + itemText: MyOrderAdjustment + level: order + promotionId: manual adjustment + examples-PriceAdjustmentPost: + value: + adjustedMerchandizeTotalTax: 28.45 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 0.05 + percentage: 5 + type: percentage + createdBy: testAgent + creationDate: '2015-05-25T09:13:10.942Z' + custom: true + itemText: MyOrderAdjustment + manual: true + price: -30 + promotionId: manual adjustment + priceAdjustmentId: cdzoAiWbOmbiUaaadlfSpMDgNw + orderTotal: 615.21 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 569.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 569.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 569.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentPatch: + value: + appliedDiscount: + amount: 15 + type: amount + itemText: AgentOrderAdjustment + reasonCode: override manual promo + examples-PriceAdjustmentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 15 + type: amount + createdBy: testWapiAgent + creationDate: '2017-03-14T09:15:35.543Z' + custom: true + itemText: MyOrderAdjustment + lastModified: '2017-03-14T09:15:35.594Z' + manual: true + price: -15 + priceAdjustmentId: e397cd21f9a9c0643277ba1011 + promotionId: manual adjustment + reasonCode: override manual promo + orderTotal: 631.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentIdNotFoundException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/price-adjustment-not-found + title: Price Adjustment Not Found + detail: No price adjustment with ID '453599643347eac5e4ebd85b49' could be found. + PriceBooksGet: + value: + - price-book-id1 + - price-book-id2 + PriceBooksPut: + value: + - price-book-id1 + - price-book-id2 + ShipmentsPost: + value: + shipmentId: me2 + shippingMethod: + id: '001' + shippingAddress: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-ShipmentsPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + - adjustedMerchandizeTotalTax: 35 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 35 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me2 + shipmentTotal: 646.76 + shippingAddress: + address1: 385 Prospect Valley Road + city: Woburn + stateCode: MA + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 84f06786daa68ae33af7e21ec6 + lastName: Miller + shippingMethod: + description: Order received in 2 business days + id: '001' + name: 2-Day Express + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 35 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 6fea9966277c94e06b482a5c43 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 36.98 + shippingTotalTax: 1.35 + taxation: net + taxTotal: 36.35 + Forbidden: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + title: Forbidden + detail: The shipment with ID 'me' corresponds to the default shipment and can't be deleted. + ShipmentsPatch: + value: + shipmentId: me + shipmentNo: ignored shipment no + shippingMethod: + id: '003' + shippingAddress: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + c_wapi-string: shipment_custom_property + examples-ShipmentsPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxation: net + taxTotal: 36.05 + ShipmentsAddressPut: + value: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + examples-ShipmentsAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ShipmentsMethodPut: + value: + id: '003' + examples-ShipmentsMethodPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + shippingStatus: not_shipped + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxTotal: 36.5 + shippingItems: + - adjustedTax: 1.5 + basePrice: 29.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 29.99 + priceAfterItemDiscount: 29.99 + shipmentId: me + tax: 1.5 + taxBasis: 29.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxation: net + taxTotal: 36.5 + ShipmentsMethodGet: + value: + applicableShippingMethods: + - description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + - description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + - description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + - description: Store Pickup + id: '005' + name: Store Pickup + price: 0 + c_storePickupEnabled: true + defaultShippingMethodId: '001' + BasketPutStorefront: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: callcenter + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BasketTaxGet: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 + InvalidTaxMode: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-tax-mode + title: Invalid Tax Mode + detail: Basket with ID 'a10ff320829cb0eef93ca5310a' has invalid tax mode. + BasketTaxPut: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 diff --git a/apis/shopper-baskets-oas/.metadata.json b/apis/shopper-baskets-oas-2.0.15/.metadata.json similarity index 82% rename from apis/shopper-baskets-oas/.metadata.json rename to apis/shopper-baskets-oas-2.0.15/.metadata.json index 8e030b02..a7277776 100644 --- a/apis/shopper-baskets-oas/.metadata.json +++ b/apis/shopper-baskets-oas-2.0.15/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.0.10-kbode.W-17297521-b3", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.0.15", "name": "Shopper Baskets OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "2.0.10-kbode.W-17297521-b3", + "version": "2.0.15", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-baskets-oas/exchange.json b/apis/shopper-baskets-oas-2.0.15/exchange.json similarity index 74% rename from apis/shopper-baskets-oas/exchange.json rename to apis/shopper-baskets-oas-2.0.15/exchange.json index 0ee81774..862cb49e 100644 --- a/apis/shopper-baskets-oas/exchange.json +++ b/apis/shopper-baskets-oas-2.0.15/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-baskets-oas-v2-bundled.yaml", + "main": "shopper-baskets-oas-v2-public.yaml", "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "2.0.10-kbode.W-17297521-b3", + "version": "2.0.15", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas/shopper-baskets-oas-v2-bundled.yaml b/apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-internal.yaml similarity index 98% rename from apis/shopper-baskets-oas/shopper-baskets-oas-v2-bundled.yaml rename to apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-internal.yaml index 750aa85b..4676450b 100644 --- a/apis/shopper-baskets-oas/shopper-baskets-oas-v2-bundled.yaml +++ b/apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-internal.yaml @@ -113,14 +113,10 @@ info: - Available to all shoppers (guest and registered shoppers), as well as agents. To create a temporary basket, set the `temporary` parameter to `true` with the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets-v2?meta=createBasket) endpoint. - license: - name: BSD 3-Clause License - url: https://opensource.org/license/bsd-3-clause servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v2 variables: shortCode: - description: 'TODO: Here is a link to the shortcode setup guide' default: shortCode paths: /organizations/{organizationId}/baskets: @@ -526,6 +522,8 @@ paths: summary: Add a billing address to a basket. parameters: - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/useAsShipping' + - $ref: '#/components/parameters/removeExternalTax' requestBody: content: application/json: @@ -761,7 +759,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GiftCertificateItem' + $ref: '#/components/schemas/Basket' examples: GiftCertPost: $ref: '#/components/examples/examples-GiftCertPost' @@ -803,6 +801,10 @@ paths: responses: '200': description: Success, the response body contains the basket without the deleted gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' '404': description: |- Possible reasons: @@ -2089,8 +2091,8 @@ paths: examples: PostBasketBody: $ref: '#/components/examples/BasketTaxGet' - schema: - $ref: '#/components/examples/Taxes' + schema: + $ref: '#/components/schemas/Taxes' '404': description: The basket with the given basket ID is unknown. content: @@ -2234,7 +2236,6 @@ components: type: string LocaleCode: description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - type: string oneOf: - $ref: '#/components/schemas/LanguageCountry' - $ref: '#/components/schemas/LanguageCode' @@ -2352,6 +2353,8 @@ components: example: Nintendo DS Game Console type: string type: object + required: + - productId additionalProperties: false BonusDiscountLineItem: description: Document representing a bonus discount line item. @@ -2375,7 +2378,6 @@ components: type: string id: description: The ID of the line item. It is read only. - readOnly: true example: 91f4dd8bfa0653d58b7783b04f type: string maxBonusItems: @@ -2409,12 +2411,10 @@ components: type: string couponItemId: description: The coupon item ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/CouponItemId' statusCode: description: The status of the coupon item. It is read only. - readOnly: true example: no_applicable_promotion enum: - coupon_code_already_in_basket @@ -2435,7 +2435,6 @@ components: 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". It is read only. example: true - readOnly: true type: boolean required: - code @@ -2454,7 +2453,6 @@ components: CurrencyCode: description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. example: USD - type: string oneOf: - $ref: '#/components/schemas/ISOCurrency' - $ref: '#/components/schemas/NoValue' @@ -2511,7 +2509,6 @@ components: type: number giftCertificateItemId: description: The item ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/GiftCertificateItemId' message: @@ -2539,36 +2536,141 @@ components: required: - amount - recipientEmail - TaxItem: - description: Object representing the taxation. + GroupedTaxItem: + description: Document representing the grouped tax item. + type: object properties: - id: - description: The taxation identifier. - type: string - rate: - format: double - description: The taxation rate. - example: 0.13 + taxRate: + description: The tax rate. It is read only. type: number - value: format: double - description: The tax amount. Will be computed if not set. + example: 0.1 + taxValue: + description: The summed up tax total for the tax rate. It is read only. type: number - type: object + format: double + example: 10.03 additionalProperties: false - TaxItems: - description: Taxation for a line item. + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. type: object properties: - taxItems: - description: The list of tax items. It is read only. - readOnly: true - type: array - items: - $ref: '#/components/schemas/TaxItem' - SimpleLink: - description: Document representing a link to another resource. + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId Status: description: Document representing an object status. properties: @@ -2662,7 +2764,6 @@ components: type: number authorizationStatus: description: The authorization status of the payment transaction. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/Status' bankRoutingNumber: @@ -2680,7 +2781,6 @@ components: - $ref: '#/components/schemas/PaymentCard' paymentInstrumentId: description: The payment instrument ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/PaymentInstrumentId' paymentMethodId: @@ -2703,7 +2803,6 @@ components: adjustedTax: format: double description: The tax on the line item, including any adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -2712,12 +2811,10 @@ components: The base price of the line item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 130 type: number bonusDiscountLineItemId: description: The ID of the bonus discount line item this bonus product relates to. It is read only. - readOnly: true type: string bonusProductLineItem: description: A flag indicating whether the product item is a bonus. @@ -2730,7 +2827,6 @@ components: $ref: '#/components/schemas/ProductItem' gift: description: Returns true if the item is a gift. It is read only. - readOnly: true example: true type: boolean giftMessage: @@ -2746,7 +2842,6 @@ components: description: |- The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' itemText: @@ -2763,7 +2858,6 @@ components: 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. It is read only. - readOnly: true type: number priceAdjustments: description: The price adjustments. @@ -2776,7 +2870,6 @@ components: The price of the product line item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 20.99 type: number priceAfterOrderDiscount: @@ -2786,7 +2879,6 @@ components: order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 15.5 type: number productId: @@ -2819,33 +2911,28 @@ components: If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only. - readOnly: true example: 006490dcc338feeafc71c964bf type: string tax: format: double description: The tax for the product item, not including price adjustments. It is read only. - readOnly: true example: 0.3 type: number taxBasis: format: double description: The price used to calculate the tax for this product item. It is read only. - readOnly: true example: 30 type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: |- The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only. - readOnly: true example: 0.9 type: number ItemId: @@ -2868,7 +2955,6 @@ components: adjustedTax: format: double description: The tax on the line item, including any adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -2876,17 +2962,14 @@ components: description: |- The base price of the line item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50 type: number bonusDiscountLineItemId: description: The ID of the bonus discount line item this bonus product relates to. It is read only. - readOnly: true example: ba248414e3eee797f062162f8b type: string bonusProductLineItem: description: A flag indicating whether the product item is a bonus. It is read only. - readOnly: true example: false type: boolean bundledProductItems: @@ -2896,7 +2979,6 @@ components: $ref: '#/components/schemas/ProductItem' gift: description: Returns true if the item is a gift. It is read only. - readOnly: true example: false type: boolean giftMessage: @@ -2906,12 +2988,10 @@ components: inventoryId: maxLength: 256 description: The inventory list ID associated with this item. It is read only. - readOnly: true example: inventory type: string itemId: description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' itemText: @@ -2921,7 +3001,6 @@ components: optionId: maxLength: 256 description: The ID of the option. It is read only. - readOnly: true example: consoleWarranty type: string optionItems: @@ -2932,7 +3011,6 @@ components: optionValueId: maxLength: 256 description: The ID of the option value. It is read only. - readOnly: true example: '000' type: string price: @@ -2940,7 +3018,6 @@ components: description: |- The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 150.99 type: number priceAdjustments: @@ -2953,7 +3030,6 @@ components: description: |- The price of the product line item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50.99 type: number priceAfterOrderDiscount: @@ -2962,7 +3038,6 @@ components: The price of the product line item including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 40.5 type: number productId: @@ -2989,168 +3064,33 @@ components: description: |- If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only. - readOnly: true example: 006490dcc338feeafc71c964bf type: string tax: format: double description: The tax on the line item before applying any adjustments. It is read only. - readOnly: true example: 0 type: number taxBasis: format: double description: The amount used to calculate the tax for this item. It is read only. - readOnly: true example: 50 type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: |- The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only. - readOnly: true example: 0.19 type: number required: - optionId - optionValueId - Discount: - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - description: Document representing a discount. - type: object - properties: - amount: - format: double - description: The discount amount for discount types that define specific discount amounts. It is read only. - example: 130.88 - type: number - percentage: - format: double - description: The discount percent for discount types that define percentage discounts. It is read only. - example: 0.19 - type: number - priceBookId: - description: The price book ID that is used with some types. It is read only. - example: usd-sale-prices - type: string - type: - description: The type of discount. It is read only. - example: fixed_price - enum: - - percentage - - fixed_price - - amount - - free - - price_book_price - - bonus - - total_fixed_price - - bonus_choice - - percentage_off_options - type: string - required: - - type - PriceAdjustmentId: - example: ba248424e3eee797f062161f8b - type: string - PriceAdjustment: - description: |- - Document representing a price adjustment within a basket or order. Price adjustments - can be assigned at the order, product, or shipping level. - properties: - appliedDiscount: - description: |- - Details describing the discount this price adjustment is based on. For adjustments - not based on a discount, this value is null. - allOf: - - $ref: '#/components/schemas/Discount' - couponCode: - description: |- - The coupon code of the coupon this price adjustment is based on. For adjustments - not based on a coupon, this value is null. It is read only. - readOnly: true - example: 5ties - type: string - createdBy: - description: The user who created the price adjustment. It is read only. - readOnly: true - example: Support - type: string - creationDate: - description: The timestamp when the price adjustment was created. It is read only. - readOnly: true - example: '2015-05-19T15:23:18.000Z' - type: string - format: date-time - custom: - description: |- - 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. - example: true - type: boolean - itemText: - description: The text describing the item. - type: string - lastModified: - description: The timestamp when the price adjustment was last modified. It is read only. - readOnly: true - example: '2021-02-25T09:58:08.715Z' - type: string - format: date-time - manual: - description: |- - A flag indicating whether this price adjustment was created by a manual process. - If the price adjustment was created by the promotion engine, this value is always - false. - example: true - type: boolean - price: - format: double - description: The adjustment price. It is read only. - readOnly: true - example: 120.88 - type: number - priceAdjustmentId: - description: The price adjustment ID. It is read only. - readOnly: true - allOf: - - $ref: '#/components/schemas/PriceAdjustmentId' - promotionId: - description: |- - 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 a promotion defined in the promotion engine. - If not specified, a promotion ID is generated. - type: string - promotionLink: - description: The URL addressing the related promotion. It is read only. - readOnly: true - type: string - reasonCode: - description: The reason for the price adjustment. - type: string - type: object - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId ProductListLink: description: Document representing a link to a product list. properties: @@ -3189,7 +3129,6 @@ components: properties: id: description: The ID of the product list item. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' priority: @@ -3201,7 +3140,6 @@ components: $ref: '#/components/schemas/ProductDetailsLink' productList: description: A reference to the associated product list. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ProductListLink' public: @@ -3286,7 +3224,6 @@ components: description: |- The shipping cost total, including shipment level costs, product level fix, and surcharge costs. It is read only. - readOnly: true example: 15 type: number shippingPromotions: @@ -3297,6 +3234,8 @@ components: items: $ref: '#/components/schemas/ShippingPromotion' type: object + required: + - id Shipment: description: Document representing a shipment. additionalProperties: @@ -3313,18 +3252,15 @@ components: The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 4.95 type: number adjustedShippingTotalTax: format: double description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number gift: description: A flag indicating whether the shipment is a gift. It is read only. - readOnly: true example: true type: boolean giftMessage: @@ -3336,7 +3272,6 @@ components: description: |- The total tax on products in the shipment, not including price adjustments or service charges such as shipping. It is read only. - readOnly: true example: 4.95 type: number productSubTotal: @@ -3345,7 +3280,6 @@ components: The total price of all products in the shipment, including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number productTotal: @@ -3354,7 +3288,6 @@ components: The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number shipmentId: @@ -3364,14 +3297,12 @@ components: - $ref: '#/components/schemas/ShipmentId' shipmentNo: description: The shipment number of this shipment. This number is automatically generated. It is read only. - readOnly: true type: string shipmentTotal: format: double description: |- The total price of all products in the shipment including item-level adjustments, shipping charges, and tax. It is read only. - readOnly: true example: 39.99 type: number shippingAddress: @@ -3392,13 +3323,11 @@ components: description: |- The total price of all shipping charges in the shipment, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 5.99 type: number shippingTotalTax: format: double description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number taxTotal: @@ -3407,7 +3336,6 @@ components: The total tax on the shipment, including item-level price adjustments and service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 1.8 type: number trackingNumber: @@ -3428,7 +3356,6 @@ components: adjustedTax: format: double description: The tax for the shipping item, including price adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -3436,14 +3363,12 @@ components: description: |- The base price of the shipping item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50 type: number itemId: description: |- The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true example: 430ef5aad3a24de59378458434 type: string itemText: @@ -3456,7 +3381,6 @@ components: 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. It is read only. - readOnly: true type: number priceAdjustments: description: The price adjustments. @@ -3469,7 +3393,6 @@ components: The price of the shipping item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true type: number shipmentId: description: The identifier of the shipment to which this item belongs. @@ -3478,24 +3401,20 @@ components: tax: format: double description: The tax on the product item, not including adjustments. It is read only. - readOnly: true example: 0.19 type: number taxBasis: format: double description: The price used to calculate the tax for this shipping item. It is read only. - readOnly: true type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. - readOnly: true type: number type: object Basket: @@ -3515,23 +3434,19 @@ components: including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 4.95 type: number adjustedShippingTotalTax: format: double description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number agentBasket: description: Is the basket created by an agent? It is read only. - readOnly: true example: true type: boolean basketId: description: The unique identifier for the basket. It is read only. - readOnly: true example: e78aa5646a8efebdd9cdd38be7 type: string billingAddress: @@ -3545,7 +3460,6 @@ components: $ref: '#/components/schemas/BonusDiscountLineItem' channelType: description: The sales channel. It is read only. - readOnly: true example: storefront enum: - storefront @@ -3573,7 +3487,6 @@ components: $ref: '#/components/schemas/CouponItem' creationDate: description: The timestamp when the basket was created. It is read only. - readOnly: true example: '2015-05-19T15:23:18.000Z' type: string format: date-time @@ -3592,19 +3505,16 @@ components: description: |- Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. - readOnly: true type: array items: - $ref: '#/components/schemas/TaxItems' + $ref: '#/components/schemas/GroupedTaxItem' inventoryReservationExpiry: description: The expiration datetime of the inventory reservation. It is read only. - readOnly: true example: '2015-05-19T15:30:18.000Z' type: string format: date-time lastModified: description: The timestamp when the basket was last modified. It is read only. - readOnly: true example: '2015-05-19T15:25:18.000Z' type: string format: date-time @@ -3615,17 +3525,16 @@ components: Merchandise total price represents the sum of the product prices before services (such as shipping) or adjustments from promotions have been added. It is read only. - readOnly: true example: 4.95 type: number - notes: - description: The notes. - allOf: - - $ref: '#/components/schemas/SimpleLink' + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' orderTotal: format: double description: The total price, including products, shipping and tax. It is read only. - readOnly: true example: 110.24 type: number paymentInstruments: @@ -3643,7 +3552,6 @@ components: description: |- The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number productTotal: @@ -3651,7 +3559,6 @@ components: description: |- The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 88 type: number shipments: @@ -3669,29 +3576,24 @@ components: description: |- The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 5.99 type: number shippingTotalTax: format: double description: The total tax on all shipping charges, not including shipping adjustments. It is read only. - readOnly: true example: 0.3 type: number sourceCode: description: The source code assigned to the basket. It is read only. - readOnly: true example: OUTDOOR1 type: string taxTotal: format: double description: The total tax amount. It is read only. - readOnly: true example: 5.25 type: number taxation: description: The taxation policy (gross or net). It is read only. - readOnly: true example: net enum: - gross @@ -3699,12 +3601,10 @@ components: type: string taxRoundedAtGroup: description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. - readOnly: true example: true type: boolean temporaryBasket: description: If the created basket is a temporary basket, this is set to true. Otherwise, it is set to false. - readOnly: true example: true type: boolean type: object @@ -3748,6 +3648,35 @@ components: - title - type - detail + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + additionalProperties: false + required: + - id + - rate + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' OrderPaymentCardRequest: description: Document representing an order payment card request. type: object @@ -3894,23 +3823,18 @@ components: description: description: The localized description of the payment method or card. It is read only. type: string - readOnly: true id: maxLength: 256 description: The ID of the payment method or card. It is read only. - readOnly: true type: string image: description: The URL to the image that represents the payment method or card. It is read only. - readOnly: true type: string name: description: The localized name of the payment method or card. It is read only. - readOnly: true type: string paymentProcessorId: description: The payment processor ID. It is read only. It is read only. - readOnly: true type: string required: - id @@ -3919,7 +3843,6 @@ components: properties: applicablePaymentMethods: description: The applicable payment methods. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/PaymentMethod' @@ -4006,13 +3929,11 @@ components: properties: applicableShippingMethods: description: The applicable shipping method documents. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/ShippingMethod' defaultShippingMethodId: description: The default shipping method. It is read only. - readOnly: true example: me type: string type: object @@ -4025,15 +3946,22 @@ components: additionalProperties: $ref: '#/components/schemas/TaxItems' type: object + required: + - taxes additionalProperties: false parameters: siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. name: siteId in: query required: true + examples: + SiteId: + value: RefArch schema: $ref: '#/components/schemas/SiteId' organizationId: + description: An identifier for the organization the request is being made by name: organizationId in: path required: true @@ -4059,9 +3987,14 @@ components: default: false type: boolean locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. name: locale in: query - required: false + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US schema: $ref: '#/components/schemas/LocaleCode' overrideExisting: @@ -4117,6 +4050,11 @@ components: schema: default: true type: boolean + useAsShipping: + name: useAsShipping + in: query + schema: + type: boolean couponItemId: name: couponItemId in: path @@ -4231,7 +4169,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -4395,7 +4332,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -4530,7 +4466,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:53:35.747Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -4653,7 +4588,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -4784,7 +4718,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:53:35.747Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -4913,7 +4846,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -5038,7 +4970,6 @@ components: email: shopperUpdate@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -5170,7 +5101,6 @@ components: shipmentId: me lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -5301,7 +5231,6 @@ components: shipmentId: me lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -5463,7 +5392,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -5643,7 +5571,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderPriceAdjustments: - appliedDiscount: amount: 0.05 @@ -5785,7 +5712,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderPriceAdjustments: - appliedDiscount: amount: 15 @@ -5947,7 +5873,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -6124,7 +6049,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -6253,7 +6177,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -6378,7 +6301,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -6521,7 +6443,6 @@ components: email: shopper@salesforce-test.com lastModified: '2019-10-17T08:29:55.698Z' merchandizeTotalTax: 30 - notes: {} orderTotal: 646.76 paymentInstruments: - amount: 0 @@ -6630,16 +6551,6 @@ components: rate: 0.01 - id: US_5 rate: 0.05 - Taxes: - description: Document representing the tax rates and (optionally) amounts for all items in a basket. - properties: - taxes: - description: 'Map containing the TaxItems for the line item ids: Map' - type: object - additionalProperties: - $ref: '#/components/schemas/TaxItems' - type: object - additionalProperties: false InvalidTaxMode: value: type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-tax-mode @@ -6661,3 +6572,4 @@ components: rate: 0.01 - id: US_5 rate: 0.05 +x-sdk-classname: ShopperBasketsV2 diff --git a/apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-public.yaml b/apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-public.yaml new file mode 100644 index 00000000..696e9179 --- /dev/null +++ b/apis/shopper-baskets-oas-2.0.15/shopper-baskets-oas-v2-public.yaml @@ -0,0 +1,6574 @@ +openapi: 3.0.3 +info: + title: Shopper Baskets + version: v2 + description: |- + # API Overview + + Shopper Baskets V2 provides all Shopper Basket V1 functionality and adds support for temporary baskets. + Temporary baskets can perform calculations to generate totals, line items, promotions, and item availability without affecting the shopper’s storefront cart, and you can use those calculations for temporary basket checkout. You can also use a temporary basket for an immediate order request. + + **Note**: `dw.ocapi.shop.basket.beforePOST` hook is no longer supported and is replaced by the `dw.ocapi.shop.basket.beforePOST_v2` hook. + + Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout. + + To create a basket, start with the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets-v2?meta=createBasket) endpoint. The endpoint creates the basket in the B2C Commerce system and returns a JSON representation of the basket with a `basketId` property. + + If you provide the JSON for a prepopulated basket to the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets-v2?meta=createBasket) endpoint, you can create a basket using a single API request. + + You can also create a basket and gradually populate it with data using subsequent API requests that reference the same `basketId`. The gradual approach allows you to validate the input data as you go. + + The Shopper Baskets API includes endpoints to populate each part of a basket separately, including: + + - Billing address + - Customer information + - Line items + - Products + - Coupons + - Gift certificates + - Payment methods + - Price books + - Shipments + - Taxation (for items and the basket itself) + + In addition to creating a basket, the main `/baskets` resource offers endpoints to get, transfer, merge, and delete baskets, depending on the HTTP method that you use and the parameters that you supply. These endpoints can you help you handle a variety of complex scenarios, such as when a user starts shopping as a guest and then logs in before checkout. + + You can also use the main `/baskets` resource to add custom properties to your basket, prefixed with `c_` (example: `c_faxNumber`). + + When your basket is fully populated, you can use its `basketId` property to create an order with the [Shopper Orders API](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=Summary). + + For more detail on building baskets, see [Build Baskets and Place Orders](https://developer.salesforce.com/docs/commerce/commerce-api/guide/work-with-baskets-orders.html). + + ## Authentication & Authorization + + The client requesting the basket information must have access to the `/baskets` resource. The Shopper Baskets API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + The following resources require an Account Manager OAuth token with a client ID: + + - `/baskets/{basketId}/taxes` + - `/baskets/{basketId}/items/{itemId}/taxes` + - `/baskets/{basketId}/price-books` + + ## Use Cases + + ### Use Hooks + + For details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + + ## Basket Calculation + + Unless you’re using [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), each modification to a basket triggers the following calculations: + + 1. Calculate product prices: + - Iterate through the product line items and determine the base price of each using its price model. If multiple price books apply to a product, the lowest price is used. + - Calculate product option line item prices using the product option model. + - For bonus products, check dependent adjustments in the basket to determine the price. + 2. Iterate through the gift certificate line items and calculate the price of each by multiplying the base price by the quantity. + 3. Recalculate for all promotions, adding and removing them as appropriate. + 4. Apply product-specific shipping costs. + 5. Calculate the total shipping cost. + 6. Recalculate for all promotions, adding and removing them as appropriate. + 7. Calculate prices for products added by the promotion engine. + 8. Calculate taxes using line item tax class codes. + - For internal tax mode, use the tax tables. + - For external tax mode, use the tax rates returned by the tax API endpoints. + 9. Calculate the order’s net, tax, and gross totals by adding up the line totals. + + ## External Taxation + + The B2C Commerce API calculates taxes internally using tax tables. If you want to integrate with a third-party tax provider, or calculate tax on your own, you can use the external taxation feature to add a taxation rate and optional taxation value. When setting a taxation rate, the taxation is calculated for this specific rate. If you pass a value, this value is used as taxation value, as well, without recalculation. To use this feature, set the `taxMode` parameter to `external` when creating the basket. + + When using external taxation, you must set a tax rate either in one request to the `/baskets/{basketId}/taxes` or with separate requests for each line item, using `/baskets/{basketId}/items/{lineItemId}/taxes`. + + If the tax mode of a basket is set to `external`, a tax item is required for all line items even for zero-tax items to avoid oversights. + + ### External Taxation with Hooks Enabled + + To use external tax calculation with [hooks](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html), use the following API methods in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + - `dw.order.LineItemCtnr#isExternallyTaxed`: Returns true if the basket was created with `taxMode = external` + - `dw.order.TaxMgr#applyExternalTax`: Applies externally set tax rates to the given basket. Only use when `dw.order.LineItemCtnr#isExternallyTaxed` returns true. + + The following example shows an implementation of external tax calculation with hooks enabled in the [Calculate Hook](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html#calculate-hook): + + exports.calculate = function (basket) { + if ( basket.isExternallyTaxed() ) + { + TaxMgr.applyExternalTaxation( basket ); // apply the external tax calculation based on the tax rates set by the SCAPI external taxation APIs + } + else + { + // calculation with tax tables or customization + } + } + + ## Temporary Baskets + + A temporary basket is populated with all the data required to ready the basket for checkout, but differs from a shopper basket in the following ways: + - Basket lifetime is limited to 15 minutes. + - The shopper can have up to 10 (default 4) temporary baskets, which can be configured via Basket Preferences (Sites -> Merchant Tools -> Basket Preferences) and specifying the preference **Temporary Baskets per Customer**. + - Available to all shoppers (guest and registered shoppers), as well as agents. + + To create a temporary basket, set the `temporary` parameter to `true` with the [Create basket](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-baskets-v2?meta=createBasket) endpoint. +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v2 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/baskets: + post: + description: |- + Creates a new basket. + + The created basket is initialized with default values. Optional JSON data provided in the request body is populated into the created basket. It can be updated with other endpoints offered by the Shopper Baskets API. + + Each customer can have just one open basket. When a basket is created, it is said to be open. It remains open until either an order is created from it or it is deleted. + operationId: createBasket + summary: Create a new basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/taxMode' + - $ref: '#/components/parameters/temporary' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PostBasketBody: + $ref: '#/components/examples/BasketPost' + required: true + responses: + '200': + description: The initialized basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customerId URL parameter does not match the verified customer + represented by the JSON Web Token (JWT). + - a new basket cannot be created because the maximum number + of baskets per customer would be exceeded. + - a new temporary basket cannot be created because the maximum number + of temporary baskets per customer would be exceeded. + - the same shipment ID appeared twice in the body. + - the coupon number is not provided. + - a fixed price adjustment was added at order level which is disallowed. + - a promotion ID was used twice, while attempting to add a price adjustment. + - a system promotion ID was used as a manual promotion ID, while attempting to add a price adjustment. + - more than one hundred price adjustments would have been created. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + TemporaryBasketQuotaExceededException: + $ref: '#/components/examples/TemporaryBasketQuotaExceededException' + '404': + description: Thrown if the shipment with the given shipment ID is unknown. + content: + application/problem+json: + examples: + ShipmentNotFound: + $ref: '#/components/examples/ShipmentNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/baskets/actions/transfer: + post: + description: |- + Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. + + A success response contains the transferred basket. + + If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: + - Keep the current shopper's active basket. + - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. + - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + operationId: transferBasket + summary: Transfer an existing basket. + parameters: + - $ref: '#/components/parameters/overrideExisting' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The transferred basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketTransferException: + $ref: '#/components/examples/BasketTransferException' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + /organizations/{organizationId}/baskets/actions/merge: + post: + description: |- + Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. + + The following information is merged: + - custom attributes on the basket and on all copied records + - product items + - gift certificate items + - coupon items + - shipments + - ad-hoc price adjustments + + To control the merging of products that exist in both baskets, use the `productItemMergeMode` parameter. By default, the higher of the two basket quantities is used for each product. Products in both baskets are considered to be the same when all of the following values match (if one product doesn't have a value, the other product is a match only if it also doesn't have that value): + - shipment + - productId + - option values + - wishlist reference + - inventory list id + - gift flag & message + - ad-hoc price adjustments + + If any of the listed values don't match, then the item in the previous shopper's basket is copied to a new line item in the current shopper's basket. If the listed values all match, but the matching products have different values for any custom attribute, the merged line item keeps the custom attribute value from the current shopper's basket. + + A success response contains the current shopper's active basket. The previous guest shopper's active basket is deleted. + + If the current shopper doesn't have an active basket, and the createDestinationBasket request parameter is false, then the merge request returns a BasketMergeException (HTTP status 409). You can proceed with one of these options: + - Transfer the previous shopper's active basket to the current logged-in shopper by calling the `baskets/transfer` endpoint. + - Force the merge by calling the `baskets/merge` endpoint again, with the parameter `createDestinationBasket=true`. Forcing the merge creates a new basket for the current shopper and copies information from the previous shopper's basket into it. Because the merge doesn't copy all basket data, a forced merge is not the same as a transfer. For example, the new basket doesn't contain any Personally Identifiable Information (PII) from the previous basket. + + ### before merge + | Previous Shopper's Basket, SKU: Quantity, Custom Attributes | Current Shopper's Basket, SKU: Quantity, Custom Attributes | + |-------------------------------------------------------------|-------------------------------------------------------------| + | SKU_A: 5
SKU_B: 3
SKU_C: 4
c_customAttr_1: 'ABC'
c_customAttr_2: 'DEF' | SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_3: 'XYZ' | + + ### after merge - (previous shopper's basket is deleted) + | productItemMergeMode | Current Shopper's Basket - SKU: Quantity, Custom Attributes | + |----------------------|--------------------------------------------------------------| + | sum_quantities | SKU_A: 7
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | higher_quantity | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | saved_quantity | SKU_A: 2
SKU_B: 3
SKU_C: 4
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + | separate_item | SKU_A: 5
SKU_B: 3
SKU_C: 4
SKU_A: 2
SKU_D: 6
SKU_E: 7
c_customAttr_1: 'UVW'
c_customAttr_2: 'DEF'
c_customAttr_3: 'XYZ' | + operationId: mergeBasket + summary: Merge baskets. + parameters: + - $ref: '#/components/parameters/createDestinationBasket' + - $ref: '#/components/parameters/productItemMergeMode' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: The current shopper's active basket, including items merged from the previous shopper's basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '403': + description: The call returns this error if no SLAS token for a registered shopper is available. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenMissingPrevCustomerInfo: + $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' + '409': + description: |- + The call returns this response in either of these cases: + - The previous shopper has no active basket. + - The current shopper has no active basket and the `createDestinationBasket` query parameter was `false` (default value). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + SourceBasketException: + $ref: '#/components/examples/SourceBasketException' + BasketMergeException: + $ref: '#/components/examples/BasketMergeException' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + /organizations/{organizationId}/baskets/{basketId}: + get: + description: Gets a basket. + operationId: getBasket + summary: Retrieve an existing basket. + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the retrieved basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GetBasket: + $ref: '#/components/examples/BasketGet' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + delete: + description: Removes a basket. + operationId: deleteBasket + summary: Delete a basket. + responses: + '204': + description: Success, without a body. + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates a basket. Only the currency of the basket, source code, the custom + properties of the basket, and the shipping items will be considered. + operationId: updateBasket + summary: Update a basket. + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/BasketPatch' + required: true + responses: + '200': + description: Success, the response body contains the updated basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPatch: + $ref: '#/components/examples/examples-BasketPatch' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the basket cannot be updated because the + requested currency is not supported by the site. + - the given shipping item ID is null or empty. + - a few shipping items with the same item ID are + provided. + - the provided code is not currently active. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipping item with the given item ID is + unknown for the basket. + - the provided code was not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/agent: + put: + description: Marks a basket as an agent basket. + operationId: updateAsAgentBasket + summary: Designate a basket as an agent basket. + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains basket that is set as an agent basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutAgent: + $ref: '#/components/examples/BasketPutAgent' + '400': + description: Marking this basket as an agent basket would exceed the open agent basket limit for the basket customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/billing-address: + put: + description: Sets the billing address of a basket. + operationId: updateBillingAddressForBasket + summary: Add a billing address to a basket. + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/useAsShipping' + - $ref: '#/components/parameters/removeExternalTax' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrderAddress' + examples: + BillingAddressPut: + $ref: '#/components/examples/BillingAddressPut' + required: true + responses: + '200': + description: Success, the response body contains basket with the added billing address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-BillingAddressPut' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/coupons: + post: + description: Adds a coupon to an existing basket. + operationId: addCouponToBasket + summary: Add a coupon to a basket. + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CouponItem' + examples: + CouponCodePost: + $ref: '#/components/examples/CouponCodePost' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + CouponCodePost: + $ref: '#/components/examples/examples-CouponCodePost' + '400': + description: |- + Possible Reasons: + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + - the coupon number is not provided. + - the coupon code specified is invalid. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}: + delete: + description: Removes a coupon from the basket. + operationId: removeCouponFromBasket + summary: Remove a coupon from a basket. + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted coupon. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + Basket: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the couponItemId URL parameter does not match any + coupon item ID in the basket. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/couponItemId' + /organizations/{organizationId}/baskets/{basketId}/customer: + put: + description: Sets customer information for an existing basket. + operationId: updateCustomerForBasket + summary: Add shopper information to a basket. + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInfo' + examples: + BillingAddressPut: + $ref: '#/components/examples/CustomerPut' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added customer information. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BillingAddress: + $ref: '#/components/examples/examples-CustomerPut' + '400': + description: |- + Possible reasons: + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the customer cannot be set to the basket because the + max number of baskets per customer would be exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the customer with the given customer number is unknown. + - the basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items: + post: + description: Adds a gift certificate item to an existing basket. + operationId: addGiftCertificateItemToBasket + summary: Add a gift certificate to a basket. + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GiftCertificateItem' + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPost' + responses: + '200': + description: Success, the response body contains the basket with the added gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPost: + $ref: '#/components/examples/examples-GiftCertPost' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}: + delete: + description: Deletes a gift certificate item from an existing basket. + operationId: removeGiftCertificateItemFromBasket + summary: Remove a gift certificate from a basket. + parameters: + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: Updates a gift certificate item of an existing basket. + operationId: updateGiftCertificateItemInBasket + summary: Update gift certificate information for a basket. + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GiftCertificateItem' + examples: + GiftCertificateItemPost: + $ref: '#/components/examples/GiftCertPatch' + responses: + '200': + description: Success, the response body contains the basket with the updated gift certificate. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + GiftCertPatch: + $ref: '#/components/examples/examples-GiftCertPatch' + '400': + description: The gift certificate item amount is negative. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the gift certificate item with the given gift certificate item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/giftCertificateItemId' + /organizations/{organizationId}/baskets/{basketId}/items: + post: + description: |- + 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: + + - productId: 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. + - shipmentId: 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. + - inventoryId: a valid inventory ID (optional). This is the ID of the inventory from which the item is + allocated. + - bonusDiscountLineItemId: 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. + - optionItems/optionValueId: 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 optionItems + property. These option items must contain optionId and optionValueId. 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_: the custom property must correspond to a custom + attribute () defined for ProductLineItem. The value of this property must be valid for the + type of custom attribute defined for ProductLineItem. + operationId: addItemToBasket + summary: Add an item to a basket. + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + examples: + ItemPost: + $ref: '#/components/examples/ItemPost' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added items. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given product ID is null or invalid. + - 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. + - a null quantity value. + - the requested product quantity is not available. + - the product cannot be added to the basket because of its type. + - an option with the specified option ID is unknown. + - an option with the specified option value ID is + unknown. + - the maximum allowed number of products added to the basket, + has been exceeded. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + - the provided bonus discount line item ID is not + present in the current basket. + - 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. + - the selected bonus product is not an applicable product for + the bonus discount line item provided. + body: + application/problem+json: + type: ErrorResponse + examples: + dataTypes.ErrorResponse: !include exchange_modules/893f605e-10e2-423a-bdb4-f952f56eb6d8/checkout-data-types/2.0.6/examples/errors/bad-request-example.raml + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the basket does not contain a shipment with the given shipment ID. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates multiple items in a basket. This behaviour matches that of updating a + single item, but the body contains an array of ProductItems to be updated that are identified by `itemId`. + The items to update can include bundled product items, although the + kind of update supported for bundled product items is limited to `productId`, `gift`, `giftMessage` + and custom properties. + The following values in the request body are considered by the server: + + - `itemId` (mandatory): identifies an item to be updated. + - `productId`: a valid product ID. The purpose of this + value is to change the variation of a variation product. + - `shipmentId`: 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 the quantity of the product item. If the quantity is 0, + the product item is removed. + - `optionItems`/`optionValueId`: 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 the option items to be changed must be + provided in the property `optionItems`. Those + `optionItems` must contain `optionId` + and `optionValueId`. The provided values must be valid + for the option product that this product item represents. Otherwise, + `InvalidProductOptionItemException` or + `InvalidProductOptionValueItemException` is thrown. + - custom properties `c_`: a + value corresponding to the type defined for custom attribute + `` of the ProductLineItem. The purpose of this value is to + add or change the value of a custom attribute defined for the + ProductLineItem. + - `gift`: a boolean value that specifies whether the item is a gift. + - `giftMessage`: a message to include with the gift. + operationId: updateItemsInBasket + summary: Update a basket item. + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductItem' + examples: + ItemPatch: + $ref: '#/components/examples/ItemPatch' + required: true + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - no product item with a given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with a specified option ID is unknown. + - an option with a specified option value ID is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: 'Possible reasons: basket not found' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}: + delete: + description: Removes a product item from the basket. + operationId: removeItemFromBasket + summary: Remove an item from a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates an item in a basket. The item to be updated can be a bundled product item, although the + kind of update supported for bundled product items is limited to `productId` (to support + variation products), `gift`, `giftMessage` and custom properties. + The following values in the request body are considered by the server: + + - `productId`: a valid product ID. The purpose of this + value is to exchange a variation of a variation product. + - `shipmentId`: 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. + - `optionItems`/`optionValueId`: 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 optionItems. Those + optionItems need to contain optionId + and `optionValueId`. The provided values must be valid + for the option product that this product item represents. Otherwise, + `InvalidProductOptionItemException` or + `InvalidProductOptionValueItemException` is thrown. + - custom properties `c_`: a + value corresponding to the type defined for custom attribute + `` of ProductLineItem. The purpose of this value is to + add or change the value of a custom attribute defined for + ProductLineItem. + - `gift`: a boolean value that specifies whether the item is a gift + - `giftMessage`: a message for the gift + operationId: updateItemInBasket + summary: Update an item in a basket. + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductItem' + examples: + ItemPatch: + $ref: '#/components/examples/ItemPatch' + required: true + responses: + '200': + description: Success, the response body contains the basket with the updated item. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - no product item with given item ID was found for the basket. + - the product with the given product ID in the + request body is invalid. + - a null quantity value. + - an option with the specified option id is unknown. + - an option with the specified option value id is unknown. + - the given shipment ID is invalid. + - the customer assigned to the basket does not. + match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - a shipment with it's given ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes: + put: + description: This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for a specific taxable line item. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasketItem + summary: Add taxation information for a basket item. + parameters: + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaxItems' + examples: + BasketItemTaxPut: + $ref: '#/components/examples/BasketItemTaxPut' + required: true + responses: + '204': + description: Success, without body. + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The item with the given item ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments: + post: + description: Adds a payment instrument to a basket. + operationId: addPaymentInstrumentToBasket + summary: Add a payment instrument to a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BasketPaymentInstrumentRequest' + examples: + PaymentInstrumentPost: + $ref: '#/components/examples/PaymentInstrumentPost' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketsPostSuccess: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the customer assigned to the basket does not match the verified + customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}: + delete: + description: Removes a payment instrument of a basket. + operationId: removePaymentInstrumentFromBasket + summary: Remove a payment instrument from a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument with the given basket payment + instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: Updates payment instrument of an existing basket. + operationId: updatePaymentInstrumentInBasket + summary: Update a payment instrument for a basket. + parameters: + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrderPaymentInstrument' + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/PaymentInstrumentPatch' + required: true + responses: + '200': + description: Success, the response body contains the basket with the updated payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/examples-PaymentInstrumentPatch' + '400': + description: |- + Possible reasons: + - the provided payment method is invalid or not applicable. + - the basket payment intsrument with the given id is already permanently masked. + - The customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - the basket with the given basket ID is unknown. + - the payment instrument item with the given payment instrument ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/payment-methods: + get: + description: Gets applicable payment methods for an existing basket considering the open payment amount only. + operationId: getPaymentMethodsForBasket + summary: Retrieve payment instruments for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the applicable payment methods for the basket. + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentMethodResult' + examples: + PaymentMethodsGet: + $ref: '#/components/examples/PaymentMethodsGet' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments: + post: + description: Adds a custom manual price adjustment to the basket. + operationId: addPriceAdjustmentToBasket + summary: Add a price adjustment to a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PriceAdjustmentRequest' + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/PriceAdjustmentPost' + required: true + responses: + '200': + description: Success, the response body contains the basket with added price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPost: + $ref: '#/components/examples/examples-PriceAdjustmentPost' + '400': + description: |- + Possible reasons: + - a fixed price adjustment was already created for the given level. + - a fixed price adjustment was added at `order` level. + - a promotion ID was used twice. + - a system promotion ID was used as a manual promotion ID. + - more than one hundred price adjustments would have been created. + - the price adjustment limit had exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}: + delete: + description: Removes a custom manual price adjustment from the basket. + operationId: removePriceAdjustmentFromBasket + summary: Remove a price adjustment from a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: The priceAdjustmentId is missing, empty or whitespace. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored. + - `discount` + - `itemText` + - `reasonCode` + - `custom properties` + 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. + operationId: updatePriceAdjustmentInBasket + summary: Update a price adjustment for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PriceAdjustment' + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/PriceAdjustmentPatch' + required: true + responses: + '200': + description: Success, the response body contains the basket with the updated price adjustment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + PriceAdjustmentPatch: + $ref: '#/components/examples/examples-PriceAdjustmentPatch' + '400': + description: |- + Possible reasons: + - the price adjustment is not manual and cannot be updated. + - the expected attributes are missing in the input. + - the type of a price adjustment does not match the adjustment type of the input data. + - the price adjustment limit is exceeded. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The price adjustment ID is not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + PriceAdjustmentIdNotFoundException: + $ref: '#/components/examples/PriceAdjustmentIdNotFoundException' + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/priceAdjustmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/price-books: + get: + description: "( DEPRECATED ) Gets applicable price books for an existing basket. This endpoint is deprecated. \nUse [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary),\nhooks or `dw.catalog.PriceBookMgr#getApplicablePriceBooks()` instead." + operationId: getPriceBooksForBasket + summary: Retrieve price books for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success, the response body contains the priceBookIds for the basket. + content: + application/json: + schema: + $ref: '#/components/schemas/PriceBookIds' + examples: + PriceBooksGet: + $ref: '#/components/examples/PriceBooksGet' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + put: + description: "( DEPRECATED ) This method allows you to put an array of priceBookIds to an existing basket, which will be used for basket calculation. This endpoint is deprecated. \nUse [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-context?meta=Summary), \nhooks or `dw.catalog.PriceBookMgr#setApplicablePriceBooks()` instead." + operationId: addPriceBooksToBasket + summary: Add price books to a basket. + parameters: + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PriceBookIds' + examples: + PriceBooksPut: + $ref: '#/components/examples/PriceBooksPut' + required: true + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown or contains a price book ID that does not correspond to an existing price book. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments: + post: + description: |- + 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 + operationId: createShipmentForBasket + summary: Create a shipment for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Shipment' + examples: + ShipmentsPost: + $ref: '#/components/examples/ShipmentsPost' + required: true + responses: + '200': + description: Success, the response body contains the basket with added shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPost: + $ref: '#/components/examples/examples-ShipmentsPost' + '400': + description: |- + Possible reasons: + - a shipment id is not provided. + - a shipment with the provided ID already. + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}: + delete: + description: |- + Removes a specified shipment and all associated product, gift certificate, + shipping, and price adjustment line items from a basket. + It is not allowed to remove the default shipment. + operationId: removeShipmentFromBasket + summary: Remove a shipment from a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the basket without the deleted shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPost: + $ref: '#/components/examples/examples-BasketPost' + '400': + description: |- + Possible reasons: + - the given shipment ID is invalid. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '403': + description: |- + The given shipment ID corresponds to the + default shipment and cannot be removed. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/Forbidden' + '404': + description: |- + The basket with the given basket ID is + unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates a shipment for a basket. + + The 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 + operationId: updateShipmentForBasket + summary: Update a shipment for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Shipment' + examples: + ShipmentsPatch: + $ref: '#/components/examples/ShipmentsPatch' + required: true + responses: + '200': + description: Success, the response body contains the basket with the updated shipment. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsPatch: + $ref: '#/components/examples/examples-ShipmentsPatch' + '400': + description: |- + Possible reasons: + - the given shipment ID was invalid. + - a shipment with the provided ID already + exists for the basket. + - a shipment with the provided shipment number + already exists for the basket. + - a missing shipping method. + - an invalid shipping method. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address: + put: + description: Sets a shipping address of a specific shipment of a basket. + operationId: updateShippingAddressForShipment + summary: Update the shipping address for a shipment. + parameters: + - $ref: '#/components/parameters/useAsBilling' + - $ref: '#/components/parameters/removeExternalTax' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrderAddress' + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/ShipmentsAddressPut' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added shipping address. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsAddressPut: + $ref: '#/components/examples/examples-ShipmentsAddressPut' + '400': + description: |- + Possible reasons: + - the shipment with the given shipment ID is unknown. + - the customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method: + put: + description: Sets a shipping method to a specific shipment of a basket. + operationId: updateShippingMethodForShipment + summary: Update the shipping method for a shipment. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShippingMethod' + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/ShipmentsMethodPut' + required: true + responses: + '200': + description: Success, the response body contains the basket with the added shipping method. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + ShipmentsMethodPut: + $ref: '#/components/examples/examples-ShipmentsMethodPut' + '400': + description: |- + Possible reasons: + - the id of the shipping method is missing. + - a shipping method with an ID was specified + which is not a valid shipping method ID. + - the customer assigned to the basket does not match the + verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods: + get: + description: Gets the applicable shipping methods for a certain shipment of a basket. + operationId: getShippingMethodsForShipment + summary: Retrieve the shipping methods for a shipment. + parameters: + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the applicable shipping methods for a certain shipment of the basket. + content: + application/json: + schema: + $ref: '#/components/schemas/ShippingMethodResult' + examples: + ShipmentsMethodGet: + $ref: '#/components/examples/ShipmentsMethodGet' + '400': + description: |- + The customer assigned to the basket does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerInfoJwtMismatch: + $ref: '#/components/examples/CustomerInfoJwtMismatch' + '404': + description: |- + Possible reasons: + - The basket with the given basket ID is unknown. + - The shipment with the given shipment ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/shipmentId' + - $ref: '#/components/parameters/basketId' + /organizations/{organizationId}/baskets/{basketId}/storefront: + put: + description: Marks a basket as a storefront basket. + operationId: updateAsStorefrontBasket + summary: Designate a basket as a storefront basket. + parameters: + - $ref: '#/components/parameters/exchange' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains a basket that is set as a storefront basket. + content: + application/json: + schema: + $ref: '#/components/schemas/Basket' + examples: + BasketPutStorefront: + $ref: '#/components/examples/BasketPutStorefront' + '400': + description: Thrown if a storefront basket already exists and the query parameter `exchange` is false. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + CustomerBasketQuotaExceededException: + $ref: '#/components/examples/CustomerBasketQuotaExceededException' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperTokenTaob: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' + - $ref: '#/components/parameters/siteId' + /organizations/{organizationId}/baskets/{basketId}/taxes: + get: + description: This method gives you the external taxation data set by the PUT taxes API. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: getTaxesFromBasket + summary: Retrieve the external taxation information for a basket. + parameters: + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success, the response body contains the external taxation from all line items from the referenced basket. + content: + application/json: + examples: + PostBasketBody: + $ref: '#/components/examples/BasketTaxGet' + schema: + $ref: '#/components/schemas/Taxes' + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + InvalidTaxMode: + $ref: '#/components/examples/InvalidTaxMode' + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + put: + description: This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information. + operationId: addTaxesForBasket + summary: Add external taxation information to a basket. + parameters: + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Taxes' + examples: + BasketTaxPut: + $ref: '#/components/examples/BasketTaxPut' + required: true + responses: + '204': + description: Success, without body. + '404': + description: The basket with the given basket ID is unknown. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + '409': + description: |- + Possible Reasons: + - The tax mode of the referenced basket is not set to EXTERNAL. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders.rw + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/basketId' +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + ShopperTokenTaob: + type: oauth2 + description: "`ShopperTokenTaob` (Taob = trusted agent on behalf) is a child of the `ShopperToken` security scheme and extends the functionality of `ShopperToken` for specific use cases. \nA token of type `ShopperTokenTaob` allows you to access Shopper API endpoints, including OCAPI and Salesforce Commerce API for headless applications. Besides endpoints that require this specific subtype, all other endpoints secured by the `ShopperToken` parent scheme can be accessed with a `ShopperTokenTaob`.\nTo get a `ShopperTokenTaob` token, a `Taob` session needs to be created first (see [getTrustedAgentAuthorizationToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAuthorizationToken)). \nAfterwards the `ShopperTokenTaob` token can be gained (see [getTrustedAgentAccessToken](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAccessToken)).\nFor more information regarding the `Taob` flow see also [Trusted Agent Authorization](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-trusted-agent.html).\n" + flows: + clientCredentials: + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/trusted-agent/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + AmOAuth2: + type: oauth2 + description: AccountManager OAuth 2.0 bearer token Authentication. + flows: + clientCredentials: + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + schemas: + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + OrderAddress: + description: Document representing an order address. + properties: + address1: + description: The first address line. + example: 45 Main Rd. + type: string + address2: + description: The second address line. + example: Apartment 204 + type: string + city: + description: The city. + example: Boston + type: string + companyName: + description: The company name. + example: Salesforce + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + firstName: + description: The first name. + example: Max + type: string + fullName: + description: The full name. + example: Max Mustermann + type: string + id: + description: The ID of the address. + example: me + type: string + jobTitle: + description: The job title. + example: Software Engineer + type: string + lastName: + description: The last name. + example: Mustermann + type: string + phone: + description: The phone number. + example: '6175555555' + type: string + postBox: + description: The post office box. + example: PO BOX 109 + type: string + postalCode: + description: The postal code. + example: '05408' + type: string + salutation: + description: The salutation. + example: Mr + type: string + secondName: + description: The second name. + type: string + stateCode: + description: The state code. + example: MA + type: string + suffix: + description: The suffix. + example: Sr + type: string + suite: + description: The suite. + example: 24A + type: string + title: + description: The title. + example: Dr. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + ProductDetailsLink: + description: Document representing a link to the resource for product details. + properties: + productDescription: + description: The description of the product. + example: Nintendo DS revolutionizes handheld gameplay. + type: string + productId: + $ref: '#/components/schemas/ProductId' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + title: + description: The link title. + example: Nintendo DS Game Console + type: string + type: object + required: + - productId + additionalProperties: false + BonusDiscountLineItem: + description: Document representing a bonus discount line item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + bonusProducts: + description: The bonus products the customer can choose from. + type: array + items: + $ref: '#/components/schemas/ProductDetailsLink' + couponCode: + description: The coupon code that triggered the promotion, if applicable. + example: 5ties + type: string + id: + description: The ID of the line item. It is read only. + example: 91f4dd8bfa0653d58b7783b04f + type: string + maxBonusItems: + format: int32 + description: The maximum number of bonus items the user can select for this promotion. + type: integer + promotionId: + description: The ID of the promotion that triggered the creation of the line item. + example: Buy1Get2 + type: string + CouponItemId: + minLength: 1 + type: string + description: The coupon item ID + example: d4c9c0141e9c74c150225580f3 + CouponItem: + description: Document representing a coupon item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + code: + maxLength: 256 + description: The coupon code. + example: 5ties + type: string + couponItemId: + description: The coupon item ID. It is read only. + allOf: + - $ref: '#/components/schemas/CouponItemId' + statusCode: + description: The status of the coupon item. It is read only. + example: no_applicable_promotion + enum: + - 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 + type: string + valid: + description: |- + 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". It is read only. + example: true + type: boolean + required: + - code + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CustomerInfo: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: The customer information for guest or logged-in customers. + type: object + properties: + customerId: + maxLength: 100 + description: The customer ID. It is read only. + example: abMKqMaNYOBMnNdDNzyC5oNTi5 + type: string + customerName: + description: The customer name. + example: Max Mustermann + type: string + customerNo: + maxLength: 100 + description: The customer number. + example: '0002352' + type: string + email: + description: The customer's email address. + example: no-reply@salesforce.com + type: string + required: + - email + GiftCertificateItemId: + example: 629dea6e7b61e58da629b57b21 + type: string + minLength: 1 + GiftCertificateItem: + description: A gift certificate item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate item amount. + example: 20 + type: number + giftCertificateItemId: + description: The item ID. It is read only. + allOf: + - $ref: '#/components/schemas/GiftCertificateItemId' + message: + maxLength: 4000 + description: The gift certificate message. + example: Birthday present. + type: string + recipientEmail: + minLength: 1 + description: The recipient email. + example: no-reply@salesforce.com + type: string + recipientName: + description: The recipient's name. + example: Daniel Mustermann + type: string + senderName: + description: The sender's name. + example: Max Mustermann + type: string + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + required: + - amount + - recipientEmail + GroupedTaxItem: + description: Document representing the grouped tax item. + type: object + properties: + taxRate: + description: The tax rate. It is read only. + type: number + format: double + example: 0.1 + taxValue: + description: The summed up tax total for the tax rate. It is read only. + type: number + format: double + example: 10.03 + additionalProperties: false + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. + type: object + properties: + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b + type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + Status: + description: Document representing an object status. + properties: + code: + description: The status code. + type: string + message: + description: The status message. + type: string + status: + format: int32 + description: |- + The status. + For more information on the status values see Status.OK and Status.ERROR. + type: integer + type: object + additionalProperties: false + PaymentCard: + additionalProperties: false + description: Document representing a payment card. + type: object + properties: + cardType: + maxLength: 256 + description: The payment card type. + example: Visa + type: string + creditCardExpired: + description: A flag indicating if the credit card is expired. It is read only. + example: true + type: boolean + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + maxLength: 4000 + description: The masked payment card number. + example: '*********4422' + type: string + numberLastDigits: + maxLength: 4000 + description: The last digits of the payment card number. It is read only. + example: '4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2015 + type: integer + PaymentInstrumentId: + description: The payment instrument ID + example: ba248424e3eee797f062162f8b + type: string + OrderPaymentInstrument: + description: Document representing an order payment instrument. + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + authorizationStatus: + description: The authorization status of the payment transaction. It is read only. + allOf: + - $ref: '#/components/schemas/Status' + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + maskedGiftCertificateCode: + description: The gift certificate code with the last 4 characters not masked. + example: '******Gzzy' + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/PaymentCard' + paymentInstrumentId: + description: The payment instrument ID. It is read only. + allOf: + - $ref: '#/components/schemas/PaymentInstrumentId' + paymentMethodId: + maxLength: 256 + description: The payment method ID. It is read only. + example: CREDIT_CARD + type: string + type: object + ProductItem: + description: Document representing a product item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including + adjustments. If the taxation policy is net, it doesn't include tax. If the + taxation policy is gross, it includes tax. It is read only. + example: 130 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. + example: true + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. + example: inventory + type: string + itemId: + description: |- + The product item ID. Use it to identify this item when updating its quantity or + creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not + including order-level adjustments or shipping charges. If the taxation policy is + net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 20.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation + policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 15.5 + type: number + productId: + maxLength: 100 + description: The ID of the product. + example: nintendo-ds-console + type: string + productListItem: + description: |- + If this product line item was added from a product list, this value is a reference + to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A + related shipping item represents a surcharge applied to individual products using + a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax for the product item, not including price adjustments. It is read only. + example: 0.3 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this product item. It is read only. + example: 30 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.9 + type: number + ItemId: + description: The item id. + example: 430ef5aad3a24de59378458434 + type: string + OptionItem: + description: |- + An option item represents an optional purchase related to a product item, and is always associated with that parent product + item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + example: ba248414e3eee797f062162f8b + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. It is read only. + example: false + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: false + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. It is read only. + example: inventory + type: string + itemId: + description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + example: The item text. + type: string + optionId: + maxLength: 256 + description: The ID of the option. It is read only. + example: consoleWarranty + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + optionValueId: + maxLength: 256 + description: The ID of the option value. It is read only. + example: '000' + type: string + price: + format: double + description: |- + The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 150.99 + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not including order-level adjustments or + shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated order-level adjustments, but not + including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 40.5 + type: number + productId: + $ref: '#/components/schemas/ProductId' + productListItem: + description: If this product line item was added from a product list, this value is a reference to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The ordered quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A related shipping item represents a + surcharge applied to individual products using a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax on the line item before applying any adjustments. It is read only. + example: 0 + type: number + taxBasis: + format: double + description: The amount used to calculate the tax for this item. It is read only. + example: 50 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.19 + type: number + required: + - optionId + - optionValueId + ProductListLink: + description: Document representing a link to a product list. + properties: + description: + description: The description of this product list. + type: string + name: + description: The name of this product list. + type: string + public: + description: |- + A flag indicating whether the owner made this product list available for access + by other customers. It is read only. + example: true + type: boolean + title: + description: The link title. + type: string + type: + description: The type of the product list. + example: shopping_list + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + type: string + type: object + additionalProperties: false + ProductListItemReference: + description: Document representing product list item details. + type: object + additionalProperties: false + properties: + id: + description: The ID of the product list item. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + priority: + format: int32 + description: The priority of the product list item. + example: 1 + type: integer + productDetailsLink: + $ref: '#/components/schemas/ProductDetailsLink' + productList: + description: A reference to the associated product list. It is read only. + allOf: + - $ref: '#/components/schemas/ProductListLink' + public: + example: false + type: boolean + purchasedQuantity: + format: double + description: The total quantity of this item purchased from the product list. + example: 0 + type: number + quantity: + minimum: 0 + format: double + description: The number of products or gift certificates that get shipped when purchasing this product list item. + example: 1 + type: number + type: + description: Specifies whether the item is a product or a gift certificate. + example: product + enum: + - product + - gift_certificate + type: string + required: + - id + ShipmentId: + minLength: 1 + type: string + example: me + description: The identifier of the shipment + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id + Shipment: + description: Document representing a shipment. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not including + service charges such as shipping. If the Discount Taxation preference is set to Tax Products and + Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + gift: + description: A flag indicating whether the shipment is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + merchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, not including price adjustments or service charges such as + shipping. It is read only. + example: 4.95 + type: number + productSubTotal: + format: double + description: |- + The total price of all products in the shipment, including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If + the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + shipmentId: + description: The order-specific ID of the shipment. The default value is 'me'. + default: me + allOf: + - $ref: '#/components/schemas/ShipmentId' + shipmentNo: + description: The shipment number of this shipment. This number is automatically generated. It is read only. + type: string + shipmentTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments, shipping charges, + and tax. It is read only. + example: 39.99 + type: number + shippingAddress: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + shippingMethod: + $ref: '#/components/schemas/ShippingMethod' + shippingStatus: + description: The shipping status of the shipment. + example: shipped + enum: + - not_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges in the shipment, including shipping adjustments. If the + taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. + example: 0.3 + type: number + taxTotal: + format: double + description: |- + The total tax on the shipment, including item-level price adjustments and service charges such as + shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on + Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 1.8 + type: number + trackingNumber: + description: The tracking number of the shipment. + example: 1Z204E380338943508 + type: string + type: object + ShippingItem: + description: Document representing a shipping item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax for the shipping item, including price adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the shipping item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + itemId: + description: |- + The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a + custom price adjustment for it. It is read only. + example: 430ef5aad3a24de59378458434 + type: string + itemText: + description: The text describing the shipping item. + example: Shipping + type: string + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the shipping item including item-level adjustments, but not including order-level + adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + type: number + shipmentId: + description: The identifier of the shipment to which this item belongs. + allOf: + - $ref: '#/components/schemas/ShipmentId' + tax: + format: double + description: The tax on the product item, not including adjustments. It is read only. + example: 0.19 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this shipping item. It is read only. + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. + type: number + type: object + Basket: + description: Document representing a basket. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not + including service charges such as shipping. If the Discount Taxation preference is set to Tax + Products and Shipping Only Based on Adjusted Price, this amount also includes prorated + order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + agentBasket: + description: Is the basket created by an agent? It is read only. + example: true + type: boolean + basketId: + description: The unique identifier for the basket. It is read only. + example: e78aa5646a8efebdd9cdd38be7 + type: string + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + couponItems: + description: The coupon items. + type: array + items: + $ref: '#/components/schemas/CouponItem' + creationDate: + description: The timestamp when the basket was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information, if the customer is logged in. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + giftCertificateItems: + description: The gift certificate line items. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + groupedTaxItems: + description: |- + Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same + tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. + type: array + items: + $ref: '#/components/schemas/GroupedTaxItem' + inventoryReservationExpiry: + description: The expiration datetime of the inventory reservation. It is read only. + example: '2015-05-19T15:30:18.000Z' + type: string + format: date-time + lastModified: + description: The timestamp when the basket was last modified. It is read only. + example: '2015-05-19T15:25:18.000Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. + Merchandise total price represents the sum of the product prices before + services (such as shipping) or adjustments from promotions have + been added. It is read only. + example: 4.95 + type: number + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderTotal: + format: double + description: The total price, including products, shipping and tax. It is read only. + example: 110.24 + type: number + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + productItems: + description: The product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including order-level adjustments or shipping + charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 88 + type: number + shipments: + description: The shipments. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + sourceCode: + description: The source code assigned to the basket. It is read only. + example: OUTDOOR1 + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. + example: true + type: boolean + temporaryBasket: + description: If the created basket is a temporary basket, this is set to true. Otherwise, it is set to false. + example: true + type: boolean + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + additionalProperties: false + required: + - id + - rate + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' + OrderPaymentCardRequest: + description: Document representing an order payment card request. + type: object + properties: + cardType: + maxLength: 256 + description: 'The payment card type (for example: Visa).' + example: Visa + type: string + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + pattern: ^[0-9 -]{0,7}\D{6,15}\d{0,4}$ + maxLength: 25 + description: The masked payment card number. + example: '*********4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2019 + type: integer + BasketPaymentInstrumentRequest: + description: Document representing a basket payment instrument request. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + giftCertificateCode: + maxLength: 256 + description: The gift certificate code. + example: AFGRTUZ + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/OrderPaymentCardRequest' + paymentMethodId: + maxLength: 256 + description: The payment method ID. + example: CREDIT_CARD + type: string + PaymentCardSpec: + description: Document representing the specification for a payment card. + type: object + properties: + cardType: + description: The payment card type. It is read only. + example: Visa + type: string + checksumVerificationEnabled: + description: A flag indicating whether the card number is verified using the Luhn checksum algorithm. It is read only. + example: true + type: boolean + description: + description: The localized description of the payment card. It is read only. + type: string + image: + description: The URL to the image that represents the payment card. It is read only. + type: string + name: + description: The localized name of the payment card. It is read only. + type: string + numberLengths: + description: |- + The sorted list of number lengths (individual lengths as well as + length ranges). It is read only. + type: array + items: + type: string + numberPrefixes: + description: |- + The sorted list of number prefixes (individual prefixes as well + as prefix ranges). It is read only. + type: array + items: + type: string + securityCodeLength: + format: int32 + description: The length of the security code for this card. It is read only. + type: integer + PaymentMethod: + description: Document representing a payment method. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + cards: + description: The sorted array of payment cards (included only when the system payment method is CREDIT_CARD). It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentCardSpec' + description: + description: The localized description of the payment method or card. It is read only. + type: string + id: + maxLength: 256 + description: The ID of the payment method or card. It is read only. + type: string + image: + description: The URL to the image that represents the payment method or card. It is read only. + type: string + name: + description: The localized name of the payment method or card. It is read only. + type: string + paymentProcessorId: + description: The payment processor ID. It is read only. It is read only. + type: string + required: + - id + PaymentMethodResult: + description: Result document of payment methods applicable for a basket. + properties: + applicablePaymentMethods: + description: The applicable payment methods. It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentMethod' + type: object + DiscountRequest: + description: Request that represents a discount to be applied to a custom price adjustment. + type: object + additionalProperties: false + properties: + type: + description: |- + The type of discount. + - `amount` describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced by. Example: For a $10 discount, set `type` to `amount` and `value` to `10.00`. + - `percentage` describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. Example: For a 5% discount, set `type` to `percentage` and `value` to `5.00`. + - `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. Example: To set a fixed price of $15, set `type` to `fixed_price` and `value` to `15.00`. **Important**: Setting `type` to `fixed_price` is not supported when `level` is set to `order`. + example: percentage + enum: + - percentage + - fixed_price + - amount + type: string + value: + format: double + description: The amount of the discount. + example: 20 + type: number + required: + - type + - value + PriceAdjustmentRequest: + description: Request that represents a price adjustment. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + discount: + description: A discount that can be specified instead of a price. + allOf: + - $ref: '#/components/schemas/DiscountRequest' + itemId: + description: The item to which the price adjustment should be added, depending on the specified level. If the level is ´order´, item id is not needed. If `shipping`, specify the UUID of the shipping item. If `product`, specify the UUID of the product item. + example: 93196fae953cbedbe54d67e760 + type: string + itemText: + description: The text describing the item in more detail. + example: A discounted item + type: string + level: + description: |- + The level at which the adjustment is applied. + - `order` indicates that the price adjustment should be added directly to basket. + - `product` indicates that the price adjustment should be added to the product item. + - `shipping` indicates that the price adjustment is added to the shipping item. + example: order + enum: + - product + - shipping + - order + type: string + promotionId: + description: The ID of the related promotion. Custom price adjustments can be assigned any promotion ID as long as it's not used by a price adjustment belonging to the same item and isn't used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated. + example: Shipping100 + type: string + reasonCode: + description: The reason for the price adjustment. + example: Shipping promotion on order above $1,000 USD + type: string + required: + - level + PriceBookIds: + maxItems: 10 + description: Array of price book IDs to use for the basket calculation. + type: array + items: + maxLength: 256 + type: string + ShippingMethodResult: + description: Result document containing shipping methods. + properties: + applicableShippingMethods: + description: The applicable shipping method documents. It is read only. + type: array + items: + $ref: '#/components/schemas/ShippingMethod' + defaultShippingMethodId: + description: The default shipping method. It is read only. + example: me + type: string + type: object + Taxes: + description: Document representing the tax rates and (optionally) amounts for all items in a basket. + properties: + taxes: + description: 'Map containing the TaxItems for the line item ids: Map' + type: object + additionalProperties: + $ref: '#/components/schemas/TaxItems' + type: object + required: + - taxes + additionalProperties: false + parameters: + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + taxMode: + name: taxMode + in: query + description: "Determines how taxes are calculated. \n\nThe default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. \nExternal tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. \nGift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. \nDepending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket." + schema: + default: internal + enum: + - internal + - external + type: string + example: external + temporary: + name: temporary + in: query + description: If set to true, the basket created is a temporary basket. + schema: + default: false + type: boolean + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + overrideExisting: + name: overrideExisting + in: query + description: |- + If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior: + - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change. + - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200). + schema: + default: false + type: boolean + example: false + createDestinationBasket: + name: createDestinationBasket + in: query + description: |- + If the current shopper has an active basket, this parameter is ignored. If the current shopper has no active basket, this parameter controls the behavior: + - `false` (default): Return a BasketMergeException (HTTP status 409). + - `true`: Force the merge by creating a basket for the current shopper and copying information from the previous shopper's basket into it. Return success (HTTP status 200). + schema: + default: false + type: boolean + productItemMergeMode: + name: productItemMergeMode + in: query + description: |- + This parameter controls the quantity calculation for products that exist in both baskets. + - higher_quantity (default): Compare the product's quantities in each basket, and use the higher value. + - sum_quantities: Use the sum of the product's quantities from both baskets. + - saved_quantity: Use the product's quantity in the current shopper's active basket. Ignore the quantity from the previous shopper's basket. + - separate_item: Add a separate product item to the current shopper's basket for the quantity in the previous shopper's basket. + schema: + default: higher_quantity + enum: + - higher_quantity + - sum_quantities + - saved_quantity + - separate_item + type: string + basketId: + name: basketId + in: path + required: true + schema: + minLength: 1 + type: string + description: The ID of the basket to be modified. + removeExternalTax: + name: removeExternalTax + in: query + description: 'If `true` (default value), the external tax rates are removed from the basket and set to null. To add external tax rates to a basket, use the `addTaxesForBasket` or `addTaxesForBasketItem` endpoint. The removal of external tax rates depends on the update performed on the basket, for example: an update to the `currency` triggers a removal. Set this parameter to `false` to disable the removal of external tax rates/values.' + schema: + default: true + type: boolean + useAsShipping: + name: useAsShipping + in: query + schema: + type: boolean + couponItemId: + name: couponItemId + in: path + required: true + schema: + $ref: '#/components/schemas/CouponItemId' + description: The ID of the coupon item. + giftCertificateItemId: + name: giftCertificateItemId + in: path + required: true + schema: + $ref: '#/components/schemas/GiftCertificateItemId' + description: the ID of the gift certificate item to be updated. + itemId: + name: itemId + in: path + required: true + schema: + $ref: '#/components/schemas/ItemId' + description: The ID of the item to be updated. + paymentInstrumentId: + name: paymentInstrumentId + in: path + required: true + schema: + $ref: '#/components/schemas/PaymentInstrumentId' + priceAdjustmentId: + name: priceAdjustmentId + in: path + required: true + schema: + $ref: '#/components/schemas/PriceAdjustmentId' + shipmentId: + name: shipmentId + in: path + required: true + schema: + $ref: '#/components/schemas/ShipmentId' + description: The ID of the shipment to be modified. + useAsBilling: + name: useAsBilling + in: query + schema: + type: boolean + exchange: + name: exchange + in: query + description: If true, an existing storefront basket is exchanged and marked as an agent basket. If false, a `CustomerBasketsQuotaExceededException` is thrown. + schema: + type: boolean + examples: + BasketPost: + value: + customerInfo: + email: shopper@salesforce-test.com + customerNo: '000000001' + billingAddress: + firstName: Stephanie + lastName: Miller + address1: 104 Presidential Way + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + shipments: + - shippingMethod: + id: '001' + shippingAddress: + firstName: Agustin + lastName: Estes + address1: 4162 Turkey Pen Road + city: New York + postalCode: '10016' + stateCode: NY + countryCode: US + paymentInstruments: + - paymentMethodId: CREDIT_CARD + paymentCard: + cardType: Visa + couponItems: + - code: 5ties + productItems: + - productId: green-umbrella + quantity: 3 + examples-BasketPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BadRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: Decoding of the property with path '$.failedExample.[1].intProperty' failed because the expected type is 'Integer|Decimal' but the actual type was 'String'. + CustomerBasketQuotaExceededException: + value: + title: Customer Baskets Quota Exceeded + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/customer-baskets-quota-exceeded + detail: The maximum number of baskets per customer was exceeded. Please reuse or delete one of the existing baskets (40e91e04aba6e42a6836f79308). + basketIds: 40e91e04aba6e42a6836f79308 + TemporaryBasketQuotaExceededException: + value: + title: Customer Temporary Baskets Quota Exceeded, + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/customer-temporary-baskets-quota-exceeded + detail: The maximum number of temporary baskets per customer was exceeded. Please reuse or delete one of the existing temporary baskets (40e91e04aba6e42a6836f79308, 73ca0f0860a67df946782c2688). + basketIds: 40e91e04aba6e42a6836f79308, 73ca0f0860a67df946782c2688 + ShipmentNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/shipment-not-found + title: Shipment Not Found + detail: The shipping method with ID '123' is unknown or can't be applied to the basket. + ForbiddenMissingPrevCustomerInfo: + value: + title: Forbidden + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + detail: Your access-token is valid, but it contains no previous customer to process this action. + SourceBasketException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/no-source-basket-exception + title: Conflict + detail: The previous customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketTransferException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-transfer-basket-already-exists-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has an active basket. + BasketMergeException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-merge-no-current-basket-exception + title: Conflict + detail: The current customer with ID 'cdo7rJNie7ahERqXSb51Yvz2M4' has no active basket. + BasketGet: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerInfoJwtMismatch: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: The customer is invalid. + BasketNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-not-found + title: Basket Not Found + detail: No basket with ID '123' could be found. + BasketPatch: + value: + c_textValue: oak + examples-BasketPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + c_textValue: oak + BasketPutAgent: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: true + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BillingAddressPut: + value: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-BillingAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 385 Prospect Valley Road + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: 7800e0f611dac6caf77afb9df9 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:53:30.993Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:53:35.747Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 2b76b8644eb6da43e7e223b48d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 43c38652bc3844e14cd482ff28 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: b4ff13039bc7abd1b9d933b871 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 193e99bc1205b870cebd36d970 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: ac7a3b62dc1df8de898d7a2141 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CouponCodePost: + value: + code: 10_percent_off + examples-CouponCodePost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + - code: 10_percent_off + couponItemId: 9372d0f511dac8caf77afc4kj2 + statusCode: applied + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + CustomerPut: + value: + email: shopperUpdate@salesforce-test.com + examples-CustomerPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPost: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + shipmentId: me + examples-GiftCertPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 2 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + GiftCertPatch: + value: + amount: 1 + recipientEmail: miller@salesforce-test.com + examples-GiftCertPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopperUpdate@salesforce-test.com + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 83726a8351540534af93f3b15f + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ItemPost: + value: + - productId: green-bag + quantity: 1 + ItemPatch: + value: + quantity: 1 + BasketItemTaxPut: + value: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + UnsupportedRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-request-if-scapi-hooks-enabled + title: Unsupported Request If SCAPI Hooks Enabled + detail: You can't call this endpoint because Salesforce Commerce API hook execution is enabled. + PaymentInstrumentPost: + value: + amount: 1 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '*********1234' + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + PaymentInstrumentPatch: + value: + amount: 0 + paymentCard: + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + examples-PaymentInstrumentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + holder: Miller + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PaymentMethodsGet: + value: + applicablePaymentMethods: + - id: GIFT_CERTIFICATE + name: Gift Certificate + paymentProcessorId: BASIC_GIFT_CERTIFICATE + - cards: + - cardType: Visa + checksumVerificationEnabled: true + name: Visa + numberLengths: + - '13' + - '16' + numberPrefixes: + - '4' + - cardType: Amex + checksumVerificationEnabled: true + name: American Express + numberLengths: + - '15' + numberPrefixes: + - '34' + - '37' + - cardType: Master Card + checksumVerificationEnabled: true + name: MasterCard + numberLengths: + - '16' + numberPrefixes: + - 51-55 + - cardType: Discover + checksumVerificationEnabled: true + name: Discover + numberLengths: + - '16' + numberPrefixes: + - '6011' + - 622126-622925 + - 644-649 + - '65' + id: CREDIT_CARD + name: Credit Card + paymentProcessorId: BASIC_CREDIT + - id: PayPal + name: Pay Pal + paymentProcessorId: PAYPAL_EXPRESS + - id: BML + name: Bill Me Later + paymentProcessorId: CYBERSOURCE_BML + PriceAdjustmentPost: + value: + discount: + value: 5 + type: percentage + itemText: MyOrderAdjustment + level: order + promotionId: manual adjustment + examples-PriceAdjustmentPost: + value: + adjustedMerchandizeTotalTax: 28.45 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 0.05 + percentage: 5 + type: percentage + createdBy: testAgent + creationDate: '2015-05-25T09:13:10.942Z' + custom: true + itemText: MyOrderAdjustment + manual: true + price: -30 + promotionId: manual adjustment + priceAdjustmentId: cdzoAiWbOmbiUaaadlfSpMDgNw + orderTotal: 615.21 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 569.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 569.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 569.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentPatch: + value: + appliedDiscount: + amount: 15 + type: amount + itemText: AgentOrderAdjustment + reasonCode: override manual promo + examples-PriceAdjustmentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderPriceAdjustments: + - appliedDiscount: + amount: 15 + type: amount + createdBy: testWapiAgent + creationDate: '2017-03-14T09:15:35.543Z' + custom: true + itemText: MyOrderAdjustment + lastModified: '2017-03-14T09:15:35.594Z' + manual: true + price: -15 + priceAdjustmentId: e397cd21f9a9c0643277ba1011 + promotionId: manual adjustment + reasonCode: override manual promo + orderTotal: 631.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + PriceAdjustmentIdNotFoundException: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/price-adjustment-not-found + title: Price Adjustment Not Found + detail: No price adjustment with ID '453599643347eac5e4ebd85b49' could be found. + PriceBooksGet: + value: + - price-book-id1 + - price-book-id2 + PriceBooksPut: + value: + - price-book-id1 + - price-book-id2 + ShipmentsPost: + value: + shipmentId: me2 + shippingMethod: + id: '001' + shippingAddress: + firstName: Stephanie + lastName: Miller + address1: 385 Prospect Valley Road + city: Woburn + postalCode: '01801' + stateCode: MA + countryCode: US + examples-ShipmentsPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + - adjustedMerchandizeTotalTax: 35 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 35 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me2 + shipmentTotal: 646.76 + shippingAddress: + address1: 385 Prospect Valley Road + city: Woburn + stateCode: MA + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 84f06786daa68ae33af7e21ec6 + lastName: Miller + shippingMethod: + description: Order received in 2 business days + id: '001' + name: 2-Day Express + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 35 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 6fea9966277c94e06b482a5c43 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 36.98 + shippingTotalTax: 1.35 + taxation: net + taxTotal: 36.35 + Forbidden: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + title: Forbidden + detail: The shipment with ID 'me' corresponds to the default shipment and can't be deleted. + ShipmentsPatch: + value: + shipmentId: me + shipmentNo: ignored shipment no + shippingMethod: + id: '003' + shippingAddress: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + c_wapi-string: shipment_custom_property + examples-ShipmentsPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + shippingMethod: + description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + shippingStatus: not_shipped + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxTotal: 36.05 + shippingItems: + - adjustedTax: 1.05 + basePrice: 20.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 20.99 + priceAfterItemDiscount: 20.99 + shipmentId: me + tax: 1.05 + taxBasis: 20.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 20.99 + shippingTotalTax: 1.05 + taxation: net + taxTotal: 36.05 + ShipmentsAddressPut: + value: + firstName: Ward J + lastName: Adamek + address1: 4911 Lincoln Street + city: IDANHA + postalCode: '97350' + stateCode: OR + countryCode: US + examples-ShipmentsAddressPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + ShipmentsMethodPut: + value: + id: '003' + examples-ShipmentsMethodPut: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4911 Lincoln Street + postalCode: '97350' + city: IDANHA + countryCode: US + firstName: Ward J + fullName: Ward J Adamek + id: b3e1269a2c1d0ad56694206741 + lastName: Adamek + stateCode: OR + shippingMethod: + description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + shippingStatus: not_shipped + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxTotal: 36.5 + shippingItems: + - adjustedTax: 1.5 + basePrice: 29.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 29.99 + priceAfterItemDiscount: 29.99 + shipmentId: me + tax: 1.5 + taxBasis: 29.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 29.99 + shippingTotalTax: 1.5 + taxation: net + taxTotal: 36.5 + ShipmentsMethodGet: + value: + applicableShippingMethods: + - description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + - description: Order received in 2 business days + id: '002' + name: 2-Day Express + price: 20.99 + - description: Order received the next business day + id: '003' + name: Overnight + price: 29.99 + - description: Store Pickup + id: '005' + name: Store Pickup + price: 0 + c_storePickupEnabled: true + defaultShippingMethodId: '001' + BasketPutStorefront: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + agentBasket: false + basketId: a10ff320829cb0eef93ca5310a + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: bfea663fd3de75d5be3ec02702 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: callcenter + couponItems: + - code: 5ties + couponItemId: cc6ef43f207bf64099288aec36 + statusCode: no_applicable_promotion + valid: true + creationDate: '2019-10-17T08:29:55.340Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + email: shopper@salesforce-test.com + lastModified: '2019-10-17T08:29:55.698Z' + merchandizeTotalTax: 30 + orderTotal: 646.76 + paymentInstruments: + - amount: 0 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: b7679bea661819b2de78b9de7d + paymentMethodId: CREDIT_CARD + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: 3d4e28425ce0b3a65b0ac4e163 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: ff9452ed11fcf5c80f9143a8f1 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.97 + priceAfterItemDiscount: 599.97 + priceAfterOrderDiscount: 599.97 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: 4432af77112f7c2433248a48e8 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: d5ed0e58b8f8b5efe8d617a630 + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxation: net + taxTotal: 30.8 + BasketTaxGet: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 + InvalidTaxMode: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-tax-mode + title: Invalid Tax Mode + detail: Basket with ID 'a10ff320829cb0eef93ca5310a' has invalid tax mode. + BasketTaxPut: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 diff --git a/apis/shopper-context-oas/.metadata.json b/apis/shopper-context-oas-1.0.34/.metadata.json similarity index 83% rename from apis/shopper-context-oas/.metadata.json rename to apis/shopper-context-oas-1.0.34/.metadata.json index fbc1e011..52590968 100644 --- a/apis/shopper-context-oas/.metadata.json +++ b/apis/shopper-context-oas-1.0.34/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-context-oas/1.0.30-kbode.sdkE2E-b9", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-context-oas/1.0.34", "name": "Shopper Context OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-context-oas", - "version": "1.0.30-kbode.sdkE2E-b9", + "version": "1.0.34", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-context-oas/exchange.json b/apis/shopper-context-oas-1.0.34/exchange.json similarity index 75% rename from apis/shopper-context-oas/exchange.json rename to apis/shopper-context-oas-1.0.34/exchange.json index 37c88e18..95d2c5e4 100644 --- a/apis/shopper-context-oas/exchange.json +++ b/apis/shopper-context-oas-1.0.34/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-context-oas-v1-bundled.yaml", + "main": "shopper-context-oas-v1-public.yaml", "name": "Shopper Context OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-context-oas", - "version": "1.0.30-kbode.sdkE2E-b9", + "version": "1.0.34", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-context-oas/shopper-context-oas-v1-bundled.yaml b/apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-internal.yaml similarity index 99% rename from apis/shopper-context-oas/shopper-context-oas-v1-bundled.yaml rename to apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-internal.yaml index 27d90fef..3cf008e6 100644 --- a/apis/shopper-context-oas/shopper-context-oas-v1-bundled.yaml +++ b/apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-internal.yaml @@ -8,7 +8,6 @@ servers: variables: shortCode: default: shortCode -x-sdk-classname: ShopperContexts paths: /organizations/{organizationId}/shopper-context/{usid}: get: @@ -116,7 +115,7 @@ paths: schema: type: string '400': - description: The usid in the incoming request does not match the USID in the token. + description: The usid in the incoming request does not match the usid in the token. content: application/json: schema: @@ -539,3 +538,4 @@ components: regionCode: '12345' latitude: 10.11 longitude: 198.34 +x-sdk-classname: ShopperContexts diff --git a/apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-public.yaml b/apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-public.yaml new file mode 100644 index 00000000..7ac29a33 --- /dev/null +++ b/apis/shopper-context-oas-1.0.34/shopper-context-oas-v1-public.yaml @@ -0,0 +1,540 @@ +openapi: 3.0.3 +info: + title: Shopper Context + version: v1 + description: "# API Overview\n\nWith the Shopper Context API, you can set any context information as a key/value pair and use it to retrieve personalized promotions, payment methods, and shipping methods. The context information that is set is evaluated against the customer group definitions to determine a customer group (shopper segment), and is then used to activate the experiences that are associated with a particular segment, such as promotions.\n\nYou can also get personalized API responses triggered by shopper context from the [Open Commerce API](https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/OCAPI/current/usage/OpenCommerceAPI.html) (OCAPI). Support for both the B2C Commerce API and OCAPI allows shopper context to be used in hybrid deployments.\n\n**Warning** \nAccess tokens with a scope that includes the Shopper Context API are powerful. They can activate specific promotions and can be used to see how a storefront would be displayed in the future. Don't share them with untrusted clients like web browsers or client apps.\n\nMake Shopper Context calls with a private client and only set shopper context through a secure backend channel. To avoid misuse, do not make direct calls through a browser or similar client in which data can be viewed. \n\nAs part of this, when creating a SLAS public client for a tenant, if you attempt to add the Shopper Context API scope, a warning message is displayed to ensure you are aware of the pitfalls of doing so.\n\n**Note**:\n\nShopper context is valid for 1 day for guest shoppers and 7 days for registered shoppers. To extend the context set, create a new context. As a best practice, refresh your contexts periodically to ensure that the right personalized experience is rendered for your shoppers.\n\nWith B2C Commerce release 24.5, all new implementations of Shopper Context require the `siteId` query parameter to be passed. Existing customers with Shopper Context implementations should start including `siteId` going forward. Starting July 31 2024, `siteId` is required for all customers, and a bad request response code is returned for requests without a `siteId`.\n\n## Authentication & Authorization\n\nThe Shopper Context API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html) in the SLAS guides. \n\nAdd `sfcc.shopper-context.rw` to the scopes configuration for the SLAS API client.\n\nFor more information, see [Authorization for Shopper APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html) in the Get Started guides.\n\n**Warning**: As with all APIs, never store access tokens in the browser because this creates a security vulnerability.\n\n## Use Cases\n\nFor detailed usage information, see the [Shopper Context guides](https://developer.salesforce.com/docs/commerce/commerce-api/guide/shopper-context-api.html)." +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/shopper-context/{usid}: + get: + summary: |- + Get the shopper's context based on the shopperJWT. + + With B2C Commerce release 24.5, all endpoints in the Shopper context API require the `siteId` parameter for new customers. This field is marked as optional for backward compatibility and will be changed to mandatory tentatively by January 2025. + operationId: getShopperContext + parameters: + - $ref: '#/components/parameters/usid' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Shopper Context retrieved successfully. + headers: + X-Geolocation: + description: The response header returns the geolocation based on the `clientIp` or `geoLocation` attribute set in the shopper context. If both are set, `geoLocation` takes precedence. + required: false + schema: + type: string + example: 'CountryCode: US; Country: United States; MetroCode: 0; Latitude: 37.751; Longitude: -97.822' + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperContext' + examples: + ShopperContextExample: + $ref: '#/components/examples/ShopperContextExample' + '400': + description: The usid in the incoming request does not match the usid in the token. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext400: + $ref: '#/components/examples/BadRequestUSIDNotMatching' + '401': + description: Your shopper JWT is invalid and cannot be used to identify the API client. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext401: + $ref: '#/components/examples/Unauthorized' + '403': + description: Your shopper JWT is valid, but you do not have permission to access the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext403: + $ref: '#/components/examples/Forbidden' + '404': + description: Shopper Context for ORGANIZATION_ID - f_ecom_bhbv_prd and USID - 7e1f65fb-185c-4788-8cec-05fef8dac77d not found in repository. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext404: + $ref: '#/components/examples/NotFound' + security: + - ShopperToken: + - sfcc.shopper-context + - sfcc.shopper-context.rw + put: + summary: |- + Create the shopper's context based on the shopperJWT. If a shopper context already exists, the entire existing context is replaced. + + With B2C Commerce release 24.5, all endpoints in the Shopper context API will require the `siteId` parameter for new customers. This field is marked as optional for backward compatibility and will be changed to mandatory tentatively by January 2025. + operationId: createShopperContext + parameters: + - $ref: '#/components/parameters/usid' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/evaluateContextWithClientIp' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperContext' + examples: + ShopperContextExample: + $ref: '#/components/examples/ShopperContextExample' + required: true + responses: + '200': + description: The shopper's context was created successfully. + headers: + X-Geolocation: + description: The response header returns the geolocation based on the `clientIp` or `geoLocation` attribute set in the shopper context. If both are set, `geoLocation` takes precedence. + required: false + schema: + type: string + '201': + description: The shopper's context was created successfully. + headers: + X-Geolocation: + description: The response header returns the geolocation based on the `clientIp` or `geoLocation` attribute set in the shopper context. If both are set, `geoLocation` takes precedence. + required: false + schema: + type: string + '400': + description: The usid in the incoming request does not match the usid in the token. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext400: + $ref: '#/components/examples/BadRequestUSIDNotMatching' + '401': + description: Your shopper JWT is invalid and cannot be used to identify the API client. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext401: + $ref: '#/components/examples/Unauthorized' + '403': + description: Your shopper JWT is valid, but you do not have permission to access the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + Forbidden: + $ref: '#/components/examples/Forbidden' + security: + - ShopperToken: + - sfcc.shopper-context.rw + delete: + description: |- + Get a shopper's context based on the shopperJWT. + + With B2C Commerce release 24.5, all endpoints in the Shopper context API require the `siteId` parameter for new customers. This field is marked as optional for backward compatibility and will be changed to mandatory tentatively by January 2025. + operationId: deleteShopperContext + parameters: + - $ref: '#/components/parameters/usid' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '204': + description: The shopper's context was deleted successfully. + '400': + description: The usid in the incoming request does not match the usid in the token. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext400: + $ref: '#/components/examples/BadRequestUSIDNotMatching' + '401': + description: Your shopper JWT is invalid and cannot be used to identify the API client. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext401: + $ref: '#/components/examples/Unauthorized' + '403': + description: Your shopper JWT is valid, but you do not have permission to access the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + Forbidden: + $ref: '#/components/examples/Forbidden' + '404': + description: Shopper Context for ORGANIZATION_ID - f_ecom_bhbv_prd and USID - 7e1f65fb-185c-4788-8cec-05fef8dac77d not found in repository. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getShopperContext404: + $ref: '#/components/examples/NotFound' + security: + - ShopperToken: + - sfcc.shopper-context.rw + patch: + summary: Update an existing shopper's context based on the Shopper JWT. + description: "If the shopper context exists, it's updated with the patch body.\n- If a new attribute that does not exist in the existing shopper context is present, it is added to the context.\n-If an attribute is already present in the existing shopper context, its value is replaced by the corresponding value from the new shopper context in the request body as follows:\n - `custom qualifiers` or `assignment qualifiers`:\n\n If the individual qualifier key exists, it is overwritten with the new value.\n\n If the value of the key is set to null, it is deleted from the existing shopper context.\n\n If an empty `custom qualifiers` or `assignment qualifiers` object `{}` is passed, the entire qualifier object is deleted.\n - `effectiveDateTime` or `sourceCode` or `clientIp`:\n\n If the new value is set to an empty string (\"\"), it is deleted from the existing shopper context.\n\n If the new value is set to null, it is ignored.\n\n If the new value is not empty or null, it overwrites the existing value.\n\n - `customerGroupIds`:\n\n If a list of `customerGroupIds` exists, it is replaced by the new list of customer group IDs from the request.\n\n If `customerGroupIds` is set to an empty array [], the existing list in the shopper context is deleted.\n\n - `geoLocation`: \n\n If it exists, the entire `geoLocation` object is replaced with the new value.\n\n If the new value is set to null, it is ignored.\n\n If an empty `geoLocation` object `{}` is passed, it is deleted. \n\nWith B2C Commerce release 24.5, all endpoints in the Shopper context API require the `siteId` parameter for new customers. This field is marked as optional for backward compatibility and will be changed to mandatory tentatively by January 2025." + operationId: updateShopperContext + parameters: + - $ref: '#/components/parameters/usid' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/evaluateContextWithClientIp' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperContext' + examples: + ShopperContextUpdateRequestBody: + $ref: '#/components/examples/ShopperContextUpdateRequestBody' + required: true + responses: + '200': + description: The shopper context was updated successfully. + headers: + X-Geolocation: + required: false + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperContext' + examples: + ShopperContextUpdateResponseExample: + $ref: '#/components/examples/ShopperContextUpdateResponseExample' + '400': + description: The usid in the incoming request does not match the usid in the token. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + updateShopperContext400: + $ref: '#/components/examples/BadRequestUSIDNotMatching' + '401': + description: Your shopper JWT is invalid and cannot be used to identify the API client. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + updateShopperContext401: + $ref: '#/components/examples/Unauthorized' + '403': + description: Your shopper JWT is valid, but you do not have permission to access the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + updateShopperContext403: + $ref: '#/components/examples/Forbidden' + security: + - ShopperToken: + - sfcc.shopper-context.rw +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-context: Shopper Context READONLY + sfcc.shopper-context.rw: Shopper Context + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-context: Shopper Context READONLY + sfcc.shopper-context.rw: Shopper Context + parameters: + usid: + name: usid + in: path + description: The Shopper's unique identifier. It is a required parameter and is part of the response from the Guest or Registered User Shopper Login (SLAS) API call. + required: true + schema: + type: string + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The site context. + name: siteId + example: RefArch + in: query + required: false + schema: + $ref: '#/components/schemas/SiteId' + evaluateContextWithClientIp: + name: evaluateContextWithClientIp + in: query + description: | + Determines whether to evaluate the context using the provided `clientIp`. This property is available with B2C Commerce version 24.7. + - If `evaluateContextWithClientIp` is set to `true`: + - The `clientIP` is saved and used in subsequent requests. + + - If `evaluateContextWithClientIp` is set to `false`: + - The `clientIP` is not saved and will not be used in subsequent requests. + required: false + schema: + type: boolean + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + ShopperContext: + type: object + properties: + effectiveDateTime: + description: Qualifier to set the effective date time for the context to apply. For example, "Shop the Future" use cases. If not provided, the current dateTime will be assumed. + type: string + example: '2020-12-20T00:00:00Z' + format: date-time + nullable: true + sourceCode: + description: Qualifier to set the source code for the context to apply. Set the source code to evaluate source code group that triggers the promotion (campaign assignment) and Price books (assigned to Source code group). + type: string + example: wii1-98 + nullable: true + customerGroupIds: + items: + maxLength: 256 + type: string + example: BigSpenders + type: array + description: Qualifier to set the Customer Group Ids for the context to apply. Set the Customer Group Ids to evaluate customer groups that trigger the promotions (campaign assignment) assigned to the customer groups. + customQualifiers: + type: object + additionalProperties: false + description: Map of custom qualifiers for the shopper context. Set this object to trigger pricing and promotion experiences using a dynamic session-based customer group. Object size is limited to 20 key-value pairs (properties). + example: + deviceType: mobile + ipAddress: 189.0.0.0 + operatingSystem: Android + assignmentQualifiers: + type: object + example: + store: boston + additionalProperties: false + description: Map of assignment qualifiers for the shopper context. Set this object when using the assignment framework to activate experiences based on assignment qualifiers. Currently, only pricing and promotion experiences are supported. Object size is limited to 20 key-value pairs (properties). + clientIp: + type: string + example: 12.12.12.1 + description: "The IP Address of the client. If the client IP is not a valid IPv4 address, a Bad Request (400) error is thrown. This property is available with B2C Commerce version 24.7.\n\nWhen `clientIp` is set, the geolocation based on the `clientIp` is returned in the `X-Geolocation` header in the response. Note: Use/retrieve this header in a case insensitive manner.\n\nHowever, if the `geoLocation` attribute is also set in the context, it takes precedence over the `clientIp`, and the `X-Geolocation` header returns the geolocation based on the `geoLocation` attribute.\n\nThe query parameter `evaluateContextWithClientIp` determines whether to evaluate the context using the provided `clientIp`.\n - If `evaluateContextWithClientIp` is set to `true`:\n - The `clientIp` is saved and used in subsequent requests. \n \n Note: If `geoLocation` is also saved in the context, it takes precedence over the `clientIp`.\n - If `evaluateContextWithClientIp` is set to `false`:\n - The `clientIp` is not saved and is not used in subsequent requests." + geoLocation: + type: object + properties: + city: + type: string + description: The city name associated with this location. + example: Boston + country: + type: string + description: The country name associated with this location. + example: United States of America + countryCode: + type: string + description: The ISO country code associated with this location. + example: US + latitude: + example: 10.11 + type: number + description: The latitude coordinate, which is a number between -90.0 and +90.0, associated with this location. + format: double + longitude: + type: number + example: 198.34 + description: The longitude coordinate, which is a number between -180.0 and +180.0, associated with this location. + format: double + metroCode: + type: string + description: The metro code associated with this location. + postalCode: + type: string + description: The postal code associated with this location. + example: '01730' + region: + type: string + description: The region (subdivision) name for this location. Corresponds with "state" in the USA. + example: NA + regionCode: + type: string + example: '12345' + description: The region (province or state) code for this location. + description: The geographic location of the client. When you set a geolocation, it is saved as context for subsequent requests. This overrides any geolocation context previously saved using `clientIp`. This property is available with B2C Commerce version 24.7. + description: A shoppers' context represented as key-value string pairs. + example: + effectiveDateTime: '2020-12-20T00:00:00Z' + sourceCode: wii1-98 + customQualifiers: + deviceType: mobile + ipAddress: 189.0.0.0 + operatingSystem: Android + assignmentQualifiers: + store: boston + customerGroupIds: + - BigSpenders + - MobileUsers + clientIp: 12.12.12.1 + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + examples: + ShopperContextExample: + value: + effectiveDateTime: '2020-12-20T00:00:00Z' + sourceCode: wii1-98 + customQualifiers: + deviceType: mobile + ipAddress: 189.0.0.0 + operatingSystem: Android + assignmentQualifiers: + store: boston + customerGroupIds: + - BigSpenders + - MobileUsers + clientIp: 12.12.12.1 + BadRequestUSIDNotMatching: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/usid-not-matching-with-token + detail: Usid in incoming request does not match Usid in token. + title: Usid not matching with token + Unauthorized: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized + title: Unauthorized + detail: Your shopper JWT is invalid and could not be used to identify the API client. + Forbidden: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + title: Forbidden + detail: Your shopper JWT is valid, but you have no permissions to access the resource. + NotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/shopper-context-no-found + detail: 'Shopper Context for ORGANIZATION_ID: f_ecom_bhbv_prd and USID: 7e1f65fb-185c-4788-8cec-05fef8dac77d not found in Repository.' + title: Shopper Context Not Found + ShopperContextUpdateRequestBody: + value: + effectiveDateTime: null + customQualifiers: + deviceType: iPad + operatingSystem: null + storeId: SLC1 + assignmentQualifiers: + store: london + clientIp: 12.12.12.1 + geoLocation: + countryCode: US + country: United States of America + city: Boston + postalCode: '01730' + metroCode: M234 + region: NA + regionCode: '12345' + latitude: 10.11 + longitude: 198.34 + ShopperContextUpdateResponseExample: + value: + sourceCode: wii1-98 + customQualifiers: + deviceType: iPad + ipAddress: 189.0.0.0 + storeId: SLC1 + assignmentQualifiers: + store: london + customerGroupIds: + - BigSpenders + - MobileUsers + clientIp: 12.12.12.1 + geoLocation: + countryCode: US + country: United States of America + city: Boston + postalCode: '01730' + metroCode: M234 + region: NA + regionCode: '12345' + latitude: 10.11 + longitude: 198.34 diff --git a/apis/shopper-customers-oas/.metadata.json b/apis/shopper-customers-oas-1.0.52/.metadata.json similarity index 78% rename from apis/shopper-customers-oas/.metadata.json rename to apis/shopper-customers-oas-1.0.52/.metadata.json index 5ad4df9f..ec46c726 100644 --- a/apis/shopper-customers-oas/.metadata.json +++ b/apis/shopper-customers-oas-1.0.52/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-customers-oas/1.0.50-kbode.W-18403924-SNAPSHOT-b4", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-customers-oas/1.0.52", "name": "Shopper Customers OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-customers-oas", - "version": "1.0.50-kbode.W-18403924-SNAPSHOT-b4", + "version": "1.0.52", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-customers-oas/exchange.json b/apis/shopper-customers-oas-1.0.52/exchange.json similarity index 73% rename from apis/shopper-customers-oas/exchange.json rename to apis/shopper-customers-oas-1.0.52/exchange.json index 8be65e2a..95053791 100644 --- a/apis/shopper-customers-oas/exchange.json +++ b/apis/shopper-customers-oas-1.0.52/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-customers-oas-v1-bundled.yaml", + "main": "shopper-customers-oas-v1-public.yaml", "name": "Shopper Customers OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-customers-oas", - "version": "1.0.50-kbode.W-18403924-SNAPSHOT-b4", + "version": "1.0.52", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-customers-oas/shopper-customers-oas-v1-bundled.yaml b/apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-internal.yaml similarity index 97% rename from apis/shopper-customers-oas/shopper-customers-oas-v1-bundled.yaml rename to apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-internal.yaml index c8f8aeb1..43538111 100644 --- a/apis/shopper-customers-oas/shopper-customers-oas-v1-bundled.yaml +++ b/apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-internal.yaml @@ -612,7 +612,7 @@ paths: type: integer format: int64 default: 0 - maximum: 0 + minimum: 0 description: Used to retrieve the results based on a particular resource offset. responses: '200': @@ -1276,9 +1276,6 @@ paths: application/json: schema: $ref: '#/components/schemas/PublicProductList' - examples: - getCustomerProductListByListId: - $ref: '#/components/examples/publicProductListExample' '400': description: | CustomerId URL parameter does not match the verified customer represented by the JWT token. @@ -1385,7 +1382,7 @@ components: sfcc.shopper-myaccount.paymentinstruments.rw: Shopper MyAccount PaymentInstruments scope sfcc.shopper-myaccount.productlists: Shopper MyAccount ProductLists scope READONLY sfcc.shopper-myaccount.productlists.rw: Shopper MyAccount ProductLists scope - sfcc.shopper.productlists: Shopper ProductLists scope READONLY + sfcc.shopper-productlists: Shopper ProductLists scope READONLY authorizationCode: authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token @@ -1402,8 +1399,7 @@ components: sfcc.shopper-myaccount.paymentinstruments.rw: Shopper MyAccount PaymentInstruments scope sfcc.shopper-myaccount.productlists: Shopper MyAccount ProductLists scope READONLY sfcc.shopper-myaccount.productlists.rw: Shopper MyAccount ProductLists scope - sfcc.shopper.productlists: Shopper ProductLists scope READONLY - example: Just an example + sfcc.shopper-productlists: Shopper ProductLists scope READONLY AmOAuth2: type: oauth2 description: AccountManager OAuth 2.0 bearer token Authentication. @@ -1548,44 +1544,6 @@ components: - countryCode - lastName type: object - PaymentBankAccount: - type: object - properties: - driversLicenseLastDigits: - maxLength: 256 - type: string - description: |- - The last 4 characters of the decrypted driver’s license number of the bank account associated with this payment - instrument. - example: 7435 - driversLicenseStateCode: - maxLength: 256 - type: string - description: The driver’s license state code. - example: UT - holder: - maxLength: 256 - type: string - description: The holder of the bank account. - example: John Smith - maskedDriversLicense: - maxLength: 256 - type: string - description: |- - The decrypted driver’s license number of the bank account with all but the last 4 characters replaced with `*` - characters. - example: '****7658' - maskedNumber: - maxLength: 256 - type: string - description: The masked bank account number. - example: '********' - numberLastDigits: - maxLength: 256 - type: string - description: The last digits of the bank account number. - example: 6654 - description: Document representing a payment bank account. PaymentCard: additionalProperties: false description: Document representing a payment card. @@ -1670,11 +1628,6 @@ components: type: string description: The masked gift certificate code. example: gift-code - paymentBankAccount: - type: object - allOf: - - $ref: '#/components/schemas/PaymentBankAccount' - description: Document representing a payment bank account. paymentCard: allOf: - $ref: '#/components/schemas/PaymentCard' @@ -2326,9 +2279,6 @@ components: format: double example: 10.03 additionalProperties: false - SimpleLink: - description: Document representing a link to another resource. - type: string Discount: additionalProperties: title: Additional Property Support @@ -2438,9 +2388,6 @@ components: and is not used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated. type: string - promotionLink: - description: The URL addressing the related promotion. It is read only. - type: string reasonCode: description: The reason for the price adjustment. type: string @@ -3246,10 +3193,6 @@ components: been added. It is read only. example: 4.95 type: number - notes: - description: The notes. - allOf: - - $ref: '#/components/schemas/SimpleLink' orderPriceAdjustments: description: The order-level price adjustments. type: array @@ -3350,7 +3293,6 @@ components: - customerInfo - lastModified - merchandizeTotalTax - - notes - orderTotal - productSubTotal - productTotal @@ -3537,10 +3479,6 @@ components: not including shipping or adjustments. It is read only. example: 1.5 type: number - notes: - description: The notes. - allOf: - - $ref: '#/components/schemas/SimpleLink' orderNo: description: The order number. example: '00000410' @@ -3998,8 +3936,10 @@ components: $ref: '#/components/schemas/ProductLink' productPromotions: description: |- - The array of active customer product promotions for this product. This array can be empty. - Coupon promotions are not returned in this array. + An array of active customer product promotions for this product, sorted by promotion priority + using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → + best discount → ID). This array can be empty. Coupon promotions are not returned in this array. + See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details. type: array items: $ref: '#/components/schemas/ProductPromotion' @@ -5154,13 +5094,6 @@ components: creationDate: '2017-08-20T11:30:36.000Z' lastModified: '2017-08-20T11:30:50.000Z' maskedGiftCertificateCode: '***********ode' - paymentBankAccount: - driversLicenseStateCode: CO - driversLicenseLastDigits: '9742' - holder: John Doe - maskedDriversLicense: '**********2159' - maskedNumber: '*************1234' - numberLastDigits: '8700' paymentCard: cardType: Visa creditCardExpired: false @@ -5171,7 +5104,6 @@ components: numberLastDigits: ber2 paymentInstrumentId: beybQiWcyatEEaaadniwhKxxFl paymentMethodId: CREDIT_CARD - uuid: beybQiWcyatEEaaadniwhKxxFl phoneBusiness: '234560003' phoneHome: '123450003' phoneMobile: '345670003' @@ -5322,8 +5254,6 @@ components: inventoryReservationExpiry: '2019-09-05T17:12:56.670Z' lastModified: '2019-09-05T17:12:56.670Z' merchandizeTotalTax: 0 - notes: - link: Link to Notes orderPriceAdjustments: - appliedDiscount: amount: 0 @@ -5351,13 +5281,6 @@ components: status: 0 bankRoutingNumber: string maskedGiftCertificateCode: string - paymentBankAccount: - driversLicenseLastDigits: '6374' - driversLicenseStateCode: MA - holder: John - maskedDriversLicense: '***************74' - maskedNumber: '***********52' - numberLastDigits: '2345' paymentCard: cardType: Visa creditCardExpired: false @@ -5426,9 +5349,13 @@ components: productListItem: id: 2345245e654utjSSDFfdhh priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver productList: description: My Product List - link: Link to product list name: Electronics public: true title: My Electronics Wish List @@ -5470,9 +5397,13 @@ components: productListItem: id: string priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver productList: description: My Product List - link: Link to product list name: Electronics public: true title: My Electronics Wish List @@ -5568,7 +5499,7 @@ components: total: 1 CustomersOrdersResult: value: - limit: 0 + limit: 1 data: - adjustedMerchandizeTotalTax: 0 adjustedShippingTotalTax: 0 @@ -5586,8 +5517,7 @@ components: stateCode: MA bonusDiscountLineItems: - bonusProducts: - - link: bonus product link - productDescription: Bonus Product + - productDescription: Bonus Product productId: '34984327448' productName: Extra Fluffy Bonus Product title: Bonus Product @@ -5620,11 +5550,8 @@ components: recipientName: John Smith senderName: Jane Smith shipmentId: 678934jsadLHY5 - inventoryReservationExpiry: '2019-09-05T17:12:56.670Z' lastModified: '2019-09-05T17:12:56.670Z' merchandizeTotalTax: 0 - notes: - link: Link to Notes orderPriceAdjustments: - appliedDiscount: amount: 0 @@ -5652,13 +5579,6 @@ components: status: 0 bankRoutingNumber: string maskedGiftCertificateCode: string - paymentBankAccount: - driversLicenseLastDigits: '6374' - driversLicenseStateCode: MA - holder: John - maskedDriversLicense: '***************74' - maskedNumber: '***********52' - numberLastDigits: '2345' paymentCard: cardType: Visa creditCardExpired: false @@ -5729,14 +5649,12 @@ components: id: 2345245e654utjSSDFfdhh priority: 0 productDetailsLink: - link: link to product details productDescription: apple-ipod-classic productId: apple-ipod-classic productName: Apple iPod Classic title: Apple iPod Classic Silver productList: description: My Product List - link: Link to product list name: Electronics public: true title: My Electronics Wish List @@ -5779,14 +5697,12 @@ components: id: string priority: 0 productDetailsLink: - link: link to product details productDescription: apple-ipod-classic productId: apple-ipod-classic productName: Apple iPod Classic title: Apple iPod Classic Silver productList: description: My Product List - link: Link to product list name: Electronics public: true title: My Electronics Wish List @@ -5905,7 +5821,6 @@ components: getCustomerPaymentInstrumentSuccess: value: bankRoutingNumber: bankrouting3776 - paymentBankAccount: {} paymentCard: cardType: MasterCard creditCardExpired: false @@ -6193,41 +6108,6 @@ components: type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-access-token detail: The request is unauthorized, the access token is invalid. accessToken: iI6IjEiLCJhbGciOiJIUzI1NiIsInR5cCI6Ik - publicProductListExample: - value: - coRegistrant: - email: jane.doe@example.com - firstName: Jane - lastName: Doe - role: Bride - currentShippingAddressInfo: - addressId: me - title: me, John Doe, Woburn - event: - city: Washington - country: US - date: '2017-08-20T11:30:36.000Z' - state: DC - type: Wedding - id: bcqg6iWbw4XEYaaadjixFLTWP0 - name: DC-Doe-Wedding - postEventShippingAddressInfo: - addressId: me - title: jane, Jane Doe, Springfield - productListItems: - - id: 09c9df175e247c0d75d76f443e - priority: 6 - type: product - public: true - registrant: - email: john.doe@example.com - firstName: John - lastName: Doe - role: Groom - shippingAddressInfo: - addressId: me - title: me, John Doe, Woburn - type: gift_registry publicProductListItemsExample: value: id: 023513f915fad06573f330fb0d diff --git a/apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-public.yaml b/apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-public.yaml new file mode 100644 index 00000000..43538111 --- /dev/null +++ b/apis/shopper-customers-oas-1.0.52/shopper-customers-oas-v1-public.yaml @@ -0,0 +1,6143 @@ +openapi: 3.0.3 +info: + title: Shopper Customers + version: v1 + description: |- + # API Overview + + The Shopper Customers API enables you to develop functionality that lets customers log in, and manage their profiles and product lists. Profile management includes ability for shoppers to add or modify addresses and payment methods, and add or modify products to wishlists or favorites. Commerce Cloud provides a rich set of Authentication APIs that include logging in guest shoppers, registered shoppers, agents on behalf of customers and a trusted system authentication on behalf of customers. In all authentication scenarios involving customers, a JSON Web Token (JWT) is generated in Commerce Cloud. Using the JWT, customers can access other Shopper API resources like Orders and Baskets. The application must refresh the JWT every 30 minutes to save the shopper activity (for example, retain products in a shopper's cart) for prolonged periods of time. + + ## Authentication & Authorization + + The client requesting the customer information must have access to the Customer and Product List resources. The API requests pass a system-to-system bearer token in the header of the request. For the trusted system API, the trusted client must first authenticate against Account manager to log in on behalf of a customer. + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### Register a New Customer + + In this use case, a customer who is browsing on a commerce shopping app built using B2C Commerce APIs would like to create a customer profile, so that they can track their order when logged in on the next visit. + + The API flow is shown in the following diagram: + + ![b2c-commerce-shopper-customers-screenshot-1.png](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/b2c-commerce-shopper-customers-screenshot-1.png) + + 1. The shopper opens the shopping app. + 2. Request an access token from SLAS. For details, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + 3. The SLAS API responds with the shopper access token (JWT). + 4. The shopper adds a product to their basket. + 5. Use the Shopper Baskets API to create a basket. The shopper JWT from SLAS is supplied in the authorization header. + 6. Save the basket with a registered user customer ID (even though the shopper is still a guest). The shopper JWT from SLAS is supplied in the authorization header. + 7. The shopper creates a profile. + 8. Use the Shopper Customers API to register the customer. + + ### Authenticate a Trusted System on Behalf of a Customer + + In this cross-cloud use case, a Experience Cloud user places an order on Commerce Cloud from the Experience Cloud using the platform APIs. The Experience Cloud app is a trusted system that has a trusted relationship with Commerce Cloud using the OAuth client credentials grant against the Commerce Cloud Account Manager. The Experience Cloud user logs in with a redirect to Salesforce IDM and after successful login, the client application is able to call B2C Commerce APIs on behalf of the customer. Commerce Cloud returns a JWT for the Experience Cloud user and the Experience Cloud user is able to place orders on Commerce Cloud. + + The API flow is shown in the following diagram: + + ![b2c-commerce-shopper-customers-screenshot-2.png](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/b2c-commerce-shopper-customers-screenshot-2.png) + + ### Reset Customer Password + + In this use case, a shopper who is browsing on a commerce shopping app, built using B2C Commerce APIs, requests to reset their password. The app verifies the shopper's credentials and returns a 404 if verification fails. Otherwise, when the shopper requests their password to be reset, the app first creates a password reset token using the shopper’s login ID, and an account manager token (obtained using the client credentials grant). After the app has the password reset token, the app can prompt the shopper for new password. Any app-level customization, such as sending a password reset email, can be done at this step. Finally, the app calls the reset endpoint to reset the customer’s password. + + ![b2c-commerce-shopper-customers-screenshot-3.png](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/b2c-commerce-shopper-customers-screenshot-3.png) + + ### Update Shopper LoginId + + In this use case, in order to update a shopper's loginId, the PATCH /customers/{customerId} call can be used starting B2C Commerce Cloud GA release 24.7. The new field in the request called `currentPassword` is mandatory and needs to match the shopper's existing password. If this field is not provided or does not match the existing shopper password when trying to update loginId, a HTTP 400 rsponse will be returned. If the loginId field is not sent in the PATCH request body, the `currentPassword` field is not required. + **Note: After the `loginId` is updated, a new SLAS token must be fetched for the shopper for subsequent calls. + + ### Use Hooks + + For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/customers: + post: + summary: Register a new customer. + description: Mandatory data includes the credentials, profile last name, and email. This requires a JSON Web Token (JWT) which needs to be obtained using the POST /customers/auth API with type "guest", or from the Shopper Login (SLAS) API. The return type object for this endpoint is a common customer object shared by multiple Shopper Customer endpoints. In this case, all customer object details are returned, but attributes that are not included in the response, although they might be part of the customer object, are ignored. For example, although address information is included in the customer object, it is not displayed in the response for this endpoint and is ignored. + operationId: registerCustomer + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerRegistration' + examples: + CustomerRegistrationBody: + $ref: '#/components/examples/CustomerRegistrationBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + examples: + customerRegistrationResponse: + $ref: '#/components/examples/customerRegistrationResponse' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '401': + description: | + In the case of type credentials, the username is unknown or the password does not match. In the case of type session, the session is no longer active or the dwsecuretoken value is invalid. In both cases, the customer is disabled or locked. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer401: + $ref: '#/components/examples/registerCustomer401' + security: + - ShopperToken: + - sfcc.shopper-customers.register + /organizations/{organizationId}/customers/password/actions/reset: + post: + summary: Reset customer password after obtaining a reset token. + description: This is the second step in the reset customer password flow, in which a customer password is reset by providing new credentials along with a reset token. This call should be preceded by a call to the /create-reset-token endpoint. + operationId: resetPassword + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetPasswordRequest' + examples: + ResetPasswordBody: + $ref: '#/components/examples/ResetPasswordBody' + required: true + responses: + '204': + description: Reset password successful. No Content. + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + security: + - AmOAuth2: + - sfcc.shopper-customers.login + /organizations/{organizationId}/customers/password/actions/create-reset-token: + post: + summary: Get reset password token. + description: This is the first step in the reset customer password flow, in which a password reset token is requested for future use to reset a customer password. This call should be followed by a call to the /reset endpoint. + operationId: getResetPasswordToken + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetPasswordTokenRequest' + examples: + ResetPasswordTokenBody: + $ref: '#/components/examples/ResetPasswordTokenBody' + required: true + responses: + '200': + description: Reset password token generated and returned successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ResetPasswordToken' + examples: + getResetPasswordTokenSuccess: + $ref: '#/components/examples/getResetPasswordTokenSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + security: + - AmOAuth2: + - sfcc.shopper-customers.login + /organizations/{organizationId}/customers/external-profile: + get: + summary: Gets the new external profile for a customer. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: getExternalProfile + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/externalId' + - $ref: '#/components/parameters/authenticationProviderId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerExternalProfile' + examples: + getExternalProfileSuccess: + $ref: '#/components/examples/getExternalProfileSuccess' + '400': + description: | + Customer ExternalId URL parameter is not valid. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getExternalProfile400: + $ref: '#/components/examples/getExternalProfile400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getExternalProfile404: + $ref: '#/components/examples/getExternalProfile404' + security: + - AmOAuth2: + - sfcc.shopper-customers.login + post: + summary: Register a new external profile for a customer. This endpoint accepts a guest customer ShopperToken (JWT) only. + operationId: registerExternalProfile + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerExtProfileRequest' + examples: + ExternalProfileBody: + $ref: '#/components/examples/ExternalProfileBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerExternalProfile' + examples: + registerExternalProfileSuccess: + $ref: '#/components/examples/registerExternalProfileSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '401': + description: | + In the case of type credentials, the username is unknown or the password does not match. In the case of type session, the session is no longer active or the dwsecuretoken value is invalid. In both cases, the customer is disabled or locked. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer401: + $ref: '#/components/examples/registerCustomer401' + security: + - ShopperToken: + - sfcc.shopper-customers.register + /organizations/{organizationId}/customers/{customerId}: + get: + summary: Get a customer and all existing addresses and payment instruments associated with the requested customer. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: getCustomer + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + examples: + getCustomerSuccess: + $ref: '#/components/examples/getCustomerSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount + - sfcc.shopper-myaccount.rw + patch: + summary: Update a customer. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: updateCustomer + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + examples: + UpdateCustomerBody: + $ref: '#/components/examples/UpdateCustomerBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + examples: + updateCustomerResponse: + $ref: '#/components/examples/updateCustomerResponse' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.rw + /organizations/{organizationId}/customers/{customerId}/addresses: + post: + summary: Create a new address with the given name for the customer. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: createCustomerAddress + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAddress' + examples: + CustomerAddressBody: + $ref: '#/components/examples/CustomerAddressBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAddress' + examples: + customerAddressResponse: + $ref: '#/components/examples/customerAddressResponse' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.addresses.rw + /organizations/{organizationId}/customers/{customerId}/addresses/{addressName}: + get: + summary: Retrieve a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: getCustomerAddress + parameters: + - $ref: '#/components/parameters/addressName' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAddress' + examples: + customerAddressResponse: + $ref: '#/components/examples/customerAddressResponse' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.addresses + - sfcc.shopper-myaccount.addresses.rw + delete: + summary: Delete a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: removeCustomerAddress + parameters: + - $ref: '#/components/parameters/addressName' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '204': + description: No content + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.addresses.rw + patch: + summary: Update a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: updateCustomerAddress + parameters: + - $ref: '#/components/parameters/addressName' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAddress' + examples: + CustomerAddressResponseBody: + $ref: '#/components/examples/CustomerAddressResponseBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAddress' + examples: + customerAddressResponse: + $ref: '#/components/examples/customerAddressResponse' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.addresses.rw + /organizations/{organizationId}/customers/{customerId}/baskets: + get: + summary: Get the baskets for a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getCustomerBaskets + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/BasketsResult' + examples: + customerBasketsResult: + $ref: '#/components/examples/customerBasketsResult' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.baskets + /organizations/{organizationId}/customers/{customerId}/orders: + get: + summary: Return a page list of all the customer's orders. The default page size is 10. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getCustomerOrders + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/crossSites' + - $ref: '#/components/parameters/from' + - $ref: '#/components/parameters/until' + - $ref: '#/components/parameters/status' + - $ref: '#/components/parameters/siteId' + - name: limit + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 50 + description: Maximum records to retrieve per request, not to exceed 50. Defaults to 10. + - name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + minimum: 0 + description: Used to retrieve the results based on a particular resource offset. + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerOrderResult' + examples: + CustomersOrdersResult: + $ref: '#/components/examples/CustomersOrdersResult' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.orders + /organizations/{organizationId}/customers/{customerId}/password: + put: + summary: Update a customer's password. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: updateCustomerPassword + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordChangeRequest' + examples: + UpdatePasswordBody: + $ref: '#/components/examples/UpdatePasswordBody' + required: true + responses: + '204': + description: No content + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-customers.login + /organizations/{organizationId}/customers/{customerId}/payment-instruments: + post: + summary: Add a payment instrument to the customer information. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: createCustomerPaymentInstrument + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerPaymentInstrumentRequest' + examples: + CustomerPaymentInstrumentBody: + $ref: '#/components/examples/CustomerPaymentInstrumentBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerPaymentInstrument' + examples: + getCustomerPaymentInstrumentSuccess: + $ref: '#/components/examples/getCustomerPaymentInstrumentSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.paymentinstruments.rw + /organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}: + get: + summary: Retrieve a customer's payment instrument by its ID. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: getCustomerPaymentInstrument + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerPaymentInstrument' + examples: + getCustomerPaymentInstrumentSuccess: + $ref: '#/components/examples/getCustomerPaymentInstrumentSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.paymentinstruments + - sfcc.shopper-myaccount.paymentinstruments.rw + delete: + summary: Delete a customer's payment instrument. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: deleteCustomerPaymentInstrument + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '204': + description: No content + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.paymentinstruments.rw + /organizations/{organizationId}/customers/{customerId}/product-lists: + get: + summary: Return all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getCustomerProductLists + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListResult' + examples: + customerProductListResult: + $ref: '#/components/examples/customerProductListResult' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists + - sfcc.shopper-myaccount.productlists.rw + post: + summary: Create a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: createCustomerProductList + parameters: + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductList' + examples: + PostCustomerProductListBody: + $ref: '#/components/examples/PostCustomerProductListBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductList' + examples: + customerProductList: + $ref: '#/components/examples/customerProductList' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}: + get: + summary: Return a customer product list for the given customer and the items in the list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getCustomerProductList + parameters: + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductList' + examples: + getCustomerProductListByListId: + $ref: '#/components/examples/getCustomerProductListByListId' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists + - sfcc.shopper-myaccount.productlists.rw + delete: + description: Delete a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: deleteCustomerProductList + parameters: + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '204': + description: No content + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + patch: + summary: Change a product list. Changeable properties include name, description, and if the list is public. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: updateCustomerProductList + parameters: + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductList' + examples: + UpdateCustomerProductListByListIdBody: + $ref: '#/components/examples/UpdateCustomerProductListByListIdBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductList' + examples: + getCustomerProductListByListId: + $ref: '#/components/examples/updateCustomerProductListByListId' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items: + post: + summary: Add an item to the customer's product list. + description: "This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.\n\nConsidered values from the request body are:\n\n- `type` → The item type to be added to the customer's product. This value is required and must be a valid type.\nlist.\n- `priority` → The priority of the item to be added to the customer's product list.\n- `public` → The flag that determines whether the item to be added to the customer's product list is public.\n- `product_id` → The ID (SKU) of the product related to the item to be added to the customer's product list. Required when item type is `product`, and must be a valid product ID and only used for product item type. Otherwise, a `ProductListProductIdMissingException` or `ProductListProductNotFoundException` is thrown. \n- `quantity` → Only used for product item type. This is the quantity of the item to be added to the customer's product list.\n\nYou can also use a custom property of the form `c_`. The custom property must correspond to a custom attribute (``) that is defined for `ProductListItem`. The value of this property must be valid for the type of custom attribute defined for `ProductListItem`." + operationId: createCustomerProductListItem + parameters: + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListItem' + examples: + UpdateCustomerProductListItemBody: + $ref: '#/components/examples/UpdateCustomerProductListItemBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListItem' + examples: + updateCustomerProductListItemSuccess: + $ref: '#/components/examples/updateCustomerProductListItemSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}: + get: + summary: Return an item of a customer product list and the actual product details such as image, availability, and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getCustomerProductListItem + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListItem' + examples: + getCustomerProductListItemSuccess: + $ref: '#/components/examples/getCustomerProductListItemSuccess' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists + - sfcc.shopper-myaccount.productlists.rw + delete: + summary: Remove an item from a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: deleteCustomerProductListItem + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '204': + description: No content + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + patch: + summary: Update an item in a customer's product list. + description: |- + This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + Considered values from the request body are: + + priority: The priority of the customer's product list item. + public: The flag that indicates if the customer's product list item is public. + quantity: The quantity of + the customer's product list item. Onlyl used for product item type. + custom properties in the form c_: The custom property + must correspond to a custom attribute () defined for ProductListItem. + The value of this property must be valid for the type of custom attribute defined for ProductListItem. + operationId: updateCustomerProductListItem + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListItem' + examples: + CustomerProductListItemBody: + $ref: '#/components/examples/CustomerProductListItemBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProductListItem' + examples: + updateCustomerProductListItemSuccess: + $ref: '#/components/examples/updateCustomerProductListItemSuccess' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.productlists.rw + /organizations/{organizationId}/product-lists: + get: + summary: 'Retrieve all public product lists as defined by the given search term, for example: email OR first name and last name). This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.' + operationId: getPublicProductListsBySearchTerm + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/email' + - $ref: '#/components/parameters/firstName' + - $ref: '#/components/parameters/lastName' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PublicProductListResult' + examples: + productListsResultExample: + $ref: '#/components/examples/productListsResultExample' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '401': + description: | + Indicates that the customerId URL parameter does not match the verified customer represented by the JWT token, which is not relevant when using OAuth, or indicates that the provided new address name is already in use for the customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPublicProductListsBySearchTerm401: + $ref: '#/components/examples/getPublicProductListsBySearchTerm401' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-productlists + /organizations/{organizationId}/product-lists/{listId}: + get: + summary: Retrieve a public product list by ID and the items under that product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getPublicProductList + parameters: + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PublicProductList' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '401': + description: | + Indicates that the customerId URL parameter does not match the verified customer represented by the JWT token, which is not relevant when using OAuth, or indicates that the provided new address name is already in use for the customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPublicProductListsBySearchTerm401: + $ref: '#/components/examples/getPublicProductListsBySearchTerm401' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-productlists + /organizations/{organizationId}/product-lists/{listId}/items/{itemId}: + get: + summary: Retrieve an item from a public product list and the actual product details such as product, image, availability, and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. + operationId: getProductListItem + parameters: + - $ref: '#/components/parameters/itemId' + - $ref: '#/components/parameters/listId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PublicProductListItem' + examples: + getCustomerProductListItemSuccess: + $ref: '#/components/examples/publicProductListItemsExample' + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '401': + description: | + Indicates that the customerId URL parameter does not match the verified customer represented by the JWT token, which is not relevant when using OAuth, or indicates that the provided new address name is already in use for the customer. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPublicProductListsBySearchTerm401: + $ref: '#/components/examples/getPublicProductListsBySearchTerm401' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-productlists +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-customers.register: Shopper Customers Register scope READONLY + sfcc.shopper-customers.login: Shopper Customers Login scope READONLY + sfcc.shopper-myaccount: Shopper MyAccount scope READONLY + sfcc.shopper-myaccount.rw: Shopper MyAccount scope + sfcc.shopper-myaccount.addresses: Shopper MyAccount Addresses scope READONLY + sfcc.shopper-myaccount.addresses.rw: Shopper MyAccount Addresses scope + sfcc.shopper-myaccount.baskets: Shopper MyAccount Baskets scope READONLY + sfcc.shopper-myaccount.orders: Shopper MyAccount Orders scope READONLY + sfcc.shopper-myaccount.paymentinstruments: Shopper MyAccount PaymentInstruments scope READONLY + sfcc.shopper-myaccount.paymentinstruments.rw: Shopper MyAccount PaymentInstruments scope + sfcc.shopper-myaccount.productlists: Shopper MyAccount ProductLists scope READONLY + sfcc.shopper-myaccount.productlists.rw: Shopper MyAccount ProductLists scope + sfcc.shopper-productlists: Shopper ProductLists scope READONLY + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-customers.register: Shopper Customers Register scope READONLY + sfcc.shopper-customers.login: Shopper Customers Login scope READONLY + sfcc.shopper-myaccount: Shopper MyAccount scope READONLY + sfcc.shopper-myaccount.rw: Shopper MyAccount scope + sfcc.shopper-myaccount.addresses: Shopper MyAccount Addresses scope READONLY + sfcc.shopper-myaccount.addresses.rw: Shopper MyAccount Addresses scope + sfcc.shopper-myaccount.baskets: Shopper MyAccount Baskets scope READONLY + sfcc.shopper-myaccount.orders: Shopper MyAccount Orders scope READONLY + sfcc.shopper-myaccount.paymentinstruments: Shopper MyAccount PaymentInstruments scope READONLY + sfcc.shopper-myaccount.paymentinstruments.rw: Shopper MyAccount PaymentInstruments scope + sfcc.shopper-myaccount.productlists: Shopper MyAccount ProductLists scope READONLY + sfcc.shopper-myaccount.productlists.rw: Shopper MyAccount ProductLists scope + sfcc.shopper-productlists: Shopper ProductLists scope READONLY + AmOAuth2: + type: oauth2 + description: AccountManager OAuth 2.0 bearer token Authentication. + flows: + clientCredentials: + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-customers.login: Shopper Customers Login scope READONLY + authorizationCode: + authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-customers.login: Shopper Customers Login scope READONLY + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + CustomerAddress: + description: Address that is associated with a shopper (billing, shipping, mailing, and so on). + properties: + address1: + description: The first address. + example: 10 Presidential Way + maxLength: 256 + type: string + address2: + description: The second address. + example: Apt-616 + maxLength: 256 + type: string + addressId: + description: The ID of the address as specified by account owner. + example: Home + maxLength: 256 + type: string + city: + description: The city. + example: New York + maxLength: 256 + type: string + companyName: + description: The company name. + example: Acme Inc + maxLength: 256 + type: string + countryCode: + description: The two-letter ISO 3166-1 (Alpha-2) country code. + example: US + maxLength: 2 + pattern: ^([A-Z][A-Z])$ + type: string + creationDate: + description: Returns the value of attribute 'creationDate'. + example: '9999-12-31T17:12:56.670Z' + format: date-time + type: string + firstName: + description: The first name. + example: John + maxLength: 256 + type: string + fullName: + description: The full name. + example: John Smith + maxLength: 256 + type: string + jobTitle: + description: The job title. + example: Supervisor + maxLength: 256 + type: string + lastModified: + description: Returns the value of attribute 'lastModified'. + example: '9999-12-31T17:12:56.670Z' + format: date-time + type: string + lastName: + description: The last name. + example: Smith + maxLength: 256 + type: string + phone: + description: The phone number. + example: 555-555-5555 + maxLength: 32 + type: string + postBox: + description: The post box. + example: '12345' + maxLength: 256 + type: string + postalCode: + description: The postal code. + example: N5 + maxLength: 256 + type: string + preferred: + description: The preferred attribute. + example: true + type: boolean + salutation: + description: The salutation. + example: Sir + maxLength: 256 + type: string + secondName: + description: The second name. + example: Smith + maxLength: 256 + type: string + stateCode: + description: The state code. + example: UT + maxLength: 256 + type: string + suffix: + description: The suffix. + example: Sr. + maxLength: 256 + type: string + suite: + description: The suite. + example: '100' + maxLength: 32 + type: string + title: + description: The title. + example: Supervisor + maxLength: 256 + type: string + required: + - addressId + - countryCode + - lastName + type: object + PaymentCard: + additionalProperties: false + description: Document representing a payment card. + type: object + properties: + cardType: + maxLength: 256 + description: The payment card type. + example: Visa + type: string + creditCardExpired: + description: A flag indicating if the credit card is expired. It is read only. + example: true + type: boolean + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + maxLength: 4000 + description: The masked payment card number. + example: '*********4422' + type: string + numberLastDigits: + maxLength: 4000 + description: The last digits of the payment card number. It is read only. + example: '4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2015 + type: integer + CustomerPaymentInstrument: + type: object + properties: + bankRoutingNumber: + maxLength: 256 + type: string + description: The bank routing number. + example: KDSJHKS + creationDate: + type: string + description: Returns the value of attribute 'creationDate'. + format: date-time + example: 253402214400 + lastModified: + type: string + description: Returns the value of attribute 'lastModified'. + format: date-time + example: 253402214400 + maskedGiftCertificateCode: + type: string + description: The masked gift certificate code. + example: gift-code + paymentCard: + allOf: + - $ref: '#/components/schemas/PaymentCard' + description: The payment card. + paymentInstrumentId: + type: string + description: The payment instrument ID. + example: Personal + paymentMethodId: + maxLength: 256 + type: string + description: The payment method ID. Optional if a customer payment instrument ID is specified. + example: Personal + description: Method for customers to pay for the goods purchased on an ecommerce site. Payment methods include - credit card, debit card, bank account, and gift card. + Customer: + description: Person or entity who shops on Commerce Cloud storefronts by creating a shopper account in Commerce Cloud. + properties: + addresses: + description: The customer's addresses. + items: + $ref: '#/components/schemas/CustomerAddress' + type: array + authType: + description: The customer's authorization type (indicates whether the customer is a guest or a registered customer). + enum: + - guest + - registered + example: registered + type: string + birthday: + description: The customer's birthday. + format: date + type: string + companyName: + description: The customer's company name. + example: Acme + maxLength: 256 + type: string + creationDate: + description: Returns the value of attribute 'creationDate'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + currentPassword: + description: The shopper's current password. This is only used when attempting to update a shopper's `loginId` in a PATCH call. This value is never returned in any response for security reasons, but is validated and must match shopper's existing password in order to update `loginId`. Otherwise, an HTTP 400 statusCode is returned and the `loginId` is not updated. This field and functionality is available with B2C Commerce version 24.7. + type: string + customerId: + description: The customer's number (ID). Both registered and guest customers have an customer ID. + example: dfuisydifu2342usyf + maxLength: 28 + type: string + customerNo: + description: The customer's number (ID). Only a registered customer has a customer number. + example: D0000123 + maxLength: 100 + type: string + email: + description: The customer's email address. + example: johnsmith@email.com + maxLength: 256 + type: string + enabled: + description: A flag indicating whether this customer is enabled and can log in. + example: true + type: boolean + fax: + description: The customer's fax number. The length is restricted to 32 characters. + example: 555-555-5555 + maxLength: 32 + type: string + firstName: + description: The customer's first name. + example: John + maxLength: 256 + type: string + gender: + description: The customer's gender. + example: 1 + format: int32 + type: integer + hashedLogin: + description: Represents the read-only hashed value for the `loginId` used for Einstein events. This field is available with B2C Commerce version 24.9. + example: 123927deac310a3dae382897d9e458bd92ef1d4ea5cdd327a0fcffd8426dfbb5 + type: string + jobTitle: + description: The customer's job title. + example: Supervisor + maxLength: 256 + type: string + lastLoginTime: + description: The time when the customer last logged in. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + lastModified: + description: Returns the value of attribute 'lastModified'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + lastName: + description: The customer's last name. + example: Smith + maxLength: 256 + type: string + lastVisitTime: + description: The time when the customer last visited. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + login: + description: The customer's login. In a PATCH call, this field can only be updated by providing a valid `currentPassword` for the shopper. The `loginId` update feature is available with B2C Commerce version 24.7. + example: jsmith + maxLength: 256 + type: string + note: + description: The customer's note. + example: customer-note + type: string + paymentInstruments: + description: The customer's payment instruments. + items: + $ref: '#/components/schemas/CustomerPaymentInstrument' + type: array + phoneBusiness: + description: The customer's business phone number. + example: 555-555-5555 + maxLength: 32 + type: string + phoneHome: + description: The customer's home phone number. + example: 555-555-5555 + maxLength: 32 + type: string + phoneMobile: + description: The customer's mobile phone number. + example: 555-555-5555 + maxLength: 32 + type: string + preferredLocale: + description: The customer's preferred locale. + example: us-en + type: string + previousLoginTime: + description: The time when the customer previously logged in. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + previousVisitTime: + description: The time when the customer last visited the store. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + salutation: + description: The salutation to use for the customer. + example: Mr. + maxLength: 256 + type: string + secondName: + description: The customer's second name. + example: Smith + maxLength: 256 + type: string + suffix: + description: The customer's suffix (for example, "Jr." or "Sr."). + example: Jr. + maxLength: 256 + type: string + title: + description: The customer's title (for example, "Mrs" or "Mr"). + example: Mr. + maxLength: 256 + type: string + type: object + CustomerRegistration: + description: Document representing the registration information for a customer. + properties: + customer: + allOf: + - $ref: '#/components/schemas/Customer' + description: The customer registration information. The mandatory properties for registration are login, last name and email. + example: + email: jsmith@test.com + last_name: Smith + login: jsmith + password: + description: The login password + example: Abcd!1234 + type: string + required: + - customer + - password + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + ResetPasswordRequest: + required: + - login + - newPassword + - resetToken + type: object + properties: + resetToken: + maxLength: 4096 + type: string + description: Temporary token used to reset password. + example: R1e2s3e4t5T6o7k8e9n0 + login: + maxLength: 256 + type: string + description: The customer's login. + example: loginId + newPassword: + maxLength: 4096 + type: string + description: New password to reset to. + example: p@ssword2 + description: Document representing a reset password request. + ResetPasswordTokenRequest: + required: + - login + type: object + properties: + login: + maxLength: 256 + type: string + description: The customer's login. + example: loginId + description: Document representing a reset password token request. + ResetPasswordToken: + required: + - email + - expiresInMinutes + - login + - resetToken + type: object + properties: + login: + maxLength: 256 + type: string + description: The customer's login. + example: loginId + email: + maxLength: 256 + type: string + description: The customer's email address. + example: jdoe@customer.com + resetToken: + maxLength: 4096 + type: string + description: Temporary token generated that will be used to reset password. + example: R1e2s3e4t5T6o7k8e9n0 + expiresInMinutes: + type: integer + description: Reset token expiry (in minutes). + format: int32 + example: 30 + description: Document representing reset password token response. + CustomerExtProfileRequest: + description: Document representing the External Profile Request. + properties: + authenticationProviderId: + description: The authentication Provider Id + example: Google + minLength: 1 + type: string + email: + description: The Email of the customer. + example: s@gmail.com + minLength: 1 + type: string + externalId: + description: The ID of the customer. + example: jsmith@gmail.com + minLength: 1 + type: string + firstName: + description: The First Name of the customer. + example: John + minLength: 1 + type: string + lastName: + description: The Last Name of the customer. + example: Smith + minLength: 1 + type: string + required: + - authenticationProviderId + - externalId + type: object + CustomerExternalProfile: + type: object + required: + - customerId + allOf: + - $ref: '#/components/schemas/CustomerExtProfileRequest' + properties: + customerId: + description: The Id of the Customer + example: '1234' + minLength: 1 + type: string + description: The Document representing the External Profile of a Customer. + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + OrderAddress: + description: Document representing an order address. + properties: + address1: + description: The first address line. + example: 45 Main Rd. + type: string + address2: + description: The second address line. + example: Apartment 204 + type: string + city: + description: The city. + example: Boston + type: string + companyName: + description: The company name. + example: Salesforce + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + firstName: + description: The first name. + example: Max + type: string + fullName: + description: The full name. + example: Max Mustermann + type: string + id: + description: The ID of the address. + example: me + type: string + jobTitle: + description: The job title. + example: Software Engineer + type: string + lastName: + description: The last name. + example: Mustermann + type: string + phone: + description: The phone number. + example: '6175555555' + type: string + postBox: + description: The post office box. + example: PO BOX 109 + type: string + postalCode: + description: The postal code. + example: '05408' + type: string + salutation: + description: The salutation. + example: Mr + type: string + secondName: + description: The second name. + type: string + stateCode: + description: The state code. + example: MA + type: string + suffix: + description: The suffix. + example: Sr + type: string + suite: + description: The suite. + example: 24A + type: string + title: + description: The title. + example: Dr. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + ProductDetailsLink: + description: Document representing a link to the resource for product details. + properties: + productDescription: + description: The description of the product. + example: Nintendo DS revolutionizes handheld gameplay. + type: string + productId: + $ref: '#/components/schemas/ProductId' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + title: + description: The link title. + example: Nintendo DS Game Console + type: string + type: object + required: + - productId + additionalProperties: false + BonusDiscountLineItem: + description: Document representing a bonus discount line item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + bonusProducts: + description: The bonus products the customer can choose from. + type: array + items: + $ref: '#/components/schemas/ProductDetailsLink' + couponCode: + description: The coupon code that triggered the promotion, if applicable. + example: 5ties + type: string + id: + description: The ID of the line item. It is read only. + example: 91f4dd8bfa0653d58b7783b04f + type: string + maxBonusItems: + format: int32 + description: The maximum number of bonus items the user can select for this promotion. + type: integer + promotionId: + description: The ID of the promotion that triggered the creation of the line item. + example: Buy1Get2 + type: string + CouponItemId: + minLength: 1 + type: string + description: The coupon item ID + example: d4c9c0141e9c74c150225580f3 + CouponItem: + description: Document representing a coupon item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + code: + maxLength: 256 + description: The coupon code. + example: 5ties + type: string + couponItemId: + description: The coupon item ID. It is read only. + allOf: + - $ref: '#/components/schemas/CouponItemId' + statusCode: + description: The status of the coupon item. It is read only. + example: no_applicable_promotion + enum: + - 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 + type: string + valid: + description: |- + 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". It is read only. + example: true + type: boolean + required: + - code + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CustomerInfo: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: The customer information for guest or logged-in customers. + type: object + properties: + customerId: + maxLength: 100 + description: The customer ID. It is read only. + example: abMKqMaNYOBMnNdDNzyC5oNTi5 + type: string + customerName: + description: The customer name. + example: Max Mustermann + type: string + customerNo: + maxLength: 100 + description: The customer number. + example: '0002352' + type: string + email: + description: The customer's email address. + example: no-reply@salesforce.com + type: string + required: + - email + GiftCertificateItemId: + example: 629dea6e7b61e58da629b57b21 + type: string + minLength: 1 + GiftCertificateItem: + description: A gift certificate item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate item amount. + example: 20 + type: number + giftCertificateItemId: + description: The item ID. It is read only. + allOf: + - $ref: '#/components/schemas/GiftCertificateItemId' + message: + maxLength: 4000 + description: The gift certificate message. + example: Birthday present. + type: string + recipientEmail: + minLength: 1 + description: The recipient email. + example: no-reply@salesforce.com + type: string + recipientName: + description: The recipient's name. + example: Daniel Mustermann + type: string + senderName: + description: The sender's name. + example: Max Mustermann + type: string + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + required: + - amount + - recipientEmail + GroupedTaxItem: + description: Document representing the grouped tax item. + type: object + properties: + taxRate: + description: The tax rate. It is read only. + type: number + format: double + example: 0.1 + taxValue: + description: The summed up tax total for the tax rate. It is read only. + type: number + format: double + example: 10.03 + additionalProperties: false + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. + type: object + properties: + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b + type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + Status: + description: Document representing an object status. + properties: + code: + description: The status code. + type: string + message: + description: The status message. + type: string + status: + format: int32 + description: |- + The status. + For more information on the status values see Status.OK and Status.ERROR. + type: integer + type: object + additionalProperties: false + PaymentInstrumentId: + description: The payment instrument ID + example: ba248424e3eee797f062162f8b + type: string + OrderPaymentInstrument: + description: Document representing an order payment instrument. + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + authorizationStatus: + description: The authorization status of the payment transaction. It is read only. + allOf: + - $ref: '#/components/schemas/Status' + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + maskedGiftCertificateCode: + description: The gift certificate code with the last 4 characters not masked. + example: '******Gzzy' + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/PaymentCard' + paymentInstrumentId: + description: The payment instrument ID. It is read only. + allOf: + - $ref: '#/components/schemas/PaymentInstrumentId' + paymentMethodId: + maxLength: 256 + description: The payment method ID. It is read only. + example: CREDIT_CARD + type: string + type: object + ProductItem: + description: Document representing a product item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including + adjustments. If the taxation policy is net, it doesn't include tax. If the + taxation policy is gross, it includes tax. It is read only. + example: 130 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. + example: true + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. + example: inventory + type: string + itemId: + description: |- + The product item ID. Use it to identify this item when updating its quantity or + creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not + including order-level adjustments or shipping charges. If the taxation policy is + net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 20.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation + policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 15.5 + type: number + productId: + maxLength: 100 + description: The ID of the product. + example: nintendo-ds-console + type: string + productListItem: + description: |- + If this product line item was added from a product list, this value is a reference + to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A + related shipping item represents a surcharge applied to individual products using + a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax for the product item, not including price adjustments. It is read only. + example: 0.3 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this product item. It is read only. + example: 30 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.9 + type: number + ItemId: + description: The item id. + example: 430ef5aad3a24de59378458434 + type: string + OptionItem: + description: |- + An option item represents an optional purchase related to a product item, and is always associated with that parent product + item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + example: ba248414e3eee797f062162f8b + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. It is read only. + example: false + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: false + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. It is read only. + example: inventory + type: string + itemId: + description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + example: The item text. + type: string + optionId: + maxLength: 256 + description: The ID of the option. It is read only. + example: consoleWarranty + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + optionValueId: + maxLength: 256 + description: The ID of the option value. It is read only. + example: '000' + type: string + price: + format: double + description: |- + The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 150.99 + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not including order-level adjustments or + shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated order-level adjustments, but not + including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 40.5 + type: number + productId: + $ref: '#/components/schemas/ProductId' + productListItem: + description: If this product line item was added from a product list, this value is a reference to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The ordered quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A related shipping item represents a + surcharge applied to individual products using a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax on the line item before applying any adjustments. It is read only. + example: 0 + type: number + taxBasis: + format: double + description: The amount used to calculate the tax for this item. It is read only. + example: 50 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.19 + type: number + required: + - optionId + - optionValueId + ProductListLink: + description: Document representing a link to a product list. + properties: + description: + description: The description of this product list. + type: string + name: + description: The name of this product list. + type: string + public: + description: |- + A flag indicating whether the owner made this product list available for access + by other customers. It is read only. + example: true + type: boolean + title: + description: The link title. + type: string + type: + description: The type of the product list. + example: shopping_list + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + type: string + type: object + additionalProperties: false + ProductListItemReference: + description: Document representing product list item details. + type: object + additionalProperties: false + properties: + id: + description: The ID of the product list item. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + priority: + format: int32 + description: The priority of the product list item. + example: 1 + type: integer + productDetailsLink: + $ref: '#/components/schemas/ProductDetailsLink' + productList: + description: A reference to the associated product list. It is read only. + allOf: + - $ref: '#/components/schemas/ProductListLink' + public: + example: false + type: boolean + purchasedQuantity: + format: double + description: The total quantity of this item purchased from the product list. + example: 0 + type: number + quantity: + minimum: 0 + format: double + description: The number of products or gift certificates that get shipped when purchasing this product list item. + example: 1 + type: number + type: + description: Specifies whether the item is a product or a gift certificate. + example: product + enum: + - product + - gift_certificate + type: string + required: + - id + ShipmentId: + minLength: 1 + type: string + example: me + description: The identifier of the shipment + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id + Shipment: + description: Document representing a shipment. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not including + service charges such as shipping. If the Discount Taxation preference is set to Tax Products and + Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + gift: + description: A flag indicating whether the shipment is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + merchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, not including price adjustments or service charges such as + shipping. It is read only. + example: 4.95 + type: number + productSubTotal: + format: double + description: |- + The total price of all products in the shipment, including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If + the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + shipmentId: + description: The order-specific ID of the shipment. The default value is 'me'. + default: me + allOf: + - $ref: '#/components/schemas/ShipmentId' + shipmentNo: + description: The shipment number of this shipment. This number is automatically generated. It is read only. + type: string + shipmentTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments, shipping charges, + and tax. It is read only. + example: 39.99 + type: number + shippingAddress: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + shippingMethod: + $ref: '#/components/schemas/ShippingMethod' + shippingStatus: + description: The shipping status of the shipment. + example: shipped + enum: + - not_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges in the shipment, including shipping adjustments. If the + taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. + example: 0.3 + type: number + taxTotal: + format: double + description: |- + The total tax on the shipment, including item-level price adjustments and service charges such as + shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on + Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 1.8 + type: number + trackingNumber: + description: The tracking number of the shipment. + example: 1Z204E380338943508 + type: string + type: object + ShippingItem: + description: Document representing a shipping item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax for the shipping item, including price adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the shipping item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + itemId: + description: |- + The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a + custom price adjustment for it. It is read only. + example: 430ef5aad3a24de59378458434 + type: string + itemText: + description: The text describing the shipping item. + example: Shipping + type: string + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the shipping item including item-level adjustments, but not including order-level + adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + type: number + shipmentId: + description: The identifier of the shipment to which this item belongs. + allOf: + - $ref: '#/components/schemas/ShipmentId' + tax: + format: double + description: The tax on the product item, not including adjustments. It is read only. + example: 0.19 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this shipping item. It is read only. + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. + type: number + type: object + Basket: + description: Document representing a basket. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not + including service charges such as shipping. If the Discount Taxation preference is set to Tax + Products and Shipping Only Based on Adjusted Price, this amount also includes prorated + order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + agentBasket: + description: Is the basket created by an agent? It is read only. + example: true + type: boolean + basketId: + description: The unique identifier for the basket. It is read only. + example: e78aa5646a8efebdd9cdd38be7 + type: string + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + couponItems: + description: The coupon items. + type: array + items: + $ref: '#/components/schemas/CouponItem' + creationDate: + description: The timestamp when the basket was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information, if the customer is logged in. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + giftCertificateItems: + description: The gift certificate line items. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + groupedTaxItems: + description: |- + Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same + tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. + type: array + items: + $ref: '#/components/schemas/GroupedTaxItem' + inventoryReservationExpiry: + description: The expiration datetime of the inventory reservation. It is read only. + example: '2015-05-19T15:30:18.000Z' + type: string + format: date-time + lastModified: + description: The timestamp when the basket was last modified. It is read only. + example: '2015-05-19T15:25:18.000Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. + Merchandise total price represents the sum of the product prices before + services (such as shipping) or adjustments from promotions have + been added. It is read only. + example: 4.95 + type: number + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderTotal: + format: double + description: The total price, including products, shipping and tax. It is read only. + example: 110.24 + type: number + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + productItems: + description: The product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including order-level adjustments or shipping + charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 88 + type: number + shipments: + description: The shipments. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + sourceCode: + description: The source code assigned to the basket. It is read only. + example: OUTDOOR1 + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. + example: true + type: boolean + temporaryBasket: + description: If the created basket is a temporary basket, this is set to true. Otherwise, it is set to false. + example: true + type: boolean + type: object + BasketsResult: + description: Result document containing an array of baskets. + properties: + baskets: + description: The list of baskets for a customer. + items: + allOf: + - $ref: '#/components/schemas/Basket' + - required: + - adjustedMerchandizeTotalTax + - adjustedShippingTotalTax + - agentBasket + - basketId + - channelType + - creationDate + - currency + - customerInfo + - lastModified + - merchandizeTotalTax + - orderTotal + - productSubTotal + - productTotal + - shipments + - shippingItems + - shippingTotal + - shippingTotalTax + - taxTotal + - taxation + type: array + total: + description: The total number of baskets. + example: 10 + format: int32 + type: integer + required: + - total + type: object + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + Offset: + default: 0 + minimum: 0 + format: int64 + description: The zero-based index of the first hit/data to include in the result. + type: integer + example: 0 + PaginatedResultBase: + description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + offset: + $ref: '#/components/schemas/Offset' + required: + - limit + - offset + - total + OrderNo: + description: The order number + minLength: 1 + maxLength: 50 + type: string + example: '00000410' + Order: + description: Document representing an order. + type: object + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the order, including price adjustments, but not including service charges such as + shipping. It is read only. + example: 1.5 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the order, including shipping price adjustments. It is read only. + example: 0.3 + type: number + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + confirmationStatus: + description: The confirmation status. + example: confirmed + enum: + - not_confirmed + - confirmed + type: string + couponItems: + description: The coupon items. It is read only. + type: array + items: + $ref: '#/components/schemas/CouponItem' + createdBy: + description: |- + This value depends on how the order was created. If a shopper created the order, this value is Customer. + If a job created the order, this value is System. Otherwise, this value is the name of the user who created the order. It is read only. + example: Customer + type: string + creationDate: + description: The timestamp when the order was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + description: The ISO 4217 mnemonic code of the currency. It is read only. + allOf: + - $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information for guest or logged-in customers. It is read only. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + customerName: + description: The customer name. It is read only. + example: Max Mustermann + type: string + exportStatus: + description: The export status of the order. + example: exported + enum: + - not_exported + - exported + - ready + - failed + type: string + externalOrderStatus: + description: The external status of the order. + example: Submitted + type: string + giftCertificateItems: + description: The gift certificate line items. It is read only. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + globalPartyId: + description: The Customer 360 Global Party ID associated with the shopper. It is read only. + example: GP_1234 + type: string + lastModified: + description: The timestamp when the order was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. Merchandise total prices represent the sum of product prices + not including shipping or adjustments. It is read only. + example: 1.5 + type: number + orderNo: + description: The order number. + example: '00000410' + allOf: + - $ref: '#/components/schemas/OrderNo' + orderPriceAdjustments: + description: The order-level price adjustments. It is read only. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderToken: + description: |- + The order token used to secure the lookup of an order on base of the + plain order number. The order token contains only URL safe characters. It is read only. + type: string + orderTotal: + format: double + description: The total price, including products, shipping, and tax. It is read only. + example: 110.24 + type: number + orderViewCode: + description: |- + The order view code used to secure the order lookup of an order using Order Lookup API. + The order view code contains only URL safe characters. + Warning : Order view code must not be exposed in the URL and must only be displayed to the shopper or sent as an email. + Order view code must not be logged in the code. It is read only. + type: string + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + paymentStatus: + description: The payment status. + example: paid + enum: + - not_paid + - part_paid + - paid + type: string + productItems: + description: The product items. It is read only. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. It is read only. + type: boolean + example: true + shipments: + description: The shipments. It is read only. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. It is read only. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingStatus: + description: The shipping status. + example: shipped + enum: + - not_shipped + - part_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + siteId: + description: The order's site. It is read only. + example: ShoppingSite + allOf: + - $ref: '#/components/schemas/SiteId' + sourceCode: + description: The source code assigned to the basket from which this order was created. It is read only. + example: OUTDOOR1 + type: string + status: + description: The status. + example: created + enum: + - created + - new + - completed + - cancelled + - replaced + - failed + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + groupedTaxItems: + description: |- + Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same + tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. + type: array + items: + $ref: '#/components/schemas/GroupedTaxItem' + guest: + description: The registration status of the customer. It is read only. + type: boolean + example: true + CustomerOrderResult: + type: object + allOf: + - $ref: '#/components/schemas/PaginatedResultBase' + properties: + data: + items: + $ref: '#/components/schemas/Order' + type: array + description: The array of customer order documents. + description: Result document containing an array of customer orders. + PasswordChangeRequest: + required: + - currentPassword + - password + type: object + properties: + currentPassword: + maxLength: 4096 + type: string + description: The customer's current password. + example: p@ssword1 + password: + maxLength: 4096 + type: string + description: The customer's new password. + example: p@ssword2 + description: Document representing a password change request. + PaymentBankAccountRequest: + required: + - driversLicense + - driversLicenseStateCode + - holder + - number + type: object + properties: + driversLicense: + maxLength: 256 + type: string + description: The driver’s license. + example: 84736485 + driversLicenseStateCode: + maxLength: 256 + type: string + description: The driver’s license state code. + example: UT + holder: + maxLength: 256 + type: string + description: The holder of the bank account. + example: John Smith + number: + maxLength: 256 + type: string + description: The payment bank account number. + example: 9796976 + description: Document representing a payment bank account request. + CustomerPaymentCardRequest: + required: + - cardType + - expirationMonth + - expirationYear + - holder + - issueNumber + - number + - validFromMonth + - validFromYear + type: object + properties: + cardType: + maxLength: 256 + type: string + description: The payment card type (for example, "Visa"). + example: Visa + creditCardToken: + type: string + description: |- + 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. + example: hk2jh293484 + expirationMonth: + type: integer + description: The month the payment card expires. + format: int32 + example: 11 + expirationYear: + type: integer + description: The year the payment card expires. + format: int32 + example: 9999 + holder: + maxLength: 256 + type: string + description: The payment card holder. + example: John Smith + issueNumber: + maxLength: 256 + type: string + description: The payment card issue number. + example: 92743927 + number: + maxLength: 4000 + type: string + description: The payment card number. + example: 4454852652415965 + validFromMonth: + maximum: 12 + minimum: 1 + type: integer + description: The month the payment card valid is from. + format: int32 + example: 11 + validFromYear: + type: integer + description: The year the payment card is valid from. + format: int32 + example: 23 + description: Document representing a customer payment card request. + CustomerPaymentInstrumentRequest: + type: object + properties: + bankRoutingNumber: + maxLength: 256 + type: string + description: The bank routing number. + example: AB123 + giftCertificateCode: + maxLength: 256 + type: string + description: The gift certificate code. + example: gift-code + paymentBankAccount: + allOf: + - $ref: '#/components/schemas/PaymentBankAccountRequest' + description: The payment bank account request data. + paymentCard: + allOf: + - $ref: '#/components/schemas/CustomerPaymentCardRequest' + description: The customer payment card. + paymentMethodId: + maxLength: 256 + type: string + description: The payment method ID. Optional if a customer payment instrument ID is specified. + example: Credit Card + description: Document representing a customer payment instrument request. + CustomerProductListRegistrant: + description: Document representing a customer product list registrant. + properties: + email: + description: The email of the registrant. + example: jsmith@mail.com + type: string + firstName: + description: The first name of the registrant. + example: John + type: string + lastName: + description: The last name of the registrant. + example: Smith + type: string + role: + description: The role of the registrant. + example: Friend + type: string + required: + - email + - firstName + - lastName + - role + type: object + CustomerAddressInfo: + description: Result document of product list addresses. + properties: + addressId: + description: The ID of the address. + example: Home + maxLength: 256 + type: string + title: + description: The link title. + example: title + type: string + required: + - addressId + - title + type: object + Product: + description: Any product that is sold, shown alone, and does not have variations such as different sizes or colors. A product has no reliance on any other product for inheritance. *A product has a SKU and can have a product option, which has a different SKU*. + properties: + brand: + description: The product's brand. + example: Apple + type: string + bundledProducts: + description: The array of all bundled products of this product. + type: array + items: + $ref: '#/components/schemas/BundledProduct' + currency: + $ref: '#/components/schemas/CurrencyCode' + ean: + description: The European Article Number of the product. + example: 8essdf9w3 + type: string + fetchDate: + format: int32 + example: 5 + type: integer + id: + $ref: '#/components/schemas/ProductId' + imageGroups: + description: The array of product image groups. + type: array + items: + $ref: '#/components/schemas/ImageGroup' + inventories: + description: |- + The array of product inventories explicitly requested via the 'inventory_ids' query parameter. This property + is only returned in context of the 'availability' expansion. + type: array + items: + $ref: '#/components/schemas/Inventory' + inventory: + description: |- + The site default inventory information. This property is only + returned in context of the 'availability' expansion. + allOf: + - $ref: '#/components/schemas/Inventory' + longDescription: + description: The localized product's long description. + example: Awesome long description of product + type: string + manufacturerName: + description: The product's manufacturer name. + example: Apple + type: string + manufacturerSku: + description: The product's manufacturer SKU. + example: 2ND8834 + type: string + master: + description: 'The master product information, only for types: master, variation group, and variant.' + allOf: + - $ref: '#/components/schemas/Master' + minOrderQuantity: + format: double + description: The minimum order quantity for this product. + example: 2 + type: number + name: + description: The localized product name. + example: Apple IPod Classic + type: string + options: + description: The array of product options, only for type option. This array can be empty. + type: array + items: + $ref: '#/components/schemas/Option' + pageDescription: + description: The localized product's page description. + example: Really good Product + type: string + pageKeywords: + description: The localized product's page description. + example: Ipod, Music Player + type: string + pageTitle: + description: The localized product's page title. + example: Apple IPod Classic + type: string + pageMetaTags: + description: Page Meta tags associated with the given product. + type: array + items: + $ref: '#/components/schemas/PageMetaTag' + price: + format: double + description: |- + The sales price of the product. In case of complex products, like master or set, this is the minimum price of + related child products. + example: 59.99 + type: number + pricePerUnit: + format: double + description: The price per unit if defined for the product + example: 19.99 + type: number + pricePerUnitMax: + format: double + description: The max price per unit typically for a master product's variant. + example: 29.99 + type: number + priceMax: + format: double + description: The maximum sales of related child products in complex products like master or set. + example: 69.99 + type: number + priceRanges: + description: Array of one or more price range objects representing one or more Pricebooks in context for the site. + type: array + items: + $ref: '#/components/schemas/PriceRange' + prices: + description: The prices map with pricebook IDs and their values. + type: object + additionalProperties: + format: double + type: number + primaryCategoryId: + description: The ID of the products primary category. + example: electronics + type: string + productLinks: + description: The array of source and target product links information. + type: array + items: + $ref: '#/components/schemas/ProductLink' + productPromotions: + description: |- + An array of active customer product promotions for this product, sorted by promotion priority + using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → + best discount → ID). This array can be empty. Coupon promotions are not returned in this array. + See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details. + type: array + items: + $ref: '#/components/schemas/ProductPromotion' + recommendations: + description: Returns a list of recommendations. + type: array + items: + $ref: '#/components/schemas/Recommendation' + setProducts: + description: The array of set products of this product. + type: array + items: + $ref: '#/components/schemas/Product' + shortDescription: + description: The localized product short description. + example: Awesome Product + type: string + slugUrl: + description: The complete link to this product's storefront page. + example: https://www.example.com/on/store/Sites-MySite/default/Product-Show?pid=MyProduct + type: string + stepQuantity: + format: double + description: |- + The steps in which the order amount of the product can be + increased. + example: 2 + type: number + tieredPrices: + description: The document represents list of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + type: + description: 'The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.' + allOf: + - $ref: '#/components/schemas/ProductType' + unit: + description: The sales unit of the product. + example: lbs + type: string + upc: + description: The Universal Product Code (UPC). + example: JSDU876 + type: string + validFrom: + description: The time a product is valid from. + example: '9999-12-31T00:00:00.0Z' + type: string + format: date-time + validTo: + description: The time a product is valid to. + example: '9999-12-31T23:59:59.0Z' + type: string + format: date-time + variants: + description: The array of actual variants. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/Variant' + variationAttributes: + description: |- + Sorted array of variation attributes information. Only for master, + variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + variationGroups: + description: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationGroup' + variationValues: + description: |- + The actual variation attribute ID - value pairs. Only for variant and + variation group types. + type: object + additionalProperties: + type: string + required: + - id + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + BundledProduct: + description: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.* + properties: + id: + example: '823476' + type: string + product: + description: The product being bundled. + allOf: + - $ref: '#/components/schemas/Product' + quantity: + format: double + description: For the product being bundled, the quantity added to the bundle. + example: 5 + type: number + required: + - id + - product + - quantity + type: object + Image: + description: Product image + properties: + alt: + description: The localized alternative text of the image. + example: Apple iPod Shuffle, large + type: string + disBaseLink: + description: Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled. + example: https://example.com/images/large/ipod-shuffle-silver.jpg + type: string + link: + minLength: 1 + description: The URL of the actual image. + example: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2/images/large/ipod-shuffle.jpg + type: string + title: + description: The localized title of the image. + example: Apple iPod Shuffle + type: string + required: + - link + type: object + VariationAttributeValue: + description: Document representing a variation attribute value. + properties: + description: + description: The localized description of the variation value. + example: Color of the product + type: string + image: + description: The first product image for the configured viewtype and this variation value. + allOf: + - $ref: '#/components/schemas/Image' + imageSwatch: + description: The first product image for the configured viewtype and this variation value (typically the swatch image). + allOf: + - $ref: '#/components/schemas/Image' + name: + description: The localized display name of the variation value. + example: Red + type: string + orderable: + description: A flag indicating whether at least one variant with this variation attribute value is available to sell. + example: true + type: boolean + value: + minLength: 1 + description: The actual variation value. + example: red + type: string + required: + - value + type: object + VariationAttribute: + description: Document representing a variation attribute. + properties: + id: + minLength: 1 + description: The ID of the variation attribute. + example: color + type: string + name: + description: The localized display name of the variation attribute. + example: Color + type: string + values: + description: The sorted array of variation values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttributeValue' + required: + - id + type: object + ImageGroup: + description: Document representing an image group containing a list of images for a particular view type and an optional variation value. + properties: + images: + description: The images of the image group. + type: array + items: + $ref: '#/components/schemas/Image' + variationAttributes: + description: Returns a list of variation attributes applying to this image group. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + viewType: + description: The image view type. + example: hi-res + type: string + required: + - images + - viewType + type: object + InventoryId: + description: The inventory ID. + type: string + minLength: 1 + maxLength: 256 + example: Site1InventoryList + Inventory: + description: Document representing inventory information of the current product for a particular inventory list. + properties: + ats: + format: double + description: |- + The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the + OCAPI setting 'product.inventory.ats.max_threshold'. + example: 15 + type: number + backorderable: + description: A flag indicating whether the product is backorderable. + example: true + type: boolean + id: + $ref: '#/components/schemas/InventoryId' + inStockDate: + description: A flag indicating the date when the product will be in stock. + example: '9999-12-31T00:00:00.0Z' + type: string + format: date-time + orderable: + description: A flag indicating whether at least one of the products is available to sell. + example: true + type: boolean + preorderable: + description: A flag indicating whether the product is preorderable. + example: false + type: boolean + stockLevel: + format: double + description: |- + The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the + OCAPI setting 'product.inventory.stock_level.max_threshold'. + example: 10 + type: number + required: + - id + type: object + Price: + type: number + description: Document representing a price for a product + format: double + example: 12.99 + Master: + description: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn't have a SKU.* + properties: + masterId: + description: The ID (SKU) of the master product. + allOf: + - $ref: '#/components/schemas/ProductId' + orderable: + description: A flag indicating whether at least one of the variants can be ordered. + example: true + type: boolean + price: + description: The minimum sales price of the related variants. + allOf: + - $ref: '#/components/schemas/Price' + priceMax: + description: The maximum sales price of the related variants. + allOf: + - $ref: '#/components/schemas/Price' + prices: + description: List of sale prices. + type: object + additionalProperties: + format: double + type: number + required: + - masterId + type: object + OptionValue: + description: Document representing an option value. + properties: + default: + description: A flag indicating whether this option value is the default one. + example: true + type: boolean + id: + description: The ID of the option value. + example: 5YR + allOf: + - $ref: '#/components/schemas/ProductId' + name: + description: The localized name of the option value. + example: 5 Year Warranty + type: string + price: + description: The effective price of the option value. + allOf: + - $ref: '#/components/schemas/Price' + required: + - id + type: object + Option: + description: Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can't be purchased separately. *Product Option has a SKU and a price associated with it.* + properties: + description: + description: The localized description of the option. + example: Get this Option + type: string + id: + description: The ID of the option. + example: Warranty + allOf: + - $ref: '#/components/schemas/ProductId' + image: + description: The URL to the option image. + example: https://www.exampleimage.com/images/optionImage.jpg + type: string + name: + description: The localized name of the option. + example: Warranty + type: string + values: + description: The array of option values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/OptionValue' + required: + - id + type: object + PageMetaTag: + description: Document representing a Page Meta Tag object. + properties: + id: + description: The ID of the Page Meta Tag. + type: string + example: title + value: + description: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID. + type: string + example: Buy the Long Sleeve Covered Placket Blouse for USD 61.99. + PriceRange: + description: Document representing price ranges for a product which happens to be a master product (per Pricebook) + properties: + maxPrice: + description: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook) + allOf: + - $ref: '#/components/schemas/Price' + minPrice: + description: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook) + allOf: + - $ref: '#/components/schemas/Price' + pricebook: + description: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM. + example: usd-list-pricebook + type: string + type: object + ProductLink: + description: |- + Document representing a link between two products. It contains the ID of the source and target products, the type of + product link, and the URLs to retrieve product data. + properties: + sourceProductId: + description: The semantic ID of the product this product link is coming from. + example: '824756924' + allOf: + - $ref: '#/components/schemas/ProductId' + sourceProductLink: + description: The URL addressing the product this product link is coming from. + example: Link + type: string + targetProductId: + description: The semantic ID of the product this product link is pointing to. + example: 2TR93459 + allOf: + - $ref: '#/components/schemas/ProductId' + targetProductLink: + description: The URL addressing the product this product link is pointing to. + example: Link + type: string + type: + description: The type of product link. + example: up_sell + enum: + - cross_sell + - replacement + - up_sell + - accessory + - newer_version + - alt_orderunit + - spare_part + - other + type: string + required: + - sourceProductId + - sourceProductLink + - targetProductId + - targetProductLink + - type + type: object + ProductPromotion: + description: Document representing a product promotion. + properties: + calloutMsg: + description: The localized call-out message of the promotion. + example: Fantastic promotion + type: string + promotionId: + description: The unique ID of the promotion. + example: summerSale + type: string + promotionalPrice: + description: The promotional price for this product. + allOf: + - $ref: '#/components/schemas/Price' + required: + - calloutMsg + - promotionId + - promotionalPrice + type: object + RecommendationType: + description: Document representing a recommendation type. + properties: + displayValue: + description: The localized display value of the recommendation type. + example: UpSell + type: string + value: + format: int32 + description: The value of the recommendation type. + example: 2 + type: integer + required: + - displayValue + - value + type: object + Recommendation: + description: Document representing a product recommendation. + properties: + calloutMsg: + description: The localized callout message of the recommendation. + example: Absolutely recommended + type: string + image: + $ref: '#/components/schemas/Image' + longDescription: + description: The localized long description of the recommendation. + example: Really good detailed product description + type: string + name: + description: The localized name of the recommendation. + example: Apple Ipod Shuffle + type: string + recommendationType: + $ref: '#/components/schemas/RecommendationType' + recommendedItemId: + description: The recommended item ID of the recommendation. + example: apple-ipod-shuffle + type: string + shortDescription: + description: The localized short description of the recommendation. + example: Product description + type: string + required: + - recommendationType + type: object + ProductPriceTable: + description: Tiered Price Level Object + properties: + price: + description: Price for the product for the specified tier for the specified pricebook + allOf: + - $ref: '#/components/schemas/Price' + pricebook: + description: The active pricebook for which this price is defined + example: usd-list-pricebook + type: string + quantity: + format: double + description: Quantity tier for which the price is defined. + example: 1 + type: number + type: object + ProductType: + description: Document representing a product type. + properties: + bundle: + description: A flag indicating whether the product is a bundle. + example: true + type: boolean + item: + description: A flag indicating whether the product is a standard item. + example: false + type: boolean + master: + description: A flag indicating whether the product is a master. + example: true + type: boolean + option: + description: A flag indicating whether the product is an option. + example: false + type: boolean + set: + description: A flag indicating whether the product is a set. + example: true + type: boolean + variant: + description: A flag indicating whether the product is a variant. + example: false + type: boolean + variationGroup: + description: A flag indicating whether the product is a variation group. + example: false + type: boolean + type: object + Variant: + description: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.* + properties: + orderable: + description: A flag indicating whether the variant is orderable. + example: true + type: boolean + price: + description: The sales price of the variant. + allOf: + - $ref: '#/components/schemas/Price' + productId: + description: The ID (SKU) of the variant. + example: 8W4756834 + allOf: + - $ref: '#/components/schemas/ProductId' + tieredPrices: + description: List of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + additionalProperties: + type: string + required: + - productId + type: object + VariationGroup: + description: Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn't have a SKU.* + properties: + orderable: + description: A flag indicating whether the variation group is orderable. + example: false + type: boolean + price: + description: The sales price of the variation group. + allOf: + - $ref: '#/components/schemas/Price' + productId: + description: The ID (SKU) of the variation group. + example: 49345VG + allOf: + - $ref: '#/components/schemas/ProductId' + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + additionalProperties: + type: string + required: + - orderable + - price + - productId + - variationValues + type: object + CustomerProductListItem: + description: Document representing a customer product list item. + properties: + id: + description: The ID of this product list item. + example: Main Product + type: string + priority: + description: The priority of the item. + example: 1 + format: int32 + type: integer + product: + allOf: + - $ref: '#/components/schemas/Product' + description: The product item. + productId: + description: The ID of the product. + example: Toaster + allOf: + - $ref: '#/components/schemas/ProductId' + public: + description: Is this product list item available for access by other customers? + example: true + type: boolean + purchasedQuantity: + description: The quantity of products already purchased. + example: 1 + format: double + type: number + quantity: + description: The quantity of this product list item. + example: 2 + format: double + minimum: 0 + type: number + type: + description: The type of the item. + enum: + - product + - gift_certificate + example: product + type: string + required: + - priority + - public + - quantity + type: object + ProductListEvent: + required: + - type + type: object + properties: + city: + type: string + description: The city where the event takes place. + example: New York + country: + type: string + description: The country where the event takes place. + example: USA + date: + type: string + description: The date when the event takes place. + format: date-time + example: 253402214400 + state: + type: string + description: The federal state where the event takes place. + example: UT + type: + type: string + description: Type of the event to celebrate. + example: wedding + description: Document representing a product list event. + ProductListShippingAddress: + required: + - addressId + type: object + properties: + addressId: + minLength: 1 + type: string + description: The ID of this address. + example: Home + city: + type: string + description: The city of this address. + example: New York + firstName: + type: string + description: The first name of this address. + example: John + lastName: + type: string + description: The last name of this address. + example: Smith + description: Document representing a product list shipping address. + CustomerProductList: + type: object + description: Document representing a customer product list. + properties: + coRegistrant: + allOf: + - $ref: '#/components/schemas/CustomerProductListRegistrant' + description: The coregistrant of this product list. + creationDate: + description: Returns the value of attribute 'creationDate'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + currentShippingAddressInfo: + allOf: + - $ref: '#/components/schemas/CustomerAddressInfo' + description: The resource link to the current shipping address of this customer product list. + customerProductListItems: + description: The list of customer product list items. + items: + $ref: '#/components/schemas/CustomerProductListItem' + type: array + description: + description: The description of this product list. + example: My Product List + type: string + event: + allOf: + - $ref: '#/components/schemas/ProductListEvent' + description: The event of this product list. + id: + description: The ID of this product list. + example: MyList + minLength: 1 + type: string + lastModified: + description: Returns the value of attribute 'lastModified'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + name: + description: The name of this product list. + example: Danny's Product List + type: string + postEventShippingAddressInfo: + allOf: + - $ref: '#/components/schemas/CustomerAddressInfo' + description: The resource link to the post event shipping address of this customer product list. + productListShippingAddress: + allOf: + - $ref: '#/components/schemas/ProductListShippingAddress' + description: The abbreviated shipping address of this product list representing what an anonymous user can see. + public: + description: Indicates whether the owner made this product list available for access by other customers. + example: true + type: boolean + registrant: + allOf: + - $ref: '#/components/schemas/CustomerProductListRegistrant' + description: The registrant of this product list. + shippingAddressInfo: + allOf: + - $ref: '#/components/schemas/CustomerAddressInfo' + description: The resource link to the shipping address of this customer product list. + type: + description: The type of the product list. + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + example: wish_list + type: string + CustomerProductListResult: + description: Document representing a customer product lists result. + required: + - data + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + description: The customer product lists. + items: + $ref: '#/components/schemas/CustomerProductList' + type: array + PublicProductListInfo: + description: Document representing a link to a public product list. + properties: + description: + description: The description of this product list. + example: Super Awesome ProductList + type: string + id: + description: The ID of the product-list document. + example: '3958739435' + type: string + name: + description: The name of this product list. + example: My Product List + type: string + title: + description: The link title. + example: Product List Title + type: string + type: + description: The type of the product list. + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + example: custom_1 + type: string + required: + - id + - title + - type + type: object + PublicProductListResult: + required: + - data + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + description: The array of product list link documents. + items: + $ref: '#/components/schemas/PublicProductListInfo' + type: array + description: Result document containing an array of public product list links. + ProductListRegistrant: + required: + - firstName + - lastName + - role + type: object + properties: + firstName: + type: string + description: The first name of the registrant. + example: John + lastName: + type: string + description: The last name of the registrant. + example: Smith + role: + type: string + description: The role of the registrant. + example: CEO + description: |- + A `ProductListRegistrant` is typically associated with an event-related product list, such as a gift registry. It holds + information about a person associated with the event, such as a bride or groom. + PublicProductListItem: + description: Document representing a product list item. + properties: + id: + description: The ID of this product list item. + example: '8745345' + type: string + priority: + description: The priority of the item. + example: 2 + format: int32 + type: integer + product: + allOf: + - $ref: '#/components/schemas/Product' + description: The product item. + type: + description: The type of the item. + enum: + - product + - gift_certificate + example: product + type: string + required: + - id + - priority + - type + type: object + PublicProductList: + description: Document representing a customer product list. + properties: + coRegistrant: + allOf: + - $ref: '#/components/schemas/ProductListRegistrant' + description: The coRegistrant of this product list. + creationDate: + description: Returns the value of attribute 'creationDate'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + description: + description: The description of this product list. + example: Super Product List + type: string + event: + allOf: + - $ref: '#/components/schemas/ProductListEvent' + description: The event of this product list. + id: + description: The id of this product list. + example: '873465834' + minLength: 1 + type: string + lastModified: + description: Returns the value of attribute 'lastModified'. + example: '9999-12-31T00:00:00.0Z' + format: date-time + type: string + name: + description: The name of this product list. + example: My Product List + type: string + productListItems: + description: The product list items + items: + $ref: '#/components/schemas/PublicProductListItem' + type: array + productListShippingAddress: + allOf: + - $ref: '#/components/schemas/ProductListShippingAddress' + description: The abbreviated shipping address of this product list representing what anonymous users see. + public: + description: Indicates whether the owner made this product list available for access by other customers. + example: true + type: boolean + registrant: + allOf: + - $ref: '#/components/schemas/ProductListRegistrant' + description: The registrant of this product list. + type: + description: The type of the product list. + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + example: gift_registry + type: string + required: + - id + - public + - type + type: object + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + externalId: + name: externalId + in: query + description: The External ID of the customer. + required: true + schema: + minLength: 1 + type: string + authenticationProviderId: + name: authenticationProviderId + in: query + description: The authentication Provider Id. + required: true + schema: + minLength: 1 + type: string + customerId: + name: customerId + in: path + description: The customer ID. + required: true + schema: + minLength: 1 + type: string + addressName: + name: addressName + in: path + description: The name of the address to update. + required: true + schema: + maxLength: 256 + minLength: 1 + type: string + crossSites: + name: crossSites + in: query + description: The flag indicating whether all sites should be searched. This flag is ignored unless a valid User / Agent is present with a trusted agent on behalf (TAOB) token. Without a TAOB token, only the customer's orders placed on the site specified by siteId are returned. + required: false + schema: + type: boolean + from: + name: from + in: query + required: false + schema: + type: string + until: + name: until + in: query + required: false + schema: + type: string + status: + name: status + in: query + required: false + schema: + type: string + paymentInstrumentId: + name: paymentInstrumentId + in: path + description: The ID of the payment instrument to be retrievedCustomer. + required: true + schema: + minLength: 1 + type: string + listId: + name: listId + in: path + description: The ID of the list. + required: true + schema: + maxLength: 28 + minLength: 1 + type: string + itemId: + name: itemId + in: path + description: The ID of the item. + required: true + schema: + minLength: 1 + type: string + email: + name: email + in: query + description: The email address of the customer the product lists belong to. + required: false + schema: + type: string + firstName: + name: firstName + in: query + description: The first name of the customer the product lists belong to. + required: false + schema: + type: string + lastName: + name: lastName + in: query + description: The last name of the customer the product lists belong to. + required: false + schema: + type: string + examples: + CustomerRegistrationBody: + value: + password: 12345!aBcD + customer: + login: jsmith + email: jsmith@test.com + firstName: John + lastName: Smith + customerRegistrationResponse: + value: + authType: registered + creationDate: '2020-02-13T17:44:15.892Z' + customerId: abkd9LhOWzAiAFubdEDChtkMHW + customerNo: '00006002' + email: jsmith@test.com + enabled: true + firstName: John + lastModified: '2020-02-13T17:44:15.898Z' + lastName: Smith + login: jsmith + registerCustomer400: + value: + title: Invalid Customer + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-customer + detail: The customer is invalid. + registerCustomer401: + value: + title: Authentication Failed + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/authentication-failed + detail: Customer authentication based on JohnSmith failed. + credentialType: JohnSmith + ResetPasswordBody: + value: + resetToken: R1e2s3e4t5T6o7k8e9n0 + login: janedoe@test.com + newPassword: p@assword2 + ResetPasswordTokenBody: + value: + login: janedoe@test.com + getResetPasswordTokenSuccess: + value: + login: janedoe@test.com + email: janedoe@test.com + resetToken: R1e2s3e4t5T6o7k8e9n0 + expiresInMinutes: 30 + getExternalProfileSuccess: + value: + authenticationProviderId: Google + firstName: John + lastName: Doe + customerId: bfqcN48dn2y4EaV9Qj5bNpVJVj + email: testCustomer@test.com + externalId: testCustomer@test.com + getExternalProfile400: + value: + title: Invalid Customer External Profile + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-customer-external-profile + detail: The customer external profile is invalid. + getExternalProfile404: + value: + title: Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found + detail: No customer with external profile with ID 'abfTWMDZOgi3JPzkHjv9IhmziI' could be found. + externalId: abfTWMDZOgi3JPzkHjv9IhmziI + ExternalProfileBody: + value: + authenticationProviderId: Google + firstName: John + lastName: Doe + email: testCustomer@test.com + externalId: testCustomer@test.com + registerExternalProfileSuccess: + value: + authenticationProviderId: Google + firstName: John + lastName: Doe + customerId: bfqcN48dn2y4EaV9Qj5bNpVJVj + email: testCustomer@test.com + externalId: testCustomer@test.com + getCustomerSuccess: + value: + addresses: + - address1: 10 Presidential Way + addressId: me + city: Woburn + countryCode: US + firstName: John + fullName: John M. Smith + lastName: Smith + postalCode: '01827' + salutation: Mr. + stateCode: MA + authType: registered + creationDate: '2020-02-14T20:39:53.818Z' + customerId: abfTEMDZOgi3JPrkHjv9IhoziM + customerNo: '00010009' + email: jsmith@demandware.com + firstName: John + gender: 1 + lastName: Smith + paymentInstruments: + - bankRoutingNumber: '0763564' + creationDate: '2017-08-20T11:30:36.000Z' + lastModified: '2017-08-20T11:30:50.000Z' + maskedGiftCertificateCode: '***********ode' + paymentCard: + cardType: Visa + creditCardExpired: false + expirationMonth: 2 + expirationYear: 2022 + holder: John Smith + maskedNumber: '***********ber2' + numberLastDigits: ber2 + paymentInstrumentId: beybQiWcyatEEaaadniwhKxxFl + paymentMethodId: CREDIT_CARD + phoneBusiness: '234560003' + phoneHome: '123450003' + phoneMobile: '345670003' + getCustomer404: + value: + title: Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found + detail: No customer with ID 'abfTWMDZOgi3JPzkHjv9IhmziI' could be found. + customerId: abfTWMDZOgi3JPzkHjv9IhmziI + UpdateCustomerBody: + value: + customerNo: '00010009' + firstName: John + lastName: Wild + email: jwild@yourstore.com + fax: +49 03641 78393 346 + updateCustomerResponse: + value: + authType: registered + creationDate: '2020-02-14T20:39:53.818Z' + customerId: abfTEMDZOgi3JPrkHjv9IhoziM + customerNo: '00010009' + email: jwild@yourstore.com + enabled: true + fax: +49 03641 78393 346 + firstName: John + lastLoginTime: '2020-02-14T20:51:59.313Z' + lastModified: '2020-02-14T20:55:12.133Z' + lastName: Wild + lastVisitTime: '2020-02-14T20:51:59.313Z' + login: f0a43dc2-692a-43bf-b008-e10918ea935d + previousLoginTime: '2020-02-14T20:51:59.313Z' + previousVisitTime: '2020-02-14T20:51:59.313Z' + CustomerAddressBody: + value: + addressId: home_address + address1: 5 Wall St + address2: 24 Presidential Way + city: Burlington + companyName: Salesforce Commerce Cloud + countryCode: US + firstName: John + jobTitle: Developer + lastName: Murphy + phone: 408-555-1212 + postalCode: '01805' + postBox: 12a + preferred: false + salutation: Mr. + secondName: Jim + stateCode: MA + title: Dr. + customerAddressResponse: + value: + addressId: home_address + address1: 5 Wall St + address2: 24 Presidential Way + city: Burlington + companyName: Salesforce Commerce Cloud + countryCode: US + creationDate: '2020-02-14T21:13:29.769Z' + firstName: John + fullName: John Jim Murphy + jobTitle: Developer + lastModified: '2020-02-14T21:13:29.770Z' + lastName: Murphy + phone: 408-555-1212 + postalCode: '01805' + postBox: 12a + preferred: false + salutation: Mr. + secondName: Jim + stateCode: MA + title: Dr. + CustomerAddressResponseBody: + value: + addressId: home_address + address1: 5 Wall St + address2: 24 Presidential Way + city: Burlington + companyName: Salesforce Commerce Cloud + countryCode: US + creationDate: '2020-02-14T21:13:29.769Z' + firstName: John + fullName: John Jim Murphy + jobTitle: Developer + lastModified: '2020-02-14T21:13:29.770Z' + lastName: Murphy + phone: 408-555-1212 + postalCode: '01805' + postBox: 12a + preferred: false + salutation: Mr. + secondName: Jim + stateCode: MA + title: Dr. + customerBasketsResult: + value: + baskets: + - basketId: bccO1aOjgEnuIaaadk7pYO2rFE + adjustedMerchandizeTotalTax: 0 + adjustedShippingTotalTax: 0 + agentBasket: true + billingAddress: + address1: 10 Presidential Way + city: Woburn + countryCode: US + firstName: John + fullName: John M. Smith + id: abfTEMDZOgi3JPrkHjv9IhoziM + lastName: Smith + phone: '123450003' + postalCode: '01827' + salutation: Mr. + stateCode: MA + bonusDiscountLineItems: + - bonusProducts: + - productDescription: Bonus Product + productId: '34984327448' + productName: Extra Fluffy Bonus Product + title: Bonus Product + couponCode: BONUS + id: qhegj345ruhrfkj + maxBonusItems: 1 + promotionId: basds98295jsafi + channelType: storefront + couponItems: + - code: '5634573' + couponItemId: 100-89038 + statusCode: coupon_code_already_in_basket + valid: true + creationDate: '2019-09-05T17:12:56.670Z' + currency: USD + customerInfo: + c_familyStatus: string + customerId: abfTEMDZOgi3JPrkHjv9IhoziM + customerName: John Smith + customerNo: '1000' + email: jsmith@demandware.com + giftCertificateItems: + - amount: 0 + giftCertificateItemId: '901' + message: Preferred Customer + recipientEmail: jsmith@demandware.com + recipientName: John Smith + senderName: Jane Smith + shipmentId: 678934jsadLHY5 + inventoryReservationExpiry: '2019-09-05T17:12:56.670Z' + lastModified: '2019-09-05T17:12:56.670Z' + merchandizeTotalTax: 0 + orderPriceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: asdfgh4567 + type: percentage + couponCode: 2345-009 + createdBy: System + creationDate: '2019-09-05T17:12:56.670Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.670Z' + manual: true + price: 0 + priceAdjustmentId: 324545673fgjghj + promotionId: 1000-7654 + promotionLink: link to promotion + reasonCode: PRICE_MATCH + orderTotal: 0 + paymentInstruments: + - amount: 0 + authorizationStatus: + code: AUTH + message: Authorizing + status: 0 + bankRoutingNumber: string + maskedGiftCertificateCode: string + paymentCard: + cardType: Visa + creditCardExpired: false + creditCardToken: sadjklfajkgae + expirationMonth: 12 + expirationYear: 2019 + holder: John + issueNumber: '389342643978' + maskedNumber: '**************53' + numberLastDigits: '8753' + validFromMonth: 4 + validFromYear: 2015 + paymentInstrumentId: creditCard + paymentMethodId: credit + productItems: + - adjustedTax: 0 + basePrice: 0 + bonusDiscountLineItemId: string + bonusProductLineItem: true + bundledProductItems: + - quantity: 10 + gift: true + giftMessage: string + inventoryId: string + itemId: string + itemText: string + optionItems: + - adjustedTax: 0 + basePrice: 110 + bonusDiscountLineItemId: dsklgladsjkq349857 + bonusProductLineItem: true + bundledProductItems: + - quantity: 10 + gift: true + giftMessage: Happy Birthday + inventoryId: '258963' + itemId: apple-ipod-classic + itemText: Apple iPod Classic + optionId: 34526hjyuGGH56 + optionItems: + - optionId: sdiughsdjkfgoqtuy + optionValueId: '1564897654' + optionValueId: string + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: 34526hjyuGGH56 + type: percentage + couponCode: '109475' + createdBy: System + creationDate: '2019-09-05T17:12:56.670Z' + custom: true + itemText: '' + lastModified: '2019-09-05T17:12:56.670Z' + manual: true + price: 0 + priceAdjustmentId: '1597563' + promotionId: '963852' + promotionLink: link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: apple-ipod-classic + productListItem: + id: 2345245e654utjSSDFfdhh + priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver + productList: + description: My Product List + name: Electronics + public: true + title: My Electronics Wish List + type: wish_list + public: true + purchasedQuantity: 0 + quantity: 0 + type: product + productName: Apple iPod Classic + quantity: 0 + shipmentId: 12345rdsghfjh + shippingItemId: 47568ghfhjgkg + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: string + type: percentage + couponCode: sadfghgjw4e56r7 + createdBy: System + creationDate: '2019-09-05T17:12:56.672Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.672Z' + manual: true + price: 0 + priceAdjustmentId: asdgfhg5463798453 + promotionId: 100-7345 + promotionLink: Link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: string + productListItem: + id: string + priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver + productList: + description: My Product List + name: Electronics + public: true + title: My Electronics Wish List + type: wish_list + public: true + purchasedQuantity: 0 + quantity: 0 + type: product + productName: Apple iPod Classic + quantity: 0 + shipmentId: 12345rdsghfjh + shippingItemId: 47568ghfhjgkg + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + productSubTotal: 0 + productTotal: 0 + shipments: + - adjustedMerchandizeTotalTax: 0 + adjustedShippingTotalTax: 0 + gift: true + giftMessage: Happy Birthday + merchandizeTotalTax: 0 + productSubTotal: 0 + productTotal: 0 + shipmentId: '1200' + shipmentNo: '3' + shipmentTotal: 0 + shippingAddress: + address1: 10 Presidential Way + city: string + countryCode: US + firstName: John + fullName: John M. Smith + id: abfTWMDZOgi3JPzkHjv9IhmziI + lastName: Smith + phone: '123450003' + postalCode: '01827' + salutation: Mr. + stateCode: MA + shippingMethod: + c_storePickupEnabled: true + description: Ship using FEDEX + externalShippingMethod: FEDEX + id: '1200' + name: John Smith + price: 0 + shippingPromotions: + - calloutMsg: Callout Message + promotionId: 123452768sdfgh + promotionName: Special Promotion + shippingStatus: not_shipped + shippingTotal: 0 + shippingTotalTax: 0 + taxTotal: 0 + trackingNumber: 89e980-562489-54ifsdgj + shippingItems: + - adjustedTax: 0 + basePrice: 0 + itemId: 2345245e654utjSSDFfdhh + itemText: apple-iPod-classic + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: string + type: percentage + couponCode: sadfghgjw4e56r7 + createdBy: System + creationDate: '2019-09-05T17:12:56.672Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.672Z' + manual: true + price: 0 + priceAdjustmentId: asdgfhg5463798453 + promotionId: 100-7345 + promotionLink: Link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + shipmentId: asghdfjghwertyu + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + shippingTotal: 0 + shippingTotalTax: 0 + sourceCode: '' + taxTotal: 0 + taxation: gross + total: 1 + CustomersOrdersResult: + value: + limit: 1 + data: + - adjustedMerchandizeTotalTax: 0 + adjustedShippingTotalTax: 0 + billingAddress: + address1: 10 Presidential Way + city: Woburn + countryCode: US + firstName: John + fullName: John M. Smith + id: abfTEMDZOgi3JPrkHjv9IhoziM + lastName: Smith + phone: '123450003' + postalCode: '01827' + salutation: Mr. + stateCode: MA + bonusDiscountLineItems: + - bonusProducts: + - productDescription: Bonus Product + productId: '34984327448' + productName: Extra Fluffy Bonus Product + title: Bonus Product + couponCode: BONUS + id: qhegj345ruhrfkj + maxBonusItems: 1 + promotionId: basds98295jsafi + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: '5634573' + couponItemId: 100-89038 + statusCode: coupon_code_already_in_basket + valid: true + creationDate: '2019-09-05T17:12:56.670Z' + currency: USD + customerInfo: + c_familyStatus: string + customerId: abfTEMDZOgi3JPrkHjv9IhoziM + customerName: John Smith + customerNo: '00010009' + email: jsmith@demandware.com + exportStatus: not_exported + externalOrderStatus: string + giftCertificateItems: + - amount: 0 + giftCertificateItemId: '901' + message: Preferred Customer + recipientEmail: jsmith@demandware.com + recipientName: John Smith + senderName: Jane Smith + shipmentId: 678934jsadLHY5 + lastModified: '2019-09-05T17:12:56.670Z' + merchandizeTotalTax: 0 + orderPriceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: asdfgh4567 + type: percentage + couponCode: 2345-009 + createdBy: System + creationDate: '2019-09-05T17:12:56.670Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.670Z' + manual: true + price: 0 + priceAdjustmentId: 324545673fgjghj + promotionId: 1000-7654 + promotionLink: link to promotion + reasonCode: PRICE_MATCH + orderTotal: 0 + paymentInstruments: + - amount: 0 + authorizationStatus: + code: AUTH + message: Authorizing + status: 0 + bankRoutingNumber: string + maskedGiftCertificateCode: string + paymentCard: + cardType: Visa + creditCardExpired: false + creditCardToken: sadjklfajkgae + expirationMonth: 12 + expirationYear: 2019 + holder: John + issueNumber: '389342643978' + maskedNumber: '**************53' + numberLastDigits: '8753' + validFromMonth: 4 + validFromYear: 2015 + paymentInstrumentId: creditCard + paymentMethodId: credit + paymentStatus: not_paid + productItems: + - adjustedTax: 0 + basePrice: 0 + bonusDiscountLineItemId: string + bonusProductLineItem: true + bundledProductItems: + - quantity: 10 + gift: true + giftMessage: string + inventoryId: string + itemId: string + itemText: string + optionItems: + - adjustedTax: 0 + basePrice: 110 + bonusDiscountLineItemId: dsklgladsjkq349857 + bonusProductLineItem: true + bundledProductItems: + - quantity: 10 + gift: true + giftMessage: Happy Birthday + inventoryId: '258963' + itemId: apple-ipod-classic + itemText: Apple iPod Classic + optionId: 34526hjyuGGH56 + optionItems: + - optionId: sdiughsdjkfgoqtuy + optionValueId: '1564897654' + optionValueId: string + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: 34526hjyuGGH56 + type: percentage + couponCode: '109475' + createdBy: System + creationDate: '2019-09-05T17:12:56.670Z' + custom: true + itemText: '' + lastModified: '2019-09-05T17:12:56.670Z' + manual: true + price: 0 + priceAdjustmentId: '1597563' + promotionId: '963852' + promotionLink: link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: apple-ipod-classic + productListItem: + id: 2345245e654utjSSDFfdhh + priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver + productList: + description: My Product List + name: Electronics + public: true + title: My Electronics Wish List + type: wish_list + public: true + purchasedQuantity: 0 + quantity: 0 + type: product + productName: Apple iPod Classic + quantity: 0 + shipmentId: 12345rdsghfjh + shippingItemId: 47568ghfhjgkg + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: string + type: percentage + couponCode: sadfghgjw4e56r7 + createdBy: System + creationDate: '2019-09-05T17:12:56.672Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.672Z' + manual: true + price: 0 + priceAdjustmentId: asdgfhg5463798453 + promotionId: 100-7345 + promotionLink: Link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: string + productListItem: + id: string + priority: 0 + productDetailsLink: + productDescription: apple-ipod-classic + productId: apple-ipod-classic + productName: Apple iPod Classic + title: Apple iPod Classic Silver + productList: + description: My Product List + name: Electronics + public: true + title: My Electronics Wish List + type: wish_list + public: true + purchasedQuantity: 0 + quantity: 0 + type: product + productName: Apple iPod Classic + quantity: 0 + shipmentId: 12345rdsghfjh + shippingItemId: 47568ghfhjgkg + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + productSubTotal: 0 + productTotal: 0 + shipments: + - adjustedMerchandizeTotalTax: 0 + adjustedShippingTotalTax: 0 + gift: true + giftMessage: Happy Birthday + merchandizeTotalTax: 0 + productSubTotal: 0 + productTotal: 0 + shipmentId: '1200' + shipmentNo: '3' + shipmentTotal: 0 + shippingAddress: + address1: 10 Presidential Way + city: string + countryCode: US + firstName: John + fullName: John M. Smith + id: abfTWMDZOgi3JPzkHjv9IhmziI + lastName: Smith + phone: '123450003' + postalCode: '01827' + salutation: Mr. + stateCode: MA + shippingMethod: + c_storePickupEnabled: true + description: Ship using FEDEX + externalShippingMethod: FEDEX + id: '1200' + name: John Smith + price: 0 + shippingPromotions: + - calloutMsg: Callout Message + link: link to shipping promotions + promotionId: 123452768sdfgh + promotionName: Special Promotion + shippingStatus: not_shipped + shippingTotal: 0 + shippingTotalTax: 0 + taxTotal: 0 + trackingNumber: 89e980-562489-54ifsdgj + shippingItems: + - adjustedTax: 0 + basePrice: 0 + itemId: 2345245e654utjSSDFfdhh + itemText: apple-iPod-classic + price: 0 + priceAdjustments: + - appliedDiscount: + amount: 0 + percentage: 0 + priceBookId: string + type: percentage + couponCode: sadfghgjw4e56r7 + createdBy: System + creationDate: '2019-09-05T17:12:56.672Z' + custom: true + itemText: string + lastModified: '2019-09-05T17:12:56.672Z' + manual: true + price: 0 + priceAdjustmentId: asdgfhg5463798453 + promotionId: 100-7345 + promotionLink: Link to promotion + reasonCode: PRICE_MATCH + priceAfterItemDiscount: 0 + shipmentId: asghdfjghwertyu + tax: 0 + taxBasis: 0 + taxClassId: STATE + taxRate: 0 + shippingStatus: not_shipped + shippingTotal: 0 + shippingTotalTax: 0 + sourceCode: '' + status: created + taxTotal: 0 + taxation: gross + offset: 0 + total: 1 + UpdatePasswordBody: + value: + currentPassword: 01dpass + password: newpass + CustomerPaymentInstrumentBody: + value: + paymentCard: + expirationYear: 2027 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + number: '1234567' + holder: John Smith + cardType: MasterCard + giftCertificateCode: gift_code7 + paymentMethodId: OCAPI_Payment_Simple + bankRoutingNumber: bankrouting3776 + getCustomerPaymentInstrumentSuccess: + value: + bankRoutingNumber: bankrouting3776 + paymentCard: + cardType: MasterCard + creditCardExpired: false + expirationMonth: 7 + expirationYear: 2027 + holder: John Smith + issueNumber: i117 + maskedNumber: '***4567' + numberLastDigits: '4567' + validFromMonth: 8 + validFromYear: 2007 + paymentMethodId: OCAPI_Payment_Simple + paymentInstrumentId: cdOLciWbOsYl6aaadkwcsx9xHH + customerProductListResult: + value: + limit: 1 + data: + - coRegistrant: + email: janedoe@example.com + firstName: Jane + lastName: Doe + role: Bride + creationDate: '2019-10-18T22:06:28.965Z' + currentShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + customerProductListItems: + - id: 30f35c187ea255ccb633c3ba11 + priority: 4 + productId: SimpleProduct + public: false + purchasedQuantity: 0 + quantity: 2 + type: product + postEventShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + productListShippingAddress: + addressId: home_address + city: Burlington + firstName: John + lastName: Murphy + name: OurProductList + registrant: + email: johndoe@example.com + firstName: John + lastName: Doe + role: Groom + lastModified: '2019-10-18T22:06:28.971Z' + description: a productlist + event: + city: any city + country: USA + type: product_list_event + id: 8b04014a9d6e5dbae542004824 + public: false + type: wish_list + total: 1 + PostCustomerProductListBody: + value: + coRegistrant: + email: janedoe@example.com + firstName: Jane + lastName: Doe + role: Bride + creationDate: '2019-10-18T22:06:28.965Z' + description: our productlist + event: + city: Washington + country: US + date: '2019-09-05T17:12:56.670Z' + state: DC + type: Wedding + id: bcedkiWbxCM2MaaadkRhB2IBzM + lastModified: '2019-10-18T22:06:28.971Z' + name: OurProductList + public: true + registrant: + email: johndoe@example.com + firstName: John + lastName: Doe + role: Groom + type: wish_list + customerProductList: + value: + coRegistrant: + email: janedoe@example.com + firstName: Jane + lastName: Doe + role: Bride + creationDate: '2019-10-18T22:06:28.965Z' + currentShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + description: our productlist + event: + city: Washington + country: US + date: '2019-09-05T17:12:56.670Z' + state: DC + type: Wedding + id: bcedkiWbxCM2MaaadkRhB2IBzM + lastModified: '2019-10-18T22:06:28.971Z' + name: OurProductList + postEventShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + productListShippingAddress: + addressId: home_address + city: Burlington + firstName: John + lastName: Murphy + public: false + registrant: + email: johndoe@example.com + firstName: John + lastName: Doe + role: Groom + shippingAddressInfo: + addressId: me + title: me, John Doe, Woburn + type: wish_list + getCustomerProductListByListId: + value: + coRegistrant: + email: janedoe@example.com + firstName: Jane + lastName: Doe + role: Bride + creationDate: '2019-10-18T22:06:28.965Z' + currentShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + customerProductListItems: + - id: 30f35c187ea255ccb633c3ba11 + priority: 4 + productId: SimpleProduct + public: false + purchasedQuantity: 0 + quantity: 2 + type: product + description: our productlist + event: + city: Washington + country: US + date: '2019-09-05T17:12:56.670Z' + state: DC + type: Wedding + id: bcedkiWbxCM2MaaadkRhB2IBzM + lastModified: '2019-10-18T22:06:28.971Z' + name: OurProductList + public: true + registrant: + email: johndoe@example.com + firstName: John + lastName: Doe + role: Groom + type: wish_list + UpdateCustomerProductListByListIdBody: + value: + description: Description + updateCustomerProductListByListId: + value: + coRegistrant: + email: janedoe@example.com + firstName: Jane + lastName: Doe + role: Bride + creationDate: '2019-10-18T22:06:28.965Z' + currentShippingAddressInfo: + addressId: home_address + title: home_address, John Murphy, Burlington + customerProductListItems: + - id: 30f35c187ea255ccb633c3ba11 + priority: 4 + productId: SimpleProduct + public: false + purchasedQuantity: 0 + quantity: 2 + type: product + description: Description + event: + city: Washington + country: US + date: '2019-09-05T17:12:56.670Z' + state: DC + type: Wedding + id: bcedkiWbxCM2MaaadkRhB2IBzM + lastModified: '2019-10-18T22:06:28.971Z' + name: OurProductList + public: true + registrant: + email: johndoe@example.com + firstName: John + lastName: Doe + role: Groom + type: wish_list + UpdateCustomerProductListItemBody: + value: + id: 1d447daa4d25805fd682bd4ce1 + priority: 4 + productId: RedDress1 + public: true + purchasedQuantity: 0 + quantity: 2 + type: product + updateCustomerProductListItemSuccess: + value: + id: 1d447daa4d25805fd682bd4ce1 + priority: 4 + productId: RedDress1 + public: true + purchasedQuantity: 0 + quantity: 2 + type: product + getCustomerProductListItemSuccess: + value: + id: 1d447daa4d25805fd682bd4ce1 + priority: 4 + productId: RedDress1 + product: + id: RedDress1 + imageGroups: + - images: + - alt: ALT master detail + link: https://example.com/foo/bar/master_detail.jpg + title: TITLE master detail + viewType: detail + - images: + - alt: ALT master swatch + link: https://example.com/foo/bar/master_swatch.jpg + title: TITLE master swatch + viewType: swatch + - images: + - alt: ALT master thumbnail + link: https://example.com/foo/bar/master_thumbnail.jpg + title: TITLE master thumbnail + viewType: thumbnail + inventories: + - ats: 0 + backorderable: false + id: RedDress1Inventory + orderable: false + preorderable: false + stockLevel: 0 + minOrderQuantity: 1 + price: 99.99 + stepQuantity: 1 + public: true + purchasedQuantity: 0 + quantity: 2 + type: product + CustomerProductListItemBody: + value: + productId: RedDress1 + id: '1' + purchasedQuantity: 0 + priority: 3 + quantity: 4 + public: false + type: product + productListsResultExample: + value: + limit: 3 + data: + - description: our productlist + id: f4682729817ee215acd3a1a8b4 + name: OurProductList + title: OurProductList + type: wish_list + - description: something + id: b985bea3aaae7702c0b692c65c + name: OurProductList + title: OurProductList + type: wish_list + - description: our productlist + id: 95aa60b8c681ad5431cb4c5bfa + name: OurProductList + title: OurProductList + type: wish_list + total: 3 + getPublicProductListsBySearchTerm401: + value: + title: Invalid Access Token + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-access-token + detail: The request is unauthorized, the access token is invalid. + accessToken: iI6IjEiLCJhbGciOiJIUzI1NiIsInR5cCI6Ik + publicProductListItemsExample: + value: + id: 023513f915fad06573f330fb0d + priority: 0 + product: + id: RedDress1 + imageGroups: + - images: + - alt: ALT master detail + link: https://example.com/foo/bar/master_detail.jpg + title: TITLE master detail + viewType: detail + - images: + - alt: ALT master swatch + link: https://example.com/foo/bar/master_swatch.jpg + title: TITLE master swatch + viewType: swatch + - images: + - alt: ALT master thumbnail + link: https://example.com/foo/bar/master_thumbnail.jpg + title: TITLE master thumbnail + viewType: thumbnail + inventories: + - ats: 0 + backorderable: false + id: RedDress1Inventory + orderable: false + preorderable: false + stockLevel: 0 + minOrderQuantity: 1 + price: 99.99 + stepQuantity: 1 + type: product diff --git a/apis/shopper-experience-oas/.metadata.json b/apis/shopper-experience-oas-1.0.6/.metadata.json similarity index 90% rename from apis/shopper-experience-oas/.metadata.json rename to apis/shopper-experience-oas-1.0.6/.metadata.json index 5c20ce8d..5ba20129 100644 --- a/apis/shopper-experience-oas/.metadata.json +++ b/apis/shopper-experience-oas-1.0.6/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-experience-oas/1.0.5", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-experience-oas/1.0.6", "name": "Shopper Experience OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-experience-oas", - "version": "1.0.5", + "version": "1.0.6", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-experience-oas/exchange.json b/apis/shopper-experience-oas-1.0.6/exchange.json similarity index 79% rename from apis/shopper-experience-oas/exchange.json rename to apis/shopper-experience-oas-1.0.6/exchange.json index c38de835..caf7db51 100644 --- a/apis/shopper-experience-oas/exchange.json +++ b/apis/shopper-experience-oas-1.0.6/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-experience-oas-v1-bundled.yaml", + "main": "shopper-experience-oas-v1-public.yaml", "name": "Shopper Experience OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-experience-oas", - "version": "1.0.5", + "version": "1.0.6", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-experience-oas/shopper-experience-oas-v1-bundled.yaml b/apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-internal.yaml similarity index 97% rename from apis/shopper-experience-oas/shopper-experience-oas-v1-bundled.yaml rename to apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-internal.yaml index b91531f3..69ee68b0 100644 --- a/apis/shopper-experience-oas/shopper-experience-oas-v1-bundled.yaml +++ b/apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-internal.yaml @@ -16,6 +16,14 @@ info: Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. **Important**: Currently, the Shopper Experience API can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. + + ## Authentication & Authorization + + The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 variables: diff --git a/apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-public.yaml new file mode 100644 index 00000000..69ee68b0 --- /dev/null +++ b/apis/shopper-experience-oas-1.0.6/shopper-experience-oas-v1-public.yaml @@ -0,0 +1,610 @@ +openapi: 3.0.3 +info: + title: Shopper Experience + version: v1 + description: |- + Use the Shopper Experience API to look up page information for pages that are created in Page Designer. + + Responses include the following: + + - The entire component hierarchy of the page at design time. + - All merchant data provided at design time. + - Server-side scripting data provided at run time. + + Both the page and components contain the values of all native and custom attributes that have been populated during page authoring. + + Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. + + **Important**: Currently, the Shopper Experience API can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. + + ## Authentication & Authorization + + The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/pages: + get: + summary: Get Page Designer pages. + description: "Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.\n\nYou must provide the `aspectTypeId` along with either a `categoryId` or a `productId`. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPages + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/categoryId' + - $ref: '#/components/parameters/productId' + - $ref: '#/components/parameters/aspectTypeId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/PageResult' + examples: + PageResult: + $ref: '#/components/examples/PageResult' + '400': + description: | + Business Object ID Invalid + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BusinessObjectIDInvalid: + $ref: '#/components/examples/BusinessObjectIDInvalid' + '404': + description: | + Requested Aspect Type Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectTypeNotFound: + $ref: '#/components/examples/AspectTypeNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience + /organizations/{organizationId}/pages/{pageId}: + get: + summary: Get a Page Designer page based on a single page ID. + description: "Get a Page Designer page for a specific page ID. The results apply the visibility rules for the page's components, such as personalization or scheduled visibility.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPage + parameters: + - $ref: '#/components/parameters/pageId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Page' + examples: + Page: + $ref: '#/components/examples/Page' + '400': + description: | + Provided Aspect Attribute Invalid + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectAttributeInvalid: + $ref: '#/components/examples/AspectAttributeInvalid' + '404': + description: | + Requested Page Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + PageNotFound: + $ref: '#/components/examples/PageNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Region: + properties: + id: + maxLength: 256 + title: ID + description: Region identifier. + example: header + type: string + components: + title: Components + description: The components in the region. + example: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + type: array + items: + $ref: '#/components/schemas/Component' + required: + - id + type: object + Component: + properties: + id: + maxLength: 256 + title: ID + description: Component identifier. + example: rfdvj4ojtltljw3 + type: string + typeId: + maxLength: 256 + title: Component Type ID + description: Component type identifier. + example: commerce_assets.carousel + type: string + data: + title: Component Data + description: The configuration data assigned to the component. + example: + title: Topseller + category: topseller + type: object + custom: + title: Custom Component Data + description: Any custom data added by the custom code for this component. + example: + detailUrl: www.myshop.com/topseller + type: object + regions: + title: Regions + description: The regions (and their assigned components) for the component. + example: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + Page: + properties: + id: + maxLength: 256 + title: ID + description: Page identifier. + example: homepage + type: string + typeId: + maxLength: 256 + title: Page Type ID + description: Page type identifier. + example: storePage + type: string + aspectTypeId: + maxLength: 256 + title: Aspect Type ID + description: The aspect type assigned to the page. + example: pdpAspect + type: string + name: + maxLength: 4000 + title: Page Name + description: Display name of the page. + example: Homepage + type: string + description: + maxLength: 4000 + title: Page Description + description: Description of the page. + example: Home page of the storefront. + type: string + pageTitle: + maxLength: 4000 + title: SEO Title + description: The SEO title of the page. + example: Homepage - My Shop + type: string + pageDescription: + maxLength: 4000 + title: SEO Description + description: The SEO description of the page. + example: Get started shopping + type: string + pageKeywords: + maxLength: 4000 + title: SEO Keywords + description: The SEO keywords of the page. + example: fashion, my shop + type: string + data: + title: Page Data + description: The configuration data assigned to the page. + example: + thumbnail: myshop.jpg + type: object + custom: + title: Custom Page Data + description: Any custom data added by the custom code for the page type. + example: + thumbnail_full: http://static.myshop.com/myshop.jpg + type: object + regions: + title: Regions + description: The regions (and their assigned components) for the page. + example: + - id: header + components: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: rfdvj4ojtltljw3 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: footer + components: [] + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + PageResult: + properties: + data: + title: Data + description: List of pages. + type: array + items: + $ref: '#/components/schemas/Page' + required: + - data + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + categoryId: + name: categoryId + in: query + description: Category identifier that is used for searching the page assignment. Must be provided if no `productId` is provided. + required: false + schema: + maxLength: 256 + type: string + example: home-clearance + productId: + name: productId + in: query + description: Product identifier that is used for searching the page assignment. Must be provided if no `categoryId` is provided. + required: false + schema: + maxLength: 100 + type: string + example: iphone11 + aspectTypeId: + name: aspectTypeId + in: query + description: Aspect type identifier that is used for searching the page assignment in conjunction with either the `productId` or `categoryId`. + required: true + schema: + maxLength: 256 + type: string + example: pdp + aspectAttributes: + name: aspectAttributes + in: query + description: A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + type: string + maxLength: 256 + example: |- + { + "product" : "iphone11", + "breadcrumbCategory" : "home-clearance" + } + parameters: + name: parameters + in: query + description: A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + maxLength: 256 + type: string + example: refine=color,size;currency=USD;showNavigation=false + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + pageId: + name: pageId + in: path + description: Identifier for the requested page. + required: true + schema: + maxLength: 256 + type: string + example: homepage + examples: + PageResult: + value: + data: + - id: homePpage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 2192f5b9aac0f2af2385f6f6b7 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: 5c5ebbcd2aee1a67af519c83b5 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: d98a30dfe93715e3e6fc22a329 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: 43aa39896afb9292308181ce14 + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: detailpage + typeId: storePage + name: storepage + description: A Store page + pageTitle: A Store + pageDescription: Buy in store + pageKeywords: fashion, my shop, store + data: + thumbnail: mystore.jpg + BusinessObjectIDInvalid: + value: + title: Business Object ID Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid + detail: At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist. + AspectTypeNotFound: + value: + title: Aspect Type Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found + detail: No aspect type with ID 'pdp' was found in site 'RefArch'. + Page: + value: + id: homepage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 375b9107b067902827083772f9 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: be1f331b92d8ad7e38e440e35d + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: 45af07459684e6db78990c5d05 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: df6e33766d90e7e205d109aa2f + typeId: commerce_assets.productTile + data: + product: iphone7 + AspectAttributeInvalid: + value: + title: Aspect Attribute Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-attribute-invalid + detail: 'Aspect attribute value "5555" does not fulfill its respective definition {"id" : "foobar", "type" : "string","required" : "false"}' + PageNotFound: + value: + title: Page Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/page-not-found + detail: No visible page with ID 'homepage' was found in site 'RefArch'. diff --git a/apis/shopper-gift-certificates-oas/.metadata.json b/apis/shopper-gift-certificates-oas-1.0.25/.metadata.json similarity index 89% rename from apis/shopper-gift-certificates-oas/.metadata.json rename to apis/shopper-gift-certificates-oas-1.0.25/.metadata.json index d3dcde9f..7f751f88 100644 --- a/apis/shopper-gift-certificates-oas/.metadata.json +++ b/apis/shopper-gift-certificates-oas-1.0.25/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-gift-certificates-oas/1.0.17", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-gift-certificates-oas/1.0.25", "name": "Shopper Gift Certificates OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-gift-certificates-oas", - "version": "1.0.17", + "version": "1.0.25", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-gift-certificates-oas/exchange.json b/apis/shopper-gift-certificates-oas-1.0.25/exchange.json similarity index 78% rename from apis/shopper-gift-certificates-oas/exchange.json rename to apis/shopper-gift-certificates-oas-1.0.25/exchange.json index 38ed6356..7fc4fefe 100644 --- a/apis/shopper-gift-certificates-oas/exchange.json +++ b/apis/shopper-gift-certificates-oas-1.0.25/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-gift-certificates-oas-v1-bundled.yaml", + "main": "shopper-gift-certificates-oas-v1-public.yaml", "name": "Shopper Gift Certificates OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-gift-certificates-oas", - "version": "1.0.17", + "version": "1.0.25", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-gift-certificates-oas/shopper-gift-certificates-oas-v1-bundled.yaml b/apis/shopper-gift-certificates-oas-1.0.25/shopper-gift-certificates-oas-v1-internal.yaml similarity index 100% rename from apis/shopper-gift-certificates-oas/shopper-gift-certificates-oas-v1-bundled.yaml rename to apis/shopper-gift-certificates-oas-1.0.25/shopper-gift-certificates-oas-v1-internal.yaml diff --git a/apis/shopper-gift-certificates-oas-1.0.25/shopper-gift-certificates-oas-v1-public.yaml b/apis/shopper-gift-certificates-oas-1.0.25/shopper-gift-certificates-oas-v1-public.yaml new file mode 100644 index 00000000..1008c88f --- /dev/null +++ b/apis/shopper-gift-certificates-oas-1.0.25/shopper-gift-certificates-oas-v1-public.yaml @@ -0,0 +1,260 @@ +openapi: 3.0.3 +info: + title: Shopper Gift Certificates + version: v1 + description: |- + # API Overview + + Use the Shopper Gift Certificates API to obtain gift certificate details. + + ## Authentication & Authorization + + The Shopper Gift Certificates API requires a JSON Web Token acquired via the Shopper Customers endpoint: + + ``` + https://{{shortCode}}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{{organizationId}}/customers/actions/login + ``` + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### Retrieve Existing Gift Certificate Details + + A shopper who received a code identifying a gift certificate can use the gift certificate code to query information, such as the status or remaining balance. + + ### Use Hooks + + For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/gift-certificate: + post: + summary: Retrieve an existing gift certificate. + operationId: getGiftCertificate + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GiftCertificateRequest' + examples: + Gift-Certificates: + $ref: '#/components/examples/GetGiftCertificate' + responses: + '200': + description: Gift certificate retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/GiftCertificate' + examples: + CreateGiftCertificate: + $ref: '#/components/examples/CreateGiftCertificate' + '404': + description: | + Thrown when the given gift certificate code is not valid. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GiftCertificate404: + $ref: '#/components/examples/GiftCertificate404' + security: + - ShopperToken: + - sfcc.shopper-gift-certificates +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc:shopper-gift-certificates: Allows read operations on shopper gift certificates + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-gift-certificates: Allows read operations on shopper gift certificates + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + GiftCertificateRequest: + description: Document representing a gift certificate request data. + additionalProperties: false + type: object + required: + - giftCertificateCode + properties: + giftCertificateCode: + description: The gift certificate code. + example: MYGIFTCERTIFICATECODE + type: string + GiftCertificate: + description: Document representing a gift certificate. + type: object + required: + - amount + - balance + - enabled + - maskedGiftCertificateCode + - merchantId + - recipientEmail + - recipientName + - senderName + - status + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate original amount. + type: number + example: 100 + balance: + format: double + description: The gift certificate remaining balance. + type: number + example: 100 + description: + description: The gift certificate description. + type: string + enabled: + description: Is the gift certificate is enabled? + type: boolean + example: true + maskedGiftCertificateCode: + description: The masked gift certificate code. + type: string + example: '************FJWQ' + merchantId: + description: The merchant ID. + type: string + example: '00000001' + message: + description: The message. + type: string + recipientEmail: + description: The recipient email. + type: string + example: p@gmail.com + recipientName: + description: The recipient name. + type: string + example: sampleuser + senderName: + description: The sender name. + type: string + example: Salesforce Support + status: + description: The gift certificate status. + enum: + - pending + - issued + - partially_redeemed + - redeemed + type: string + example: issued + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + examples: + GetGiftCertificate: + value: + giftCertificateCode: MYGIFTCERTIFICATECODE + CreateGiftCertificate: + value: + amount: 100 + balance: 100 + enabled: true + maskedGiftCertificateCode: '************FJWQ' + merchantId: '00000001' + recipientEmail: p@gmail.com + recipientName: sampleuser + senderName: Salesforce Support + status: issued + GiftCertificate404: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found + title: Gift Certificate Not Found Exception + detail: The gift certificate with the provided code could not be retrieved. diff --git a/apis/shopper-login-oas/.metadata.json b/apis/shopper-login-oas-1.39.39/.metadata.json similarity index 83% rename from apis/shopper-login-oas/.metadata.json rename to apis/shopper-login-oas-1.39.39/.metadata.json index 0f5b7bed..dfba711f 100644 --- a/apis/shopper-login-oas/.metadata.json +++ b/apis/shopper-login-oas-1.39.39/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-login-oas/1.39.36-kbode.sdkE2E-b9", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-login-oas/1.39.39", "name": "Shopper Login OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-login-oas", - "version": "1.39.36-kbode.sdkE2E-b9", + "version": "1.39.39", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-login-oas/exchange.json b/apis/shopper-login-oas-1.39.39/exchange.json similarity index 75% rename from apis/shopper-login-oas/exchange.json rename to apis/shopper-login-oas-1.39.39/exchange.json index 30f11192..eca13c0e 100644 --- a/apis/shopper-login-oas/exchange.json +++ b/apis/shopper-login-oas-1.39.39/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-login-oas-v1-bundled.yaml", + "main": "shopper-login-oas-v1-public.yaml", "name": "Shopper Login OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-login-oas", - "version": "1.39.36-kbode.sdkE2E-b9", + "version": "1.39.39", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-login-oas/shopper-login-oas-v1-bundled.yaml b/apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-internal.yaml similarity index 99% rename from apis/shopper-login-oas/shopper-login-oas-v1-bundled.yaml rename to apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-internal.yaml index 7bd5df4a..68028d6a 100644 --- a/apis/shopper-login-oas/shopper-login-oas-v1-bundled.yaml +++ b/apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-internal.yaml @@ -33,7 +33,9 @@ paths: The SLAS `/login` endpoint redirects back to the redirect URI and returns an authorization code. Calls to `/login` made with the same loginId and tenantId within 1 second result in a conflict. operationId: authenticateCustomer - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: + - '409' parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization @@ -100,7 +102,8 @@ paths: summary: Allow the customer to authenticate when their identity provider is down. description: This endpoint allows customers to authenticate when their configured identity provider is inaccessible. It provides an alternative authentication path through passwordless login methods like email or SMS verification. operationId: authorizePasswordlessCustomer - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization @@ -160,7 +163,8 @@ paths: Required parameters: `refresh token`, `channel_id`, and `client`. operationId: logoutCustomer - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/client_id' @@ -229,7 +233,8 @@ paths: You can call this endpoint from the front channel (the browser). operationId: authorizeCustomer - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/redirect_uri' @@ -305,7 +310,8 @@ paths: **Important**: As of July 31, 2024**, SLAS requires the `channel_id` query parameter in token requests. operationId: getAccessToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization @@ -372,7 +378,8 @@ paths: **NOTE:** The registered customer Json Web Token (JWT) is available in B2C Commerce versions 25.4 and later. operationId: getSessionBridgeAccessToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' requestBody: @@ -430,7 +437,9 @@ paths: For trusted-system requests, you cannot use SLAS public client_ids. operationId: getTrustedSystemAccessToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: + - '409' parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization @@ -497,7 +506,8 @@ paths: summary: Obtain a new agent on behalf of an authorization token for a registered customer. description: This endpoint enables trusted agents (such as customer service representatives or merchants) to obtain authorization tokens that allow them to act on behalf of registered customers. This facilitates customer support scenarios where agents need secure access to customer accounts. operationId: getTrustedAgentAuthorizationToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/client_id' @@ -559,7 +569,8 @@ paths: The value of the `_sfdc_client_auth` header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (`:`). For example, `privateClientId:privateClientsecret` becomes `cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ=` after Base64 encoding. operationId: getTrustedAgentAccessToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/_sfdc_client_auth' @@ -618,7 +629,8 @@ paths: summary: Request a reset password token. description: This endpoint initiates the password reset process for a customer by requesting a password reset token. The token is delivered through the configured delivery mode (email, SMS, etc.) and can be used with the password/action endpoint to set a new password. operationId: getPasswordResetToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' requestBody: @@ -662,7 +674,8 @@ paths: summary: Create a new password. description: This endpoint allows a customer to set a new password using a valid password reset token. The customer must provide the token received from the password/reset endpoint along with the desired new password. operationId: resetPassword - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization @@ -713,7 +726,8 @@ paths: summary: Issue a shopper token (JWT). description: This endpoint issues a shopper JWT access token using a passwordless login token. It enables authentication flows where traditional username/password combinations are not required, supporting alternative authentication methods. operationId: getPasswordLessAccessToken - x-slas-rate-limit: true + x-slas-rate-limit: + excludedStatusCodes: [] parameters: - $ref: '#/components/parameters/organizationId' - name: Authorization diff --git a/apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-public.yaml b/apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-public.yaml new file mode 100644 index 00000000..68028d6a --- /dev/null +++ b/apis/shopper-login-oas-1.39.39/shopper-login-oas-v1-public.yaml @@ -0,0 +1,2037 @@ +openapi: 3.0.3 +info: + title: Shopper Login + version: v1 + description: |- + # API Overview + + The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications. + + **Important:** Before using this API, see [Authorization for Shopper APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html) in the Get Started guides and the more detailed [SLAS guides](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas.html) for instructions on setting up a SLAS client, obtaining credentials, as well as flow and use case information. + + For load shedding and rate limiting information, see [Load Shedding and Rate Limiting.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/throttle-rates.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/oauth2/login: + post: + summary: Log in a shopper with credentials that are managed by a B2C Commerce instance (B2C Commerce). + description: |- + This follows the authorization code grant flow as defined by the OAuth 2.1 standard. It also uses a proof key for code exchange (PKCE). + + For PKCE values: + - The `code_verifier` string is a random string used for the `/token` endpoint request. + - The `code_challenge` is an encoded version of the `code_verifier` string using an SHA-256 hash. + + The request must include a basic authorization header that contains a Base64 encoded version of the following string: `:`. + Required parameters: `code_challenge`, `channel_id`, `client_id`, and `redirect_uri`. + + Optional parameters: `usid`. + The SLAS `/login` endpoint redirects back to the redirect URI and returns an authorization code. + Calls to `/login` made with the same loginId and tenantId within 1 second result in a conflict. + operationId: authenticateCustomer + x-slas-rate-limit: + excludedStatusCodes: + - '409' + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: Base64-encoded username and password for HTTP basic authentication + required: true + schema: + type: string + example: Basic + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LoginRequest' + required: true + responses: + '303': + description: The authorization code and usid were successfuly added to the location header and sent to the callback as query parameters. + content: + application/json: + schema: + type: string + examples: + authenticateCustomerSuccess: + $ref: '#/components/examples/authenticateCustomerSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InvalidBasicAuth401: + $ref: '#/components/examples/InvalidBasicAuth401' + '409': + description: Conflict + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + ConflictingCalls409: + $ref: '#/components/examples/ConflictingCalls409' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/passwordless/login: + post: + summary: Allow the customer to authenticate when their identity provider is down. + description: This endpoint allows customers to authenticate when their configured identity provider is inaccessible. It provides an alternative authentication path through passwordless login methods like email or SMS verification. + operationId: authorizePasswordlessCustomer + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`' + required: false + schema: + type: string + example: Basic + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PasswordlessLoginRequest' + required: true + responses: + '200': + description: The customer authenticated successfully. + content: + application/json: + schema: + type: string + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '412': + description: Precondition failure + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + DependentServiceUnavailable412: + $ref: '#/components/examples/DependentServiceUnavailable412' + /organizations/{organizationId}/oauth2/logout: + get: + summary: Log out a shopper. + description: |- + The shopper's access token and refresh token are revoked. If the shopper authenticated with a B2C Commerce (B2C Commerce) instance, the OCAPI JWT is also revoked. Call this endpoint for registered users that have logged in using SLAS. Do not use this endpoint for guest users. + + Required header: Authorization header bearer token of the Shopper access token to log out. + + Required parameters: `refresh token`, `channel_id`, and `client`. + operationId: logoutCustomer + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/client_id' + - $ref: '#/components/parameters/refresh_token' + - name: channel_id + in: query + description: The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce. + required: false + example: RefArch + schema: + example: RefArch + maxLength: 100 + type: string + - $ref: '#/components/parameters/hint' + - name: Authorization + in: header + description: Shopper access token to be revoked + required: true + schema: + type: string + example: Bearer eyJ2ZXIiOiIxLjAiLCJraWQiOiI0ZTQyNTFkOS0zM2Y2LTRjMTMtYjZmZC1mOWJkNTJmYTZhNDciLCJ0eXAiOiJqd3QiLCJjbHYiOiJKMi4xLjAiLCJhbGciOiJFUzI1NiJ9.eyJhdXQiOiJHVUlEIiwic2NwIjoic2ZjYy5wcm9kdWN0cy5ybyBzZmNjLmNhdGFsb2dzLnJvIHNmY2Muc2hvcHBlci5ydyIsInN1YiI6ImNjLXNsYXM6OnNsc2FfZGV2OjpzY2lkOjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3Yjo6dXNpZDoxY2E3OWZiNi0xYjIyLTRmOWItOGJiNi05YmU5NWNjMjA4NjMiLCJjdHgiOiJzbGFzLm5vdF9mb3JfZXh0ZXJuYWxfdXNlIiwiaXNzIjoic2xhcy9kZXYvc2xzYV9kZXYiLCJpc3QiOjEsImF1ZCI6ImNvbW1lcmNlY2xvdWQvZGV2L3Nsc2FfZGV2IiwibmJmIjoxNTk0NzY0MDgwLCJzdHkiOiJVc2VyIiwiaXNiIjoidWlkbzpzbGFzOjp1cG46R3Vlc3Q6OnVpZG46R3Vlc3QgVXNlciIsImV4cCI6MTU5NDc2NTkxMCwiaWF0IjoxNTk0NzY0MTEwLCJqdGkiOiJDMkMxNjM0NTE0NTEwLTE3MTQzMTg2NzY0MjcwNTcyNjQ2NTYxMzgifQ.UVYAsWXCn3hoUPy8vLlc7O96RZEHD3N3ZgdNH-ZVvJ1G-R6uJ2VPrYvwKmYXF41Ujm2bo83AYOHVqEEEPT8Kgw + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + logoutCustomerSuccess: + $ref: '#/components/examples/logoutCustomerSuccess' + '303': + description: The user has sent too many requests in a given amount of time, and rate limiting is in effect. + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/authorize: + get: + summary: Get an authorization code after authenticating a user against an identity provider (IDP). + description: |- + This is the first step of the OAuth 2.1 authorization code flow, in which a user can log in via federation to the IDP configured for the client. After successfully logging in, the user gets an authorization code via a redirect URI. + + You can call this endpoint from the front channel (the browser). + operationId: authorizeCustomer + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/redirect_uri' + - $ref: '#/components/parameters/response_type' + - $ref: '#/components/parameters/client_id' + - $ref: '#/components/parameters/scope' + - $ref: '#/components/parameters/state' + - $ref: '#/components/parameters/usid' + - $ref: '#/components/parameters/hint' + - name: channel_id + in: query + description: The channel that this request is for. For a B2C Commerce request, this is angalous to the site ID. + required: false + example: RefArch + schema: + example: RefArch + maxLength: 100 + type: string + - $ref: '#/components/parameters/code_challenge' + - $ref: '#/components/parameters/ui_locales' + responses: + '303': + description: The authorization code was successfully added to the `redirect_uri`. + content: + application/json: + schema: + type: string + examples: + authorizeCustomerSuccess: + $ref: '#/components/examples/authorizeCustomerSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InvalidBasicAuth401: + $ref: '#/components/examples/InvalidBasicAuth401' + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/token: + post: + summary: Get the shopper or guest JWT access token and a refresh token. + description: |- + This is the second step of the OAuth 2.1 authorization code flow. + + For a private client, an application is able to get an access token for the shopper through the back channel (a trusted server) by passing in the client credentials and the authorization code retrieved from the `authorize` endpoint. + + For a guest user, get the shopper JWT access token and a refresh token. This is where a client appplication is able to get an access token for the guest user through the back channel (a trusted server) by passing in the client credentials. + + For a public client using PKCE, an application passes a PKCE `code_verifier` that matches the `code_challenge` that was used to `authorize` the customer along with the authorization code. + + When refreshing the access token with a private client ID and client secret, the refresh token is _not_ regenerated. However, when refreshing the access token with a public client ID, the refresh token is _always_ regenerated. The old refresh token is voided with every refresh call, so the refresh token on the client must be replaced to always store the new refresh token. + + See the Body section for required parameters, including `grant_type` and others that depend on the value of `grant_type`. + + **Important**: As of July 31, 2024**, SLAS requires the `channel_id` query parameter in token requests. + operationId: getAccessToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nRequired unless the grant type is `authorization_code_pkce`." + required: false + schema: + type: string + example: Basic + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TokenRequest' + required: true + responses: + '200': + description: the shopper or guest JWT access token and a refresh token were retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + getAccessTokenSuccess: + $ref: '#/components/examples/getAccessTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InvalidBasicAuth401: + $ref: '#/components/examples/InvalidBasicAuth401' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/session-bridge/token: + post: + summary: Get a shopper JWT access token for a registered customer using session bridging. + description: |- + For public client ID requests, you must set the grant_type to `session_bridge`. + + For private client_id and secret, you must set the grant_type to `client_credentials` along with a basic authorization header. + + **DEPRECATED** - As of January 31, 2024, SLAS no longer supports the SESB `dwsid` parameter for `guest` users for `session-bridge/token` calls. We recommended you transition to using a SESB `dwsgst` token. + + The `dwsid` is still needed for `registered` user `session-bridge/token` calls. + + **NOTE:** The registered customer Json Web Token (JWT) is available in B2C Commerce versions 25.4 and later. + operationId: getSessionBridgeAccessToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SessionBridgeTokenRequest' + required: true + responses: + '200': + description: The shopper JWT access token was retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + getSessionBridgeAccessTokenSuccess: + $ref: '#/components/examples/getSessionBridgeAccessTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '503': + description: Gateway error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + GatewayError503: + $ref: '#/components/examples/GatewayError503' + /organizations/{organizationId}/oauth2/trusted-system/token: + post: + summary: Get a shopper JWT access token for a registered customer whose credentials are stored using a third party. + description: |- + The SLAS client must have the `sfcc.ts_ext_on_behalf_of` scope to access this endpoint. + + + For trusted-system requests, you can use a basic authorization header that includes a SLAS private client ID and SLAS private client secret instead of the bearer token. + + + For trusted-system requests, you cannot use SLAS public client_ids. + operationId: getTrustedSystemAccessToken + x-slas-rate-limit: + excludedStatusCodes: + - '409' + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nRequired unless the grant type is `authorization_code_pkce`." + required: false + schema: + type: string + example: Basic + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TrustedSystemTokenRequest' + required: true + responses: + '200': + description: The shopper JWT access token was retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + getTrustedSystemAccessTokenSuccess: + $ref: '#/components/examples/getTrustedSystemAccessTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '409': + description: Conflict + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + ConflictingCalls409: + $ref: '#/components/examples/ConflictingCalls409' + '503': + description: Gateway error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + GatewayError503: + $ref: '#/components/examples/GatewayError503' + /organizations/{organizationId}/oauth2/trusted-agent/authorize: + get: + summary: Obtain a new agent on behalf of an authorization token for a registered customer. + description: This endpoint enables trusted agents (such as customer service representatives or merchants) to obtain authorization tokens that allow them to act on behalf of registered customers. This facilitates customer support scenarios where agents need secure access to customer accounts. + operationId: getTrustedAgentAuthorizationToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/client_id' + - $ref: '#/components/parameters/channel_id' + - $ref: '#/components/parameters/code_challenge' + - $ref: '#/components/parameters/login_id' + - $ref: '#/components/parameters/idp_origin' + - $ref: '#/components/parameters/redirect_uri' + - $ref: '#/components/parameters/response_type' + responses: + '303': + description: The new agent was obtained successfully. + headers: + Location: + description: Location header with the `redirect_uri` to Account Manager, which allows the agent to log in. + schema: + maxLength: 2048 + description: URL with redirect + example: https://account.demandware.com:443/dwsso/UI/Login?realm=/&goto=https://account.demandware.com:443/dwsso/oauth2/authorize?client_id=6739cb07-2f5f-4e16-a88a-8113a3cb5512&redirect_uri=https://stg.us1.shopper.cc.salesforce.com/api/v1/trusted-agent/callback" + type: string + content: + application/json: + schema: + type: string + examples: + getTrustedAgentAuthorizationTokenSuccess: {} + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/trusted-agent/token: + post: + summary: Get a shopper JWT access token for a registered customer using a trusted agent (merchant). + description: |- + If using a SLAS private client ID, you must also use an `_sfdc_client_auth` header. + + The value of the `_sfdc_client_auth` header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (`:`). For example, `privateClientId:privateClientsecret` becomes `cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ=` after Base64 encoding. + operationId: getTrustedAgentAccessToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/_sfdc_client_auth' + - name: Authorization + in: header + description: This is the `Bearer` token that is returned from Account Manager after the trusted agent on behalf of (TAOB) authorize call. + required: false + schema: + type: string + example: Bearer HQ8zQXpc0VVaXEdBdzasZQaCQDw + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TrustedAgentTokenRequest' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + getTrustedAgentAccessTokenSuccess: + $ref: '#/components/examples/getTrustedAgentAccessTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '503': + description: Gateway error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + GatewayError503: + $ref: '#/components/examples/GatewayError503' + /organizations/{organizationId}/oauth2/password/reset: + post: + summary: Request a reset password token. + description: This endpoint initiates the password reset process for a customer by requesting a password reset token. The token is delivered through the configured delivery mode (email, SMS, etc.) and can be used with the password/action endpoint to set a new password. + operationId: getPasswordResetToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PasswordActionRequest' + required: true + responses: + '200': + description: The reset password token was requested successfully. + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadMissingAccessOrRefreshToken400: + $ref: '#/components/examples/BadMissingAccessOrRefreshToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '412': + description: Precondition failure + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + DependentServiceUnavailable412: + $ref: '#/components/examples/DependentServiceUnavailable412' + /organizations/{organizationId}/oauth2/password/action: + post: + summary: Create a new password. + description: This endpoint allows a customer to set a new password using a valid password reset token. The customer must provide the token received from the password/reset endpoint along with the desired new password. + operationId: resetPassword + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`' + required: false + schema: + type: string + example: Basic + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PasswordActionVerifyRequest' + required: true + responses: + '200': + description: The password was created successfully. + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadParameters400: + $ref: '#/components/examples/BadParameters400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '503': + description: Gateway error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + GatewayError503: + $ref: '#/components/examples/GatewayError503' + /organizations/{organizationId}/oauth2/passwordless/token: + post: + summary: Issue a shopper token (JWT). + description: This endpoint issues a shopper JWT access token using a passwordless login token. It enables authentication flows where traditional username/password combinations are not required, supporting alternative authentication methods. + operationId: getPasswordLessAccessToken + x-slas-rate-limit: + excludedStatusCodes: [] + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`' + required: false + schema: + type: string + example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PasswordLessLoginTokenRequest' + required: true + responses: + '200': + description: The shopper token was issued successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + examples: + getPasswordLessAccessTokenSuccess: + $ref: '#/components/examples/getPasswordLessAccessTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '503': + description: Gateway error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + GatewayError503: + $ref: '#/components/examples/GatewayError503' + /organizations/{organizationId}/oauth2/revoke: + post: + summary: Invalidate a refresh token. + description: A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, and the refresh token to be revoked is required in the body. + operationId: revokeToken + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), like this: `clientId:clientSecret`' + required: true + schema: + type: string + example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TokenActionRequest' + examples: + TokenActionRequestBody: + $ref: '#/components/examples/TokenActionRequestBody' + required: true + responses: + '200': + description: The refresh token was revoked successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenActionRequest' + examples: + revokeTokenSuccess: + $ref: '#/components/examples/revokeTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingRefreshToken400: + $ref: '#/components/examples/BadOrMissingRefreshToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InvalidBasicAuth401: + $ref: '#/components/examples/InvalidBasicAuth401' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/introspect: + post: + summary: Return token properties. + description: A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, as well as an access token or refresh token. Use `token_type_hint` to help identify the token. + operationId: introspectToken + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/Authorization' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TokenActionRequest' + examples: + TokenActionRequestBody: + $ref: '#/components/examples/TokenActionRequestBody' + required: true + responses: + '200': + description: Token properties returned successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenActionRequest' + examples: + introspectTokenSuccess: + $ref: '#/components/examples/introspectTokenSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadMissingAccessOrRefreshToken400: + $ref: '#/components/examples/BadMissingAccessOrRefreshToken400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InvalidBasicAuth401: + $ref: '#/components/examples/InvalidBasicAuth401' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/userinfo: + get: + summary: Return a JSON listing of claims about the currently authenticated user. + description: This endpoint returns identity information about the authenticated user in the form of OpenID Connect claims. It requires a valid access token and returns information such as user ID, name, email, and other identity attributes based on the scopes granted during authentication. + operationId: getUserInfo + parameters: + - $ref: '#/components/parameters/organizationId' + - name: channel_id + in: query + description: Used when getting user information for a SFCC login. For an B2C Commerce customer, this is angalous to the site ID. Required when getting user information for an B2C Commerce customer. + required: false + example: RefArch + schema: + example: RefArch + maxLength: 100 + type: string + - name: Authorization + in: header + description: SLAS Access Token + required: true + schema: + type: string + example: Bearer eyJ2ZXIiOiIxLjAiLCJraWQiOiI0ZTQyNTFkOS0zM2Y2LTRjMTMtYjZmZC1mOWJkNTJmYTZhNDciLCJ0eXAiOiJqd3QiLCJjbHYiOiJKMi4xLjAiLCJhbGciOiJFUzI1NiJ9.eyJhdXQiOiJHVUlEIiwic2NwIjoic2ZjYy5wcm9kdWN0cy5ybyBzZmNjLmNhdGFsb2dzLnJvIHNmY2Muc2hvcHBlci5ydyIsInN1YiI6ImNjLXNsYXM6OnNsc2FfZGV2OjpzY2lkOjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3Yjo6dXNpZDoxY2E3OWZiNi0xYjIyLTRmOWItOGJiNi05YmU5NWNjMjA4NjMiLCJjdHgiOiJzbGFzLm5vdF9mb3JfZXh0ZXJuYWxfdXNlIiwiaXNzIjoic2xhcy9kZXYvc2xzYV9kZXYiLCJpc3QiOjEsImF1ZCI6ImNvbW1lcmNlY2xvdWQvZGV2L3Nsc2FfZGV2IiwibmJmIjoxNTk0NzY0MDgwLCJzdHkiOiJVc2VyIiwiaXNiIjoidWlkbzpzbGFzOjp1cG46R3Vlc3Q6OnVpZG46R3Vlc3QgVXNlciIsImV4cCI6MTU5NDc2NTkxMCwiaWF0IjoxNTk0NzY0MTEwLCJqdGkiOiJDMkMxNjM0NTE0NTEwLTE3MTQzMTg2NzY0MjcwNTcyNjQ2NTYxMzgifQ.UVYAsWXCn3hoUPy8vLlc7O96RZEHD3N3ZgdNH-ZVvJ1G-R6uJ2VPrYvwKmYXF41Ujm2bo83AYOHVqEEEPT8Kgw + responses: + '200': + description: Claims returned successfully. + content: + application/json: + schema: + type: string + examples: + getUserInfoSuccess: + $ref: '#/components/examples/getUserInfoSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingAccessToken400: + $ref: '#/components/examples/BadOrMissingAccessToken400' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/.well-known/openid-configuration: + get: + summary: | + Return a JSON listing of the OpenID/OAuth endpoints, supported scopes and claims, public keys used to sign the tokens, and other details. + + For performance purposes, the `/.well-known/openid-configuration` endpoint is rate limited to 25 call per minute. + description: This endpoint provides OpenID Connect discovery information in a standardized format. It allows clients to programmatically discover SLAS capabilities, including available endpoints, supported authentication flows, token signing algorithms, and other configuration details. This information helps clients integrate with the authentication service with minimal manual configuration. + operationId: getWellknownOpenidConfiguration + parameters: + - $ref: '#/components/parameters/organizationId' + responses: + '200': + description: The JSON listing information was returned successfully. + content: + application/json: + schema: + type: string + examples: + getWellknownOpenidConfigurationSuccess: + $ref: '#/components/examples/getWellknownOpenidConfigurationSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + MalformedTenantId400: + $ref: '#/components/examples/MalformedTenantId400' + '500': + description: Internal server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' + /organizations/{organizationId}/oauth2/jwks: + get: + summary: Retrieve JWKS keys. + description: | + The `/jwks` endpoint provides a JSON Web Key Set (JWKS) that includes current, past, and future public keys. These keys allow clients to validate the Shopper JSON Web Token (JWT) issued by SLAS, ensuring that no tampering with the token has occurred. Every SLAS JWT that is passed into SLAS, SCAPI, or OCAPI is always validated and is rejected if the signature validation does not match. + + To optimize performance, the `/jwks` endpoint is limited to 25 calls per minute, so we recommended caching the JWKS keys and refresh them only when necessary, instead of making frequent requests. Typically, the JWKs endpoint can be used once per DAY. + + For additional information on using JWKS, see https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-validate-jwt-with-jwks.html. + operationId: getJwksUri + parameters: + - $ref: '#/components/parameters/organizationId' + responses: + '200': + description: The response body containing the JWKS keys was retrieved successfully. + content: + application/json: + schema: + type: object + examples: + getJwksSuccess: + $ref: '#/components/examples/getJwksSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + getJwksUri400: + $ref: '#/components/examples/MalformedTenantId400' + '500': + description: Internal Server Error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + InternalServerError500: + $ref: '#/components/examples/InternalServerError500' +components: + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + ResponseType: + type: string + description: Response Type + enum: + - code + example: code + LoginRequest: + type: object + required: + - redirect_uri + - channel_id + description: |- + Supports multiple custom parameters to invoke hooks in B2C Commerce API. Multiple custom parameters can be added. Use the `c_` prefix to distinguish custom query parameters from standard query parameters, for example: c_captcha=true + If there is a validation error, a 400 Bad_Request with the details of the error is thrown. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + client_id: + description: SLAS client ID. Required when the grant type is `authorization_code_pkce`. + type: string + maxLength: 40 + example: z99ec276-cg53-4g94-cf72-76f300c6778zc + response_type: + description: Must be `code`. Indicates that the client wants an authorization code (when the grant type is `authorization_code`). + allOf: + - $ref: '#/components/schemas/ResponseType' + redirect_uri: + description: "The URI to which the server redirects the browser after the user grants the authorization. The URI must be registered with the SLAS client. A variety of URI formats and wildcards for host are supported, but app links like airbnb:// or fb:// are not. Examples of supported URIs: \n\nExamples of supported URIs:\n - `http://localhost:3000/callback`\n - `https://example.com/callback`\n - `com.example.app:redirect_uri_path`\n - ` *.subdomain.topleveldomain.com`\n" + maxLength: 256 + type: string + example: http://localhost:3000/callback + state: + description: Value to be sent by the client to determine the state between the authorization request and the server response. Optional, but strongly recommended. + type: string + maxLength: 512 + example: client-state + scope: + description: Scopes to limit an application's access to a user's account. + type: string + maxLength: 256 + example: openid|offline_access|email + usid: + description: The unique shopper ID. + type: string + maxLength: 128 + example: 18cda486-fe32-4e27-888b-6e4f89938e67 + channel_id: + description: The channel that the request is for. For a B2C Commerce request, this is angalous to the site ID. + type: string + maxLength: 100 + example: RefArch + code_challenge: + description: |- + PKCE code verifier. Created by the client calling the `login` endpoint. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + + The `code_challenge` is optional when using a private client id for the token request. + type: string + minLength: 43 + maxLength: 128 + example: krc5G3_5lRUcXDUzFZQ88oJA_-ZmlHWkyGsgOrSLEWg + Oauth2ErrorResponse: + required: + - error + type: object + properties: + error: + type: string + example: invalid_client + error_uri: + type: string + example: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/oauth-service + error_description: + type: string + example: Missing access token or refresh token. + PasswordlessLoginRequest: + required: + - channel_id + - mode + - user_id + type: object + properties: + user_id: + maxLength: 128 + type: string + description: User ID for logging in. + example: samantha.sampleson@example.com + mode: + type: string + description: Password Action delivery modes + enum: + - callback + - sms + locale: + type: string + description: The locale of the template. Not needed for the `callback` mode + example: en-us + usid: + type: string + description: The shopper's unique identifier, if known. If not provided, a new USID is generated. + example: 18cda486-fe32-4e27-888b-6e4f89938e67 + channel_id: + maxLength: 100 + type: string + description: The channel (B2C Commerce site) that the user is associated with. + example: RefArch + callback_uri: + type: string + description: | + The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. + + Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url. + example: http://localhost:9050/passwordless/login/callback + description: A request for a passwordless login token. This is only available for resgistered users using B2C Commerce. + TokenType: + type: string + description: Token Type + enum: + - Bearer + example: Bearer + TokenResponse: + required: + - access_token + - customer_id + - enc_user_id + - expires_in + - id_token + - idp_access_token + - refresh_token + - refresh_token_expires_in + - token_type + - usid + type: object + properties: + access_token: + type: string + description: |- + Short term shopper JWT that can be used to access Shopper APIs. Valid for 30 minutes. + + A trusted agent shopper JWT is valid for 15 min. + example: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: + type: string + description: User ID token. Valid for 30 minutes. + example: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: + type: string + description: "Long term refresh token that can be used to refresh an access token. Valid for 30 days. \n\nThe refresh_token will not be returned for trusted agents JWTs. A JWT for trusted agents expires after 15 minutes and is not refreshable. When expired, then app must restart the authorization flow and make another request to the /trusted-agent/authorize endpoint." + example: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: + type: integer + description: Remaining access token expiry time, in seconds. + example: 900 + refresh_token_expires_in: + type: number + description: Remaining refresh token expiry time, in seconds. + example: 2592000 + token_type: + $ref: '#/components/schemas/TokenType' + usid: + type: string + description: The unique shopper ID. Returned when using the `client_credentials` grant type. + example: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: + type: string + description: Customer's ID + example: 1000005 + enc_user_id: + type: string + description: MD5 Hashed B2C Commerce user ID in uppercase. + example: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: + maxLength: 8192 + type: string + description: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS. + example: eyJraWQiOiJYS21HbHVuSm0zSlBTMHNjQXZXV19XQlYtRi1wMkxLSDR0V05UMHVVSjVJIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjFMY0xxTWhqM2t0N1FKeFhxQ0VtdGZOOVV2eUcweW1meDFxZG9BdzF1NWMub2FyeXhveHF0QUtxaVFMbkM1ZDYiLCJpc3MiOiJodHRwczovL2Rldi05NTY1MjM2Lm9rdGEuY29tIiwiYXVkIjoiaHR0cHM6Ly9kZXYtOTU2NTIzNi5va3RhLmNvbSIsInN1YiI6Im9rdGEuc2xhcy50ZXN0IiwiaWF0IjoxNjc5Njk4MzA4LCJleHAiOjE2Nzk3MDE5MDgsImNpZCI6IjBvYTJrNXNma0JXZ0poTEVHNWQ2IiwidWlkIjoiMDB1MzhxZGpuU2NMT0IxbXE1ZDYiLCJzY3AiOlsib2ZmbGluZV9hY2Nlc3MiLCJvcGVuaWQiLCJlbWFpbCIsInByb2ZpbGUiXSwiYXV0aF90aW1lIjoxNjc5Njk4MzA2fQ.FDbGsnZGwTYVKGSlAo6jqcjG2HQ_BqQKRk72M5h69DRHyOM4wngsEELN_Wtgj3E77sP7IOmIKjiK5SFP17ADMbKZptVr2pqaMVF3PuU3Cbl_MgXZValfT-z12jHRq9sHMfsdTjY2RnvG44ZDFKc2no8mdL6IJ1MfCaZT5Tql5Ktq_UgudaWFsYqad3ETcmp5Y8ivz1bFnqud0sO9D9JzYOtfd9h71JKcsSC2rXc_Si-INPKKaGl8CDgaLXxu_Am9twJpUenHLpy0BerhcVvdFz7_611E53xOT_Esrc1pe-XAZtlYsJFnhxTBDT342ukiSWk2m6juVappv1GsRfUf2g + GrantType: + type: string + description: Grant Type + enum: + - authorization_code + - refresh_token + - client_credentials + - authorization_code_pkce + - session_bridge + example: authorization_code + TokenRequest: + required: + - grant_type + type: object + properties: + refresh_token: + maxLength: 256 + type: string + description: The long-term token used to refresh the short term access token. Required only with a grant type of `refresh_token`. + code: + maxLength: 256 + type: string + description: Authorization code from the OAuth 2.1 service received in the front channel that is used to get access tokens and refresh tokens. Required with a grant type of `authorization_code` and `session_bridge`. + example: M0t1K0pyoFKhBpUZnuUYO07xf8iYyMJrAc7h31h_ra8.gglPClJHsofqdTm_yPe5n6m2yCXzFmD8qICwIEjQGVA + usid: + type: string + description: The shopper's unique identifier, if known. If not provided, a new USID is generated. + example: 54ad2c5a-91f0-44ab-817c-73d6b86872d9 + grant_type: + $ref: '#/components/schemas/GrantType' + redirect_uri: + maxLength: 256 + type: string + description: "The redirect URI that was used when getting the authorization code. A variety of URI formats and wildcards for host are supported, but app links like `airbnb://` or `fb://` are not. \n\nExamples of supported URIs:\n - `http://localhost:3000/callback`\n - `https://example.com/callback`\n - `com.example.app:redirect_uri_path`\n - ` *.subdomain.topleveldomain.com`\n" + example: http://localhost:3000/callback + code_verifier: + maxLength: 128 + type: string + description: |- + PKCE code verifier. Created by the client calling the `login` endpoint. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + + The `code_verifier` is optional when using a private client id for the token request. + client_id: + maxLength: 40 + type: string + description: The SLAS client ID. Required when the grant type is `authorization_code_pkce`. + example: z99ec276-cg53-4g94-cf72-76f300c6778zc + channel_id: + maxLength: 100 + type: string + description: |- + The channel (B2C Commerce site) that the user is associated with. + + **Important: We strongly recommended using the channel_id query parameter because it will be required in the future. + + **NOTE - As of July 31, 2024**, SLAS will be requiring the `channel_id` query parameter in token requests. + example: RefArch + dnt: + type: string + description: "This is an optional parameter to set `Do Not Track` for the session. \n\nSLAS is making this available, but will not be used by B2C Commerce until after the 24.4 release.\n\nValues are:\n * `false`\n * `true`\n\nIf not added the `dnt` value will default to `false`." + example: 'true' + SessionBridgeTokenRequest: + required: + - channel_id + - client_id + - code + - code_verifier + - dwsid + - grant_type + - login_id + type: object + properties: + code: + maxLength: 256 + type: string + description: Authorization code returned from session bridge authorization received in the front channel that is used to get session bridge access tokens and refresh tokens. Required with a grant type of `session_bridge`. The SLAS client must have the `sfcc.session_bridge` scope to request a session bridge token. + example: M0t1K0pyoFKhBpUZnuUYO07xf8iYyMJrAc7h31h_ra8.gglPClJHsofqdTm_yPe5n6m2yCXzFmD8qICwIEjQGVA + client_id: + maxLength: 40 + type: string + description: The SLAS public client ID for use with PKCE requests. This is a required parameter when using a public client. + example: 6c388ebd-6843-4863-aef9-781382c9e8cd + channel_id: + maxLength: 100 + type: string + description: The channel (B2C Commerce site) that the user is associated with. + example: RefArch + code_verifier: + type: string + description: |- + PKCE code verifier. Created by the caller. This is a required parameter when using a public client. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo + dwsid: + type: string + description: "Cookie passed back from the '/authorize' endpoint call for session bridge. This parameter is optional and not needed if using the `dwsgst` parameter.\n\n**DEPRECATED** - As of January 31, 2024, SLAS will no longer support the SESB `dwsid` parameter for `guest` users for `session-bridge/token` calls. It is recommended to transition over to using a SESB `dwsgst` token. \n\nThe `dwsid` will still be needed for `registered` user session-bridge/token calls." + example: pATvWUO3KSdt-Kmcy-8-RsxKnoO4BMDwoec7ACVlW6tZNnhaOL7gt7mHqL-h7QYn5TyE61z0DeSMCqxngsWeHw== + grant_type: + type: string + description: Grant Type + enum: + - authorization_code + - refresh_token + - client_credentials + - authorization_code_pkce + - session_bridge + login_id: + maxLength: 128 + type: string + description: The ID of the shopper for session bridge access. If requesting a token for a guest user set login_id to `guest`. + example: jack.shopper@example.com + dwsgst: + type: string + description: Signed guest Json Web Token (JWT) that was obtained from B2C Commerce. This parameter is optional and not needed if using the guest `dwsid` parameter. + example: eyJraWQiOiIxNjgxNTU5OTkxNzkwIiwiYWxnIjoiRVMyNTYifQ.eyJ0ZW5hbnRJZCI6IkJHVk5fUzA1IiwiZHdzaWQiOiJuWHRhckdNU2ZxbnBaSUNJUGFKTHJSWGZ6b2lWYXBBU3BBTFNfeFdUMV9QZjRBWDA0N1lMQ1dSUFByM1BiSEl4d2RaODFiVGZoM3M1Wlgza2NhOG0zZz09IiwiY3VzdG9tZXJJZCI6ImJjQXI5N2NuMm1ZdmhjMGhqTGsxYmFXSzRqIiwiaWF0IjoxNjg1MTI4NjM2LCJleHAiOjE2ODUxMjkyMzksImlzcyI6ImNvbW1lcmNlY2xvdWQvcHJvZHVjdGlvbi9iZ3ZuczA1IiwidmVycyI6IjEiLCJ0eXBlIjoiRyJ9.BGY4kyOXbQSzZxubE3BrSzhf8ByehGUfJa7_J2XRQ93xY4dAOhF_xbXcHmBaEUBUzSny-Cf0pATzEaSsKpTxkg + dwsrst: + type: string + description: "Signed registered customer Json Web Token (JWT) that was obtained from B2C Commerce. This parameter is optional and not needed if using the registered user `dwsid` parameter. \n\n**NOTE:** The registered customer Json Web Token (JWT) will be available in ECOM versions 25.4 and higher." + example: eyJraWQiOiIxNjMwOTM5MzAyODE0IiwiYWxnIjoiRVMyNTYifQ.eyJmbmFtZSI6Ikx1a2UiLCJkd3NpZCI6IkdkWWpSQjViZGVpU0xkb3Ixdy15QzRTZ1l3dDJHYl9Ec255OG5nZ2I3c0VDajVMWndnT0ZJWTZsa21sNlVRMXZoazl1SDVJUGxMek5rZTJhNTV2YU9nPT0iLCJ2ZXJzIjoiMiIsImlzcyI6InNsYXMvZGV2L2Jndm5fc3RnIiwidHlwZSI6IlIiLCJsbmFtZSI6IlNreXdhbGtlciIsInJjdXN0b21lcklkIjoiOGgzNHh6dDQxOTVpOHA1MmE2ejAzczIxNDgiLCJwaG9uZSI6bnVsbCwidGVuYW50SWQiOiJiZ3ZuX3N0ZyIsImN1c3RvbWVySWQiOiI0OHB1eXA4dTdmMmM5NHgzMTUxeDA4bGEweiIsImV4cCI6MTczNTE1NDQ4NiwiaWF0IjoxNzMyNTYyNDg2LCJlbWFpbCI6Imx1a2Uuc2t5d2Fsa2VyQG5hYm9vLm9yZyJ9.Q2nF0wuEl1X7aVZ-ycCwxDjjmq5toJred5AEDqKXXjj89BY_0HIQoAEMbx9UDqOmhjdBkxN4idVzYVoXcl0c2A + usid: + type: string + description: The unique shopper ID. Returned when from session bridge authorization. + example: 18cda486-fe32-4e27-888b-6e4f89938e67 + dnt: + type: string + description: "This is an optional parameter to set `Do Not Track` for the session. \n\nSLAS is making this available, but will not be used by B2C Commerce until after the 24.4 release.\n\nValues are:\n * `false`\n * `true`\n\nIf not added the `dnt` value will default to `false`." + example: 'true' + TrustedSystemTokenRequest: + required: + - channel_id + - client_id + - grant_type + - hint + - idp_origin + - login_id + type: object + properties: + usid: + type: string + description: The shopper's unique identifier, if known. If not provided, a new USID is generated. + example: 54ad2c5a-91f0-44ab-817c-73d6b86872d9 + grant_type: + type: string + description: Grant Type + enum: + - authorization_code + - refresh_token + - client_credentials + - authorization_code_pkce + - session_bridge + hint: + type: string + description: Type of system used for Trusted System On Behalf of requests. + enum: + - ts_ext_on_behalf_of + login_id: + maxLength: 128 + type: string + description: "The ID used by the shopper for trusted system access. \n\nIf set to `guest`, a token is returned for a guest user." + example: samantha.sampleson@example.com + idp_origin: + type: string + description: IDPs that work with SLAS. Use `ecom` when using B2C Commerce is the identity provider. + enum: + - apple + - auth0 + - azure + - azure_adb2c + - cognito + - default + - ecom + - facebook + - forgerock + - gigya + - gigya_socialize + - google + - okta + - ping + - salesforce + client_id: + maxLength: 40 + type: string + description: The SLAS public client ID for use with trusted-system requests. + example: 6c388ebd-6843-4863-aef9-781382c9e8cd + channel_id: + maxLength: 100 + type: string + description: The channel (ECOM site) that the user is associated with. + example: RefArch + email_id: + maxLength: 128 + type: string + description: The email address for the shopper that is used for trusted-system requests. If not provided, `login_id` is used instead. + example: samantha.sampleson@example.com + dnt: + type: string + description: |- + This is an optional parameter to set `Do Not Track` for the session. + + SLAS is making this available, but will not be used by B2C Commerce until after the 24.4 release. + + Values are: + * `false` + * `true` + + If not added the `dnt` value will default to `false`. + + Note: The default value for `dnt` is set to `false` for SLAS token requests except for Trusted Agent token request. For Trusted Agent token requests the default value for `dnt` is `true`. + example: 'true' + description: A request for an access token on behalf of a registered user whose credentials are stored using a third party system. + TrustedAgentTokenRequest: + required: + - channel_id + - client_id + - code_verifier + - grant_type + - idp_origin + - login_id + type: object + properties: + agent_id: + maxLength: 40 + type: string + description: |- + The ID of the merchant. If passed in, the `agent_id` will be validated using the SUB claim in the response from Account Manager. + + This is an optional parameter unless the request is for a Trusted Agent on Behalf then `agent_id` is required. + example: merchant@example.com + client_id: + maxLength: 40 + type: string + description: |- + The SLAS public client ID or SLAS private client ID for use with trusted-system requests. + + The `client_id` is not needed if a using a SLAS private `client_id` and the `_sfdc_client_auth` header. + example: 6c388ebd-6843-4863-aef9-781382c9e8cd + channel_id: + maxLength: 100 + type: string + description: The channel (B2C Commerce site) that the user is associated with. + example: RefArch + code_verifier: + type: string + description: |- + PKCE code verifier. Created by the caller. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + + The `code_verifier` is not needed if a using a SLAS private `client_id` and the `_sfdc_client_auth` header. + example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo + grant_type: + type: string + description: Grant Type + enum: + - authorization_code + - refresh_token + - client_credentials + - authorization_code_pkce + - session_bridge + login_id: + maxLength: 128 + type: string + description: |- + The ID is the shopper for trusted agent access. + + For TAOB Guest the `login_id` must be set to `Guest`. + example: jack.shopper@example.com + idp_origin: + maxLength: 16 + type: string + description: "The IDP that the user is associated with. \n\nFor TAOB Guest the `idp_origin` parameter should be `slas`. If set to any other IDP origin a 400 Bad Request will be returned." + example: ecom + usid: + type: string + description: The shopper's unique identifier, if known. If not provided, a new USID is generated. + example: 54ad2c5a-91f0-44ab-817c-73d6b86872d9 + dnt: + type: string + description: "This is an optional parameter to set `Do Not Track` for the session. \n\nSLAS is making this available, but will not be used by B2C Commerce until after the 24.4 release.\n\nValues are:\n * `false`\n * `true`\n\n If not added the `dnt` value will default to `true`\n\n Note: The default value for `dnt` is set to `true` for all TAOB flows. This is opposite from other SLAS token requests." + example: 'true' + state: + type: string + description: "This is an optional parameter to set state for the trusted agent session. \n\nIf the `state` parameter is used it will be validated and a 400 Bad Request will be returned if missing or invalid.\n\nFor TAOB Guest you must pass the `state` parameter to transfer the state from the TAOB Guest authorization call to the token call. \nThe `state` parameter value is returned with the authorization code in the response url from the TAOB guest authorization call, \nfor example: `.../taob/callback?code=HETXpvg5LKBNIHjDTWkRrf2MLVU&state=taob.gst.7bc7fb7f-e646-44fd-bc73-dfd5c3c9019b`.\n\nYou would use `taob.gst.7bc7fb7f-e646-44fd-bc73-dfd5c3c9019b` for the `state` value in the TAOB request." + example: taobgst.3ebdcbb6-ef87-4f41-8173-67728636e513 + PasswordActionRequest: + required: + - channel_id + - mode + - user_id + type: object + properties: + user_id: + maxLength: 128 + type: string + description: User ID for logging in. This is the id that is used to log into SFCC. + example: samantha.sampleson@example.com + mode: + type: string + description: Password Action delivery modes + enum: + - callback + - sms + channel_id: + type: string + description: The channel (B2C Commerce site) that the user is associated with. + example: RefArch + locale: + type: string + description: The locale of the template. + example: en-us + client_id: + maxLength: 40 + type: string + description: |- + -| The public client ID. Requires setting `grant_type` to `passwordless_login_pkce`. + When using the `hint` query parameter either a public or private client ID can be used. + example: 6b200ebd-7843-4073-aef9-792482c9e1de + code_challenge: + maxLength: 128 + minLength: 43 + type: string + description: "PKCE code challenge. Created by the client.\n\nThe `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash.\n\nThe `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. \n\n Requires setting `grant_type` to `passwordless_login_pkce`" + example: Nx_Vf0-0W6SpyRVBVTbl8VSu2OE4yD2fZNExW6N3V_Q + callback_uri: + type: string + description: | + The callback uri. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. + + Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url. + example: http://localhost:9050/password/reset/callback + idp_name: + type: string + description: The name of the 3rd party identity provider for the user ID + example: okta + hint: + type: string + description: Adding a `hint` query parameter with a value of `cross_device` will remove the need to have the code_challenge for password reset request. If the `hint` query parameter is used it must also be used in the password reset request. + example: cross_device + description: A request for a password reset token. This is only available for resgistered users using B2C Commerce. + PasswordActionVerifyRequest: + required: + - channel_id + - client_id + - code_verifier + - pwd_action_token + type: object + properties: + client_id: + maxLength: 40 + type: string + description: |- + -| The public client ID. + When using the `hint` query parameter either a public or private client ID can be used. + example: 6b200ebd-7843-4073-aef9-792482c9e1de + pwd_action_token: + type: string + description: Password action token that was returned from the `/password/reset` endpoint. + example: QJO3CA7QTPVCQ3OMROXF2MTDDED3EEC3 + code_verifier: + type: string + description: |- + PKCE code verifier. Created by the client. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo + new_password: + type: string + description: The new password to set for the shopper associated with the password action token. + example: new_password + channel_id: + maxLength: 100 + type: string + description: The channel that the request is for. For a B2C Commerce request, this is angalous to the site ID. + example: RefArch + hint: + type: string + description: Adding a `hint` query parameter with a value of `cross_device` will remove the need to have the code_verifier for password reset request. If the `hint` query parameter is used it must also have been used in the password action request. + example: cross_device + description: A request for creating a new password using the password action token. + PasswordLessLoginTokenRequest: + required: + - grant_type + - hint + - pwdless_login_token + type: object + properties: + grant_type: + type: string + description: Grant Type + enum: + - authorization_code + - refresh_token + - client_credentials + - authorization_code_pkce + - session_bridge + hint: + type: string + description: Passwordless hint. Use `pwdless_login`. + example: pwdless_login + pwdless_login_token: + type: string + description: Passwordless login token that was created from the user ID. + example: QJO3CA7QTPVCQ3OMROXF2MTDDED3EEC3 + client_id: + maxLength: 40 + type: string + description: The public client ID. + example: 6b200ebd-7843-4073-aef9-792482c9e1de + code_verifier: + type: string + description: |- + PKCE code verifier. Created by the client. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo + description: A request for an access token using a passwordless token. + TokenActionRequest: + required: + - token + type: object + properties: + token: + type: string + description: Token to inspect or revoke. + example: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + token_type_hint: + type: string + description: Token Type Hint + enum: + - access_token + - refresh_token + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + client_id: + name: client_id + in: query + description: The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required. + required: true + schema: + maxLength: 40 + type: string + refresh_token: + name: refresh_token + in: query + description: Refresh token that was given during the access token request. + required: true + schema: + type: string + hint: + name: hint + in: query + description: |- + Name of an identity provider (IDP) to optionally redirect to, thereby skipping the IDP selection step. + + To use a public client, set `hint` to `guest` and use a public client ID to get an authorization code. If no `hint` is provided, the preferred IDP of the tenant is used by default. + + For session bridge authorization the `hint` should be set to `sb-user` for a registered customer and to `sb-guest` for a guest. For session bridge authorization the SLAS Client `sfcc.session_bridge` scope. + required: false + schema: + maxLength: 256 + type: string + redirect_uri: + name: redirect_uri + in: query + description: | + The redirect for Account Manager to redirect to. A variety of URI formats and wildcard for host are supported, but app links like `airbnb://` or `fb://` are not. Examples of supported URIs: + - `http://localhost:3000/callback` + - `https://example.com/callback` + - `com.example.app:redirect_uri_path` + - ` *.subdomain.topleveldomain.com` + required: true + schema: + maxLength: 256 + type: string + response_type: + name: response_type + in: query + description: Must be `code`. Indicates that the caller wants an authorization code. + required: true + schema: + type: string + description: Response Type + enum: + - code + scope: + name: scope + in: query + required: false + schema: + maxLength: 256 + type: string + enum: + - openid + - offline_access + - email + state: + name: state + in: query + description: Value to send the client to determine the state between the authorization request and the server response. Optional, but strongly recommended. + required: false + schema: + maxLength: 512 + type: string + usid: + name: usid + in: query + description: A unique shopper identifier (USID). If not provided, a new USID is generated. + required: false + schema: + maxLength: 256 + type: string + code_challenge: + name: code_challenge + in: query + description: |- + PKCE code challenge. Created by the caller. + + The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. + + The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. + + The *`code_challenge` and 'code_verifier'* are required if a using SLAS public `client_id`. + required: false + schema: + maxLength: 128 + minLength: 43 + type: string + ui_locales: + name: ui_locales + in: query + description: "End-User's preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For example, the value `fr-CA fr en` represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). \n\nIn most cases the IDP supports one language tag and has a default language set on the server. SLAS will support the space-separated list and pass them to the IDP." + required: false + schema: + maxLength: 256 + type: string + channel_id: + name: channel_id + in: query + description: The channel (B2C Commerce site) that the user is associated with. + example: RefArch + required: true + schema: + maxLength: 100 + type: string + example: RefArch + login_id: + name: login_id + in: query + description: |- + The ID of the shopper for trusted agent access. + + For TAOB Guest the `login_id` must be set to `Guest`. + required: true + schema: + maxLength: 128 + type: string + idp_origin: + name: idp_origin + in: query + description: |- + The IDP that the shopper is associated with. + + For TAOB Guest the `idp_origin` must be set to `slas`. This is standard for SLAS Guest requests. If any other `idp_origin` value is used, SLAS returns a bad request. + required: true + schema: + maxLength: 16 + type: string + _sfdc_client_auth: + name: _sfdc_client_auth + in: header + description: |- + "Base64-encoded string of client credentials. The string is composed of a client ID and client secret, separated by a colon (`:`), like this: `clientId:clientSecret`. (Do not add the string `"Basic"`.) + + The `_sfdc_client_auth` header is only required when using a SLAS private client ID." + required: false + schema: + type: string + Authorization: + name: Authorization + in: header + description: Base64 string for HTTP Basic authentication. + required: true + schema: + type: string + examples: + authenticateCustomerSuccess: + value: + location: https://:/callback?usid=d11392ae-cbf0-4296-9723-8f9f0e49fd73&state=1728422547223&scope=openid%20offline_access&code=561X8NOKvoRezq2aucazwwkrevUoIP37YRTfsRHX8ow + BadOrMissingClientId400: + value: + error: invalid_request + error_description: Bad or missing client_id. + InvalidBasicAuth401: + value: + error: invalid_client + error_description: Basic Authorization failed. + ConflictingCalls409: + value: + error: conflict + error_description: The same loginId and tenantId tried to login twice within 1 second. + InternalServerError500: + value: + error: server_error + error_description: The server has encountered a situation that it doesn't know how to handle. + BadOrMissingAccessToken400: + value: + error: invalid_request + error_description: Bad or missing access token. + InvalidClient401: + value: + error: invalid_client + error_description: Authorization failed. + DependentServiceUnavailable412: + value: + error: precondition_failure + error_description: Dependent service is not available. + logoutCustomerSuccess: + value: + access_token: '' + id_token: 'null' + refresh_token: EnL9U2f3-WiVPwL60CFBI21UY_oxWAwX5JkgO-X12Vs + expires_in: 0 + refresh_token_expires_in: 0 + token_type: Bearer + usid: 'null' + customer_id: 'null' + enc_user_id: 'null' + idp_access_token: '' + authorizeCustomerSuccess: + value: + authorizationCode: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiS + usid: 156c4e69-e89b-406b-a4b7-576980bb234e + getAccessTokenSuccess: + value: + access_token: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: 900 + refresh_token_expires_in: 7776000 + token_type: Bearer + usid: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: '1000005' + enc_user_id: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: eyJraWQiOiJYS21HbHVuSm0zSlBTMHNjQXZXV19XQlYtRi1wMkxLSDR0V05UMHVVSjVJIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjFMY0xxTWhqM2t0N1FKeFhxQ0VtdGZOOVV2eUcweW1meDFxZG9BdzF1NWMub2FyeXhveHF0QUtxaVFMbkM1ZDYiLCJpc3MiOiJodHRwczovL2Rldi05NTY1MjM2Lm9rdGEuY29tIiwiYXVkIjoiaHR0cHM6Ly9kZXYtOTU2NTIzNi5va3RhLmNvbSIsInN1YiI6Im9rdGEuc2xhcy50ZXN0IiwiaWF0IjoxNjc5Njk4MzA4LCJleHAiOjE2Nzk3MDE5MDgsImNpZCI6IjBvYTJrNXNma0JXZ0poTEVHNWQ2IiwidWlkIjoiMDB1MzhxZGpuU2NMT0IxbXE1ZDYiLCJzY3AiOlsib2ZmbGluZV9hY2Nlc3MiLCJvcGVuaWQiLCJlbWFpbCIsInByb2ZpbGUiXSwiYXV0aF90aW1lIjoxNjc5Njk4MzA2fQ.FDbGsnZGwTYVKGSlAo6jqcjG2HQ_BqQKRk72M5h69DRHyOM4wngsEELN_Wtgj3E77sP7IOmIKjiK5SFP17ADMbKZptVr2pqaMVF3PuU3Cbl_MgXZValfT-z12jHRq9sHMfsdTjY2RnvG44ZDFKc2no8mdL6IJ1MfCaZT5Tql5Ktq_UgudaWFsYqad3ETcmp5Y8ivz1bFnqud0sO9D9JzYOtfd9h71JKcsSC2rXc_Si-INPKKaGl8CDgaLXxu_Am9twJpUenHLpy0BerhcVvdFz7_611E53xOT_Esrc1pe-XAZtlYsJFnhxTBDT342ukiSWk2m6juVappv1GsRfUf2g + getSessionBridgeAccessTokenSuccess: + value: + access_token: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: 900 + refresh_token_expires_in: 7776000 + token_type: Bearer + usid: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: '1000005' + enc_user_id: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: '' + GatewayError503: + value: + error: gateway_server_error + error_description: A service that the server relies on is down or is having difficulty. + getTrustedSystemAccessTokenSuccess: + value: + access_token: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: 900 + refresh_token_expires_in: 7776000 + token_type: Bearer + usid: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: '1000005' + enc_user_id: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: '' + getTrustedAgentAccessTokenSuccess: + value: + access_token: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: 900 + token_type: Bearer + refresh_token_expires_in: 7776000 + usid: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: '1000005' + enc_user_id: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: '' + BadMissingAccessOrRefreshToken400: + value: + error: invalid_request + error_description: Bad or missing access token or refresh token + BadParameters400: + value: + error: invalid_request + error_description: Bad or missing request parameters. + getPasswordLessAccessTokenSuccess: + value: + access_token: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiSjIuMS4wIiwiYWxnIjoiRVMyNTYifQ.eyJhdWQiOiJjb3JlL2Rldi9idGluZ2V5bHRtMiIsImF1dCI6IkdVSUQiLCJzdWIiOiJ1c2lkOjo1NGFkMmM1YS05MWYwLTQ0YWItODE3Yy03M2Q2Yjg2ODcyZDk6OnVwbjpndWVzdCIsIm5iZiI6MTU4Mjg0NTYyNCwiY3R4Ijoic2ZkYy5jb21tZXJjZWNsb3VkIiwiaXNzIjoiY29yZS9kZXYvYnRpbmdleWx0bTIiLCJzdHkiOiJVc2VyIiwiaXN0IjoxLCJleHAiOjE1ODI4NDU3NDQsImlhdCI6MTU4Mjg0NTY1NCwianRpIjoiQzJDOTA0ODg2NDA3MDkwNDg4NjQwNzMyMjExNzQ1ODEyMTQzIn0.2a6lMBSY17PrhDO8pvEk7PCXW_nkguMHi4J-Tuirkz-ETB6rnKyuRjF5yD6B55tMvm8dO8ulAHyDYqjObMxLJg + id_token: eyJraWQiOiI3NGU2YjMxZS1lYTczLTQ3OTYtOWRkYi1jMDJmZGI4ZDgwYmUiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2lkOmQ1MDBhMzY5LTc1MWQtNDkzYy1iNDAzLThmOThmYjg3MTdiNiIsImF1ZCI6IjU1M2FjOGFjLTRkYjktNGVkMy04MjVjLTNhZTNiZjVkMzI3YiIsImlzcyI6ImRldi51cy5zaG9wcGVyLmNjLnNhbGVzZm9yY2UuY29tIiwibmFtZSI6ImJsYWlyLnNsYXMudGVzdEBnbWFpbC5jb20iLCJleHAiOjE1OTExMTE0MzgsImlhdCI6MTU5MTEwOTYzOCwiZW1haWwiOiJibGFpci5zbGFzLnRlc3RAZ21haWwuY29tIn0.KgpAcq-G9Lz7IGnjkJlaFLFXYncVCwcVrRIuy3bEfgzRozqaDRvAori4oOz4RtgYjmoc5x2euoisHL0mVnHgPKOdYBty1wTJqneJEQt6hP4Kp0KFciID_ILCi-DE8VWS5t0NknnMP_iKhIkqcRL48iwPFUWkWA6AEWxE_yvJLNRLithsSxsx7EfBfpD8Hr2b5tMEwImQNmJNYGRTI4LSmcYspBORvJoAnfGpMC0kglxl40bhf5j4ItX4_DiWQC4zaGYD-HJV4BDr6C7iGCs5ZVPypF0yQD3iBio26fwj9Ys5WF9XMtPtqET2kqsz6fDC5GkE6HTUHH_r87jxbDq-8w + refresh_token: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + expires_in: 900 + refresh_token_expires_in: 7776000 + token_type: Bearer + usid: 18cda486-fe32-4e27-888b-6e4f89938e67 + customer_id: '1000005' + enc_user_id: 45D39A8499A95288F82855427EBA99B5 + idp_access_token: '' + TokenActionRequestBody: + value: + token: ry5XU_WHX20S6Cn6W7keFIs7Pzkv4wTZJS9Yvh0Ve9A.cdBxoCY9Q3jffQQOFnb_qghbSmSRnn9-2H4GwFTDMTk + token_type_hint: refresh_token + revokeTokenSuccess: + value: + access_token: '' + id_token: 'null' + refresh_token: EnL9U2f3-WiVPwL60CFBI21UY_oxWAwX5JkgO-X12Vs + expires_in: 0 + refresh_token_expires_in: 0 + token_type: Bearer + usid: 'null' + customer_id: 'null' + enc_user_id: 'null' + idp_access_token: '' + BadOrMissingRefreshToken400: + value: + error: invalid_request + error_description: Bad or missing refresh token. + introspectTokenSuccess: + value: + active: true + client_id: 553ac8ac-4db9-4ed3-825c-3ae3bf5d327b + exp: 1602523099 + iat: 1594747099 + iss: https://localhost:9000/ + scope: offline_access openid + sub: usid:edbf780a-2d83-4e82-9f64-8d051e3538d2::uido:Google::upn:blair.slas.test@gmail.com::uidn:Foo SLAS-Test + token_type: refresh_token + getUserInfoSuccess: + value: + customer_id: abxHc1lblIlKwRl0k1mqYYkewY + email: slas-okta-test@test.org + external_id: okta-00u38qdjnScLOB1mq5d6 + family_name: Test + given_name: Slas + name: Slas Test + sub: 98a84e4b-be50-422a-ab04-e9034e859eb9 + validated: true + getWellknownOpenidConfigurationSuccess: + value: + authorization_endpoint: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2/authorize + claims_supported: + - email + - name + - given_name + - family_name + - sub + code_challenge_methods_supported: + - S256 + grant_types_supported: + - authorization_code + - authorization_code_pkce + - client_credentials + - refresh_token + id_token_encryption_enc_values_supported: + - A256GCM + issuer: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2 + jwks_uri: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2/jwks + response_types_supported: + - code + - token + - token id_token + revocation_endpoint: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2/revoke + scopes_supported: + - email + - openid + - profile + subject_types_supported: + - public + token_endpoint: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2/token + userinfo_endpoint: https://stg.us.shopper.cc.salesforce.com/api/v1/organizations/zzzz_tst/oauth2/userinfo + MalformedTenantId400: + value: + error: invalid_request + error_description: Tenant Id Exception - Must be a well-formed tenantId + getJwksSuccess: + value: + keys: + - crv: P-256 + kid: 2d670fa8-0f28-44a1-b8b4-87a6d2feb1d8 + kty: EC + use: sig + x: _2tPqxGhgX6cA5Qg7v6UH_9om8OR3-OehkgXXWraTp8 + 'y': DAykmQPtf282buIcL0rLwKYbK6ApgripMjazdAthUFw + - crv: P-256 + kid: eb70508f-4d64-46f7-a3d5-b36558d6e6b6 + kty: EC + use: sig + x: VV0JVJFhkz71wY0E73Z-snorZ5oJf1QOdkIbCjyMqLs + 'y': QLkqBVSPPrkd7HjaSEMgMU9Ob-FDpg1W-oLq5I4ExqQ + - crv: P-256 + kid: 0f2016af-1388-4972-b54d-31cb9e3704ed + kty: EC + use: sig + x: KpmPoZTFXs80Uxy7QcOQ9aaqW35xgT3Qyakee8zR7gA + 'y': P87TZ52rjnOGlmjaPeUGbLaOqiB7FHnoEzULIw6QlfJ diff --git a/apis/shopper-orders-oas/.metadata.json b/apis/shopper-orders-oas-1.4.12/.metadata.json similarity index 82% rename from apis/shopper-orders-oas/.metadata.json rename to apis/shopper-orders-oas-1.4.12/.metadata.json index ad710721..89645d40 100644 --- a/apis/shopper-orders-oas/.metadata.json +++ b/apis/shopper-orders-oas-1.4.12/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-orders-oas/1.4.8-kbode.W-17297521-b3", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-orders-oas/1.4.12", "name": "Shopper Orders OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-orders-oas", - "version": "1.4.8-kbode.W-17297521-b3", + "version": "1.4.12", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-orders-oas/exchange.json b/apis/shopper-orders-oas-1.4.12/exchange.json similarity index 66% rename from apis/shopper-orders-oas/exchange.json rename to apis/shopper-orders-oas-1.4.12/exchange.json index 6886fc1b..2e4e8e61 100644 --- a/apis/shopper-orders-oas/exchange.json +++ b/apis/shopper-orders-oas-1.4.12/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-orders-oas-v1-bundled.yaml", - "name": "Shopper orders OAS", + "main": "shopper-orders-oas-v1-public.yaml", + "name": "Shopper Orders OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-orders-oas", - "version": "1.4.8-kbode.W-17297521-b3", + "version": "1.4.12", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-orders-oas/shopper-orders-oas-v1-bundled.yaml b/apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-internal.yaml similarity index 96% rename from apis/shopper-orders-oas/shopper-orders-oas-v1-bundled.yaml rename to apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-internal.yaml index 52f90206..9bdb1b30 100644 --- a/apis/shopper-orders-oas/shopper-orders-oas-v1-bundled.yaml +++ b/apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-internal.yaml @@ -16,14 +16,23 @@ info: To update the payment status, use the Orders API. + Caching is provided for the Shopper Products API. For details, see [Server-Side Web-Tier Caching](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html). + + For additional guidance when working with baskets, see [Build Baskets and Place Orders](https://developer.salesforce.com/docs/commerce/commerce-api/guide/work-with-baskets-orders.html). + + ## Authentication & Authorization + + The client requesting the product information must have access to the Products resource. The Shopper Products API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + ## Use Cases ### Use Hooks For details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) - license: - name: BSD 3-Clause License - url: https://opensource.org/license/bsd-3-clause servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/v1 variables: @@ -267,7 +276,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - examples: null '404': description: |- Possible reasons: @@ -513,7 +521,6 @@ components: type: string LocaleCode: description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - type: string oneOf: - $ref: '#/components/schemas/LanguageCountry' - $ref: '#/components/schemas/LanguageCode' @@ -631,6 +638,8 @@ components: example: Nintendo DS Game Console type: string type: object + required: + - productId additionalProperties: false BonusDiscountLineItem: description: Document representing a bonus discount line item. @@ -654,7 +663,6 @@ components: type: string id: description: The ID of the line item. It is read only. - readOnly: true example: 91f4dd8bfa0653d58b7783b04f type: string maxBonusItems: @@ -688,12 +696,10 @@ components: type: string couponItemId: description: The coupon item ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/CouponItemId' statusCode: description: The status of the coupon item. It is read only. - readOnly: true example: no_applicable_promotion enum: - coupon_code_already_in_basket @@ -714,7 +720,6 @@ components: 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". It is read only. example: true - readOnly: true type: boolean required: - code @@ -733,7 +738,6 @@ components: CurrencyCode: description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. example: USD - type: string oneOf: - $ref: '#/components/schemas/ISOCurrency' - $ref: '#/components/schemas/NoValue' @@ -790,7 +794,6 @@ components: type: number giftCertificateItemId: description: The item ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/GiftCertificateItemId' message: @@ -818,36 +821,141 @@ components: required: - amount - recipientEmail - TaxItem: - description: Object representing the taxation. + GroupedTaxItem: + description: Document representing the grouped tax item. + type: object properties: - id: - description: The taxation identifier. - type: string - rate: - format: double - description: The taxation rate. - example: 0.13 + taxRate: + description: The tax rate. It is read only. type: number - value: format: double - description: The tax amount. Will be computed if not set. + example: 0.1 + taxValue: + description: The summed up tax total for the tax rate. It is read only. type: number - type: object + format: double + example: 10.03 additionalProperties: false - TaxItems: - description: Taxation for a line item. + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. type: object properties: - taxItems: - description: The list of tax items. It is read only. - readOnly: true - type: array - items: - $ref: '#/components/schemas/TaxItem' - SimpleLink: - description: Document representing a link to another resource. + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId Status: description: Document representing an object status. properties: @@ -941,7 +1049,6 @@ components: type: number authorizationStatus: description: The authorization status of the payment transaction. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/Status' bankRoutingNumber: @@ -959,7 +1066,6 @@ components: - $ref: '#/components/schemas/PaymentCard' paymentInstrumentId: description: The payment instrument ID. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/PaymentInstrumentId' paymentMethodId: @@ -982,7 +1088,6 @@ components: adjustedTax: format: double description: The tax on the line item, including any adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -991,12 +1096,10 @@ components: The base price of the line item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 130 type: number bonusDiscountLineItemId: description: The ID of the bonus discount line item this bonus product relates to. It is read only. - readOnly: true type: string bonusProductLineItem: description: A flag indicating whether the product item is a bonus. @@ -1009,7 +1112,6 @@ components: $ref: '#/components/schemas/ProductItem' gift: description: Returns true if the item is a gift. It is read only. - readOnly: true example: true type: boolean giftMessage: @@ -1025,7 +1127,6 @@ components: description: |- The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' itemText: @@ -1042,7 +1143,6 @@ components: 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. It is read only. - readOnly: true type: number priceAdjustments: description: The price adjustments. @@ -1055,7 +1155,6 @@ components: The price of the product line item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 20.99 type: number priceAfterOrderDiscount: @@ -1065,7 +1164,6 @@ components: order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 15.5 type: number productId: @@ -1098,33 +1196,28 @@ components: If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only. - readOnly: true example: 006490dcc338feeafc71c964bf type: string tax: format: double description: The tax for the product item, not including price adjustments. It is read only. - readOnly: true example: 0.3 type: number taxBasis: format: double description: The price used to calculate the tax for this product item. It is read only. - readOnly: true example: 30 type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: |- The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only. - readOnly: true example: 0.9 type: number ItemId: @@ -1147,7 +1240,6 @@ components: adjustedTax: format: double description: The tax on the line item, including any adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -1155,17 +1247,14 @@ components: description: |- The base price of the line item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50 type: number bonusDiscountLineItemId: description: The ID of the bonus discount line item this bonus product relates to. It is read only. - readOnly: true example: ba248414e3eee797f062162f8b type: string bonusProductLineItem: description: A flag indicating whether the product item is a bonus. It is read only. - readOnly: true example: false type: boolean bundledProductItems: @@ -1175,7 +1264,6 @@ components: $ref: '#/components/schemas/ProductItem' gift: description: Returns true if the item is a gift. It is read only. - readOnly: true example: false type: boolean giftMessage: @@ -1185,12 +1273,10 @@ components: inventoryId: maxLength: 256 description: The inventory list ID associated with this item. It is read only. - readOnly: true example: inventory type: string itemId: description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' itemText: @@ -1200,7 +1286,6 @@ components: optionId: maxLength: 256 description: The ID of the option. It is read only. - readOnly: true example: consoleWarranty type: string optionItems: @@ -1211,7 +1296,6 @@ components: optionValueId: maxLength: 256 description: The ID of the option value. It is read only. - readOnly: true example: '000' type: string price: @@ -1219,7 +1303,6 @@ components: description: |- The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 150.99 type: number priceAdjustments: @@ -1232,7 +1315,6 @@ components: description: |- The price of the product line item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50.99 type: number priceAfterOrderDiscount: @@ -1241,7 +1323,6 @@ components: The price of the product line item including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 40.5 type: number productId: @@ -1268,168 +1349,33 @@ components: description: |- If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only. - readOnly: true example: 006490dcc338feeafc71c964bf type: string tax: format: double description: The tax on the line item before applying any adjustments. It is read only. - readOnly: true example: 0 type: number taxBasis: format: double description: The amount used to calculate the tax for this item. It is read only. - readOnly: true example: 50 type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: |- The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only. - readOnly: true example: 0.19 type: number required: - optionId - optionValueId - Discount: - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - description: Document representing a discount. - type: object - properties: - amount: - format: double - description: The discount amount for discount types that define specific discount amounts. It is read only. - example: 130.88 - type: number - percentage: - format: double - description: The discount percent for discount types that define percentage discounts. It is read only. - example: 0.19 - type: number - priceBookId: - description: The price book ID that is used with some types. It is read only. - example: usd-sale-prices - type: string - type: - description: The type of discount. It is read only. - example: fixed_price - enum: - - percentage - - fixed_price - - amount - - free - - price_book_price - - bonus - - total_fixed_price - - bonus_choice - - percentage_off_options - type: string - required: - - type - PriceAdjustmentId: - example: ba248424e3eee797f062161f8b - type: string - PriceAdjustment: - description: |- - Document representing a price adjustment within a basket or order. Price adjustments - can be assigned at the order, product, or shipping level. - properties: - appliedDiscount: - description: |- - Details describing the discount this price adjustment is based on. For adjustments - not based on a discount, this value is null. - allOf: - - $ref: '#/components/schemas/Discount' - couponCode: - description: |- - The coupon code of the coupon this price adjustment is based on. For adjustments - not based on a coupon, this value is null. It is read only. - readOnly: true - example: 5ties - type: string - createdBy: - description: The user who created the price adjustment. It is read only. - readOnly: true - example: Support - type: string - creationDate: - description: The timestamp when the price adjustment was created. It is read only. - readOnly: true - example: '2015-05-19T15:23:18.000Z' - type: string - format: date-time - custom: - description: |- - 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. - example: true - type: boolean - itemText: - description: The text describing the item. - type: string - lastModified: - description: The timestamp when the price adjustment was last modified. It is read only. - readOnly: true - example: '2021-02-25T09:58:08.715Z' - type: string - format: date-time - manual: - description: |- - A flag indicating whether this price adjustment was created by a manual process. - If the price adjustment was created by the promotion engine, this value is always - false. - example: true - type: boolean - price: - format: double - description: The adjustment price. It is read only. - readOnly: true - example: 120.88 - type: number - priceAdjustmentId: - description: The price adjustment ID. It is read only. - readOnly: true - allOf: - - $ref: '#/components/schemas/PriceAdjustmentId' - promotionId: - description: |- - 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 a promotion defined in the promotion engine. - If not specified, a promotion ID is generated. - type: string - promotionLink: - description: The URL addressing the related promotion. It is read only. - readOnly: true - type: string - reasonCode: - description: The reason for the price adjustment. - type: string - type: object - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId ProductListLink: description: Document representing a link to a product list. properties: @@ -1468,7 +1414,6 @@ components: properties: id: description: The ID of the product list item. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ItemId' priority: @@ -1480,7 +1425,6 @@ components: $ref: '#/components/schemas/ProductDetailsLink' productList: description: A reference to the associated product list. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/ProductListLink' public: @@ -1565,7 +1509,6 @@ components: description: |- The shipping cost total, including shipment level costs, product level fix, and surcharge costs. It is read only. - readOnly: true example: 15 type: number shippingPromotions: @@ -1576,6 +1519,8 @@ components: items: $ref: '#/components/schemas/ShippingPromotion' type: object + required: + - id Shipment: description: Document representing a shipment. additionalProperties: @@ -1592,18 +1537,15 @@ components: The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 4.95 type: number adjustedShippingTotalTax: format: double description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number gift: description: A flag indicating whether the shipment is a gift. It is read only. - readOnly: true example: true type: boolean giftMessage: @@ -1615,7 +1557,6 @@ components: description: |- The total tax on products in the shipment, not including price adjustments or service charges such as shipping. It is read only. - readOnly: true example: 4.95 type: number productSubTotal: @@ -1624,7 +1565,6 @@ components: The total price of all products in the shipment, including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number productTotal: @@ -1633,7 +1573,6 @@ components: The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number shipmentId: @@ -1643,14 +1582,12 @@ components: - $ref: '#/components/schemas/ShipmentId' shipmentNo: description: The shipment number of this shipment. This number is automatically generated. It is read only. - readOnly: true type: string shipmentTotal: format: double description: |- The total price of all products in the shipment including item-level adjustments, shipping charges, and tax. It is read only. - readOnly: true example: 39.99 type: number shippingAddress: @@ -1671,13 +1608,11 @@ components: description: |- The total price of all shipping charges in the shipment, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 5.99 type: number shippingTotalTax: format: double description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number taxTotal: @@ -1686,7 +1621,6 @@ components: The total tax on the shipment, including item-level price adjustments and service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 1.8 type: number trackingNumber: @@ -1707,7 +1641,6 @@ components: adjustedTax: format: double description: The tax for the shipping item, including price adjustments. It is read only. - readOnly: true example: 19 type: number basePrice: @@ -1715,14 +1648,12 @@ components: description: |- The base price of the shipping item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 50 type: number itemId: description: |- The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a custom price adjustment for it. It is read only. - readOnly: true example: 430ef5aad3a24de59378458434 type: string itemText: @@ -1735,7 +1666,6 @@ components: 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. It is read only. - readOnly: true type: number priceAdjustments: description: The price adjustments. @@ -1748,7 +1678,6 @@ components: The price of the shipping item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true type: number shipmentId: description: The identifier of the shipment to which this item belongs. @@ -1757,24 +1686,20 @@ components: tax: format: double description: The tax on the product item, not including adjustments. It is read only. - readOnly: true example: 0.19 type: number taxBasis: format: double description: The price used to calculate the tax for this shipping item. It is read only. - readOnly: true type: number taxClassId: description: |- The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. - readOnly: true type: string taxRate: format: double description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. - readOnly: true type: number type: object Basket: @@ -1794,23 +1719,19 @@ components: including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. - readOnly: true example: 4.95 type: number adjustedShippingTotalTax: format: double description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. - readOnly: true example: 0.3 type: number agentBasket: description: Is the basket created by an agent? It is read only. - readOnly: true example: true type: boolean basketId: description: The unique identifier for the basket. It is read only. - readOnly: true example: e78aa5646a8efebdd9cdd38be7 type: string billingAddress: @@ -1824,7 +1745,6 @@ components: $ref: '#/components/schemas/BonusDiscountLineItem' channelType: description: The sales channel. It is read only. - readOnly: true example: storefront enum: - storefront @@ -1852,7 +1772,6 @@ components: $ref: '#/components/schemas/CouponItem' creationDate: description: The timestamp when the basket was created. It is read only. - readOnly: true example: '2015-05-19T15:23:18.000Z' type: string format: date-time @@ -1871,19 +1790,16 @@ components: description: |- Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. - readOnly: true type: array items: - $ref: '#/components/schemas/TaxItems' + $ref: '#/components/schemas/GroupedTaxItem' inventoryReservationExpiry: description: The expiration datetime of the inventory reservation. It is read only. - readOnly: true example: '2015-05-19T15:30:18.000Z' type: string format: date-time lastModified: description: The timestamp when the basket was last modified. It is read only. - readOnly: true example: '2015-05-19T15:25:18.000Z' type: string format: date-time @@ -1894,17 +1810,16 @@ components: Merchandise total price represents the sum of the product prices before services (such as shipping) or adjustments from promotions have been added. It is read only. - readOnly: true example: 4.95 type: number - notes: - description: The notes. - allOf: - - $ref: '#/components/schemas/SimpleLink' + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' orderTotal: format: double description: The total price, including products, shipping and tax. It is read only. - readOnly: true example: 110.24 type: number paymentInstruments: @@ -1922,7 +1837,6 @@ components: description: |- The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number productTotal: @@ -1930,7 +1844,6 @@ components: description: |- The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 88 type: number shipments: @@ -1948,29 +1861,24 @@ components: description: |- The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 5.99 type: number shippingTotalTax: format: double description: The total tax on all shipping charges, not including shipping adjustments. It is read only. - readOnly: true example: 0.3 type: number sourceCode: description: The source code assigned to the basket. It is read only. - readOnly: true example: OUTDOOR1 type: string taxTotal: format: double description: The total tax amount. It is read only. - readOnly: true example: 5.25 type: number taxation: description: The taxation policy (gross or net). It is read only. - readOnly: true example: net enum: - gross @@ -1978,12 +1886,10 @@ components: type: string taxRoundedAtGroup: description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. - readOnly: true example: true type: boolean temporaryBasket: description: If the created basket is a temporary basket, this is set to true. Otherwise, it is set to false. - readOnly: true example: true type: boolean type: object @@ -1993,21 +1899,6 @@ components: maxLength: 50 type: string example: '00000410' - GroupedTaxItem: - description: Document representing the grouped tax item. - type: object - properties: - taxRate: - description: The tax rate. It is read only. - type: number - format: double - example: 0.1 - taxValue: - description: The summed up tax total for the tax rate. It is read only. - type: number - format: double - example: 10.03 - additionalProperties: false Order: description: Document representing an order. type: object @@ -2017,7 +1908,6 @@ components: description: |- The total tax on products in the order, including price adjustments, but not including service charges such as shipping. It is read only. - readOnly: true example: 1.5 type: number adjustedShippingTotalTax: @@ -2029,9 +1919,13 @@ components: description: The billing address. allOf: - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' channelType: description: The sales channel. It is read only. - readOnly: true example: storefront enum: - storefront @@ -2061,7 +1955,6 @@ components: type: string couponItems: description: The coupon items. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/CouponItem' @@ -2069,28 +1962,23 @@ components: description: |- This value depends on how the order was created. If a shopper created the order, this value is Customer. If a job created the order, this value is System. Otherwise, this value is the name of the user who created the order. It is read only. - readOnly: true example: Customer type: string creationDate: description: The timestamp when the order was created. It is read only. - readOnly: true example: '2015-05-19T15:23:18.000Z' type: string format: date-time currency: description: The ISO 4217 mnemonic code of the currency. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/CurrencyCode' customerInfo: description: The customer information for guest or logged-in customers. It is read only. - readOnly: true allOf: - $ref: '#/components/schemas/CustomerInfo' customerName: description: The customer name. It is read only. - readOnly: true example: Max Mustermann type: string exportStatus: @@ -2108,18 +1996,15 @@ components: type: string giftCertificateItems: description: The gift certificate line items. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/GiftCertificateItem' globalPartyId: description: The Customer 360 Global Party ID associated with the shopper. It is read only. - readOnly: true example: GP_1234 type: string lastModified: description: The timestamp when the order was last modified. It is read only. - readOnly: true example: '2021-02-25T09:58:08.715Z' type: string format: date-time @@ -2128,13 +2013,8 @@ components: description: |- The total products tax in the purchase currency. Merchandise total prices represent the sum of product prices not including shipping or adjustments. It is read only. - readOnly: true example: 1.5 type: number - notes: - description: The notes. - allOf: - - $ref: '#/components/schemas/SimpleLink' orderNo: description: The order number. example: '00000410' @@ -2142,7 +2022,6 @@ components: - $ref: '#/components/schemas/OrderNo' orderPriceAdjustments: description: The order-level price adjustments. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/PriceAdjustment' @@ -2150,7 +2029,6 @@ components: description: |- The order token used to secure the lookup of an order on base of the plain order number. The order token contains only URL safe characters. It is read only. - readOnly: true type: string orderTotal: format: double @@ -2164,7 +2042,6 @@ components: Warning : Order view code must not be exposed in the URL and must only be displayed to the shopper or sent as an email. Order view code must not be logged in the code. It is read only. type: string - readOnly: true paymentInstruments: description: The payment instruments list. type: array @@ -2180,7 +2057,6 @@ components: type: string productItems: description: The product items. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/ProductItem' @@ -2190,7 +2066,6 @@ components: The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. - readOnly: true example: 99 type: number productTotal: @@ -2201,9 +2076,12 @@ components: it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. example: 99 type: number + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. It is read only. + type: boolean + example: true shipments: description: The shipments. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/Shipment' @@ -2226,12 +2104,10 @@ components: The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. example: 5.99 - readOnly: true type: number shippingTotalTax: format: double description: The total tax on all shipping charges, not including shipping adjustments. It is read only. - readOnly: true example: 0.3 type: number siteId: @@ -2241,7 +2117,6 @@ components: - $ref: '#/components/schemas/SiteId' sourceCode: description: The source code assigned to the basket from which this order was created. It is read only. - readOnly: true example: OUTDOOR1 type: string status: @@ -2258,12 +2133,10 @@ components: taxTotal: format: double description: The total tax amount. It is read only. - readOnly: true example: 5.25 type: number taxation: description: The taxation policy (gross or net). It is read only. - readOnly: true example: net enum: - gross @@ -2323,6 +2196,9 @@ components: OrderLookupRequest: description: Document representing an order lookup request. type: object + required: + - email + - orderViewCode additionalProperties: false properties: email: @@ -2477,23 +2353,18 @@ components: description: description: The localized description of the payment method or card. It is read only. type: string - readOnly: true id: maxLength: 256 description: The ID of the payment method or card. It is read only. - readOnly: true type: string image: description: The URL to the image that represents the payment method or card. It is read only. - readOnly: true type: string name: description: The localized name of the payment method or card. It is read only. - readOnly: true type: string paymentProcessorId: description: The payment processor ID. It is read only. It is read only. - readOnly: true type: string required: - id @@ -2502,11 +2373,39 @@ components: properties: applicablePaymentMethods: description: The applicable payment methods. It is read only. - readOnly: true type: array items: $ref: '#/components/schemas/PaymentMethod' type: object + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + additionalProperties: false + required: + - id + - rate + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' Taxes: description: Document representing the tax rates and (optionally) amounts for all items in a basket. properties: @@ -2516,9 +2415,12 @@ components: additionalProperties: $ref: '#/components/schemas/TaxItems' type: object + required: + - taxes additionalProperties: false parameters: organizationId: + description: An identifier for the organization the request is being made by name: organizationId in: path required: true @@ -2526,15 +2428,24 @@ components: schema: $ref: '#/components/schemas/OrganizationId' siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. name: siteId in: query required: true + examples: + SiteId: + value: RefArch schema: $ref: '#/components/schemas/SiteId' locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. name: locale in: query - required: false + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US schema: $ref: '#/components/schemas/LocaleCode' orderNo: @@ -2584,10 +2495,9 @@ components: email: shopper@salesforce-test.com customerName: Stephanie Miller exportStatus: not_exported - grouped_tax_items: - - _type: grouped_tax - tax_rate: 0.05 - tax_value: 30.8 + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 guest: true giftCertificateItems: - amount: 1 @@ -2596,7 +2506,6 @@ components: shipmentId: me lastModified: '2019-10-22T12:17:28.376Z' merchandizeTotalTax: 30 - notes: {} orderNo: '00000410' orderPriceAdjustments: - appliedDiscount: @@ -2751,10 +2660,9 @@ components: email: shopper@salesforce-test.com customerName: Stephanie Miller exportStatus: not_exported - grouped_tax_items: - - _type: grouped_tax - tax_rate: 0.05 - tax_value: 30.8 + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 guest: true giftCertificateItems: - amount: 1 @@ -2763,7 +2671,6 @@ components: shipmentId: me lastModified: '2019-10-22T12:17:28.376Z' merchandizeTotalTax: 30 - notes: {} orderNo: '00000410' orderPriceAdjustments: - appliedDiscount: @@ -2930,10 +2837,9 @@ components: email: shopper@salesforce-test.com customerName: Stephanie Miller exportStatus: not_exported - grouped_tax_items: - - _type: grouped_tax - tax_rate: 0.05 - tax_value: 30.8 + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 guest: true giftCertificateItems: - amount: 1 @@ -2942,7 +2848,6 @@ components: shipmentId: me lastModified: '2019-10-22T12:17:28.376Z' merchandizeTotalTax: 30 - notes: {} orderNo: '00000410' orderPriceAdjustments: - appliedDiscount: @@ -3106,10 +3011,9 @@ components: email: shopper@salesforce-test.com customerName: Stephanie Miller exportStatus: not_exported - grouped_tax_items: - - _type: grouped_tax - tax_rate: 0.05 - tax_value: 30.8 + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 guest: true giftCertificateItems: - amount: 1 @@ -3118,7 +3022,6 @@ components: shipmentId: me lastModified: '2019-10-22T12:17:28.376Z' merchandizeTotalTax: 30 - notes: {} orderNo: '00000410' orderPriceAdjustments: - appliedDiscount: diff --git a/apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-public.yaml b/apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-public.yaml new file mode 100644 index 00000000..9bdb1b30 --- /dev/null +++ b/apis/shopper-orders-oas-1.4.12/shopper-orders-oas-v1-public.yaml @@ -0,0 +1,3229 @@ +openapi: 3.0.3 +info: + title: Shopper Orders + version: v1 + description: |- + # API Overview + + The Shopper Orders API enables you to: + + - Create orders based on baskets prepared using the Shopper Baskets API. + - Add a customer's payment instrument to an order. + + You can choose to supply the full payment information or supply only a customer payment instrument ID and amount. If the customer payment instrument ID is set, all the other properties (except amount) are ignored and the payment data is resolved from the stored customer payment information. + + **Note:** The API doesn’t allow the storage of credit card numbers. The endpoint provides the storage of masked credit card numbers only. + + To update the payment status, use the Orders API. + + Caching is provided for the Shopper Products API. For details, see [Server-Side Web-Tier Caching](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html). + + For additional guidance when working with baskets, see [Build Baskets and Place Orders](https://developer.salesforce.com/docs/commerce/commerce-api/guide/work-with-baskets-orders.html). + + ## Authentication & Authorization + + The client requesting the product information must have access to the Products resource. The Shopper Products API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### Use Hooks + + For details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/orders: + post: + description: Submits an order based on a prepared basket. The only considered value from the request body is basketId. + operationId: createOrder + summary: Submits an order for a basket. + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + examples: + OrderPost: + $ref: '#/components/examples/OrderPost' + schema: + $ref: '#/components/schemas/Basket' + responses: + '200': + description: Success, the response body contains the submitted order. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + examples: + Order: + $ref: '#/components/examples/examples-OrderPost' + '400': + description: |- + Possible reasons: + - a failure during the creation of a gift certificate + for a gift certificate item. + - the basket ID in the request body is null or + empty. + - an invalid product item. + - an option with the specified option ID is + unknown. + - an option with the specified option value ID + is unknown. + - a product item is not available. + - the customer assigned to the basket does not + match the verified customer represented by the JWT token. + - the basket contains flashes. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The basket with the given basket ID is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}: + get: + description: Gets information for an order. + operationId: getOrder + summary: Retrieve order information. + parameters: + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the order. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + examples: + Order: + $ref: '#/components/examples/OrderGet' + '404': + description: The order with the given order number is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BasketNotFound: + $ref: '#/components/examples/BasketNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}/lookup: + post: + description: |+ + Use this endpoint to lookup a guest order. + + **Important**: This endpoint uses the [ShopperTokenTsob](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=security%3AShopperTokenTsob) security scheme. Always check the Security section of the endpoint documentation, which is hidden by default. + + The API uses the `orderViewCode` generated during the order creation and the `email` of the order customer to lookup a guest order. If email is not provided on the order, the field can be left blank in the lookup request. + **Note**: In the no email on order scenario, the custom implementation must include an additional verification of an order attribute. For example, a postal code or mobile number. + + This API can also be used for looking up an order for a registered customer. In addition to the verification steps used for guest order lookup, the API also verifies that the customer ID of the order matches with the customer ID supplied in the `ShopperTokenTsob`. + + operationId: guestOrderLookup + summary: Retrieve order information for a specific guest order. + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + examples: + OrderLookUp: + $ref: '#/components/examples/OrderLookup' + schema: + $ref: '#/components/schemas/OrderLookupRequest' + responses: + '200': + description: Success, the response body contains the order found with the order view code. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + examples: + Order: + $ref: '#/components/examples/examples-OrderPost' + '400': + description: |- + Possible reasons: + - order view code or email is missing. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Order was not found. Possible reasons: + - the order with the given order no is unknown. + - the given order view code does not match the one in the order. + - the given email does not match the one in the order. + - the authorized customer of a registered customer order lookup does not match the customer in the order. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + security: + - ShopperTokenTsob: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}/payment-instruments: + post: + description: |- + Adds a payment instrument to an order. + + Details: + + The payment instrument is added with the provided details. The payment method must be applicable for the order see GET + /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request. + operationId: createPaymentInstrumentForOrder + summary: Add a payment instrument to an order. + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + examples: + PaymentInstrumentPost: + $ref: '#/components/examples/PaymentInstrumentPost' + schema: + $ref: '#/components/schemas/OrderPaymentInstrumentRequest' + responses: + '200': + description: Success, the response body contains the order with the added payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + examples: + Order: + $ref: '#/components/examples/examples-PaymentInstrumentPost' + '400': + description: |- + Possible reasons: + - the given order number is invalid. + - the provided payment method is invalid or not applicable. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The order with the given order number is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}: + delete: + description: Removes a payment instrument of an order. + operationId: removePaymentInstrumentFromOrder + summary: Remove a payment instrument from an order. + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the order without the deleted payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + '404': + description: |- + Possible reasons: + - The order with the given order number is unknown. + - The payment instrument with the given order payment + instrument ID is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + patch: + description: |- + Updates a payment instrument of an order. + + Details: + + The payment instrument is updated with the provided details. The payment method must be applicable for the + order see GET /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a + paymentCard must be specified in the request. + operationId: updatePaymentInstrumentForOrder + summary: Update payment instrument details for an order. + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + requestBody: + content: + application/json: + examples: + PaymentInstrumentPatch: + $ref: '#/components/examples/PaymentInstrumentPatch' + schema: + $ref: '#/components/schemas/OrderPaymentInstrumentRequest' + responses: + '200': + description: Success, the response body contains the order with the updated payment instrument. + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + examples: + Order: + $ref: '#/components/examples/examples-PaymentInstrumentPatch' + '400': + description: |- + Possible reasons: + - the basket payment instrument with the given + ID already is permanently masked. + - the provided payment method is invalid or not applicable. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: |- + Possible reasons: + - The order with the given order number is unknown. + - The payment instrument with the given payment + instrument ID is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}/payment-methods: + get: + description: Gets the applicable payment methods for an existing order considering the open payment amount only. + operationId: getPaymentMethodsForOrder + summary: Retrieve payment instrument details for an order. + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success, the response body contains the applicable payment methods for the order. + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentMethodResult' + examples: + PaymentMethodResult: + $ref: '#/components/examples/PaymentMethodsGet' + '400': + description: |- + The customer assigned to the order does not + match the verified customer represented by the JSON Web Token (JWT). + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + '404': + description: The order with the given order number is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + /organizations/{organizationId}/orders/{orderNo}/taxes: + get: + description: |- + This method gives you the external taxation data of the order transferred from the basket during + order creation. This endpoint can be called only if external taxation was used. See POST /baskets + for more information. + operationId: getTaxesFromOrder + summary: Retrieve external taxation data for an order. + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/orderNo' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: |- + Success, the response body contains the external taxation from all items from the referenced + order. + content: + application/json: + schema: + $ref: '#/components/schemas/Taxes' + examples: + Taxes: + $ref: '#/components/examples/OrderTaxGet' + '404': + description: The order with the given order number is unknown. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + OrderNotFound: + $ref: '#/components/examples/OrderNotFound' + '409': + description: "Possible Reasons: \n - The tax mode of the referenced basket is not set to EXTERNAL." + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + InvalidTaxMode: + $ref: '#/components/examples/InvalidTaxMode' + UnsupportedRequest: + $ref: '#/components/examples/UnsupportedRequest' + security: + - AmOAuth2: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + ShopperTokenTsob: + type: oauth2 + description: "`ShopperTokenTsob` (Tsob = trusted system on behalf) is a child of the `ShopperToken` security scheme and extends the functionality of `ShopperToken` for specific use cases. \nA token of type `ShopperTokenTsob` allows you to access Shopper API endpoints, including OCAPI and Salesforce Commerce API for headless applications. \nBesides endpoints that require this specific subtype, all other endpoints secured by the `ShopperToken` parent scheme can be accessed with a `ShopperTokenTsob`.\nTo learn how to get a `ShopperTokenTsob` token, see [getTrustedSystemAccessToken](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:getTrustedSystemAccessToken).\n" + flows: + clientCredentials: + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/trusted-system/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + AmOAuth2: + type: oauth2 + description: AccountManager OAuth 2.0 bearer token Authentication. + flows: + clientCredentials: + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize + tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + OrderAddress: + description: Document representing an order address. + properties: + address1: + description: The first address line. + example: 45 Main Rd. + type: string + address2: + description: The second address line. + example: Apartment 204 + type: string + city: + description: The city. + example: Boston + type: string + companyName: + description: The company name. + example: Salesforce + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + firstName: + description: The first name. + example: Max + type: string + fullName: + description: The full name. + example: Max Mustermann + type: string + id: + description: The ID of the address. + example: me + type: string + jobTitle: + description: The job title. + example: Software Engineer + type: string + lastName: + description: The last name. + example: Mustermann + type: string + phone: + description: The phone number. + example: '6175555555' + type: string + postBox: + description: The post office box. + example: PO BOX 109 + type: string + postalCode: + description: The postal code. + example: '05408' + type: string + salutation: + description: The salutation. + example: Mr + type: string + secondName: + description: The second name. + type: string + stateCode: + description: The state code. + example: MA + type: string + suffix: + description: The suffix. + example: Sr + type: string + suite: + description: The suite. + example: 24A + type: string + title: + description: The title. + example: Dr. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + ProductDetailsLink: + description: Document representing a link to the resource for product details. + properties: + productDescription: + description: The description of the product. + example: Nintendo DS revolutionizes handheld gameplay. + type: string + productId: + $ref: '#/components/schemas/ProductId' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + title: + description: The link title. + example: Nintendo DS Game Console + type: string + type: object + required: + - productId + additionalProperties: false + BonusDiscountLineItem: + description: Document representing a bonus discount line item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + bonusProducts: + description: The bonus products the customer can choose from. + type: array + items: + $ref: '#/components/schemas/ProductDetailsLink' + couponCode: + description: The coupon code that triggered the promotion, if applicable. + example: 5ties + type: string + id: + description: The ID of the line item. It is read only. + example: 91f4dd8bfa0653d58b7783b04f + type: string + maxBonusItems: + format: int32 + description: The maximum number of bonus items the user can select for this promotion. + type: integer + promotionId: + description: The ID of the promotion that triggered the creation of the line item. + example: Buy1Get2 + type: string + CouponItemId: + minLength: 1 + type: string + description: The coupon item ID + example: d4c9c0141e9c74c150225580f3 + CouponItem: + description: Document representing a coupon item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + code: + maxLength: 256 + description: The coupon code. + example: 5ties + type: string + couponItemId: + description: The coupon item ID. It is read only. + allOf: + - $ref: '#/components/schemas/CouponItemId' + statusCode: + description: The status of the coupon item. It is read only. + example: no_applicable_promotion + enum: + - 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 + type: string + valid: + description: |- + 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". It is read only. + example: true + type: boolean + required: + - code + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CustomerInfo: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: The customer information for guest or logged-in customers. + type: object + properties: + customerId: + maxLength: 100 + description: The customer ID. It is read only. + example: abMKqMaNYOBMnNdDNzyC5oNTi5 + type: string + customerName: + description: The customer name. + example: Max Mustermann + type: string + customerNo: + maxLength: 100 + description: The customer number. + example: '0002352' + type: string + email: + description: The customer's email address. + example: no-reply@salesforce.com + type: string + required: + - email + GiftCertificateItemId: + example: 629dea6e7b61e58da629b57b21 + type: string + minLength: 1 + GiftCertificateItem: + description: A gift certificate item. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + amount: + format: double + description: The gift certificate item amount. + example: 20 + type: number + giftCertificateItemId: + description: The item ID. It is read only. + allOf: + - $ref: '#/components/schemas/GiftCertificateItemId' + message: + maxLength: 4000 + description: The gift certificate message. + example: Birthday present. + type: string + recipientEmail: + minLength: 1 + description: The recipient email. + example: no-reply@salesforce.com + type: string + recipientName: + description: The recipient's name. + example: Daniel Mustermann + type: string + senderName: + description: The sender's name. + example: Max Mustermann + type: string + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + required: + - amount + - recipientEmail + GroupedTaxItem: + description: Document representing the grouped tax item. + type: object + properties: + taxRate: + description: The tax rate. It is read only. + type: number + format: double + example: 0.1 + taxValue: + description: The summed up tax total for the tax rate. It is read only. + type: number + format: double + example: 10.03 + additionalProperties: false + Discount: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + description: Document representing a discount. + type: object + properties: + amount: + format: double + description: The discount amount for discount types that define specific discount amounts. It is read only. + example: 130.88 + type: number + percentage: + format: double + description: The discount percent for discount types that define percentage discounts. It is read only. + example: 0.19 + type: number + priceBookId: + description: The price book ID that is used with some types. It is read only. + example: usd-sale-prices + type: string + type: + description: The type of discount. It is read only. + example: fixed_price + enum: + - percentage + - fixed_price + - amount + - free + - price_book_price + - bonus + - total_fixed_price + - bonus_choice + - percentage_off_options + type: string + required: + - type + PriceAdjustmentId: + example: ba248424e3eee797f062161f8b + type: string + PriceAdjustment: + description: |- + Document representing a price adjustment within a basket or order. Price adjustments + can be assigned at the order, product, or shipping level. + properties: + appliedDiscount: + description: |- + Details describing the discount this price adjustment is based on. For adjustments + not based on a discount, this value is null. + allOf: + - $ref: '#/components/schemas/Discount' + couponCode: + description: |- + The coupon code of the coupon this price adjustment is based on. For adjustments + not based on a coupon, this value is null. It is read only. + example: 5ties + type: string + createdBy: + description: The user who created the price adjustment. It is read only. + example: Support + type: string + creationDate: + description: The timestamp when the price adjustment was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + custom: + description: |- + 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. + example: true + type: boolean + itemText: + description: The text describing the item. + type: string + lastModified: + description: The timestamp when the price adjustment was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + manual: + description: |- + A flag indicating whether this price adjustment was created by a manual process. + If the price adjustment was created by the promotion engine, this value is always + false. + example: true + type: boolean + price: + format: double + description: The adjustment price. It is read only. + example: 120.88 + type: number + priceAdjustmentId: + description: The price adjustment ID. It is read only. + allOf: + - $ref: '#/components/schemas/PriceAdjustmentId' + promotionId: + description: |- + 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 a promotion defined in the promotion engine. + If not specified, a promotion ID is generated. + type: string + reasonCode: + description: The reason for the price adjustment. + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + Status: + description: Document representing an object status. + properties: + code: + description: The status code. + type: string + message: + description: The status message. + type: string + status: + format: int32 + description: |- + The status. + For more information on the status values see Status.OK and Status.ERROR. + type: integer + type: object + additionalProperties: false + PaymentCard: + additionalProperties: false + description: Document representing a payment card. + type: object + properties: + cardType: + maxLength: 256 + description: The payment card type. + example: Visa + type: string + creditCardExpired: + description: A flag indicating if the credit card is expired. It is read only. + example: true + type: boolean + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + maxLength: 4000 + description: The masked payment card number. + example: '*********4422' + type: string + numberLastDigits: + maxLength: 4000 + description: The last digits of the payment card number. It is read only. + example: '4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2015 + type: integer + PaymentInstrumentId: + description: The payment instrument ID + example: ba248424e3eee797f062162f8b + type: string + OrderPaymentInstrument: + description: Document representing an order payment instrument. + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + authorizationStatus: + description: The authorization status of the payment transaction. It is read only. + allOf: + - $ref: '#/components/schemas/Status' + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + maskedGiftCertificateCode: + description: The gift certificate code with the last 4 characters not masked. + example: '******Gzzy' + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/PaymentCard' + paymentInstrumentId: + description: The payment instrument ID. It is read only. + allOf: + - $ref: '#/components/schemas/PaymentInstrumentId' + paymentMethodId: + maxLength: 256 + description: The payment method ID. It is read only. + example: CREDIT_CARD + type: string + type: object + ProductItem: + description: Document representing a product item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including + adjustments. If the taxation policy is net, it doesn't include tax. If the + taxation policy is gross, it includes tax. It is read only. + example: 130 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. + example: true + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. + example: inventory + type: string + itemId: + description: |- + The product item ID. Use it to identify this item when updating its quantity or + creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not + including order-level adjustments or shipping charges. If the taxation policy is + net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 20.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation + policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 15.5 + type: number + productId: + maxLength: 100 + description: The ID of the product. + example: nintendo-ds-console + type: string + productListItem: + description: |- + If this product line item was added from a product list, this value is a reference + to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A + related shipping item represents a surcharge applied to individual products using + a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax for the product item, not including price adjustments. It is read only. + example: 0.3 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this product item. It is read only. + example: 30 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.9 + type: number + ItemId: + description: The item id. + example: 430ef5aad3a24de59378458434 + type: string + OptionItem: + description: |- + An option item represents an optional purchase related to a product item, and is always associated with that parent product + item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax on the line item, including any adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the line item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + bonusDiscountLineItemId: + description: The ID of the bonus discount line item this bonus product relates to. It is read only. + example: ba248414e3eee797f062162f8b + type: string + bonusProductLineItem: + description: A flag indicating whether the product item is a bonus. It is read only. + example: false + type: boolean + bundledProductItems: + description: The bundled product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + gift: + description: Returns true if the item is a gift. It is read only. + example: false + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + inventoryId: + maxLength: 256 + description: The inventory list ID associated with this item. It is read only. + example: inventory + type: string + itemId: + description: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + itemText: + description: The text describing the item. + example: The item text. + type: string + optionId: + maxLength: 256 + description: The ID of the option. It is read only. + example: consoleWarranty + type: string + optionItems: + description: The option items. + type: array + items: + $ref: '#/components/schemas/OptionItem' + optionValueId: + maxLength: 256 + description: The ID of the option value. It is read only. + example: '000' + type: string + price: + format: double + description: |- + The price of the line item before applying any adjustments. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 150.99 + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments, but not including order-level adjustments or + shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50.99 + type: number + priceAfterOrderDiscount: + format: double + description: |- + The price of the product line item including item-level adjustments and prorated order-level adjustments, but not + including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it + includes tax. It is read only. + example: 40.5 + type: number + productId: + $ref: '#/components/schemas/ProductId' + productListItem: + description: If this product line item was added from a product list, this value is a reference to the corresponding product list item. + allOf: + - $ref: '#/components/schemas/ProductListItemReference' + productName: + description: The name of the product. + example: Nintendo DS Game Console + type: string + quantity: + minimum: 0 + format: double + description: The ordered quantity of the products represented by this item. + example: 1 + type: number + shipmentId: + description: The ID of the shipment this item belongs to. + example: me + type: string + shippingItemId: + description: |- + If the product line item has a related shipping item, this value is its ID. A related shipping item represents a + surcharge applied to individual products using a particular shipping method. It is read only. + example: 006490dcc338feeafc71c964bf + type: string + tax: + format: double + description: The tax on the line item before applying any adjustments. It is read only. + example: 0 + type: number + taxBasis: + format: double + description: The amount used to calculate the tax for this item. It is read only. + example: 50 + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: |- + The tax rate, which is the decimal tax rate to be applied + to the product represented by this item. It is read only. + example: 0.19 + type: number + required: + - optionId + - optionValueId + ProductListLink: + description: Document representing a link to a product list. + properties: + description: + description: The description of this product list. + type: string + name: + description: The name of this product list. + type: string + public: + description: |- + A flag indicating whether the owner made this product list available for access + by other customers. It is read only. + example: true + type: boolean + title: + description: The link title. + type: string + type: + description: The type of the product list. + example: shopping_list + enum: + - wish_list + - gift_registry + - shopping_list + - custom_1 + - custom_2 + - custom_3 + type: string + type: object + additionalProperties: false + ProductListItemReference: + description: Document representing product list item details. + type: object + additionalProperties: false + properties: + id: + description: The ID of the product list item. It is read only. + allOf: + - $ref: '#/components/schemas/ItemId' + priority: + format: int32 + description: The priority of the product list item. + example: 1 + type: integer + productDetailsLink: + $ref: '#/components/schemas/ProductDetailsLink' + productList: + description: A reference to the associated product list. It is read only. + allOf: + - $ref: '#/components/schemas/ProductListLink' + public: + example: false + type: boolean + purchasedQuantity: + format: double + description: The total quantity of this item purchased from the product list. + example: 0 + type: number + quantity: + minimum: 0 + format: double + description: The number of products or gift certificates that get shipped when purchasing this product list item. + example: 1 + type: number + type: + description: Specifies whether the item is a product or a gift certificate. + example: product + enum: + - product + - gift_certificate + type: string + required: + - id + ShipmentId: + minLength: 1 + type: string + example: me + description: The identifier of the shipment + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id + Shipment: + description: Document representing a shipment. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not including + service charges such as shipping. If the Discount Taxation preference is set to Tax Products and + Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + gift: + description: A flag indicating whether the shipment is a gift. It is read only. + example: true + type: boolean + giftMessage: + description: The gift message. + example: Happy Birthday + type: string + merchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, not including price adjustments or service charges such as + shipping. It is read only. + example: 4.95 + type: number + productSubTotal: + format: double + description: |- + The total price of all products in the shipment, including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If + the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + shipmentId: + description: The order-specific ID of the shipment. The default value is 'me'. + default: me + allOf: + - $ref: '#/components/schemas/ShipmentId' + shipmentNo: + description: The shipment number of this shipment. This number is automatically generated. It is read only. + type: string + shipmentTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments, shipping charges, + and tax. It is read only. + example: 39.99 + type: number + shippingAddress: + description: The shipping address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + shippingMethod: + $ref: '#/components/schemas/ShippingMethod' + shippingStatus: + description: The shipping status of the shipment. + example: shipped + enum: + - not_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges in the shipment, including shipping adjustments. If the + taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only. + example: 0.3 + type: number + taxTotal: + format: double + description: |- + The total tax on the shipment, including item-level price adjustments and service charges such as + shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on + Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only. + example: 1.8 + type: number + trackingNumber: + description: The tracking number of the shipment. + example: 1Z204E380338943508 + type: string + type: object + ShippingItem: + description: Document representing a shipping item. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedTax: + format: double + description: The tax for the shipping item, including price adjustments. It is read only. + example: 19 + type: number + basePrice: + format: double + description: |- + The base price of the shipping item, which is the unit price not including adjustments. + If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 50 + type: number + itemId: + description: |- + The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a + custom price adjustment for it. It is read only. + example: 430ef5aad3a24de59378458434 + type: string + itemText: + description: The text describing the shipping item. + example: Shipping + type: string + price: + format: double + description: |- + 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. It is read only. + type: number + priceAdjustments: + description: The price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + priceAfterItemDiscount: + format: double + description: |- + The price of the shipping item including item-level adjustments, but not including order-level + adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + type: number + shipmentId: + description: The identifier of the shipment to which this item belongs. + allOf: + - $ref: '#/components/schemas/ShipmentId' + tax: + format: double + description: The tax on the product item, not including adjustments. It is read only. + example: 0.19 + type: number + taxBasis: + format: double + description: The price used to calculate the tax for this shipping item. It is read only. + type: number + taxClassId: + description: |- + The tax class ID for the product item, or null + if no tax class ID is associated with the product item. It is read only. + type: string + taxRate: + format: double + description: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only. + type: number + type: object + Basket: + description: Document representing a basket. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the shipment, including item-level price adjustments but not + including service charges such as shipping. If the Discount Taxation preference is set to Tax + Products and Shipping Only Based on Adjusted Price, this amount also includes prorated + order-level price adjustments. It is read only. + example: 4.95 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only. + example: 0.3 + type: number + agentBasket: + description: Is the basket created by an agent? It is read only. + example: true + type: boolean + basketId: + description: The unique identifier for the basket. It is read only. + example: e78aa5646a8efebdd9cdd38be7 + type: string + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + couponItems: + description: The coupon items. + type: array + items: + $ref: '#/components/schemas/CouponItem' + creationDate: + description: The timestamp when the basket was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information, if the customer is logged in. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + giftCertificateItems: + description: The gift certificate line items. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + groupedTaxItems: + description: |- + Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same + tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. + type: array + items: + $ref: '#/components/schemas/GroupedTaxItem' + inventoryReservationExpiry: + description: The expiration datetime of the inventory reservation. It is read only. + example: '2015-05-19T15:30:18.000Z' + type: string + format: date-time + lastModified: + description: The timestamp when the basket was last modified. It is read only. + example: '2015-05-19T15:25:18.000Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. + Merchandise total price represents the sum of the product prices before + services (such as shipping) or adjustments from promotions have + been added. It is read only. + example: 4.95 + type: number + orderPriceAdjustments: + description: The order-level price adjustments. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderTotal: + format: double + description: The total price, including products, shipping and tax. It is read only. + example: 110.24 + type: number + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + productItems: + description: The product items. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including order-level adjustments or shipping + charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 88 + type: number + shipments: + description: The shipments. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't + include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + sourceCode: + description: The source code assigned to the basket. It is read only. + example: OUTDOOR1 + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. + example: true + type: boolean + temporaryBasket: + description: If the created basket is a temporary basket, this is set to true. Otherwise, it is set to false. + example: true + type: boolean + type: object + OrderNo: + description: The order number + minLength: 1 + maxLength: 50 + type: string + example: '00000410' + Order: + description: Document representing an order. + type: object + properties: + adjustedMerchandizeTotalTax: + format: double + description: |- + The total tax on products in the order, including price adjustments, but not including service charges such as + shipping. It is read only. + example: 1.5 + type: number + adjustedShippingTotalTax: + format: double + description: The total tax on shipping charges in the order, including shipping price adjustments. It is read only. + example: 0.3 + type: number + billingAddress: + description: The billing address. + allOf: + - $ref: '#/components/schemas/OrderAddress' + bonusDiscountLineItems: + description: The bonus discount line items. + type: array + items: + $ref: '#/components/schemas/BonusDiscountLineItem' + channelType: + description: The sales channel. It is read only. + example: storefront + enum: + - storefront + - callcenter + - marketplace + - dss + - store + - pinterest + - twitter + - facebookads + - subscriptions + - onlinereservation + - customerservicecenter + - instagramcommerce + - tiktok + - snapchat + - google + - whatsapp + - youtube + type: string + confirmationStatus: + description: The confirmation status. + example: confirmed + enum: + - not_confirmed + - confirmed + type: string + couponItems: + description: The coupon items. It is read only. + type: array + items: + $ref: '#/components/schemas/CouponItem' + createdBy: + description: |- + This value depends on how the order was created. If a shopper created the order, this value is Customer. + If a job created the order, this value is System. Otherwise, this value is the name of the user who created the order. It is read only. + example: Customer + type: string + creationDate: + description: The timestamp when the order was created. It is read only. + example: '2015-05-19T15:23:18.000Z' + type: string + format: date-time + currency: + description: The ISO 4217 mnemonic code of the currency. It is read only. + allOf: + - $ref: '#/components/schemas/CurrencyCode' + customerInfo: + description: The customer information for guest or logged-in customers. It is read only. + allOf: + - $ref: '#/components/schemas/CustomerInfo' + customerName: + description: The customer name. It is read only. + example: Max Mustermann + type: string + exportStatus: + description: The export status of the order. + example: exported + enum: + - not_exported + - exported + - ready + - failed + type: string + externalOrderStatus: + description: The external status of the order. + example: Submitted + type: string + giftCertificateItems: + description: The gift certificate line items. It is read only. + type: array + items: + $ref: '#/components/schemas/GiftCertificateItem' + globalPartyId: + description: The Customer 360 Global Party ID associated with the shopper. It is read only. + example: GP_1234 + type: string + lastModified: + description: The timestamp when the order was last modified. It is read only. + example: '2021-02-25T09:58:08.715Z' + type: string + format: date-time + merchandizeTotalTax: + format: double + description: |- + The total products tax in the purchase currency. Merchandise total prices represent the sum of product prices + not including shipping or adjustments. It is read only. + example: 1.5 + type: number + orderNo: + description: The order number. + example: '00000410' + allOf: + - $ref: '#/components/schemas/OrderNo' + orderPriceAdjustments: + description: The order-level price adjustments. It is read only. + type: array + items: + $ref: '#/components/schemas/PriceAdjustment' + orderToken: + description: |- + The order token used to secure the lookup of an order on base of the + plain order number. The order token contains only URL safe characters. It is read only. + type: string + orderTotal: + format: double + description: The total price, including products, shipping, and tax. It is read only. + example: 110.24 + type: number + orderViewCode: + description: |- + The order view code used to secure the order lookup of an order using Order Lookup API. + The order view code contains only URL safe characters. + Warning : Order view code must not be exposed in the URL and must only be displayed to the shopper or sent as an email. + Order view code must not be logged in the code. It is read only. + type: string + paymentInstruments: + description: The payment instruments list. + type: array + items: + $ref: '#/components/schemas/OrderPaymentInstrument' + paymentStatus: + description: The payment status. + example: paid + enum: + - not_paid + - part_paid + - paid + type: string + productItems: + description: The product items. It is read only. + type: array + items: + $ref: '#/components/schemas/ProductItem' + productSubTotal: + format: double + description: |- + The total price of all products including item-level adjustments, but not including + order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. + If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + productTotal: + format: double + description: |- + The total price of all products in the shipment including item-level adjustments and prorated + order-level adjustments, but not including shipping charges. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 99 + type: number + taxRoundedAtGroup: + description: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. It is read only. + type: boolean + example: true + shipments: + description: The shipments. It is read only. + type: array + items: + $ref: '#/components/schemas/Shipment' + shippingItems: + description: The shipping items. It is read only. + type: array + items: + $ref: '#/components/schemas/ShippingItem' + shippingStatus: + description: The shipping status. + example: shipped + enum: + - not_shipped + - part_shipped + - shipped + type: string + shippingTotal: + format: double + description: |- + The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, + it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only. + example: 5.99 + type: number + shippingTotalTax: + format: double + description: The total tax on all shipping charges, not including shipping adjustments. It is read only. + example: 0.3 + type: number + siteId: + description: The order's site. It is read only. + example: ShoppingSite + allOf: + - $ref: '#/components/schemas/SiteId' + sourceCode: + description: The source code assigned to the basket from which this order was created. It is read only. + example: OUTDOOR1 + type: string + status: + description: The status. + example: created + enum: + - created + - new + - completed + - cancelled + - replaced + - failed + type: string + taxTotal: + format: double + description: The total tax amount. It is read only. + example: 5.25 + type: number + taxation: + description: The taxation policy (gross or net). It is read only. + example: net + enum: + - gross + - net + type: string + groupedTaxItems: + description: |- + Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same + tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. + type: array + items: + $ref: '#/components/schemas/GroupedTaxItem' + guest: + description: The registration status of the customer. It is read only. + type: boolean + example: true + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + OrderLookupRequest: + description: Document representing an order lookup request. + type: object + required: + - email + - orderViewCode + additionalProperties: false + properties: + email: + description: The customer's email address associated with order to be looked up. + type: string + example: no-reply@salesforce.com + orderViewCode: + description: The order view code associated with the order to be looked up. + type: string + OrderPaymentCardRequest: + description: Document representing an order payment card request. + type: object + properties: + cardType: + maxLength: 256 + description: 'The payment card type (for example: Visa).' + example: Visa + type: string + creditCardToken: + description: |- + A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data + in the token store. + example: E67TY8GQ27X + type: string + expirationMonth: + format: int32 + description: The month when the payment card expires. + example: 3 + type: integer + expirationYear: + format: int32 + description: The year when the payment card expires. + example: 2025 + type: integer + holder: + maxLength: 256 + description: The payment card holder. + example: Max Mustermann + type: string + issueNumber: + maxLength: 256 + description: The payment card issue number. + example: '2' + type: string + maskedNumber: + pattern: ^[0-9 -]{0,7}\D{6,15}\d{0,4}$ + maxLength: 25 + description: The masked payment card number. + example: '*********4422' + type: string + validFromMonth: + minimum: 1 + maximum: 12 + format: int32 + description: The month the payment card is valid from. + example: 5 + type: integer + validFromYear: + format: int32 + description: The year the payment card is valid from. + example: 2019 + type: integer + OrderPaymentInstrumentRequest: + description: Document representing an order payment instrument request. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + properties: + amount: + format: double + description: The payment transaction amount. + example: 130.88 + type: number + bankRoutingNumber: + maxLength: 256 + description: The bank routing number. + example: '12030000' + type: string + giftCertificateCode: + maxLength: 256 + description: The gift certificate code. + type: string + paymentCard: + description: The payment card. + allOf: + - $ref: '#/components/schemas/OrderPaymentCardRequest' + paymentMethodId: + maxLength: 256 + description: The payment method ID. + example: CREDIT_CARD + type: string + PaymentCardSpec: + description: Document representing the specification for a payment card. + type: object + properties: + cardType: + description: The payment card type. It is read only. + example: Visa + type: string + checksumVerificationEnabled: + description: A flag indicating whether the card number is verified using the Luhn checksum algorithm. It is read only. + example: true + type: boolean + description: + description: The localized description of the payment card. It is read only. + type: string + image: + description: The URL to the image that represents the payment card. It is read only. + type: string + name: + description: The localized name of the payment card. It is read only. + type: string + numberLengths: + description: |- + The sorted list of number lengths (individual lengths as well as + length ranges). It is read only. + type: array + items: + type: string + numberPrefixes: + description: |- + The sorted list of number prefixes (individual prefixes as well + as prefix ranges). It is read only. + type: array + items: + type: string + securityCodeLength: + format: int32 + description: The length of the security code for this card. It is read only. + type: integer + PaymentMethod: + description: Document representing a payment method. + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + cards: + description: The sorted array of payment cards (included only when the system payment method is CREDIT_CARD). It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentCardSpec' + description: + description: The localized description of the payment method or card. It is read only. + type: string + id: + maxLength: 256 + description: The ID of the payment method or card. It is read only. + type: string + image: + description: The URL to the image that represents the payment method or card. It is read only. + type: string + name: + description: The localized name of the payment method or card. It is read only. + type: string + paymentProcessorId: + description: The payment processor ID. It is read only. It is read only. + type: string + required: + - id + PaymentMethodResult: + description: Result document of payment methods applicable for a basket. + properties: + applicablePaymentMethods: + description: The applicable payment methods. It is read only. + type: array + items: + $ref: '#/components/schemas/PaymentMethod' + type: object + TaxItem: + description: Object representing the taxation. + properties: + id: + description: The taxation identifier. + type: string + rate: + format: double + description: The taxation rate. + example: 0.13 + type: number + value: + format: double + description: The tax amount. Will be computed if not set. + type: number + type: object + additionalProperties: false + required: + - id + - rate + TaxItems: + description: Taxation for a line item. + type: object + properties: + taxItems: + description: The list of tax items. It is read only. + type: array + items: + $ref: '#/components/schemas/TaxItem' + Taxes: + description: Document representing the tax rates and (optionally) amounts for all items in a basket. + properties: + taxes: + description: 'Map containing the TaxItems for the line item ids: Map' + type: object + additionalProperties: + $ref: '#/components/schemas/TaxItems' + type: object + required: + - taxes + additionalProperties: false + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + orderNo: + name: orderNo + in: path + description: The order number of the order to be modified. + required: true + schema: + $ref: '#/components/schemas/OrderNo' + paymentInstrumentId: + name: paymentInstrumentId + in: path + required: true + schema: + $ref: '#/components/schemas/PaymentInstrumentId' + examples: + OrderPost: + value: + basketId: a10ff320829cb0eef93ca5310a + examples-OrderPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: 5ties + couponItemId: d3f7ae47e5897a6b5d2fd541f0 + statusCode: applied + valid: true + createdBy: Customer + creationDate: '2019-10-22T12:17:28.341Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + customerName: Stephanie Miller + email: shopper@salesforce-test.com + customerName: Stephanie Miller + exportStatus: not_exported + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 + guest: true + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 540db3ffe58bfb04ab673757d7 + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-22T12:17:28.376Z' + merchandizeTotalTax: 30 + orderNo: '00000410' + orderPriceAdjustments: + - appliedDiscount: + amount: 10 + type: amount + reasonCode: customer service + createdBy: support + creationDate: '2019-10-22T12:17:28.347Z' + custom: true + lastModified: '2019-10-22T12:17:28.349Z' + manual: true + price: -10 + priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 + promotionId: 5ties + orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I + orderTotal: 586.76 + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + paymentInstruments: + - amount: 20 + paymentInstrumentId: ca47e0da3d49b067b630db624a + paymentMethodId: BML + - amount: 566.76 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 6b970a04ca8a468a64b9936764 + paymentMethodId: CREDIT_CARD + paymentStatus: not_paid + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: d9516eecc64bd90b0022714d26 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: 8991e8d7adf0f46ffbc584e175 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.99 + priceAfterItemDiscount: 599.99 + priceAfterOrderDiscount: 589.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 37 + adjustedShippingTotalTax: 0.5 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: d5d95acf5381dc6e273b4336a7 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 768abee75aa8015239a9696c7e + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + status: created + taxation: net + taxTotal: 30.8 + BadRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: Decoding of the property with path '$.failedExample.[1].intProperty' failed because the expected type is 'Integer|Decimal' but the actual type was 'String'. + BasketNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/basket-not-found + title: Basket Not Found + detail: No basket with ID '123' could be found. + OrderGet: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: 5ties + couponItemId: d3f7ae47e5897a6b5d2fd541f0 + statusCode: applied + valid: true + createdBy: Customer + creationDate: '2019-10-22T12:17:28.341Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + customerName: Stephanie Miller + email: shopper@salesforce-test.com + customerName: Stephanie Miller + exportStatus: not_exported + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 + guest: true + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 540db3ffe58bfb04ab673757d7 + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-22T12:17:28.376Z' + merchandizeTotalTax: 30 + orderNo: '00000410' + orderPriceAdjustments: + - appliedDiscount: + amount: 10 + type: amount + reasonCode: customer service + createdBy: support + creationDate: '2019-10-22T12:17:28.347Z' + custom: true + lastModified: '2019-10-22T12:17:28.349Z' + manual: true + price: -10 + priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 + promotionId: 5ties + orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I + orderTotal: 586.76 + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + paymentInstruments: + - amount: 20 + paymentInstrumentId: ca47e0da3d49b067b630db624a + paymentMethodId: BML + - amount: 566.76 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 6b970a04ca8a468a64b9936764 + paymentMethodId: CREDIT_CARD + paymentStatus: not_paid + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: d9516eecc64bd90b0022714d26 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: 8991e8d7adf0f46ffbc584e175 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.99 + priceAfterItemDiscount: 599.99 + priceAfterOrderDiscount: 589.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 37 + adjustedShippingTotalTax: 0.5 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: d5d95acf5381dc6e273b4336a7 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 768abee75aa8015239a9696c7e + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + status: created + taxation: net + taxTotal: 30.8 + OrderLookup: + value: + email: no-reply@salesforce.com + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + OrderNotFound: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/order-not-found + title: Order Not Found + detail: No order with number '123' was found. + PaymentInstrumentPost: + value: + amount: 700 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '************4567' + holder: Miller + cardType: Visa + paymentMethodId: CREDIT_CARD + examples-PaymentInstrumentPost: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: 5ties + couponItemId: d3f7ae47e5897a6b5d2fd541f0 + statusCode: applied + valid: true + createdBy: Customer + creationDate: '2019-10-22T12:17:28.341Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + customerName: Stephanie Miller + email: shopper@salesforce-test.com + customerName: Stephanie Miller + exportStatus: not_exported + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 + guest: true + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 540db3ffe58bfb04ab673757d7 + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-22T12:17:28.376Z' + merchandizeTotalTax: 30 + orderNo: '00000410' + orderPriceAdjustments: + - appliedDiscount: + amount: 10 + type: amount + reasonCode: customer service + createdBy: support + creationDate: '2019-10-22T12:17:28.347Z' + custom: true + lastModified: '2019-10-22T12:17:28.349Z' + manual: true + price: -10 + priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 + promotionId: 5ties + orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I + orderTotal: 586.76 + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + paymentInstruments: + - amount: 20 + paymentInstrumentId: ca47e0da3d49b067b630db624a + paymentMethodId: BML + - amount: 566.76 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 6b970a04ca8a468a64b9936764 + paymentMethodId: CREDIT_CARD + - amount: 700 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '************4567' + holder: Miller + cardType: Visa + paymentInstrumentId: 9f21f0b51f206fbde2ff5789e5 + paymentMethodId: CREDIT_CARD + paymentStatus: not_paid + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: d9516eecc64bd90b0022714d26 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: 8991e8d7adf0f46ffbc584e175 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.99 + priceAfterItemDiscount: 599.99 + priceAfterOrderDiscount: 589.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 37 + adjustedShippingTotalTax: 0.5 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: d5d95acf5381dc6e273b4336a7 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 768abee75aa8015239a9696c7e + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + status: new + taxation: net + taxTotal: 30.8 + PaymentInstrumentPatch: + value: + amount: 2 + paymentMethodId: CREDIT_CARD + paymentCard: + cardType: Visa + maskedNumber: '****-****-****-4567' + examples-PaymentInstrumentPatch: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: 5ties + couponItemId: d3f7ae47e5897a6b5d2fd541f0 + statusCode: applied + valid: true + createdBy: Customer + creationDate: '2019-10-22T12:17:28.341Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + customerName: Stephanie Miller + email: shopper@salesforce-test.com + customerName: Stephanie Miller + exportStatus: not_exported + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 + guest: true + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 540db3ffe58bfb04ab673757d7 + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-22T12:17:28.376Z' + merchandizeTotalTax: 30 + orderNo: '00000410' + orderPriceAdjustments: + - appliedDiscount: + amount: 10 + type: amount + reasonCode: customer service + createdBy: support + creationDate: '2019-10-22T12:17:28.347Z' + custom: true + lastModified: '2019-10-22T12:17:28.349Z' + manual: true + price: -10 + priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 + promotionId: 5ties + orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I + orderTotal: 586.76 + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + paymentInstruments: + - amount: 20 + paymentInstrumentId: ca47e0da3d49b067b630db624a + paymentMethodId: BML + - amount: 566.76 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 6b970a04ca8a468a64b9936764 + paymentMethodId: CREDIT_CARD + - amount: 2 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '******4567' + holder: Miller + cardType: Visa + paymentInstrumentId: 9f21f0b51f206fbde2ff5789e5 + paymentMethodId: CREDIT_CARD + paymentStatus: not_paid + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: d9516eecc64bd90b0022714d26 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: 8991e8d7adf0f46ffbc584e175 + itemText: We will plant a tree for your order. + optionId: plantATree + optionValueId: '000' + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '000' + productName: Plant a tree. + quantity: 3 + shipmentId: me + tax: 0 + taxBasis: 0 + taxClassId: standard + taxRate: 0.05 + price: 599.99 + priceAfterItemDiscount: 599.99 + priceAfterOrderDiscount: 589.99 + productId: green-umbrella + productName: Green Umbrella - Sustained Edition + quantity: 3 + shipmentId: me + tax: 30 + taxBasis: 599.97 + taxClassId: standard + taxRate: 0.05 + productSubTotal: 599.97 + productTotal: 599.97 + shipments: + - adjustedMerchandizeTotalTax: 37 + adjustedShippingTotalTax: 0.5 + gift: false + merchandizeTotalTax: 30 + productSubTotal: 599.97 + productTotal: 599.97 + shipmentId: me + shipmentTotal: 646.76 + shippingAddress: + address1: 4162 Turkey Pen Road + city: New York + countryCode: US + firstName: Agustin + fullName: Agustin Estes + id: d5d95acf5381dc6e273b4336a7 + lastName: Estes + postalCode: '10016' + stateCode: NY + shippingMethod: + description: Order received within 7-10 business days + id: '001' + name: Ground + price: 15.99 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 768abee75aa8015239a9696c7e + itemText: Shipping + price: 15.99 + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxClassId: standard + taxRate: 0.05 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + status: new + taxation: net + taxTotal: 30.8 + PaymentMethodsGet: + value: + applicablePaymentMethods: + - id: GIFT_CERTIFICATE + name: Gift Certificate + paymentProcessorId: BASIC_GIFT_CERTIFICATE + - cards: + - cardType: Visa + checksumVerificationEnabled: true + name: Visa + numberLengths: + - '13' + - '16' + numberPrefixes: + - '4' + securityCodeLength: 3 + - cardType: Amex + checksumVerificationEnabled: true + name: American Express + numberLengths: + - '15' + numberPrefixes: + - '34' + - '37' + securityCodeLength: 4 + - cardType: Master Card + checksumVerificationEnabled: true + name: MasterCard + numberLengths: + - '16' + numberPrefixes: + - 51-55 + securityCodeLength: 3 + - cardType: Discover + checksumVerificationEnabled: true + name: Discover + numberLengths: + - '16' + numberPrefixes: + - '6011' + - 622126-622925 + - 644-649 + - '65' + securityCodeLength: 3 + id: CREDIT_CARD + name: Credit Card + paymentProcessorId: BASIC_CREDIT + - id: PayPal + name: Pay Pal + paymentProcessorId: PAYPAL_EXPRESS + - id: BML + name: Bill Me Later + paymentProcessorId: CYBERSOURCE_BML + OrderTaxGet: + value: + taxes: + 3d4e28425ce0b3a65b0ac4e163: + taxItems: + - id: DE_7 + rate: 0.07 + value: 13.99 + - id: DE_19 + rate: 0.19 + ff9452ed11fcf5c80f9143a8f1: + taxItems: + - id: US_1 + rate: 0.01 + - id: US_5 + rate: 0.05 + InvalidTaxMode: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-tax-mode + title: Invalid Tax Mode + detail: Basket with ID 'a10ff320829cb0eef93ca5310a' has invalid tax mode. + UnsupportedRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-request-if-scapi-hooks-enabled + title: Unsupported Request If SCAPI Hooks Enabled + detail: You can't call this endpoint because Salesforce Commerce API hook execution is enabled. diff --git a/apis/shopper-products-oas/.metadata.json b/apis/shopper-products-oas-1.0.36/.metadata.json similarity index 83% rename from apis/shopper-products-oas/.metadata.json rename to apis/shopper-products-oas-1.0.36/.metadata.json index a5aad7db..365c94c3 100644 --- a/apis/shopper-products-oas/.metadata.json +++ b/apis/shopper-products-oas-1.0.36/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-products-oas/1.0.33-tle.rp-demo-b6", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-products-oas/1.0.36", "name": "Shopper Products OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-products-oas", - "version": "1.0.33-tle.rp-demo-b6", + "version": "1.0.36", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-products-oas/exchange.json b/apis/shopper-products-oas-1.0.36/exchange.json similarity index 75% rename from apis/shopper-products-oas/exchange.json rename to apis/shopper-products-oas-1.0.36/exchange.json index 795e447c..56c22502 100644 --- a/apis/shopper-products-oas/exchange.json +++ b/apis/shopper-products-oas-1.0.36/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-products-oas-v1-bundled.yaml", + "main": "shopper-products-oas-v1-public.yaml", "name": "Shopper Products OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-products-oas", - "version": "1.0.33-tle.rp-demo-b6", + "version": "1.0.36", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-products-oas/shopper-products-oas-v1-bundled.yaml b/apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-internal.yaml similarity index 52% rename from apis/shopper-products-oas/shopper-products-oas-v1-bundled.yaml rename to apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-internal.yaml index 26129fd4..d9ef9751 100644 --- a/apis/shopper-products-oas/shopper-products-oas-v1-bundled.yaml +++ b/apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-internal.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.4 +openapi: 3.0.3 info: title: Shopper Products version: v1 @@ -48,9 +48,11 @@ info: Some promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: "add the product to your basket to view price information". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features. #### Shopper Personalization + The SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices. #### JWA Caching + The response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration. When the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA. @@ -60,6 +62,10 @@ info: For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + ### Test Description Changes + + uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew + ## Resources ### Product @@ -70,7 +76,7 @@ info: Categories and subcategories are the structure by which products are organized and grouped in a catalog and on a storefront. Categories can have relationships to other categories. Further, each category can provide context that is inherited by subcategories. For example, a category can have an assigned attribute. A product assigned to that category or any subcategory inherits the categories’s attribute value. Once the product is removed from the category, the attribute value is no longer inherited by the product. You can also use category linking for site hierarchical navigation. For example, inside the Clothing category you may have Men’s, and inside the Men’s category you may have Pants. - Categories are not tags. + Categories are not tags. ## Endpoints @@ -90,56 +96,49 @@ info: Returns category details including the parent child relationships for one or more categories. The limit on depth for the parent-child relationship is 2. servers: - - url: https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version} + - url: https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1 variables: shortCode: default: shortCode - version: - default: version paths: /organizations/{organizationId}/products: parameters: - $ref: '#/components/parameters/organizationId' get: - description: Allows access to multiple products by a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of productIDs that can be requested are 24. Along with product details, the availability, product options, images, price, promotions, and variations for the valid products will be included, as appropriate. + description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable. operationId: getProducts - summary: Allows access to multiple products by a single request + summary: Returns product details for multiple products. security: - ShopperToken: - sfcc.shopper-products parameters: - $ref: '#/components/parameters/ids' - $ref: '#/components/parameters/inventoryIds' - - $ref: '#/components/parameters/expand' + - $ref: '#/components/parameters/expand_multiId' - $ref: '#/components/parameters/allImages' - $ref: '#/components/parameters/perPricebook' - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/select' - $ref: '#/components/parameters/locale' - $ref: '#/components/parameters/currency' - - name: limit - in: query - required: false - schema: - type: integer - format: int32 - default: 10 - maximum: 10 - description: Custom query parameter added by the decorator. - - name: offset - in: query - required: false - schema: - type: integer - format: int64 - default: 0 - maximum: 0 - description: Custom query parameter added by the decorator. responses: '200': - $ref: '#/components/responses/GetProductsResponse' + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResult' '400': - $ref: '#/components/responses/GetProductsBadRequestResponse' + description: Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetProductsBadRequestResponseExample: + $ref: '#/components/examples/GetProductsBadRequestResponseExample' + MalformedSelectorResponseExample: + $ref: '#/components/examples/MalformedSelectorResponseExample' '401': $ref: '#/components/responses/401unauthorized' /organizations/{organizationId}/products/{id}: @@ -147,15 +146,15 @@ paths: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/id' get: - description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. Along with product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products will be included, as appropriate. + description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable. operationId: getProduct - summary: Allows access to product details for a single product ID + summary: Returns product details for a single product. security: - ShopperToken: - sfcc.shopper-products parameters: - $ref: '#/components/parameters/inventoryIds' - - $ref: '#/components/parameters/expand' + - $ref: '#/components/parameters/expand_singleId' - $ref: '#/components/parameters/allImages' - $ref: '#/components/parameters/perPricebook' - $ref: '#/components/parameters/select' @@ -164,20 +163,41 @@ paths: - $ref: '#/components/parameters/siteId' responses: '200': - $ref: '#/components/responses/GetProductResponse' + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + examples: + GetProductResponseExample: + $ref: '#/components/examples/GetProductResponseExample' '400': - $ref: '#/components/responses/GetProductBadRequestResponse' + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + MalformedSelectorResponseExample: + $ref: '#/components/examples/MalformedSelectorResponseExample' '401': $ref: '#/components/responses/401unauthorized' '404': - $ref: '#/components/responses/GetProductNotFoundResponse' + description: Product Not Found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetProductNotFoundResponseExample: + $ref: '#/components/examples/GetProductNotFoundResponseExample' /organizations/{organizationId}/categories: parameters: - $ref: '#/components/parameters/organizationId' get: - description: When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template as a convenient way of obtaining multiple categories in a single request, instead of issuing separate requests for each category. You can specify up to 50 multiple IDs. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character. The server only returns online categories. + description: When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character. operationId: getCategories - summary: Allows access to multiple categories by a single request + summary: Returns category and subcategory details for one or more categories. security: - ShopperToken: - sfcc.shopper-categories @@ -188,9 +208,23 @@ paths: - $ref: '#/components/parameters/siteId' responses: '200': - $ref: '#/components/responses/GetCategoriesResponse' + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/CategoryResult' + examples: + GetCategoriesResponseExample: + $ref: '#/components/examples/GetCategoriesResponseExample' '400': - $ref: '#/components/responses/GetCategoriesBadRequestResponse' + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoriesBadRequestResponseExample: + $ref: '#/components/examples/GetCategoriesBadRequestResponseExample' '401': $ref: '#/components/responses/401unauthorized' /organizations/{organizationId}/categories/{id}: @@ -198,12 +232,9 @@ paths: - $ref: '#/components/parameters/parameters-id' - $ref: '#/components/parameters/organizationId' get: - description: |- - When you use the URL template below, the server returns a category identified by its ID; by default, the server - also returns the first level of subcategories, but you can specify another level by setting the levels - parameter. The server only returns online categories. + description: "When you use the URL template, the server returns a category identified by the ID. By default, the server\nalso returns the first level of subcategories, but you can specify an additional level using the levels\nparameter.\n\nThis endpoint fetches both online and offline categories. For offline categories, only the top-level \ncategory is returned, not offline subcategories.\n\nUsing a large value for levels can cause performance issues when there is a large and deep category tree." operationId: getCategory - summary: Allows access to category details for a single category ID + summary: Returns category and subcategory details for a single category. security: - ShopperToken: - sfcc.shopper-categories @@ -213,14 +244,51 @@ paths: - $ref: '#/components/parameters/siteId' responses: '200': - $ref: '#/components/responses/GetCategoryResponse' + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Category' + examples: + GetCategoryResponseExample: + $ref: '#/components/examples/GetCategoryResponseExample' '400': - $ref: '#/components/responses/GetCategoryBadRequestResponse' + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoryBadRequestResponseExample: + $ref: '#/components/examples/GetCategoryBadRequestResponseExample' '401': $ref: '#/components/responses/401unauthorized' '404': - $ref: '#/components/responses/GetCategoryNotFoundResponse' + description: No online or offline category was found with the specified ID. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoryNotFoundResponseExample: + $ref: '#/components/examples/GetCategoryNotFoundResponseExample' components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-products: scope granting read-access to product endpoints + sfcc.shopper-categories: scope granting read-access to category endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-products: scope granting read-access to product endpoints + sfcc.shopper-categories: scope granting read-access to category endpoints schemas: OrganizationId: description: An identifier for the organization the request is being made by @@ -228,36 +296,18 @@ components: type: string minLength: 1 maxLength: 32 - ProductIds: - description: The IDs of the requested products (comma-separated, max 24 IDs) + ProductId: + minLength: 1 + maxLength: 100 type: string - example: apple-ipod-shuffle,apple-ipod-nano - InventoryIds: - description: The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs). - example: Site1InventoryList,Site2InventoryList,Site3InventoryList,Site4InventoryList,Site5InventoryList + description: The id (SKU) of the product. + example: apple-ipod-classic + InventoryId: + description: The inventory ID. type: string - ProductExpansions: - description: The expand parameter. A comma separated list with the allowed values. All expand parameters are used for the request when no expand parameter is provided. The value "none" may be used to turn off all expand options. - type: array - items: - enum: - - none - - availability - - bundled_products - - links - - promotions - - options - - images - - prices - - variations - - set_products - - recommendations - AllImages: - description: The flag that indicates whether to retrieve the whole image model for the requested product. - type: boolean - PerPricebook: - description: The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021. - type: boolean + minLength: 1 + maxLength: 256 + example: Site1InventoryList SiteId: minLength: 1 maxLength: 32 @@ -289,7 +339,6 @@ components: type: string LocaleCode: description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - type: string oneOf: - $ref: '#/components/schemas/LanguageCountry' - $ref: '#/components/schemas/LanguageCode' @@ -309,7 +358,6 @@ components: CurrencyCode: description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. example: USD - type: string oneOf: - $ref: '#/components/schemas/ISOCurrency' - $ref: '#/components/schemas/NoValue' @@ -353,7 +401,8 @@ components: description: |- The site default inventory information. This property is only returned in context of the 'availability' expansion. - $ref: '#/components/schemas/Inventory' + allOf: + - $ref: '#/components/schemas/Inventory' longDescription: description: The localized product's long description. example: Awesome long description of product @@ -368,7 +417,8 @@ components: type: string master: description: 'The master product information, only for types: master, variation group, and variant.' - $ref: '#/components/schemas/Master' + allOf: + - $ref: '#/components/schemas/Master' minOrderQuantity: format: double description: The minimum order quantity for this product. @@ -395,6 +445,11 @@ components: description: The localized product's page title. example: Apple IPod Classic type: string + pageMetaTags: + description: Page Meta tags associated with the given product. + type: array + items: + $ref: '#/components/schemas/PageMetaTag' price: format: double description: |- @@ -439,8 +494,10 @@ components: $ref: '#/components/schemas/ProductLink' productPromotions: description: |- - The array of active customer product promotions for this product. This array can be empty. - Coupon promotions are not returned in this array. + An array of active customer product promotions for this product, sorted by promotion priority + using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → + best discount → ID). This array can be empty. Coupon promotions are not returned in this array. + See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details. type: array items: $ref: '#/components/schemas/ProductPromotion' @@ -476,7 +533,8 @@ components: $ref: '#/components/schemas/ProductPriceTable' type: description: 'The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.' - $ref: '#/components/schemas/ProductType' + allOf: + - $ref: '#/components/schemas/ProductType' unit: description: The sales unit of the product. example: lbs @@ -522,6 +580,13 @@ components: required: - id type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId BundledProduct: description: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.* properties: @@ -530,7 +595,8 @@ components: type: string product: description: The product being bundled. - $ref: '#/components/schemas/Product' + allOf: + - $ref: '#/components/schemas/Product' quantity: format: double description: For the product being bundled, the quantity added to the bundle. @@ -541,12 +607,6 @@ components: - product - quantity type: object - ProductId: - minLength: 1 - maxLength: 100 - type: string - description: The id (SKU) of the product. - example: apple-ipod-classic Image: description: Product image properties: @@ -579,10 +639,12 @@ components: type: string image: description: The first product image for the configured viewtype and this variation value. - $ref: '#/components/schemas/Image' + allOf: + - $ref: '#/components/schemas/Image' imageSwatch: description: The first product image for the configured viewtype and this variation value (typically the swatch image). - $ref: '#/components/schemas/Image' + allOf: + - $ref: '#/components/schemas/Image' name: description: The localized display name of the variation value. example: Red @@ -640,10 +702,6 @@ components: - images - viewType type: object - InventoryId: - description: The inventory ID. - type: string - example: SiteList Inventory: description: Document representing inventory information of the current product for a particular inventory list. properties: @@ -683,6 +741,11 @@ components: required: - id type: object + Price: + type: number + description: Document representing a price for a product + format: double + example: 12.99 Master: description: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn't have a SKU.* properties: @@ -695,15 +758,13 @@ components: example: true type: boolean price: - format: double description: The minimum sales price of the related variants. - example: 15.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' priceMax: - format: double description: The maximum sales price of the related variants. - example: 25.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' prices: description: List of sale prices. type: object @@ -730,10 +791,9 @@ components: example: 5 Year Warranty type: string price: - format: double description: The effective price of the option value. - example: 15.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' required: - id type: object @@ -765,19 +825,28 @@ components: required: - id type: object + PageMetaTag: + description: Document representing a Page Meta Tag object. + properties: + id: + description: The ID of the Page Meta Tag. + type: string + example: title + value: + description: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID. + type: string + example: Buy the Long Sleeve Covered Placket Blouse for USD 61.99. PriceRange: description: Document representing price ranges for a product which happens to be a master product (per Pricebook) properties: maxPrice: - format: double description: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook) - example: 10.89 - type: number + allOf: + - $ref: '#/components/schemas/Price' minPrice: - format: double description: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook) - example: 10.89 - type: number + allOf: + - $ref: '#/components/schemas/Price' pricebook: description: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM. example: usd-list-pricebook @@ -838,10 +907,9 @@ components: example: summerSale type: string promotionalPrice: - format: double description: The promotional price for this product. - example: 12.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' required: - calloutMsg - promotionId @@ -871,7 +939,6 @@ components: example: Absolutely recommended type: string image: - description: The image of the recommendation. $ref: '#/components/schemas/Image' longDescription: description: The localized long description of the recommendation. @@ -882,7 +949,6 @@ components: example: Apple Ipod Shuffle type: string recommendationType: - description: The recommendation type of the recommendation. $ref: '#/components/schemas/RecommendationType' recommendedItemId: description: The recommended item ID of the recommendation. @@ -899,10 +965,9 @@ components: description: Tiered Price Level Object properties: price: - format: double description: Price for the product for the specified tier for the specified pricebook - example: 12.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' pricebook: description: The active pricebook for which this price is defined example: usd-list-pricebook @@ -953,10 +1018,9 @@ components: example: true type: boolean price: - format: double description: The sales price of the variant. - example: 25.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' productId: description: The ID (SKU) of the variant. example: 8W4756834 @@ -983,10 +1047,9 @@ components: example: false type: boolean price: - format: double description: The sales price of the variation group. - example: 24.99 - type: number + allOf: + - $ref: '#/components/schemas/Price' productId: description: The ID (SKU) of the variation group. example: 49345VG @@ -1028,13 +1091,12 @@ components: type: object ErrorResponse: type: object + additionalProperties: true properties: title: - description: | - A short, human-readable summary of the problem - type. It will not change from occurrence to occurrence of the - problem, except for purposes of localization + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" type: string + maxLength: 256 example: You do not have enough credit type: description: | @@ -1047,6 +1109,7 @@ components: that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5. type: string + maxLength: 2048 example: NotEnoughMoney detail: description: A human-readable explanation specific to this occurrence of the problem. @@ -1060,24 +1123,45 @@ components: that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5. type: string + maxLength: 2048 example: /account/12345/msgs/abc required: - title - type - detail - CategoryIds: - description: The comma separated list of category IDs (max 50). + CategoryId: + maxLength: 256 + minLength: 1 type: string - example: electronics-digital-cameras,electronics-televisions - Levels: - description: Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. - type: integer + description: The ID of the category. + example: mens + Limit: + default: 10 + minimum: 1 format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 minimum: 0 - enum: - - 0 - - 1 - - 2 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' Category: description: Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category can also provide a context inherited by subcategories. For example, a category may have an attribute value assigned to it, and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product. Linking of categories is also used for Site hierarchical navigation. For example, inside 'Clothing' you may have 'Mens', and inside 'Mens' you may have 'Pants'. Categories are not *Tags.* properties: @@ -1095,14 +1179,16 @@ components: image: description: The URL of the category image. type: string + example: https://example.com/images/large/mens-category.jpg name: description: The localized name of the category. - example: Men's Category + example: Mens type: string onlineSubCategoriesCount: format: int64 description: The total number of online sub-categories. This information will be available from B2C Commerce version 24.5. type: integer + example: 20 pageDescription: description: The localized page description of the category. example: This category ahs all men's clothing @@ -1131,11 +1217,13 @@ components: required: - id type: object - CategoryId: - description: The ID of the category. - type: string - maxLength: 256 - example: electronics-digital-cameras + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId PathRecord: description: Document representing most basic info (id and name) of a category or catalog. properties: @@ -1150,751 +1238,20 @@ components: type: object CategoryResult: description: Result document containing an array of categories. + allOf: + - $ref: '#/components/schemas/ResultBase' properties: - limit: - format: int32 - description: The number of returned documents. - example: 10 - type: integer data: description: The array of category documents. type: array items: $ref: '#/components/schemas/Category' - total: - format: int32 - description: The total number of documents. - example: 5 - type: integer required: - - limit - data - - total type: object - responses: - GetProductsResponse: - description: Response of getProducts endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/ProductResult' - examples: - GetProductsResponseExample: - value: - limit: 2 - data: - - brand: Apple - currency: USD - id: apple-ipod-shuffle - imageGroups: - - images: - - alt: Apple iPod Shuffle, , large - link: https://example.com/dwc2cc65b0/images/large/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: large - - images: - - alt: Apple iPod Shuffle, , medium - link: https://example.com/dw5f36aab1/images/medium/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: medium - - images: - - alt: Apple iPod Shuffle, , small - link: https://example.com/dw2b078e02/images/small/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: small - inventory: - ats: 900 - backorderable: false - id: inventory - orderable: true - preorderable: false - stockLevel: 900 - longDescription: Supports MP3, MP3 VBR, AAC, Protected AAC, Audible 2, 3 and 4, Apple Lossless and AIFF audio formats; also supports JPEG, BMP, GIF, TIFF, PSD (Mac only) and PNG image formats and H.264 (high-definition), MPEG-4 and MPEG-4 video formats - master: - masterId: apple-ipod-shuffle - orderable: true - price: 45.99 - name: Apple iPod Shuffle - options: - - description: Product Warranty - id: warranty - name: Warranty - values: - - default: true - id: o1 - name: Option One - price: 10 - - default: false - id: o2 - name: Option Two - price: 20 - - default: false - id: o3 - name: Option Three - price: 30 - pageDescription: This iPod delivers everything you love about iPod with added features all wrapped in a tiny 4.9 oz. package. With 120GB of storage and up to 36 hours music playback, iPod classic lets you enjoy up to 30,000 songs or 150 hours of video — or a combination — wherever you go. - pageKeywords: Apple, iPod, iPod Classic, MP3, Music Player - pageTitle: Apple iPod Nano - price: 45.99 - priceMax: 69 - primaryCategoryId: electronics-digital-media-players - shortDescription: This iPod delivers everything you love about iPod with added features all wrapped in a tiny 4.9 oz. package. With 120GB of storage and up to 36 hours music playback, iPod classic lets you enjoy up to 30,000 songs or 150 hours of video — or a combination — wherever you go. - type: - master: true - variants: - - orderable: true - price: 45.99 - productId: apple-ipod-shuffle-silver-1g - variationValues: - color: Silver - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-blue-1g - variationValues: - color: Blue - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-green-1g - variationValues: - color: Green - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-red-1g - variationValues: - color: Red - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-fuscia-1g - variationValues: - color: Fuscia - memorySize: 1 GB - - orderable: true - price: 60 - productId: apple-ipod-shuffle-silver-2g - variationValues: - color: Silver - memorySize: 2 GB - - orderable: true - price: 69 - productId: apple-ipod-shuffle-green-2g - variationValues: - color: Green - memorySize: 2 GB - - orderable: true - price: 60 - productId: apple-ipod-shuffle-red-2g - variationValues: - color: Red - memorySize: 2 GB - - orderable: true - price: 69 - productId: apple-ipod-shuffle-fuscia-2g - variationValues: - color: Fuscia - memorySize: 2 GB - variationAttributes: - - id: color - name: Color - values: - - name: Silver - orderable: true - value: Silver - - name: Blue - orderable: true - value: Blue - - name: Green - orderable: true - value: Green - - name: Red - orderable: true - value: Red - - name: Fuscia - orderable: true - value: Fuscia - - id: memorySize - name: Memory Size - values: - - name: 1 GB - orderable: true - value: 1 GB - - name: 2 GB - orderable: true - value: 2 GB - - brand: Apple - currency: USD - id: apple-ipod-nano - imageGroups: - - images: - - alt: Apple iPod Nano, , large - link: https://example.com/dw6228cf42/images/large/ipod-nano-silver.jpg - title: 'Apple iPod Nano, ' - viewType: large - - images: - - alt: Apple iPod Nano, , medium - link: https://example.com/dw6d95bfcf/images/medium/ipod-nano-silver.jpg - title: 'Apple iPod Nano, ' - viewType: medium - - images: - - alt: Apple iPod Nano, , small - link: https://example.com/default/dwc0ba7002/images/small/ipod-nano-silver.jpg - title: 'Apple iPod Nano, ' - viewType: small - inventory: - ats: 1710 - backorderable: false - id: inventory - orderable: true - preorderable: false - stockLevel: 1700 - longDescription: Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support - master: - masterId: apple-ipod-nano - orderable: true - price: 119 - minOrderQuantity: 1 - name: Apple iPod Nano - pageDescription: The all new iPod nano has a curved aluminum and glass design and stunning new features. The Genius music feature helps you find music to fit your mood. With the built-in accelerometer, you can rotate the nano to flip through album art with Cover Flow. Plus, view photos and videos in either portrait or landscape. - pageKeywords: Apple, iPod, Nano, MP3, Music Player - pageTitle: Apple iPod Nano - price: 119 - priceMax: 199 - primaryCategoryId: electronics-digital-media-players - shortDescription: "The all new iPod nano has a curved aluminum and glass design and stunning new features. The Genius music \r\nfeature helps you find music to fit your mood. With the built-in accelerometer, you can rotate the nano to flip through album art with \r\nCover Flow. Plus, view photos and videos in either portrait or landscape." - stepQuantity: 1 - type: - master: true - variants: - - orderable: true - price: 149 - productId: apple-ipod-nano-silver-8g - variationValues: - color: Silver - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-black-8g - variationValues: - color: Black - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-purple-8g - variationValues: - color: Purple - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-blue-8g - variationValues: - color: Blue - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-green-8g - variationValues: - color: Green - memorySize: 8 GB - - orderable: true - price: 119 - productId: apple-ipod-nano-yellow-8g - variationValues: - color: Yellow - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-orange-8g - variationValues: - color: Orange - memorySize: 8 GB - - orderable: true - price: 119 - productId: apple-ipod-nano-red-8g - variationValues: - color: Red - memorySize: 8 GB - - orderable: true - price: 149 - productId: apple-ipod-nano-fuscia-8g - variationValues: - color: Fuscia - memorySize: 8 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-silver-16g - variationValues: - color: Silver - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-black-16g - variationValues: - color: Black - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-purple-16g - variationValues: - color: Purple - memorySize: 16 GB - - orderable: true - price: 159 - productId: apple-ipod-nano-blue-16g - variationValues: - color: Blue - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-green-16g - variationValues: - color: Green - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-yellow-16g - variationValues: - color: Yellow - memorySize: 16 GB - - orderable: true - price: 159 - productId: apple-ipod-nano-orange-16g - variationValues: - color: Orange - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-red-16g - variationValues: - color: Red - memorySize: 16 GB - - orderable: true - price: 199 - productId: apple-ipod-nano-fuscia-16g - variationValues: - color: Fuscia - memorySize: 16 GB - variationAttributes: - - id: color - name: Color - values: - - name: Silver - orderable: true - value: Silver - - name: Black - orderable: true - value: Black - - name: Purple - orderable: true - value: Purple - - name: Blue - orderable: true - value: Blue - - name: Green - orderable: true - value: Green - - name: Yellow - orderable: true - value: Yellow - - name: Orange - orderable: true - value: Orange - - name: Red - orderable: true - value: Red - - name: Fuscia - orderable: true - value: Fuscia - - id: memorySize - name: Memory Size - values: - - name: 8 GB - orderable: true - value: 8 GB - - name: 16 GB - orderable: true - value: 16 GB - total: 2 - GetProductsBadRequestResponse: - description: GetProductsBadRequestResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetProductsBadRequestResponseExample: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation - detail: Maximum number of products you can request in one call is 25. - MalformedSelectorResponseExample: - value: - title: Malformed Selector - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector - detail: The property selector '(data.(name, imageGroups.(**))' is malformed. - selector: (data.(name, imageGroups.(**)) - 401unauthorized: - description: Your access token is invalid or expired and can’t be used to identify a user. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - UnauthorizedExample: - $ref: '#/components/examples/UnauthorizedExample' - GetProductResponse: - description: Response of getProduct endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/ProductResult' - examples: - GetProductResponseExample: - value: - brand: Apple - currency: USD - id: apple-ipod-shuffle - imageGroups: - - images: - - alt: Apple iPod Shuffle, , large - link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2cc65b0/images/large/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: large - - images: - - alt: Apple iPod Shuffle, , medium - link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw5f36aab1/images/medium/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: medium - - images: - - alt: Apple iPod Shuffle, , small - link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw2b078e02/images/small/ipod-shuffle-silver.jpg - title: 'Apple iPod Shuffle, ' - viewType: small - inventory: - ats: 0 - backorderable: false - id: SiteGenesisList - orderable: true - preorderable: false - stockLevel: 999999 - longDescription: Supports AAC, protected AAC, MP3, MP3 VBR, Audible, WAV and AIFF for immediate playback of multiple formats. - master: - masterId: apple-ipod-shuffle - orderable: false - price: 45.99 - minOrderQuantity: 1 - name: Apple iPod Shuffle - pageDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. - pageKeywords: Apple, iPod, Shuffle, MP3, Music Player - pageTitle: Apple iPod Shuffle - price: 45.99 - priceMax: 69 - primaryCategoryId: electronics-digital-media-players - shortDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. - stepQuantity: 1 - type: - master: true - variants: - - orderable: true - price: 45.99 - productId: apple-ipod-shuffle-silver-1g - variationValues: - color: Silver - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-blue-1g - variationValues: - color: Blue - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-green-1g - variationValues: - color: Green - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-red-1g - variationValues: - color: Red - memorySize: 1 GB - - orderable: true - price: 49 - productId: apple-ipod-shuffle-fuscia-1g - variationValues: - color: Fuscia - memorySize: 1 GB - - orderable: true - price: 60 - productId: apple-ipod-shuffle-silver-2g - variationValues: - color: Silver - memorySize: 2 GB - - orderable: true - price: 69 - productId: apple-ipod-shuffle-green-2g - variationValues: - color: Green - memorySize: 2 GB - - orderable: true - price: 60 - productId: apple-ipod-shuffle-red-2g - variationValues: - color: Red - memorySize: 2 GB - - orderable: true - price: 69 - productId: apple-ipod-shuffle-fuscia-2g - variationValues: - color: Fuscia - memorySize: 2 GB - variationAttributes: - - id: color - name: Color - values: - - name: Silver - orderable: false - value: Silver - - name: Blue - orderable: false - value: Blue - - name: Green - orderable: false - value: Green - - name: Red - orderable: false - value: Red - - name: Fuscia - orderable: false - value: Fuscia - - id: memorySize - name: Memory Size - values: - - name: 1 GB - orderable: true - value: 1 GB - - name: 2 GB - orderable: true - value: 2 GB - GetProductBadRequestResponse: - description: GetProductBadRequestResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - MalformedSelectorResponseExample: - value: - title: Malformed Selector - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector - detail: The property selector '(brand,imageGroups.(**)' is malformed. - selector: (brand,imageGroups.(**) - GetProductNotFoundResponse: - description: GetProductNotFoundResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetProductNotFoundResponseExample: - value: - title: Product Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found - detail: No product with ID 'pple-ipod-shuffle' for site 'SiteGenesis' could be found. - productId: pple-ipod-shuffle - siteId: SiteGenesis - GetCategoriesResponse: - description: Response of getCategories endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/CategoryResult' - examples: - GetCategoriesResponseExample: - value: - limit: 2 - data: - - id: electronics-digital-cameras - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg - name: Digital Cameras - onlineSubCategoriesCount: 0 - pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: cameras, digital camerasm point and shoot, slr - pageTitle: Digital Cameras - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - - categories: - - id: electronics-televisions-flat-screen - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg - name: Flat Screen - pageDescription: Shop all Flat Screen Televisions including the latest in LCD and Plasma technology from all the latest brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: flat screen, flat screen television, LCD, plasma, HDTV - pageTitle: LCD & Plasma High Definition Flat Screen Televisions - parentCategoryId: electronics-televisions - parent_category_tree: - - id: electronics - name: electronics - - id: electronics-televisions-projection - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg - name: Projection - onlineSubCategoriesCount: 0 - pageDescription: Shop all Projection Televisions from all the latest brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: projection, projection televisions, HDTV - pageTitle: Projection High Definition Televisions - parentCategoryId: electronics-televisions - parent_category_tree: - - id: electronics - name: electronics - id: electronics-televisions - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg - name: Televisions - onlineSubCategoriesCount: 2 - pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection - pageTitle: Televisions Including LCD, Plasma & More in High Definition - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - total: 2 - GetCategoriesBadRequestResponse: - description: GetProductsBadRequestResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetCategoriesBadRequestResponseExample: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation - detail: Maximum number of categories you can request in one call is 50. - GetCategoryResponse: - description: Response of getCategory endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/CategoryResult' - examples: - GetCategoryResponseExample: - value: - categories: - - id: electronics-televisions - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg - name: Televisions - onlineSubCategoriesCount: 2 - pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection - pageTitle: Televisions Including LCD, Plasma & More in High Definition - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - c_enableCompare: true - c_showInMenu: true - c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1d6f6411/images/slot/landing/cat-landing-tv.jpg - - id: electronics-digital-cameras - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg - name: Digital Cameras - onlineSubCategoriesCount: 0 - pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: cameras, digital camerasm point and shoot, slr - pageTitle: Digital Cameras - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - c_enableCompare: true - c_showInMenu: true - c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1a543dc7/images/slot/landing/cat-landing-camera.jpg - - id: electronics-digital-media-players - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw7e9353db/images/slot/sub_banners/cat-banner-electronics-mp3.jpg - name: iPod & MP3 Players - onlineSubCategoriesCount: 0 - pageDescription: Shop Digital Media Players including iPods, Creative Zen, Sony & the latest from all the top brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: mp3, iPods, mp3 players - pageTitle: iPod & MP3 Digital Media Players - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - c_enableCompare: true - c_showInMenu: true - c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9f3d289a/images/slot/landing/cat-landing-mp3.jpg - - id: electronics-gps-units - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw6ea864f2/images/slot/sub_banners/cat-banner-electronics-gps.jpg - name: GPS Navigation - onlineSubCategoriesCount: 0 - pageDescription: Shop the latest in GPS units from Garmin and Tom Tom along with other brands, makes and models at Salesforce Commerce Cloud. - pageKeywords: gps, gps units, garmin, tom tom - pageTitle: GPS Units - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - c_enableCompare: true - c_showInMenu: true - c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwad4e06f8/images/slot/landing/cat-landing-gps.jpg - - id: electronics-gaming - image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9da58d91/images/slot/sub_banners/cat-banner-electronics.jpg - name: Gaming - onlineSubCategoriesCount: 2 - pageDescription: Shop games and game consoles from Xbox, Xbox360, Playstation 2, Playstation 3, Game Cube, Wii, Playstation Portable and Nintento DS at Salesforce Commerce Cloud. - pageKeywords: gaming, xbox, xbox360, ps3, ps2, playstaion 3, psp, game cube, wii, nintendo, nintendo ds - pageTitle: Gaming - parentCategoryId: electronics - parent_category_tree: - - id: electronics - name: electronics - c_enableCompare: true - c_showInMenu: true - c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/en_US/v1551233475301/images/slot/landing/cat-landing-gaming.jpg - id: electronics - name: Electronics - onlineSubCategoriesCount: 5 - pageDescription: Shop Electronics including the latest in televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS & gaming at Salesforce Commerce Cloud - pageKeywords: televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS, gaming - pageTitle: Shop Electronics Including Televisions, Digital Cameras, iPods & More - parentCategoryId: root - parent_category_tree: - - id: root - name: root - c_enableCompare: true - c_headerMenuOrientation: Vertical - c_showInMenu: true - GetCategoryBadRequestResponse: - description: GetCategoryBadRequestResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetCategoryBadRequestResponseExample: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation - detail: Maximum number of categories you can request in one call is 50. - GetCategoryNotFoundResponse: - description: GetProductNotFoundResponse - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetCategoryNotFoundResponseExample: - value: - title: Category Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found - detail: No category with ID 'electronics-televi' for site 'SiteGenesis' could be found. - productId: electronics-televi - siteId: SiteGenesis parameters: organizationId: + description: An identifier for the organization the request is being made by name: organizationId in: path required: true @@ -1903,51 +1260,100 @@ components: $ref: '#/components/schemas/OrganizationId' ids: name: ids + description: The IDs of the requested products (comma-separated, max 24 IDs). in: query required: true schema: - $ref: '#/components/schemas/ProductIds' + type: array + items: + allOf: + - $ref: '#/components/schemas/ProductId' + - maxItems: 100 + example: apple-ipod-shuffle,apple-ipod-nano inventoryIds: + description: The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs). name: inventoryIds in: query schema: - $ref: '#/components/schemas/InventoryIds' - expand: + type: array + items: + allOf: + - $ref: '#/components/schemas/InventoryId' + - maxItems: 5 + example: Site1InventoryList,Site2InventoryList,Site3InventoryList,Site4InventoryList,Site5InventoryList + expand_multiId: name: expand + description: "All expand parameters except page_meta_tags are used for the request when no expand parameter is provided. \nThe value \"none\" may be used to turn off all expand options. \nThe page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2." in: query schema: - $ref: '#/components/schemas/ProductExpansions' + type: array + example: + - prices + - promotions + items: + enum: + - none + - availability + - links + - promotions + - options + - images + - prices + - variations + - recommendations + - page_meta_tags + example: promotions allImages: name: allImages + description: The flag that indicates whether to retrieve the whole image model for the requested product. in: query schema: - $ref: '#/components/schemas/AllImages' + type: boolean + example: true perPricebook: name: perPricebook + description: The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021. in: query schema: - $ref: '#/components/schemas/PerPricebook' + type: boolean + example: true siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. name: siteId in: query - required: false + required: true + examples: + SiteId: + value: RefArch schema: $ref: '#/components/schemas/SiteId' - example: en-US select: + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. name: select in: query + examples: + select: + value: (**) schema: $ref: '#/components/schemas/Select' locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. name: locale in: query - required: false + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US schema: $ref: '#/components/schemas/LocaleCode' currency: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. name: currency in: query + examples: + CurrencyCode: + value: USD schema: $ref: '#/components/schemas/CurrencyCode' id: @@ -1957,17 +1363,55 @@ components: required: true schema: $ref: '#/components/schemas/ProductId' + expand_singleId: + name: expand + description: "All expand parameters except page_meta_tags are used for the request when no expand parameter is provided. \nThe value \"none\" may be used to turn off all expand options. \nThe page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2." + in: query + schema: + type: array + example: + - prices + - promotions + items: + enum: + - none + - availability + - bundled_products + - links + - promotions + - options + - images + - prices + - variations + - set_products + - recommendations + - page_meta_tags + example: links parameters-ids: name: ids + description: The comma separated list of category IDs (max 50). in: query required: true schema: - $ref: '#/components/schemas/CategoryIds' + type: array + items: + allOf: + - $ref: '#/components/schemas/CategoryId' + - maxItems: 50 + example: electronics-digital-cameras,electronics-televisions levels: name: levels + description: Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned. in: query schema: - $ref: '#/components/schemas/Levels' + type: integer + format: int32 + minimum: 0 + enum: + - 0 + - 1 + - 2 + example: 1 parameters-id: name: id in: path @@ -1976,32 +1420,323 @@ components: schema: $ref: '#/components/schemas/CategoryId' examples: + GetProductsBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of products you can request in one call is 25. + MalformedSelectorResponseExample: + value: + title: Malformed Selector + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector + detail: The property selector '(data.(name, imageGroups.(**))' is malformed. + selector: (data.(name, imageGroups.(**)) UnauthorizedExample: value: type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized title: Unauthorized detail: Your access token is invalid or expired and can’t be used to identify a user. - requestBodies: {} - headers: {} - securitySchemes: - ShopperToken: - type: oauth2 - description: | - ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. - For a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary). - A shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications. - The `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token. - flows: - clientCredentials: - tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-products: scope granting read-access to product endpoints - sfcc.shopper-categories: scope granting read-access to category endpoints - authorizationCode: - authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize - tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - echo:read: Allows read operation on echo resource - example: Just an example - links: {} - callbacks: {} + GetProductResponseExample: + value: + brand: Apple + currency: USD + id: apple-ipod-shuffle + imageGroups: + - images: + - alt: Apple iPod Shuffle, , large + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2cc65b0/images/large/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: large + - images: + - alt: Apple iPod Shuffle, , medium + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw5f36aab1/images/medium/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: medium + - images: + - alt: Apple iPod Shuffle, , small + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw2b078e02/images/small/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: small + inventory: + ats: 0 + backorderable: false + id: SiteGenesisList + orderable: true + preorderable: false + stockLevel: 999999 + longDescription: Supports AAC, protected AAC, MP3, MP3 VBR, Audible, WAV and AIFF for immediate playback of multiple formats. + master: + masterId: apple-ipod-shuffle + orderable: false + price: 45.99 + minOrderQuantity: 1 + name: Apple iPod Shuffle + pageDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. + pageKeywords: Apple, iPod, Shuffle, MP3, Music Player + pageMetaTags: + - id: description + value: The updated Shuffle features the same-sized circular control pad in a more compact, clip-on case, making it perfect for on-the-go use. + - id: robots + value: index, follow + - id: title + value: Buy the Apple iPod Shuffle for USD 45.99-69.00. + pageTitle: Apple iPod Shuffle + price: 45.99 + priceMax: 69 + primaryCategoryId: electronics-digital-media-players + shortDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. + stepQuantity: 1 + type: + master: true + variants: + - orderable: true + price: 45.99 + productId: apple-ipod-shuffle-silver-1g + variationValues: + color: Silver + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-blue-1g + variationValues: + color: Blue + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-green-1g + variationValues: + color: Green + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-red-1g + variationValues: + color: Red + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-fuscia-1g + variationValues: + color: Fuscia + memorySize: 1 GB + - orderable: true + price: 60 + productId: apple-ipod-shuffle-silver-2g + variationValues: + color: Silver + memorySize: 2 GB + - orderable: true + price: 69 + productId: apple-ipod-shuffle-green-2g + variationValues: + color: Green + memorySize: 2 GB + - orderable: true + price: 60 + productId: apple-ipod-shuffle-red-2g + variationValues: + color: Red + memorySize: 2 GB + - orderable: true + price: 69 + productId: apple-ipod-shuffle-fuscia-2g + variationValues: + color: Fuscia + memorySize: 2 GB + variationAttributes: + - id: color + name: Color + values: + - name: Silver + orderable: false + value: Silver + - name: Blue + orderable: false + value: Blue + - name: Green + orderable: false + value: Green + - name: Red + orderable: false + value: Red + - name: Fuscia + orderable: false + value: Fuscia + - id: memorySize + name: Memory Size + values: + - name: 1 GB + orderable: true + value: 1 GB + - name: 2 GB + orderable: true + value: 2 GB + GetProductNotFoundResponseExample: + value: + title: Product Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found + detail: No product with ID 'pple-ipod-shuffle' for site 'SiteGenesis' could be found. + productId: pple-ipod-shuffle + siteId: SiteGenesis + GetCategoriesResponseExample: + value: + limit: 2 + data: + - id: electronics-digital-cameras + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg + name: Digital Cameras + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: cameras, digital camerasm point and shoot, slr + pageTitle: Digital Cameras + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + - categories: + - id: electronics-televisions-flat-screen + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Flat Screen + pageDescription: Shop all Flat Screen Televisions including the latest in LCD and Plasma technology from all the latest brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: flat screen, flat screen television, LCD, plasma, HDTV + pageTitle: LCD & Plasma High Definition Flat Screen Televisions + parentCategoryId: electronics-televisions + parent_category_tree: + - id: electronics + name: electronics + - id: electronics-televisions-projection + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Projection + onlineSubCategoriesCount: 0 + pageDescription: Shop all Projection Televisions from all the latest brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: projection, projection televisions, HDTV + pageTitle: Projection High Definition Televisions + parentCategoryId: electronics-televisions + parent_category_tree: + - id: electronics + name: electronics + id: electronics-televisions + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Televisions + onlineSubCategoriesCount: 2 + pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection + pageTitle: Televisions Including LCD, Plasma & More in High Definition + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + total: 2 + GetCategoriesBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of categories you can request in one call is 50. + GetCategoryResponseExample: + value: + categories: + - id: electronics-televisions + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Televisions + onlineSubCategoriesCount: 2 + pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection + pageTitle: Televisions Including LCD, Plasma & More in High Definition + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1d6f6411/images/slot/landing/cat-landing-tv.jpg + - id: electronics-digital-cameras + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg + name: Digital Cameras + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: cameras, digital camerasm point and shoot, slr + pageTitle: Digital Cameras + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1a543dc7/images/slot/landing/cat-landing-camera.jpg + - id: electronics-digital-media-players + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw7e9353db/images/slot/sub_banners/cat-banner-electronics-mp3.jpg + name: iPod & MP3 Players + onlineSubCategoriesCount: 0 + pageDescription: Shop Digital Media Players including iPods, Creative Zen, Sony & the latest from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: mp3, iPods, mp3 players + pageTitle: iPod & MP3 Digital Media Players + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9f3d289a/images/slot/landing/cat-landing-mp3.jpg + - id: electronics-gps-units + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw6ea864f2/images/slot/sub_banners/cat-banner-electronics-gps.jpg + name: GPS Navigation + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest in GPS units from Garmin and Tom Tom along with other brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: gps, gps units, garmin, tom tom + pageTitle: GPS Units + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwad4e06f8/images/slot/landing/cat-landing-gps.jpg + - id: electronics-gaming + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9da58d91/images/slot/sub_banners/cat-banner-electronics.jpg + name: Gaming + onlineSubCategoriesCount: 2 + pageDescription: Shop games and game consoles from Xbox, Xbox360, Playstation 2, Playstation 3, Game Cube, Wii, Playstation Portable and Nintento DS at Salesforce Commerce Cloud. + pageKeywords: gaming, xbox, xbox360, ps3, ps2, playstaion 3, psp, game cube, wii, nintendo, nintendo ds + pageTitle: Gaming + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/en_US/v1551233475301/images/slot/landing/cat-landing-gaming.jpg + id: electronics + name: Electronics + onlineSubCategoriesCount: 5 + pageDescription: Shop Electronics including the latest in televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS & gaming at Salesforce Commerce Cloud + pageKeywords: televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS, gaming + pageTitle: Shop Electronics Including Televisions, Digital Cameras, iPods & More + parentCategoryId: root + parent_category_tree: + - id: root + name: root + c_enableCompare: true + c_headerMenuOrientation: Vertical + c_showInMenu: true + GetCategoryBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of categories you can request in one call is 50. + GetCategoryNotFoundResponseExample: + value: + title: Category Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found + detail: No category with ID 'electronics-televi' for site 'SiteGenesis' could be found. + productId: electronics-televi + siteId: SiteGenesis + responses: + 401unauthorized: + description: Your access token is invalid or expired and can’t be used to identify a user. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnauthorizedExample: + $ref: '#/components/examples/UnauthorizedExample' diff --git a/apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-public.yaml b/apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-public.yaml new file mode 100644 index 00000000..d9ef9751 --- /dev/null +++ b/apis/shopper-products-oas-1.0.36/shopper-products-oas-v1-public.yaml @@ -0,0 +1,1742 @@ +openapi: 3.0.3 +info: + title: Shopper Products + version: v1 + description: |- + # API Overview + + The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API. + + Caching is provided for the Shopper Products API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html) + + ## Authentication & Authorization + + The client requesting the product information must have access to the Products resource. The Shopper Products API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + ## Use Cases + + ### Populate Product Listing Pages + + Use the Shopper Product API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can see a list of products. For example, hydrate a list of products (max 24). The API returns product details including images, prices, promotions, and product availability. + + ![b2c-commerce-shopper-products-screenshot-1.png](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/b2c-commerce-shopper-products-screenshot-1.png) + + ### Get Variation Product Details on an Ecommerce Channel + + Use the API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can switch between different variation products. The API returns product details including images, prices, promotions, and available to sell inventory. + + ![b2c-commerce-shopper-products-screenshot-2.png](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/b2c-commerce-shopper-products-screenshot-2.png) + + ### Retrieve Promotion Information + + Promotions provide discounts to shoppers when they meet certain purchase requirements. + + Promotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points: + + - Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint. + - Promotional pricing is ONLY returned for products that are included with non-conditional promotions. + - Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints. + + By default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by: + + - Promotion Type + - Product Type + - Product Purchase Requirements + + Some promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: "add the product to your basket to view price information". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features. + + #### Shopper Personalization + + The SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices. + + #### JWA Caching + + The response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration. + When the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA. + + For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html) + + ### Use Hooks + + For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + + ### Test Description Changes + + uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew + + ## Resources + + ### Product + + A full representation of a product or service that is to merchandise. A ready to merchandise product is one that is online, categorized, and published to a channel. The information associated with a product includes, the product name, description, custom and system attributes, variations, price, availability, and images. + + ### Category + + Categories and subcategories are the structure by which products are organized and grouped in a catalog and on a storefront. Categories can have relationships to other categories. Further, each category can provide context that is inherited by subcategories. For example, a category can have an assigned attribute. A product assigned to that category or any subcategory inherits the categories’s attribute value. Once the product is removed from the category, the attribute value is no longer inherited by the product. You can also use category linking for site hierarchical navigation. For example, inside the Clothing category you may have Men’s, and inside the Men’s category you may have Pants. + + Categories are not tags. + + ## Endpoints + + ### GET /products + + Returns product details for up to 24 products in one API request. You can use this API for use cases that require populating or hydrating multiple products at a time, such as populating the Product Listing Pages. + + The response data includes availability, promotions, images, and prices, along with the basic product information for the products requested. + + ### GET /products/{id} + + Returns product details about a single product. Use this API for use cases that require populating or hydrating one product at a time, such as the Product Detail Pages. + + The response data includes availability, promotions, options, images, prices, variations, bundled_products, set_products, recommendations, and the basic product information for the product requested. + + ### GET /categories + + Returns category details including the parent child relationships for one or more categories. The limit on depth for the parent-child relationship is 2. +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/products: + parameters: + - $ref: '#/components/parameters/organizationId' + get: + description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable. + operationId: getProducts + summary: Returns product details for multiple products. + security: + - ShopperToken: + - sfcc.shopper-products + parameters: + - $ref: '#/components/parameters/ids' + - $ref: '#/components/parameters/inventoryIds' + - $ref: '#/components/parameters/expand_multiId' + - $ref: '#/components/parameters/allImages' + - $ref: '#/components/parameters/perPricebook' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/select' + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/currency' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResult' + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetProductsBadRequestResponseExample: + $ref: '#/components/examples/GetProductsBadRequestResponseExample' + MalformedSelectorResponseExample: + $ref: '#/components/examples/MalformedSelectorResponseExample' + '401': + $ref: '#/components/responses/401unauthorized' + /organizations/{organizationId}/products/{id}: + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/id' + get: + description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable. + operationId: getProduct + summary: Returns product details for a single product. + security: + - ShopperToken: + - sfcc.shopper-products + parameters: + - $ref: '#/components/parameters/inventoryIds' + - $ref: '#/components/parameters/expand_singleId' + - $ref: '#/components/parameters/allImages' + - $ref: '#/components/parameters/perPricebook' + - $ref: '#/components/parameters/select' + - $ref: '#/components/parameters/currency' + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + examples: + GetProductResponseExample: + $ref: '#/components/examples/GetProductResponseExample' + '400': + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + MalformedSelectorResponseExample: + $ref: '#/components/examples/MalformedSelectorResponseExample' + '401': + $ref: '#/components/responses/401unauthorized' + '404': + description: Product Not Found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetProductNotFoundResponseExample: + $ref: '#/components/examples/GetProductNotFoundResponseExample' + /organizations/{organizationId}/categories: + parameters: + - $ref: '#/components/parameters/organizationId' + get: + description: When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character. + operationId: getCategories + summary: Returns category and subcategory details for one or more categories. + security: + - ShopperToken: + - sfcc.shopper-categories + parameters: + - $ref: '#/components/parameters/parameters-ids' + - $ref: '#/components/parameters/levels' + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/CategoryResult' + examples: + GetCategoriesResponseExample: + $ref: '#/components/examples/GetCategoriesResponseExample' + '400': + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoriesBadRequestResponseExample: + $ref: '#/components/examples/GetCategoriesBadRequestResponseExample' + '401': + $ref: '#/components/responses/401unauthorized' + /organizations/{organizationId}/categories/{id}: + parameters: + - $ref: '#/components/parameters/parameters-id' + - $ref: '#/components/parameters/organizationId' + get: + description: "When you use the URL template, the server returns a category identified by the ID. By default, the server\nalso returns the first level of subcategories, but you can specify an additional level using the levels\nparameter.\n\nThis endpoint fetches both online and offline categories. For offline categories, only the top-level \ncategory is returned, not offline subcategories.\n\nUsing a large value for levels can cause performance issues when there is a large and deep category tree." + operationId: getCategory + summary: Returns category and subcategory details for a single category. + security: + - ShopperToken: + - sfcc.shopper-categories + parameters: + - $ref: '#/components/parameters/levels' + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/siteId' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Category' + examples: + GetCategoryResponseExample: + $ref: '#/components/examples/GetCategoryResponseExample' + '400': + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoryBadRequestResponseExample: + $ref: '#/components/examples/GetCategoryBadRequestResponseExample' + '401': + $ref: '#/components/responses/401unauthorized' + '404': + description: No online or offline category was found with the specified ID. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetCategoryNotFoundResponseExample: + $ref: '#/components/examples/GetCategoryNotFoundResponseExample' +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-products: scope granting read-access to product endpoints + sfcc.shopper-categories: scope granting read-access to category endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-products: scope granting read-access to product endpoints + sfcc.shopper-categories: scope granting read-access to category endpoints + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + ProductId: + minLength: 1 + maxLength: 100 + type: string + description: The id (SKU) of the product. + example: apple-ipod-classic + InventoryId: + description: The inventory ID. + type: string + minLength: 1 + maxLength: 256 + example: Site1InventoryList + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + Select: + minLength: 1 + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + example: (name,id,variationAttributes.(**)) + type: string + pattern: ^[(].*[)]$ + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + Product: + description: Any product that is sold, shown alone, and does not have variations such as different sizes or colors. A product has no reliance on any other product for inheritance. *A product has a SKU and can have a product option, which has a different SKU*. + properties: + brand: + description: The product's brand. + example: Apple + type: string + bundledProducts: + description: The array of all bundled products of this product. + type: array + items: + $ref: '#/components/schemas/BundledProduct' + currency: + $ref: '#/components/schemas/CurrencyCode' + ean: + description: The European Article Number of the product. + example: 8essdf9w3 + type: string + fetchDate: + format: int32 + example: 5 + type: integer + id: + $ref: '#/components/schemas/ProductId' + imageGroups: + description: The array of product image groups. + type: array + items: + $ref: '#/components/schemas/ImageGroup' + inventories: + description: |- + The array of product inventories explicitly requested via the 'inventory_ids' query parameter. This property + is only returned in context of the 'availability' expansion. + type: array + items: + $ref: '#/components/schemas/Inventory' + inventory: + description: |- + The site default inventory information. This property is only + returned in context of the 'availability' expansion. + allOf: + - $ref: '#/components/schemas/Inventory' + longDescription: + description: The localized product's long description. + example: Awesome long description of product + type: string + manufacturerName: + description: The product's manufacturer name. + example: Apple + type: string + manufacturerSku: + description: The product's manufacturer SKU. + example: 2ND8834 + type: string + master: + description: 'The master product information, only for types: master, variation group, and variant.' + allOf: + - $ref: '#/components/schemas/Master' + minOrderQuantity: + format: double + description: The minimum order quantity for this product. + example: 2 + type: number + name: + description: The localized product name. + example: Apple IPod Classic + type: string + options: + description: The array of product options, only for type option. This array can be empty. + type: array + items: + $ref: '#/components/schemas/Option' + pageDescription: + description: The localized product's page description. + example: Really good Product + type: string + pageKeywords: + description: The localized product's page description. + example: Ipod, Music Player + type: string + pageTitle: + description: The localized product's page title. + example: Apple IPod Classic + type: string + pageMetaTags: + description: Page Meta tags associated with the given product. + type: array + items: + $ref: '#/components/schemas/PageMetaTag' + price: + format: double + description: |- + The sales price of the product. In case of complex products, like master or set, this is the minimum price of + related child products. + example: 59.99 + type: number + pricePerUnit: + format: double + description: The price per unit if defined for the product + example: 19.99 + type: number + pricePerUnitMax: + format: double + description: The max price per unit typically for a master product's variant. + example: 29.99 + type: number + priceMax: + format: double + description: The maximum sales of related child products in complex products like master or set. + example: 69.99 + type: number + priceRanges: + description: Array of one or more price range objects representing one or more Pricebooks in context for the site. + type: array + items: + $ref: '#/components/schemas/PriceRange' + prices: + description: The prices map with pricebook IDs and their values. + type: object + additionalProperties: + format: double + type: number + primaryCategoryId: + description: The ID of the products primary category. + example: electronics + type: string + productLinks: + description: The array of source and target product links information. + type: array + items: + $ref: '#/components/schemas/ProductLink' + productPromotions: + description: |- + An array of active customer product promotions for this product, sorted by promotion priority + using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → + best discount → ID). This array can be empty. Coupon promotions are not returned in this array. + See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details. + type: array + items: + $ref: '#/components/schemas/ProductPromotion' + recommendations: + description: Returns a list of recommendations. + type: array + items: + $ref: '#/components/schemas/Recommendation' + setProducts: + description: The array of set products of this product. + type: array + items: + $ref: '#/components/schemas/Product' + shortDescription: + description: The localized product short description. + example: Awesome Product + type: string + slugUrl: + description: The complete link to this product's storefront page. + example: https://www.example.com/on/store/Sites-MySite/default/Product-Show?pid=MyProduct + type: string + stepQuantity: + format: double + description: |- + The steps in which the order amount of the product can be + increased. + example: 2 + type: number + tieredPrices: + description: The document represents list of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + type: + description: 'The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.' + allOf: + - $ref: '#/components/schemas/ProductType' + unit: + description: The sales unit of the product. + example: lbs + type: string + upc: + description: The Universal Product Code (UPC). + example: JSDU876 + type: string + validFrom: + description: The time a product is valid from. + example: '9999-12-31T00:00:00.0Z' + type: string + format: date-time + validTo: + description: The time a product is valid to. + example: '9999-12-31T23:59:59.0Z' + type: string + format: date-time + variants: + description: The array of actual variants. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/Variant' + variationAttributes: + description: |- + Sorted array of variation attributes information. Only for master, + variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + variationGroups: + description: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationGroup' + variationValues: + description: |- + The actual variation attribute ID - value pairs. Only for variant and + variation group types. + type: object + additionalProperties: + type: string + required: + - id + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + BundledProduct: + description: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.* + properties: + id: + example: '823476' + type: string + product: + description: The product being bundled. + allOf: + - $ref: '#/components/schemas/Product' + quantity: + format: double + description: For the product being bundled, the quantity added to the bundle. + example: 5 + type: number + required: + - id + - product + - quantity + type: object + Image: + description: Product image + properties: + alt: + description: The localized alternative text of the image. + example: Apple iPod Shuffle, large + type: string + disBaseLink: + description: Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled. + example: https://example.com/images/large/ipod-shuffle-silver.jpg + type: string + link: + minLength: 1 + description: The URL of the actual image. + example: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2/images/large/ipod-shuffle.jpg + type: string + title: + description: The localized title of the image. + example: Apple iPod Shuffle + type: string + required: + - link + type: object + VariationAttributeValue: + description: Document representing a variation attribute value. + properties: + description: + description: The localized description of the variation value. + example: Color of the product + type: string + image: + description: The first product image for the configured viewtype and this variation value. + allOf: + - $ref: '#/components/schemas/Image' + imageSwatch: + description: The first product image for the configured viewtype and this variation value (typically the swatch image). + allOf: + - $ref: '#/components/schemas/Image' + name: + description: The localized display name of the variation value. + example: Red + type: string + orderable: + description: A flag indicating whether at least one variant with this variation attribute value is available to sell. + example: true + type: boolean + value: + minLength: 1 + description: The actual variation value. + example: red + type: string + required: + - value + type: object + VariationAttribute: + description: Document representing a variation attribute. + properties: + id: + minLength: 1 + description: The ID of the variation attribute. + example: color + type: string + name: + description: The localized display name of the variation attribute. + example: Color + type: string + values: + description: The sorted array of variation values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttributeValue' + required: + - id + type: object + ImageGroup: + description: Document representing an image group containing a list of images for a particular view type and an optional variation value. + properties: + images: + description: The images of the image group. + type: array + items: + $ref: '#/components/schemas/Image' + variationAttributes: + description: Returns a list of variation attributes applying to this image group. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + viewType: + description: The image view type. + example: hi-res + type: string + required: + - images + - viewType + type: object + Inventory: + description: Document representing inventory information of the current product for a particular inventory list. + properties: + ats: + format: double + description: |- + The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the + OCAPI setting 'product.inventory.ats.max_threshold'. + example: 15 + type: number + backorderable: + description: A flag indicating whether the product is backorderable. + example: true + type: boolean + id: + $ref: '#/components/schemas/InventoryId' + inStockDate: + description: A flag indicating the date when the product will be in stock. + example: '9999-12-31T00:00:00.0Z' + type: string + format: date-time + orderable: + description: A flag indicating whether at least one of the products is available to sell. + example: true + type: boolean + preorderable: + description: A flag indicating whether the product is preorderable. + example: false + type: boolean + stockLevel: + format: double + description: |- + The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the + OCAPI setting 'product.inventory.stock_level.max_threshold'. + example: 10 + type: number + required: + - id + type: object + Price: + type: number + description: Document representing a price for a product + format: double + example: 12.99 + Master: + description: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn't have a SKU.* + properties: + masterId: + description: The ID (SKU) of the master product. + allOf: + - $ref: '#/components/schemas/ProductId' + orderable: + description: A flag indicating whether at least one of the variants can be ordered. + example: true + type: boolean + price: + description: The minimum sales price of the related variants. + allOf: + - $ref: '#/components/schemas/Price' + priceMax: + description: The maximum sales price of the related variants. + allOf: + - $ref: '#/components/schemas/Price' + prices: + description: List of sale prices. + type: object + additionalProperties: + format: double + type: number + required: + - masterId + type: object + OptionValue: + description: Document representing an option value. + properties: + default: + description: A flag indicating whether this option value is the default one. + example: true + type: boolean + id: + description: The ID of the option value. + example: 5YR + allOf: + - $ref: '#/components/schemas/ProductId' + name: + description: The localized name of the option value. + example: 5 Year Warranty + type: string + price: + description: The effective price of the option value. + allOf: + - $ref: '#/components/schemas/Price' + required: + - id + type: object + Option: + description: Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can't be purchased separately. *Product Option has a SKU and a price associated with it.* + properties: + description: + description: The localized description of the option. + example: Get this Option + type: string + id: + description: The ID of the option. + example: Warranty + allOf: + - $ref: '#/components/schemas/ProductId' + image: + description: The URL to the option image. + example: https://www.exampleimage.com/images/optionImage.jpg + type: string + name: + description: The localized name of the option. + example: Warranty + type: string + values: + description: The array of option values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/OptionValue' + required: + - id + type: object + PageMetaTag: + description: Document representing a Page Meta Tag object. + properties: + id: + description: The ID of the Page Meta Tag. + type: string + example: title + value: + description: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID. + type: string + example: Buy the Long Sleeve Covered Placket Blouse for USD 61.99. + PriceRange: + description: Document representing price ranges for a product which happens to be a master product (per Pricebook) + properties: + maxPrice: + description: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook) + allOf: + - $ref: '#/components/schemas/Price' + minPrice: + description: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook) + allOf: + - $ref: '#/components/schemas/Price' + pricebook: + description: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM. + example: usd-list-pricebook + type: string + type: object + ProductLink: + description: |- + Document representing a link between two products. It contains the ID of the source and target products, the type of + product link, and the URLs to retrieve product data. + properties: + sourceProductId: + description: The semantic ID of the product this product link is coming from. + example: '824756924' + allOf: + - $ref: '#/components/schemas/ProductId' + sourceProductLink: + description: The URL addressing the product this product link is coming from. + example: Link + type: string + targetProductId: + description: The semantic ID of the product this product link is pointing to. + example: 2TR93459 + allOf: + - $ref: '#/components/schemas/ProductId' + targetProductLink: + description: The URL addressing the product this product link is pointing to. + example: Link + type: string + type: + description: The type of product link. + example: up_sell + enum: + - cross_sell + - replacement + - up_sell + - accessory + - newer_version + - alt_orderunit + - spare_part + - other + type: string + required: + - sourceProductId + - sourceProductLink + - targetProductId + - targetProductLink + - type + type: object + ProductPromotion: + description: Document representing a product promotion. + properties: + calloutMsg: + description: The localized call-out message of the promotion. + example: Fantastic promotion + type: string + promotionId: + description: The unique ID of the promotion. + example: summerSale + type: string + promotionalPrice: + description: The promotional price for this product. + allOf: + - $ref: '#/components/schemas/Price' + required: + - calloutMsg + - promotionId + - promotionalPrice + type: object + RecommendationType: + description: Document representing a recommendation type. + properties: + displayValue: + description: The localized display value of the recommendation type. + example: UpSell + type: string + value: + format: int32 + description: The value of the recommendation type. + example: 2 + type: integer + required: + - displayValue + - value + type: object + Recommendation: + description: Document representing a product recommendation. + properties: + calloutMsg: + description: The localized callout message of the recommendation. + example: Absolutely recommended + type: string + image: + $ref: '#/components/schemas/Image' + longDescription: + description: The localized long description of the recommendation. + example: Really good detailed product description + type: string + name: + description: The localized name of the recommendation. + example: Apple Ipod Shuffle + type: string + recommendationType: + $ref: '#/components/schemas/RecommendationType' + recommendedItemId: + description: The recommended item ID of the recommendation. + example: apple-ipod-shuffle + type: string + shortDescription: + description: The localized short description of the recommendation. + example: Product description + type: string + required: + - recommendationType + type: object + ProductPriceTable: + description: Tiered Price Level Object + properties: + price: + description: Price for the product for the specified tier for the specified pricebook + allOf: + - $ref: '#/components/schemas/Price' + pricebook: + description: The active pricebook for which this price is defined + example: usd-list-pricebook + type: string + quantity: + format: double + description: Quantity tier for which the price is defined. + example: 1 + type: number + type: object + ProductType: + description: Document representing a product type. + properties: + bundle: + description: A flag indicating whether the product is a bundle. + example: true + type: boolean + item: + description: A flag indicating whether the product is a standard item. + example: false + type: boolean + master: + description: A flag indicating whether the product is a master. + example: true + type: boolean + option: + description: A flag indicating whether the product is an option. + example: false + type: boolean + set: + description: A flag indicating whether the product is a set. + example: true + type: boolean + variant: + description: A flag indicating whether the product is a variant. + example: false + type: boolean + variationGroup: + description: A flag indicating whether the product is a variation group. + example: false + type: boolean + type: object + Variant: + description: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.* + properties: + orderable: + description: A flag indicating whether the variant is orderable. + example: true + type: boolean + price: + description: The sales price of the variant. + allOf: + - $ref: '#/components/schemas/Price' + productId: + description: The ID (SKU) of the variant. + example: 8W4756834 + allOf: + - $ref: '#/components/schemas/ProductId' + tieredPrices: + description: List of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + additionalProperties: + type: string + required: + - productId + type: object + VariationGroup: + description: Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn't have a SKU.* + properties: + orderable: + description: A flag indicating whether the variation group is orderable. + example: false + type: boolean + price: + description: The sales price of the variation group. + allOf: + - $ref: '#/components/schemas/Price' + productId: + description: The ID (SKU) of the variation group. + example: 49345VG + allOf: + - $ref: '#/components/schemas/ProductId' + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + additionalProperties: + type: string + required: + - orderable + - price + - productId + - variationValues + type: object + ProductResult: + description: Result document containing an array of products. + properties: + limit: + format: int32 + description: The number of returned documents. + example: 12 + type: integer + data: + description: The array of product documents. + type: array + items: + $ref: '#/components/schemas/Product' + total: + format: int32 + description: The total number of documents. + example: 12 + type: integer + required: + - limit + - data + - total + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + CategoryId: + maxLength: 256 + minLength: 1 + type: string + description: The ID of the category. + example: mens + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + Category: + description: Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category can also provide a context inherited by subcategories. For example, a category may have an attribute value assigned to it, and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product. Linking of categories is also used for Site hierarchical navigation. For example, inside 'Clothing' you may have 'Mens', and inside 'Mens' you may have 'Pants'. Categories are not *Tags.* + properties: + categories: + description: Array of subcategories. Can be empty. + type: array + items: + $ref: '#/components/schemas/Category' + description: + description: The localized description of the category. + example: Category description for Men's Category + type: string + id: + $ref: '#/components/schemas/CategoryId' + image: + description: The URL of the category image. + type: string + example: https://example.com/images/large/mens-category.jpg + name: + description: The localized name of the category. + example: Mens + type: string + onlineSubCategoriesCount: + format: int64 + description: The total number of online sub-categories. This information will be available from B2C Commerce version 24.5. + type: integer + example: 20 + pageDescription: + description: The localized page description of the category. + example: This category ahs all men's clothing + type: string + pageKeywords: + description: The localized page keywords of the category. + example: Mens, shirts + type: string + pageTitle: + description: The localized page title of the category. + example: Men's Category + type: string + parentCategoryId: + description: The ID of the parent category. + example: apparel + type: string + parentCategoryTree: + description: The List of the parent categories. + type: array + items: + $ref: '#/components/schemas/PathRecord' + thumbnail: + description: The URL of the category thumbnail. + example: https://www.exampleimage.com/images/categoryImage.jpg + type: string + required: + - id + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + PathRecord: + description: Document representing most basic info (id and name) of a category or catalog. + properties: + id: + description: The id of the category path. + example: mens + type: string + name: + description: The name of the category path. + example: mens + type: string + type: object + CategoryResult: + description: Result document containing an array of categories. + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + description: The array of category documents. + type: array + items: + $ref: '#/components/schemas/Category' + required: + - data + type: object + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + ids: + name: ids + description: The IDs of the requested products (comma-separated, max 24 IDs). + in: query + required: true + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/ProductId' + - maxItems: 100 + example: apple-ipod-shuffle,apple-ipod-nano + inventoryIds: + description: The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs). + name: inventoryIds + in: query + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/InventoryId' + - maxItems: 5 + example: Site1InventoryList,Site2InventoryList,Site3InventoryList,Site4InventoryList,Site5InventoryList + expand_multiId: + name: expand + description: "All expand parameters except page_meta_tags are used for the request when no expand parameter is provided. \nThe value \"none\" may be used to turn off all expand options. \nThe page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2." + in: query + schema: + type: array + example: + - prices + - promotions + items: + enum: + - none + - availability + - links + - promotions + - options + - images + - prices + - variations + - recommendations + - page_meta_tags + example: promotions + allImages: + name: allImages + description: The flag that indicates whether to retrieve the whole image model for the requested product. + in: query + schema: + type: boolean + example: true + perPricebook: + name: perPricebook + description: The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021. + in: query + schema: + type: boolean + example: true + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + select: + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + name: select + in: query + examples: + select: + value: (**) + schema: + $ref: '#/components/schemas/Select' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + currency: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + name: currency + in: query + examples: + CurrencyCode: + value: USD + schema: + $ref: '#/components/schemas/CurrencyCode' + id: + name: id + description: The ID of the requested product. + in: path + required: true + schema: + $ref: '#/components/schemas/ProductId' + expand_singleId: + name: expand + description: "All expand parameters except page_meta_tags are used for the request when no expand parameter is provided. \nThe value \"none\" may be used to turn off all expand options. \nThe page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2." + in: query + schema: + type: array + example: + - prices + - promotions + items: + enum: + - none + - availability + - bundled_products + - links + - promotions + - options + - images + - prices + - variations + - set_products + - recommendations + - page_meta_tags + example: links + parameters-ids: + name: ids + description: The comma separated list of category IDs (max 50). + in: query + required: true + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/CategoryId' + - maxItems: 50 + example: electronics-digital-cameras,electronics-televisions + levels: + name: levels + description: Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned. + in: query + schema: + type: integer + format: int32 + minimum: 0 + enum: + - 0 + - 1 + - 2 + example: 1 + parameters-id: + name: id + in: path + description: The ID of the requested category. + required: true + schema: + $ref: '#/components/schemas/CategoryId' + examples: + GetProductsBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of products you can request in one call is 25. + MalformedSelectorResponseExample: + value: + title: Malformed Selector + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector + detail: The property selector '(data.(name, imageGroups.(**))' is malformed. + selector: (data.(name, imageGroups.(**)) + UnauthorizedExample: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized + title: Unauthorized + detail: Your access token is invalid or expired and can’t be used to identify a user. + GetProductResponseExample: + value: + brand: Apple + currency: USD + id: apple-ipod-shuffle + imageGroups: + - images: + - alt: Apple iPod Shuffle, , large + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2cc65b0/images/large/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: large + - images: + - alt: Apple iPod Shuffle, , medium + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw5f36aab1/images/medium/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: medium + - images: + - alt: Apple iPod Shuffle, , small + link: https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dw2b078e02/images/small/ipod-shuffle-silver.jpg + title: 'Apple iPod Shuffle, ' + viewType: small + inventory: + ats: 0 + backorderable: false + id: SiteGenesisList + orderable: true + preorderable: false + stockLevel: 999999 + longDescription: Supports AAC, protected AAC, MP3, MP3 VBR, Audible, WAV and AIFF for immediate playback of multiple formats. + master: + masterId: apple-ipod-shuffle + orderable: false + price: 45.99 + minOrderQuantity: 1 + name: Apple iPod Shuffle + pageDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. + pageKeywords: Apple, iPod, Shuffle, MP3, Music Player + pageMetaTags: + - id: description + value: The updated Shuffle features the same-sized circular control pad in a more compact, clip-on case, making it perfect for on-the-go use. + - id: robots + value: index, follow + - id: title + value: Buy the Apple iPod Shuffle for USD 45.99-69.00. + pageTitle: Apple iPod Shuffle + price: 45.99 + priceMax: 69 + primaryCategoryId: electronics-digital-media-players + shortDescription: With the same size circular control pad as the previous model on a much more compact case with a built-in clip, the updated shuffle is ready to rock and easily tags along when you're on the go. + stepQuantity: 1 + type: + master: true + variants: + - orderable: true + price: 45.99 + productId: apple-ipod-shuffle-silver-1g + variationValues: + color: Silver + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-blue-1g + variationValues: + color: Blue + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-green-1g + variationValues: + color: Green + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-red-1g + variationValues: + color: Red + memorySize: 1 GB + - orderable: true + price: 49 + productId: apple-ipod-shuffle-fuscia-1g + variationValues: + color: Fuscia + memorySize: 1 GB + - orderable: true + price: 60 + productId: apple-ipod-shuffle-silver-2g + variationValues: + color: Silver + memorySize: 2 GB + - orderable: true + price: 69 + productId: apple-ipod-shuffle-green-2g + variationValues: + color: Green + memorySize: 2 GB + - orderable: true + price: 60 + productId: apple-ipod-shuffle-red-2g + variationValues: + color: Red + memorySize: 2 GB + - orderable: true + price: 69 + productId: apple-ipod-shuffle-fuscia-2g + variationValues: + color: Fuscia + memorySize: 2 GB + variationAttributes: + - id: color + name: Color + values: + - name: Silver + orderable: false + value: Silver + - name: Blue + orderable: false + value: Blue + - name: Green + orderable: false + value: Green + - name: Red + orderable: false + value: Red + - name: Fuscia + orderable: false + value: Fuscia + - id: memorySize + name: Memory Size + values: + - name: 1 GB + orderable: true + value: 1 GB + - name: 2 GB + orderable: true + value: 2 GB + GetProductNotFoundResponseExample: + value: + title: Product Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found + detail: No product with ID 'pple-ipod-shuffle' for site 'SiteGenesis' could be found. + productId: pple-ipod-shuffle + siteId: SiteGenesis + GetCategoriesResponseExample: + value: + limit: 2 + data: + - id: electronics-digital-cameras + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg + name: Digital Cameras + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: cameras, digital camerasm point and shoot, slr + pageTitle: Digital Cameras + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + - categories: + - id: electronics-televisions-flat-screen + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Flat Screen + pageDescription: Shop all Flat Screen Televisions including the latest in LCD and Plasma technology from all the latest brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: flat screen, flat screen television, LCD, plasma, HDTV + pageTitle: LCD & Plasma High Definition Flat Screen Televisions + parentCategoryId: electronics-televisions + parent_category_tree: + - id: electronics + name: electronics + - id: electronics-televisions-projection + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Projection + onlineSubCategoriesCount: 0 + pageDescription: Shop all Projection Televisions from all the latest brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: projection, projection televisions, HDTV + pageTitle: Projection High Definition Televisions + parentCategoryId: electronics-televisions + parent_category_tree: + - id: electronics + name: electronics + id: electronics-televisions + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Televisions + onlineSubCategoriesCount: 2 + pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection + pageTitle: Televisions Including LCD, Plasma & More in High Definition + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + total: 2 + GetCategoriesBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of categories you can request in one call is 50. + GetCategoryResponseExample: + value: + categories: + - id: electronics-televisions + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwc3940e75/images/slot/sub_banners/cat-banner-electronics-tv.jpg + name: Televisions + onlineSubCategoriesCount: 2 + pageDescription: Shop the latest Televisions including LCD, Plasma, Flat Screens, Projection including all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: televisions, tvs, LCD, plasma, flat screen, high definition, HDTV, projection + pageTitle: Televisions Including LCD, Plasma & More in High Definition + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1d6f6411/images/slot/landing/cat-landing-tv.jpg + - id: electronics-digital-cameras + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw3535377d/images/slot/sub_banners/cat-banner-electronics-camera.jpg + name: Digital Cameras + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest digital cameras from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: cameras, digital camerasm point and shoot, slr + pageTitle: Digital Cameras + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw1a543dc7/images/slot/landing/cat-landing-camera.jpg + - id: electronics-digital-media-players + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw7e9353db/images/slot/sub_banners/cat-banner-electronics-mp3.jpg + name: iPod & MP3 Players + onlineSubCategoriesCount: 0 + pageDescription: Shop Digital Media Players including iPods, Creative Zen, Sony & the latest from all the top brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: mp3, iPods, mp3 players + pageTitle: iPod & MP3 Digital Media Players + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9f3d289a/images/slot/landing/cat-landing-mp3.jpg + - id: electronics-gps-units + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw6ea864f2/images/slot/sub_banners/cat-banner-electronics-gps.jpg + name: GPS Navigation + onlineSubCategoriesCount: 0 + pageDescription: Shop the latest in GPS units from Garmin and Tom Tom along with other brands, makes and models at Salesforce Commerce Cloud. + pageKeywords: gps, gps units, garmin, tom tom + pageTitle: GPS Units + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dwad4e06f8/images/slot/landing/cat-landing-gps.jpg + - id: electronics-gaming + image: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/default/dw9da58d91/images/slot/sub_banners/cat-banner-electronics.jpg + name: Gaming + onlineSubCategoriesCount: 2 + pageDescription: Shop games and game consoles from Xbox, Xbox360, Playstation 2, Playstation 3, Game Cube, Wii, Playstation Portable and Nintento DS at Salesforce Commerce Cloud. + pageKeywords: gaming, xbox, xbox360, ps3, ps2, playstaion 3, psp, game cube, wii, nintendo, nintendo ds + pageTitle: Gaming + parentCategoryId: electronics + parent_category_tree: + - id: electronics + name: electronics + c_enableCompare: true + c_showInMenu: true + c_slotBannerImage: https://example.com/on/demandware.static/-/Sites-storefront-catalog-en/en_US/v1551233475301/images/slot/landing/cat-landing-gaming.jpg + id: electronics + name: Electronics + onlineSubCategoriesCount: 5 + pageDescription: Shop Electronics including the latest in televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS & gaming at Salesforce Commerce Cloud + pageKeywords: televisions, digital cameras, camcorders, mp3, ipod, mobil phones, GPS, gaming + pageTitle: Shop Electronics Including Televisions, Digital Cameras, iPods & More + parentCategoryId: root + parent_category_tree: + - id: root + name: root + c_enableCompare: true + c_headerMenuOrientation: Vertical + c_showInMenu: true + GetCategoryBadRequestResponseExample: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation + detail: Maximum number of categories you can request in one call is 50. + GetCategoryNotFoundResponseExample: + value: + title: Category Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found + detail: No category with ID 'electronics-televi' for site 'SiteGenesis' could be found. + productId: electronics-televi + siteId: SiteGenesis + responses: + 401unauthorized: + description: Your access token is invalid or expired and can’t be used to identify a user. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnauthorizedExample: + $ref: '#/components/examples/UnauthorizedExample' diff --git a/apis/shopper-products-oas/shopper-products-oas.yaml b/apis/shopper-products-oas/shopper-products-oas.yaml deleted file mode 100644 index 4900b808..00000000 --- a/apis/shopper-products-oas/shopper-products-oas.yaml +++ /dev/null @@ -1,5 +0,0 @@ -openapi: "3.0.0" -info: - version: 1.0.0 - title: Shopper Products OAS -paths: {} \ No newline at end of file diff --git a/apis/shopper-promotions-oas/.metadata.json b/apis/shopper-promotions-oas-1.0.35/.metadata.json similarity index 90% rename from apis/shopper-promotions-oas/.metadata.json rename to apis/shopper-promotions-oas-1.0.35/.metadata.json index 4f73559b..e7100eae 100644 --- a/apis/shopper-promotions-oas/.metadata.json +++ b/apis/shopper-promotions-oas-1.0.35/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-promotions-oas/1.0.27", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-promotions-oas/1.0.35", "name": "Shopper Promotions OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-promotions-oas", - "version": "1.0.27", + "version": "1.0.35", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-promotions-oas/exchange.json b/apis/shopper-promotions-oas-1.0.35/exchange.json similarity index 78% rename from apis/shopper-promotions-oas/exchange.json rename to apis/shopper-promotions-oas-1.0.35/exchange.json index 1c622be9..e557ddee 100644 --- a/apis/shopper-promotions-oas/exchange.json +++ b/apis/shopper-promotions-oas-1.0.35/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-promotions-oas-v1-bundled.yaml", + "main": "shopper-promotions-oas-v1-public.yaml", "name": "Shopper Promotions OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-promotions-oas", - "version": "1.0.27", + "version": "1.0.35", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-promotions-oas/shopper-promotions-oas-v1-bundled.yaml b/apis/shopper-promotions-oas-1.0.35/shopper-promotions-oas-v1-internal.yaml similarity index 100% rename from apis/shopper-promotions-oas/shopper-promotions-oas-v1-bundled.yaml rename to apis/shopper-promotions-oas-1.0.35/shopper-promotions-oas-v1-internal.yaml diff --git a/apis/shopper-promotions-oas-1.0.35/shopper-promotions-oas-v1-public.yaml b/apis/shopper-promotions-oas-1.0.35/shopper-promotions-oas-v1-public.yaml new file mode 100644 index 00000000..79fbe1ac --- /dev/null +++ b/apis/shopper-promotions-oas-1.0.35/shopper-promotions-oas-v1-public.yaml @@ -0,0 +1,418 @@ +openapi: 3.0.3 +info: + title: Shopper Promotions + version: v1 + description: |- + # API Overview + + Retrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign. + + Caching is provided for the Shopper Promotions API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html) + + ## Authentication & Authorization + + The Shopper Promotions API requires a JSON Web Token acquired via the Shopper Customers endpoint: + + ``` + https://{{shortcode}}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{{organizationId}}/customers/actions/login + ``` + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### Get Promotion by Promotion ID + + Use the Shopper Promotions API to find promotion information by the promotion ID. + + For example, a customer who is browsing on a commerce shopping app built using Commerce Cloud APIs can see the details about the applied promotions in the cart. + + ### Get Promotion by Campaign ID + + Use the Shopper Promotions API to find promotion information by the campaign ID. + + For example, a customer who is browsing on a commerce shopping app built using Commerce Cloud APIs can see the possible promotions that can be applied in the cart. + + ### Use Hooks + + For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/promotions: + get: + summary: Return an array of enabled promotions for specified IDs. + description: "In the request URL, you can specify up to 50 IDs. If you specify an ID that contains either parentheses or the separator characters, you must URL encode these characters. \nEach request returns only enabled promotions as the server does not consider promotion qualifiers or schedules." + operationId: getPromotions + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/ids' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Promotion information retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/PromotionResult' + examples: + PromotionsResult: + $ref: '#/components/examples/PromotionsResult' + '404': + description: Thrown when there is no promotion found with the given ID for the requested site. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPromotions404: + $ref: '#/components/examples/PromotionsNotFound404' + security: + - ShopperToken: + - sfcc.shopper-promotions + /organizations/{organizationId}/promotions/campaigns/{campaignId}: + get: + summary: Return an array of enabled promotions matching the specified filter criteria. + description: |- + Retrieves promotion information using filter criteria. In the request URL, you must provide a campaign_id parameter, and you can optionally specify a date + range by providing start_date and end_date parameters. Both parameters are required to specify a date range, and + omitting one causes the server to return a MissingParameterException fault. Each request returns only enabled + promotions, since the server does not consider promotion qualifiers or schedules. + operationId: getPromotionsForCampaign + parameters: + - $ref: '#/components/parameters/campaignId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + - $ref: '#/components/parameters/currency' + responses: + '200': + description: Retrieved promotion information successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/PromotionResult' + examples: + PromotionsResult: + $ref: '#/components/examples/PromotionsResult' + '400': + description: Thrown when a start date is provided without an end date, when an end date is provided without a start date, or when an end date precedes the start date. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPromotionsForCampaign400: + $ref: '#/components/examples/InvalidDate400' + '404': + description: Thrown when no promotion with the specified ID is found for the requested site. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getPromotions404: + $ref: '#/components/examples/PromotionsNotFound404' + security: + - ShopperToken: + - sfcc.shopper-promotions +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc:shopper-promotions: Allows read operations on shopper promotions + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-promotions: Allows read operations on shopper promotions + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + Promotion: + description: Document representing a promotion. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + type: object + required: + - id + properties: + calloutMsg: + description: The localized call-out message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + currency: + description: |- + The currency that a promotion can be applied to. A null value means that the promotion applies to all allowed + currencies. + example: USD + type: string + details: + description: The localized detailed description of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + endDate: + description: |- + The end date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ . The time + zone of the date time is always UTC. + example: '2015-07-04T21:00:00Z' + type: string + format: date-time + id: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + image: + description: The URL to the promotion image. + type: string + name: + description: The localized name of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + startDate: + description: |- + The start date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ. The + time zone of the date time is always UTC. + example: '2015-07-04T21:00:00Z' + type: string + format: date-time + PromotionResult: + description: Result document containing an array of promotions. + required: + - data + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + description: The array of promotion documents. + type: array + items: + $ref: '#/components/schemas/Promotion' + example: + limit: 2 + data: + - calloutMsg: Buy5for50 + details: Buy5for50 + id: Buy5for50 + name: Buy5for50 + - calloutMsg: $5 off Men's Ties + details: $5 off Men's Ties (with coupon) + id: $5_off_ties_promotion + name: 5 Off Ties Promotion + total: 2 + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + ids: + name: ids + in: query + required: true + schema: + type: array + items: + type: string + maxLength: 256 + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + campaignId: + name: campaignId + in: path + description: Find the promotions assigned to this campaign (mandatory). + required: true + schema: + maxLength: 256 + minLength: 1 + type: string + startDate: + name: startDate + in: query + description: 'The start date of the promotion in ISO8601 date time format: yyyy-MM-dd''T''HH:mmZ' + required: false + schema: + type: string + endDate: + name: endDate + in: query + description: 'The end date of the promotion in ISO8601 date time format: yyyy-MM-dd''T''HH:mmZ' + required: false + schema: + type: string + currency: + name: currency + in: query + description: The currency mnemonic specified for price. This parameter is effective only for product suggestions. + required: false + schema: + $ref: '#/components/schemas/ISOCurrency' + examples: + PromotionsResult: + value: + limit: 2 + data: + - calloutMsg: Buy5for50 + details: Buy5for50 + id: Buy5for50 + name: Buy5for50 + - calloutMsg: $5 off Men's Ties + details: $5 off Men's Ties (with coupon) + id: $5_off_ties_promotion + name: 5 Off Ties Promotion + total: 2 + PromotionsNotFound404: + value: + type: /PromotionNotFoundException + detail: There is no promotion found with the given ID for the requested site. + title: Not Found + instance: /foo + InvalidDate400: + value: + type: /InvalidDateException + detail: Invalid Start or End Date + title: Invalid Start or End Date + instance: /foo diff --git a/apis/shopper-search-oas/.metadata.json b/apis/shopper-search-oas-1.1.1/.metadata.json similarity index 91% rename from apis/shopper-search-oas/.metadata.json rename to apis/shopper-search-oas-1.1.1/.metadata.json index bfb5697b..69a6a3b7 100644 --- a/apis/shopper-search-oas/.metadata.json +++ b/apis/shopper-search-oas-1.1.1/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-search-oas/1.0.42", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-search-oas/1.1.1", "name": "Shopper Search OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-search-oas", - "version": "1.0.42", + "version": "1.1.1", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-search-oas/exchange.json b/apis/shopper-search-oas-1.1.1/exchange.json similarity index 79% rename from apis/shopper-search-oas/exchange.json rename to apis/shopper-search-oas-1.1.1/exchange.json index a060b897..6935ddb6 100644 --- a/apis/shopper-search-oas/exchange.json +++ b/apis/shopper-search-oas-1.1.1/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-search-oas-v1-bundled.yaml", + "main": "shopper-search-oas-v1-public.yaml", "name": "Shopper Search OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-search-oas", - "version": "1.0.42", + "version": "1.1.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-search-oas/shopper-search-oas-v1-bundled.yaml b/apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-internal.yaml similarity index 99% rename from apis/shopper-search-oas/shopper-search-oas-v1-bundled.yaml rename to apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-internal.yaml index 8ad8c374..e1d8b7b6 100644 --- a/apis/shopper-search-oas/shopper-search-oas-v1-bundled.yaml +++ b/apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-internal.yaml @@ -43,7 +43,7 @@ paths: type: integer format: int64 default: 0 - maximum: 0 + minimum: 0 description: Used to retrieve the results based on a particular resource offset. responses: '200': @@ -1042,7 +1042,7 @@ components: description: The query phrase (q) for which suggestions where made. type: string example: dresses - minLength: 1 + minLength: 3 maxLength: 50 required: - searchPhrase @@ -1176,9 +1176,9 @@ components: required: true schema: maxLength: 50 - minLength: 1 + minLength: 3 type: string - example: sh + example: sho limit: description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). name: limit diff --git a/apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-public.yaml b/apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-public.yaml new file mode 100644 index 00000000..e1d8b7b6 --- /dev/null +++ b/apis/shopper-search-oas-1.1.1/shopper-search-oas-v1-public.yaml @@ -0,0 +1,1448 @@ +openapi: 3.0.3 +info: + title: Shopper Search + version: v1 + description: "# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/product-search: + get: + summary: "Provides keyword and refinement-based search for products, returning only product ID, link, and name. Results \nare limited to products that are online and part of the site catalog." + description: "Provide keyword and refinement search functionality for products. Only returns the product ID, link, and name in\nthe product search hit. The search result only contains products that are online and assigned to the site \ncatalog." + operationId: productSearch + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/select' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/qProductSearch' + - $ref: '#/components/parameters/refine' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/currency' + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/expand' + - $ref: '#/components/parameters/allImages' + - $ref: '#/components/parameters/perPricebook' + - $ref: '#/components/parameters/allVariationProperties' + - name: limit + in: query + required: false + schema: + type: integer + format: int32 + default: 25 + maximum: 200 + description: Maximum records to retrieve per request, not to exceed 200. Defaults to 25. + - name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + minimum: 0 + description: Used to retrieve the results based on a particular resource offset. + responses: + '200': + description: Product search successfully returned results. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductSearchResult' + examples: + ProductSearchResultExample: + $ref: '#/components/examples/ProductSearchResultExample' + '400': + description: Bad Request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + MalformedSelectorGetProductsSearchForSelect: + $ref: '#/components/examples/MalformedSelectorGetProductsSearchForSelect' + security: + - ShopperToken: + - sfcc.shopper-product-search + /organizations/{organizationId}/search-suggestions: + get: + summary: "Provides keyword-based search suggestions for products, categories, and brands. Returns suggested items for each \nbased on the search phrase." + description: "Provide keyword search functionality for products, categories, and brands suggestions. Returns suggested \nproducts, suggested categories, and suggested brands for the given search phrase." + operationId: getSearchSuggestions + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/qSearchSuggestion' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/currency' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Search suggestions successfully returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionResult' + examples: + SearchSuggestionResultExample: + $ref: '#/components/examples/SearchSuggestionResultExample' + '400': + description: Thrown when a query parameter or its value is unknown, or when a maximum or minimum constraint is violated. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + StringConstraintViolation: + $ref: '#/components/examples/StringConstraintViolation' + security: + - ShopperToken: + - sfcc.shopper-product-search +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both Open Commerce API and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-product-search: Allows read operations on shopper search. + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-product-search: Allows read operations on shopper search. + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + Select: + minLength: 1 + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + example: (name,id,variationAttributes.(**)) + type: string + pattern: ^[(].*[)]$ + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + String256: + type: string + maxLength: 256 + description: "The String256 schema is a foundational schema designed for fields or attributes that are stored in a database field with a maximum capacity of 256 bytes. \nThis schema accommodates various character sets, with the following considerations:\n - ASCII Characters: Each ASCII character occupies 1 byte, allowing up to 256 characters.\n - Latin Characters: Many Latin characters require 2 bytes each, allowing up to 128 characters.\n - Asian Characters: Many Asian characters require 3 bytes each, allowing approximately 85 characters." + example: Max Mustermann + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + Offset: + default: 0 + minimum: 0 + format: int64 + description: The zero-based index of the first hit/data to include in the result. + type: integer + example: 0 + PaginatedResultBase: + description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + offset: + $ref: '#/components/schemas/Offset' + required: + - limit + - offset + - total + String4000: + type: string + maxLength: 4000 + description: "The String4000 schema is a foundational schema designed for fields or attributes that are stored in a database field with a maximum capacity of 4000 bytes. \nThis schema accommodates various character sets, with the following considerations:\n - ASCII Characters: Each ASCII character occupies 1 byte, allowing up to 4000 characters.\n - Latin Characters: Many Latin characters require 2 bytes each, allowing up to 2000 characters.\n - Asian Characters: Many Asian characters require 3 bytes each, allowing approximately 1333 characters." + example: This is a detailed description of an Excellent Product. It includes all the features, specifications, and benefits of the product. The Excellent Product is designed to provide exceptional performance and reliability. It is made from high-quality materials and has been rigorously tested to ensure it meets the highest standards. Whether you are using it for personal or professional purposes, the Excellent Product is the perfect choice. With its advanced technology and user-friendly design, it offers unparalleled convenience and efficiency. Order your Excellent Product today and experience the difference it can make. + Image: + properties: + alt: + allOf: + - $ref: '#/components/schemas/String4000' + example: The White Dress Shirt + disBaseLink: + allOf: + - $ref: '#/components/schemas/String4000' + example: https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZEU_006/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg + link: + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: https://zzeu-006.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg + title: + allOf: + - $ref: '#/components/schemas/String4000' + example: The White Dress Shirt + required: + - link + type: object + ProductType: + description: Document representing a product type. + properties: + bundle: + description: A flag indicating whether the product is a bundle. + type: boolean + example: true + item: + description: A flag indicating whether the product is a standard item. + type: boolean + example: true + master: + description: A flag indicating whether the product is a master. + type: boolean + example: true + option: + description: A flag indicating whether the product is an option. + type: boolean + example: true + set: + description: A flag indicating whether the product is a set. + type: boolean + example: true + variant: + description: A flag indicating whether the product is a variant. + type: boolean + example: true + variationGroup: + description: A flag indicating whether the product is a variation group. + type: boolean + example: true + type: object + ProductRef: + description: Document representing a product reference. + properties: + id: + description: The ID of the product reference. + type: string + minLength: 1 + maxLength: 100 + example: '74974310' + required: + - id + type: object + VariationAttributeValue: + description: Document representing a variation attribute value. + properties: + description: + description: The localized description of the variation value. + allOf: + - $ref: '#/components/schemas/String4000' + example: Size 15R + image: + description: The first product image for the configured viewtype and this variation value. + allOf: + - $ref: '#/components/schemas/Image' + imageSwatch: + description: The first product image for the configured viewtype and this variation value. Typically the swatch image. + allOf: + - $ref: '#/components/schemas/Image' + name: + description: The localized display name of the variation value. + allOf: + - $ref: '#/components/schemas/String4000' + example: 15R + orderable: + description: A flag indicating whether at least one variant with this variation attribute value is available to sell. + type: boolean + example: true + value: + minLength: 1 + description: The actual variation value. + allOf: + - $ref: '#/components/schemas/String4000' + example: 15R + required: + - value + type: object + VariationAttribute: + description: Document representing a variation attribute. + properties: + id: + minLength: 1 + description: The ID of the variation attribute. + allOf: + - $ref: '#/components/schemas/String256' + example: size + name: + description: The localized display name of the variation attribute. + allOf: + - $ref: '#/components/schemas/String4000' + example: size + values: + description: The sorted array of variation values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttributeValue' + required: + - id + type: object + ImageGroup: + description: Document representing an image group containing a list of images for a particular view type and an optional variation value. + properties: + images: + description: The images of the image group. + type: array + minLength: 1 + items: + $ref: '#/components/schemas/Image' + variationAttributes: + description: Returns a list of variation attributes applying to this image group. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + viewType: + description: The image view type. + example: hi-res + type: string + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + required: + - images + - viewType + type: object + PriceRange: + description: Document representing price ranges for a product which happens to be a master product (per Pricebook) + properties: + maxPrice: + format: double + description: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook) + example: 10.89 + type: number + minPrice: + format: double + description: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook) + example: 10.89 + type: number + pricebook: + description: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM. + example: usd-list-pricebook + allOf: + - $ref: '#/components/schemas/String256' + type: object + ProductPromotion: + description: Document representing a product promotion. + properties: + calloutMsg: + description: The localized call-out message of the promotion. + example: Fantastic promotion + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + promotionId: + description: The unique ID of the promotion. + example: summerSale + type: string + minLength: 1 + maxLength: 260 + promotionalPrice: + format: double + description: The promotional price for this product. + example: 12.99 + type: number + minLength: 1 + required: + - calloutMsg + - promotionId + - promotionalPrice + type: object + ProductPriceTable: + description: Tiered Price Level Object + properties: + price: + format: double + description: Price for the product for the specified tier for the specified pricebook + example: 12.99 + type: number + pricebook: + description: The active pricebook for which this price is defined + example: usd-list-pricebook + allOf: + - $ref: '#/components/schemas/String256' + quantity: + format: double + description: Quantity tier for which the price is defined. + example: 1 + type: number + type: object + Variant: + description: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.* + properties: + orderable: + description: A flag indicating whether the variant is orderable. + example: true + type: boolean + price: + format: double + description: The sales price of the variant. + example: 25.99 + type: number + productId: + minLength: 1 + maxLength: 100 + description: The ID (SKU) of the variant. + example: 8W4756834 + type: string + tieredPrices: + description: List of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + additionalProperties: + allOf: + - $ref: '#/components/schemas/String4000' + example: Beige + productPromotions: + description: |- + The array of active customer product promotions for this product. This array can be empty. + Coupon promotions are not returned in this array. + type: array + items: + $ref: '#/components/schemas/ProductPromotion' + required: + - productId + type: object + VariationGroup: + description: Representation of a group of variant products by an attribute. This can't be purchased by a shopper. It provides inheritable attributes for its product variants and is used for navigation. A VariationGroup doesn't have a SKU. + properties: + orderable: + description: A flag indicating whether the variation group is orderable. + example: false + type: boolean + minLength: 1 + price: + format: double + description: The sales price of the variation group. + example: 24.99 + type: number + minLength: 1 + productId: + minLength: 1 + maxLength: 100 + description: The ID (SKU) of the variation group. + example: 49345VG + type: string + variationValues: + description: The actual variation attribute ID - value pairs. + type: object + minLength: 1 + additionalProperties: + allOf: + - $ref: '#/components/schemas/String4000' + example: Beige + required: + - orderable + - price + - productId + - variationValues + type: object + ProductSearchHit: + description: Document representing a product search hit. + properties: + currency: + $ref: '#/components/schemas/CurrencyCode' + hitType: + description: The type information for the search hit. + allOf: + - $ref: '#/components/schemas/String256' + example: product + image: + description: The first image of the product hit for the configured viewtype. + allOf: + - $ref: '#/components/schemas/Image' + orderable: + description: A flag indicating whether the product is orderable. + type: boolean + example: true + price: + format: double + description: |- + The sales price of the product. In complex products, like master or set, this is the minimum price of + related child products. + type: number + example: 135 + priceMax: + format: double + description: The maximum sales of related child products in complex products like master or set. + type: number + example: 150 + productId: + description: The ID (SKU) of the product. + type: string + minLength: 1 + example: '74974310' + maxLength: 100 + productName: + description: The localized name of the product. + example: Modern Dress Shirt + allOf: + - $ref: '#/components/schemas/String4000' + productType: + description: The type information for the product. + allOf: + - $ref: '#/components/schemas/ProductType' + representedProduct: + description: The first represented product. + allOf: + - $ref: '#/components/schemas/ProductRef' + representedProducts: + description: All the represented products. + type: array + items: + $ref: '#/components/schemas/ProductRef' + variationAttributes: + description: The array of represented variation attributes, for the master product only. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationAttribute' + imageGroups: + description: The array of product image groups. + type: array + items: + $ref: '#/components/schemas/ImageGroup' + priceRanges: + description: Array of one or more price range objects representing one or more Pricebooks in context for the site. + type: array + items: + $ref: '#/components/schemas/PriceRange' + productPromotions: + description: |- + The array of active customer product promotions for this product. This array can be empty. + Coupon promotions are not returned in this array. + type: array + items: + $ref: '#/components/schemas/ProductPromotion' + tieredPrices: + description: The document represents list of tiered prices if the product is a variant + type: array + items: + $ref: '#/components/schemas/ProductPriceTable' + variants: + description: The array of actual variants. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/Variant' + variationGroups: + description: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty. + type: array + items: + $ref: '#/components/schemas/VariationGroup' + required: + - productId + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + PageMetaTag: + description: Document representing a Page Meta Tag object. + properties: + id: + description: The ID of the Page Meta Tag. + example: title + allOf: + - $ref: '#/components/schemas/String256' + value: + description: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID. + example: Buy the Long Sleeve Covered Placket Blouse for USD 61.99. + type: string + type: object + ProductSearchRefinementValue: + description: Document representing a product search refinement value. + properties: + description: + description: The localized description of the refinement value. + allOf: + - $ref: '#/components/schemas/String4000' + example: The Beige objects + hitCount: + format: int32 + description: The number of search hits when selecting the refinement value. Can be 0. + type: integer + minLength: 1 + example: 3 + label: + description: The localized label of the refinement value. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Beige + presentationId: + description: |- + The optional presentation ID associated with the refinement value. + The presentation ID can be used, for example, to associate an ID with + an HTML widget. + allOf: + - $ref: '#/components/schemas/String256' + example: beige + value: + description: "The refinement value. In the case of an attribute refinement, this is the bucket, the attribute value, or a \nvalue range. In the case of a category refinement, this is the category ID. In the case of a price \nrefinement, this is the price range. Ranges are enclosed by parentheses and delimited by \"..\"; for example, \n\"(100..999)\" and \"(Aa..Fa)\" are valid ranges." + type: string + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Beige + values: + description: The array of hierarchical refinement values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ProductSearchRefinementValue' + required: + - hitCount + - label + - value + type: object + ProductSearchRefinement: + description: Document representing a product search refinement attribute. + properties: + attributeId: + description: |- + The ID of the search refinement attribute. In the case of an attribute refinement, this is the attribute ID. + Custom attributes are marked by the prefix "c_" (for example, "c_refinementColor"). In the case of a + category refinement, the ID must be "cgid". In the case of a price refinement, the ID must be "price". + example: refinementColor + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + label: + description: The localized label of the refinement. + example: Color + allOf: + - $ref: '#/components/schemas/String256' + values: + description: The sorted array of refinement values. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ProductSearchRefinementValue' + required: + - attributeId + type: object + SuggestedPhrase: + description: Document representing a suggested search phrase. + properties: + exactMatch: + description: Returns whether this suggested phrase exactly matches the user input search phrase. + type: boolean + minLength: 1 + example: true + phrase: + description: Returns the suggested search phrase. + type: string + minLength: 1 + maxLength: 50 + example: sony + required: + - exactMatch + - phrase + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + SuggestedTerm: + description: Document representing a suggested term. + properties: + completed: + description: Returns whether this term value is a completion match. + type: boolean + minLength: 1 + example: true + corrected: + description: Returns whether this term value is a correction match. + type: boolean + minLength: 1 + example: false + exactMatch: + description: Returns whether this term value is a exact match. + type: boolean + minLength: 1 + example: false + value: + description: Returns the term value. + type: string + minLength: 1 + maxLength: 50 + example: sony + required: + - completed + - corrected + - exactMatch + - value + type: object + SuggestedTerms: + description: Document representing a list of suggested terms for each term of a search phrase. + properties: + originalTerm: + description: Returns the original term that the suggested terms relates to. + type: string + minLength: 1 + maxLength: 50 + example: son + terms: + description: Returns the suggested terms. + type: array + items: + $ref: '#/components/schemas/SuggestedTerm' + required: + - originalTerm + type: object + Suggestion: + description: Document representing a suggestion. + properties: + suggestedPhrases: + description: A list of suggested phrases. This list can be empty. + type: array + items: + $ref: '#/components/schemas/SuggestedPhrase' + suggestedTerms: + description: A list of suggested terms. This list can be empty. + type: array + minLength: 1 + items: + $ref: '#/components/schemas/SuggestedTerms' + required: + - suggestedTerms + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductSearchSortingOption: + description: Document representing a product search sorting option. + properties: + id: + description: The ID of the sorting option. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + example: best-matches + label: + description: The localized label of the sorting option. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Best Matches + required: + - id + - label + type: object + ProductSearchResult: + description: Document representing a product search result. + allOf: + - $ref: '#/components/schemas/PaginatedResultBase' + properties: + hits: + description: A sorted array of search hits (`ProductSearchHit` objects). The array can be empty. + type: array + minLength: 1 + items: + $ref: '#/components/schemas/ProductSearchHit' + pageMetaTags: + description: Page Meta tags associated with the search result. + type: array + items: + $ref: '#/components/schemas/PageMetaTag' + query: + description: The query string that was searched for. + type: string + maxLength: 50 + example: dresses + refinements: + description: The sorted array of search refinements. This array can be empty. + type: array + minLength: 1 + items: + $ref: '#/components/schemas/ProductSearchRefinement' + searchPhraseSuggestions: + description: The suggestion given by the system for the submitted search phrase. + minLength: 1 + allOf: + - $ref: '#/components/schemas/Suggestion' + selectedRefinements: + description: A map of selected refinement attribute ID or value pairs. The sorting order is the same as in request URL. + type: object + additionalProperties: + allOf: + - $ref: '#/components/schemas/String4000' + example: Beige + selectedSortingOption: + description: The ID of the applied sorting option. + allOf: + - $ref: '#/components/schemas/String4000' + example: best-matches + sortingOptions: + description: The sorted array of search sorting options. This array can be empty. + type: array + minLength: 1 + items: + $ref: '#/components/schemas/ProductSearchSortingOption' + required: + - limit + - hits + - query + - refinements + - searchPhraseSuggestions + - sortingOptions + - offset + - total + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + BrandSuggestions: + description: The suggested brand names are listed in suggested phrases. If this list is empty, no brand suggestion for a given search phrase was found. + allOf: + - $ref: '#/components/schemas/Suggestion' + SuggestedCategory: + properties: + id: + description: The ID of the category. + type: string + minLength: 1 + maxLength: 260 + example: womens-clothing-dresses + name: + description: The localized name of the category. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Dresses + parentCategoryName: + description: The name of the parent category. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Clothing + required: + - id + - name + - parentCategoryName + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + CategorySuggestions: + allOf: + - $ref: '#/components/schemas/Suggestion' + properties: + categories: + description: The sorted list of suggested categories. This list can be empty. + type: array + items: + $ref: '#/components/schemas/SuggestedCategory' + type: object + SuggestedProduct: + description: Document representing a product search hit. + properties: + currency: + $ref: '#/components/schemas/CurrencyCode' + price: + format: double + description: |- + The sales price of the product. In the case of complex products like a master or a set, this is the minimum price of + related child products. + type: number + minLength: 1 + example: 300 + productId: + description: The ID (SKU) of the product. + type: string + minLength: 1 + maxLength: 100 + example: sony-ps3-bundle + productName: + description: The localized name of the product. + minLength: 1 + allOf: + - $ref: '#/components/schemas/String4000' + example: Playstation 3 Bundle + required: + - currency + - price + - productId + - productName + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ProductSuggestions: + allOf: + - $ref: '#/components/schemas/Suggestion' + properties: + products: + description: The sorted list of suggested products. This list can be empty. + type: array + items: + $ref: '#/components/schemas/SuggestedProduct' + type: object + CustomSuggestions: + description: The custom suggestions are listed in suggested phrases. If this list is empty, no custom suggestion for the given search phrase was found. + allOf: + - $ref: '#/components/schemas/Suggestion' + properties: + customSuggestion: + type: string + example: Try searching for budget shoes. + type: object + SuggestionResult: + description: Document representing a search suggestion result. + properties: + brandSuggestions: + description: Returns the suggested brands. + allOf: + - $ref: '#/components/schemas/BrandSuggestions' + categorySuggestions: + description: Returns the suggested categories. + allOf: + - $ref: '#/components/schemas/CategorySuggestions' + productSuggestions: + description: Returns the suggested products. + allOf: + - $ref: '#/components/schemas/ProductSuggestions' + customSuggestion: + description: Returns custom suggestions. + allOf: + - $ref: '#/components/schemas/CustomSuggestions' + searchPhrase: + description: The query phrase (q) for which suggestions where made. + type: string + example: dresses + minLength: 3 + maxLength: 50 + required: + - searchPhrase + type: object + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + select: + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + name: select + in: query + examples: + select: + value: (**) + schema: + $ref: '#/components/schemas/Select' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + qProductSearch: + name: q + in: query + description: The query phrase to search for. For example to search for a product "shirt", type q=shirt. + required: false + schema: + maxLength: 50 + minLength: 1 + type: string + example: shirt + refine: + name: refine + in: query + description: "Parameter that represents a refinement attribute or values pair. Refinement attribute ID and \nvalues are separated by '='. Multiple values are supported by a subset of refinement attributes and \ncan be provided by separating them using a pipe (URL \nencoded = \\\"|\\\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . \nMultiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. \nThe refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can \nonly accept a total of 9 refinements at a time. \nThe following system refinement attribute ids are supported:\ncgid: Allows refinement per single category ID. Multiple category ids are not supported. \nprice: Allows refinement per single price range. Multiple price ranges are not supported. \npmid: Allows refinement per promotion ID. \nhtype: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.\norderable_only: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.\nilids: Allows refinement per inventory list IDs. Important Note:This API parameter is not GA and is currently a pilot/beta service as defined by the customer's main services agreement and provided as-is. If you are not part of the pilot/beta program, the API will throw an exception. Contact your customer success representative for more information.\n\n**Note:** To refine a search using multiple promotion filters—for example, to find products in both the spring and summer campaigns—see [Refining by Multiple Promotions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-promotions-for-developers.html#refining-by-multiple-promotions)." + required: false + style: form + explode: true + schema: + type: string + maxLength: 4000 + example: refine=price=(0..10)&refine=c_refinementColor=green + sort: + name: sort + in: query + description: The ID of the sorting option to sort the search hits. + required: false + schema: + example: brand + allOf: + - $ref: '#/components/schemas/String256' + currency: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + name: currency + in: query + examples: + CurrencyCode: + value: USD + schema: + $ref: '#/components/schemas/CurrencyCode' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + expand: + name: expand + in: query + description: "A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`. \nBy default, the expand parameter includes `availability, images, prices, represented_products, variations`. \nUse none to disable all expand options. \n**The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**\"" + required: false + schema: + items: + type: string + example: prices + enum: + - none + - availability + - images + - prices + - represented_products + - variations + - promotions + - custom_properties + - page_meta_tags + type: array + allImages: + name: allImages + in: query + description: "When the `images` expand parameter is used with this flag, the response includes the `imageGroups property`, which contains an image model. \nIf this flag is true, the full image model is returned. If false, only matching images are included. \nIf no flag is passed, the `imageGroups` property is omitted from the response." + required: false + schema: + type: boolean + example: true + perPricebook: + name: perPricebook + in: query + description: When this flag is set to `true` and is used with the `prices` expand parameter, the response includes per PriceBook prices and tiered prices (if available). + required: false + schema: + type: boolean + example: true + allVariationProperties: + name: allVariationProperties + in: query + description: The flag that determines which variation properties are included in the result. When set to `true` with the `variations` expand parameter, all variation properties (`variationAttributes`, `variationGroups`, `variants`) are returned. When set to false, only the default property `variationAttributes` is returned. + required: false + schema: + type: boolean + example: false + qSearchSuggestion: + name: q + in: query + description: The search phrase (q) for which suggestions are evaluated. Search suggestions are determined when the search phrase input is at least three (default) characters long. The value is configurable in the Business Manager. + required: true + schema: + maxLength: 50 + minLength: 3 + type: string + example: sho + limit: + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + name: limit + in: query + examples: + limit: + value: 25 + schema: + $ref: '#/components/schemas/Limit' + examples: + ProductSearchResultExample: + value: + limit: 3 + hits: + - currency: USD + hitType: master + image: + alt: Modern Dress Shirt, , large + disBaseLink: https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZEU_006/on/demandware.static/-/Sites-apparel-catalog/default/dw7671b929/images/large/B0174501_GY9_0.jpg + link: https://zzeu-006.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-catalog/default/dw7671b929/images/large/B0174501_GY9_0.jpg + title: 'Modern Dress Shirt, ' + orderable: true + price: 135 + productId: '74974310' + productName: Modern Dress Shirt + productType: + master: true + representedProduct: + id: 74974310-1 + representedProducts: + - id: 74974310-1 + - id: 74974310-2 + - id: 74974310-3 + - id: 74974310-4 + variationAttributes: + - id: color + name: color + values: + - name: Blue + orderable: true + value: '002' + - id: size + name: size + values: + - name: 15R + orderable: true + value: 15R + - name: 15L + orderable: true + value: 15L + - name: 16L + orderable: true + value: 16L + - currency: USD + hitType: master + image: + alt: The White Dress Shirt, , large + disBaseLink: https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZEU_006/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg + link: https://zzeu-006.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg + title: 'The White Dress Shirt, ' + orderable: true + price: 135 + productId: '78916783' + productName: The White Dress Shirt + productType: + master: true + representedProduct: + id: 78916783-1 + representedProducts: + - id: 78916783-1 + - id: 78916783-2 + - id: 78916783-3 + - id: 78916783-4 + variationAttributes: + - id: color + name: Color + values: + - name: White + orderable: true + value: white + - id: size + name: size + values: + - name: 15L + orderable: true + value: 15L + - name: 15R + orderable: true + value: 15R + - currency: USD + hitType: master + image: + alt: Striped Shirt, , large + disBaseLink: https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZEU_006/on/demandware.static/-/Sites-apparel-catalog/default/dw83b22281/images/large/PG.10213135.JJ9VSA5.PZ.jpg + link: https://zzeu-006.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-catalog/default/dw83b22281/images/large/PG.10213135.JJ9VSA5.PZ.jpg + title: 'Striped Shirt, ' + orderable: true + price: 40.99 + productId: '25518484' + productName: Striped Shirt + productType: + master: true + representedProduct: + id: '701642854760' + representedProducts: + - id: '701642854760' + - id: '701642854784' + - id: '701642854791' + - id: '701642854777' + variationAttributes: + - id: color + name: Color + values: + - name: Royal Multi + orderable: true + value: JJ9VSA5 + - id: size + name: Size + values: + - name: S + orderable: true + value: 9SM + - name: M + orderable: true + value: 9MD + - name: L + orderable: true + value: 9LG + - name: XL + orderable: true + value: 9XL + pageMetaTags: + - id: robots + value: index,follow + - id: title + value: Find amazing products in Storefront Catalog - EN' today + query: shirt + refinements: + - attributeId: cgid + label: Category + values: + - hitCount: 4 + label: New Arrivals + value: newarrivals + - attributeId: c_refinementColor + label: Color + values: + - hitCount: 0 + label: Beige + presentationId: beige + value: Beige + - hitCount: 0 + label: Yellow + presentationId: yellow + value: Yellow + - hitCount: 7 + label: Miscellaneous + presentationId: miscellaneous + value: Miscellaneous + - attributeId: price + label: Price + values: + - hitCount: 14 + label: $20 - $49.99 + value: (20..50) + - hitCount: 26 + label: $50 - $99.99 + value: (50..100) + - hitCount: 6 + label: $100 - $499.99 + value: (100..500) + - attributeId: c_isNew + label: New Arrival + values: + - hitCount: 1 + label: 'true' + value: 'true' + - attributeId: brand + label: brand + values: + - hitCount: 1 + label: Lacy-S + value: Lacy-S + searchPhraseSuggestions: + suggestedPhrases: + - exactMatch: true + phrase: shirt + suggestedTerms: + - originalTerm: shirt + terms: + - completed: false + corrected: false + exactMatch: true + value: shirt + sortingOptions: + - id: best-matches + label: Best Matches + - id: price-low-to-high + label: Price Low To High + offset: 0 + total: 46 + MalformedSelectorGetProductsSearchForSelect: + value: + title: Malformed Selector + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector + detail: The property selector '(hits.(currency, hitType,image.(**))' is malformed. + selector: (hits.(currency, hitType,image.(**)) + SearchSuggestionResultExample: + value: + brandSuggestions: + suggestedPhrases: + - exactMatch: false + phrase: Sony + suggestedTerms: + - originalTerm: son + terms: + - completed: true + corrected: false + exactMatch: false + value: sony + categorySuggestions: + suggestedTerms: + - originalTerm: son + productSuggestions: + products: + - currency: EUR + price: 300 + productId: sony-ps3-bundle + productName: Playstation 3 Bundle + - currency: EUR + price: 310 + productId: sony-alpha350-wlen + productName: Sony Alpha 350 Digital SLR Camera w/18-70mm Lens + - currency: EUR + price: 10 + productId: sony-alpha900-body + productName: Sony Alpha 900 Digital SLR Camera (body only) + - currency: EUR + price: 50 + productId: sony-warhawk-ps3 + productName: Warhawk (for Sony PS3) + - currency: EUR + price: 280 + productId: sony-psp-console + productName: Sony PSP® Game Console + suggestedPhrases: + - exactMatch: false + phrase: sony + suggestedTerms: + - originalTerm: son + terms: + - completed: true + corrected: false + exactMatch: false + value: sony + - completed: true + corrected: false + exactMatch: false + value: sonyalpha + searchPhrase: son + StringConstraintViolation: + value: + title: String Constraint Violation + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/string-constraint-violation + detail: The string length constraint was violated by 'q'. The expected length is '(3..50)'. + expected: (3..50) + parameter: q diff --git a/apis/shopper-seo-oas/.metadata.json b/apis/shopper-seo-oas-1.0.11/.metadata.json similarity index 91% rename from apis/shopper-seo-oas/.metadata.json rename to apis/shopper-seo-oas-1.0.11/.metadata.json index 225d3e45..5fb91883 100644 --- a/apis/shopper-seo-oas/.metadata.json +++ b/apis/shopper-seo-oas-1.0.11/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-seo-oas/1.0.9", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-seo-oas/1.0.11", "name": "Shopper Seo OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-seo-oas", - "version": "1.0.9", + "version": "1.0.11", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-seo-oas/exchange.json b/apis/shopper-seo-oas-1.0.11/exchange.json similarity index 79% rename from apis/shopper-seo-oas/exchange.json rename to apis/shopper-seo-oas-1.0.11/exchange.json index a7606c07..41742f59 100644 --- a/apis/shopper-seo-oas/exchange.json +++ b/apis/shopper-seo-oas-1.0.11/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-seo-oas-v1-bundled.yaml", + "main": "shopper-seo-oas-v1-public.yaml", "name": "Shopper Seo OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-seo-oas", - "version": "1.0.9", + "version": "1.0.11", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-seo-oas/shopper-seo-oas-v1-bundled.yaml b/apis/shopper-seo-oas-1.0.11/shopper-seo-oas-v1-internal.yaml similarity index 100% rename from apis/shopper-seo-oas/shopper-seo-oas-v1-bundled.yaml rename to apis/shopper-seo-oas-1.0.11/shopper-seo-oas-v1-internal.yaml diff --git a/apis/shopper-seo-oas-1.0.11/shopper-seo-oas-v1-public.yaml b/apis/shopper-seo-oas-1.0.11/shopper-seo-oas-v1-public.yaml new file mode 100644 index 00000000..d0c4d0a3 --- /dev/null +++ b/apis/shopper-seo-oas-1.0.11/shopper-seo-oas-v1-public.yaml @@ -0,0 +1,305 @@ +openapi: 3.0.3 +info: + title: Shopper SEO + version: v1 + description: |- + # API Overview + + The Shopper SEO API Provides access to SEO-related information, such as URL mapping information. + + ## Authentication & Authorization + + The Shopper SEO API requires a shopper access token from the [Shopper Login and API Access Service (SLAS).](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html) + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### URL Resolution + + For information on setting up URL rules and URL redirects in Business Manager, see [URL Resolution.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/url-resolution.html) + + ### Caching + + Caching capabilities are available for the Shopper SEO API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html) + + ### Using Hooks + + For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/url-mapping: + get: + summary: Get URL mapping information for a URL segment. + description: "The mapping information is based on URL rules and redirects that are set up in Business Manager. \nFor more information about prerequisites and sample usage, see [URL Resolution](/docs/commerce/commerce-api/guide/url-resolution.html). \nYou can customize the behavior of this endpoint by using hooks. For details, refer to the [Hook List](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook_list.html)." + operationId: getUrlMapping + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/urlSegment' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Returns URL mapping information for a URL that a shopper entered or selected. + content: + application/json: + schema: + $ref: '#/components/schemas/UrlMapping' + examples: + UrlMapping: + $ref: '#/components/examples/UrlMapping' + '400': + description: 'The locale is invalid. Make sure you provide a locale using the correct format: ISO 639-1 for the language code and ISO 3166-1 for the country code. For example, en-US.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getUrlMapping400: + $ref: '#/components/examples/getUrlMapping400' + '401': + description: The user making the call isn't authorized to make this request. For example, the correct scope wasn't added to an SLAS API Client or the access token is invalid or missing. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getUrlMapping401: + $ref: '#/components/examples/getUrlMapping401' + '404': + description: No mapping information for the requested URL exists because there's no corresponding URL rule in Business Manager. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getUrlMapping404: + $ref: '#/components/examples/getUrlMapping404' + security: + - ShopperToken: + - sfcc.shopper-seo +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both Open Commerce API and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-seo: Allows read operations on shopper seo. + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-seo: Allows read operations on shopper seo. + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + String256: + type: string + maxLength: 256 + description: "The String256 schema is a foundational schema designed for fields or attributes that are stored in a database field with a maximum capacity of 256 bytes. \nThis schema accommodates various character sets, with the following considerations:\n - ASCII Characters: Each ASCII character occupies 1 byte, allowing up to 256 characters.\n - Latin Characters: Many Latin characters require 2 bytes each, allowing up to 128 characters.\n - Asian Characters: Many Asian characters require 3 bytes each, allowing approximately 85 characters." + example: Max Mustermann + UrlMapping: + description: The URL mapping information for a URL that a shopper clicked or typed in. + type: object + properties: + resourceType: + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + description: "The type of resource that corresponds to the requested URL. If you set up a URL redirect in Business Manager, \nresourceType returns the corresponding destination type value from the redirect. If there's a URI redirect, resourceType isn't returned. \nThe URL redirect feature is available from B2C Commerce version 24.3." + enum: + - CATEGORY + - PRODUCT + - CONTENT_ASSET + example: CATEGORY + resourceSubType: + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + description: "If the resourceType is CONTENT_ASSET, this field tells you whether the resource is a standard content asset or a Page Designer content asset. \nThis output is available from B2C Commerce version 24.2." + enum: + - STANDARD_CONTENT_ASSET + - PAGE_DESIGNER_CONTENT_ASSET + example: STANDARD_CONTENT_ASSET + resourceId: + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + description: "The identifier for the resource that corresponds to the requested URL. If you set up a URL redirect in Business Manager, \nresourceId returns the corresponding destination ID value from the redirect. \nIf there's a URI redirect, resourceId isn't returned. The URL redirect feature is available from B2C Commerce version 24.3." + example: mens-clothing-shorts + refinements: + description: "The refinement filters that correspond to the URL and resourceType. \nRefinements are returned only if all of these conditions are met - a) the resourceType is CATEGORY, b) refinements are included in the urlSegment, and c) the refinements are configured in Business Manager. \nThis field returns a key-value pair of refinement name and refinement value. If there’s a matching URL redirect for the requested URL. the refinements output isn’t returned.\nThe URL redirect feature is available from B2C Commerce version 24.3." + type: object + additionalProperties: true + statusCode: + format: int32 + description: "This field is populated only if you set up a URL redirect in Business Manager. It specifies whether the redirect is temporary (302 or 307) or permanent (301). \nSee [Create a Redirect from a B2C Commerce URL.](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_a_redirect_from_a_digital_url.htm&type=5) \nThis parameter is available from B2C Commerce version 24.3." + type: integer + example: 301 + destinationUrl: + minLength: 1 + maxLength: 2048 + description: "This field is populated if the urlSegment resolves to a redirect. Specifies the URL you want to redirect to as an absolute or relative URL. \nThe destinationUrl is based on your configuration in Business Manager. It's either a calculated value indicating the Commerce Cloud object (product, category, or content asset) URL or your specified URL. \nNote that an object's path may not necessarily match your headless storefront URLs but can be used as a reference for calculating the destinationUrl. \nSee [Create a Redirect from a B2C Commerce URL.](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_a_redirect_from_a_digital_url.htm&type=5). \nAvailable from B2C Commerce 24.3." + type: string + example: mens/clothing/shorts + copySourceParams: + description: "This field is populated only if you set up a URL redirect in Business Manager. \nIt’s a flag that shows whether the parameters of the source URL have been copied to the destination URL. \nThis parameter is available from B2C Commerce version 24.3." + type: boolean + example: true + additionalUrlParams: + minLength: 1 + maxLength: 2048 + description: "This field is populated only if you set up a URL redirect in Business Manager. \nIt returns the parameters you want to add to the end of the URL. \nThis parameter is available from B2C Commerce version 24.3." + type: string + example: '&cgid=womens-accessories-scarves&prefn1=displaySize' + productCategoryId: + minLength: 1 + allOf: + - $ref: '#/components/schemas/String256' + description: "This field is populated only if you set up a URL redirect in Business Manager. \nIt identifies the destination product's category ID. This field is returned only when the destination type is product. \nThis parameter is available from B2C Commerce version 24.3." + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + urlSegment: + name: urlSegment + in: query + description: "The part of the requested URL that comes after the domain name. For example, the urlSegment for \\\"www.abc.com/blue/new-arrivals/tops\\\" is \\\"blue/new-arrivals/tops\\\". \nThere's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. \nMake this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned." + required: true + schema: + minLength: 1 + type: string + maxLength: 2047 + example: mens/clothing/shorts + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + examples: + UrlMapping: + value: + resourceType: CATEGORY + resourceId: new-arrivals-tops + refinements: + refinementColor: Blue + getUrlMapping400: + value: + title: Unknown Locale + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unknown-locale + detail: The locale 'ab-CD' is unknown. + locale: ab-CD + getUrlMapping401: + value: + title: Invalid Access Token + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-access-token + detail: The request is unauthorized, the access token is invalid. + accessToken: hbGciOiJIUzI1NiIsInR5cCI6Ikp + getUrlMapping404: + value: + title: Seo Url Mapping Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/seo-url-mapping-not-found + detail: black/mens/accessories/luggage + urlSegment: black/mens/accessories/luggage + locale: en_US diff --git a/apis/shopper-stores-oas/.metadata.json b/apis/shopper-stores-oas-1.0.16/.metadata.json similarity index 83% rename from apis/shopper-stores-oas/.metadata.json rename to apis/shopper-stores-oas-1.0.16/.metadata.json index dd56543a..29049a24 100644 --- a/apis/shopper-stores-oas/.metadata.json +++ b/apis/shopper-stores-oas-1.0.16/.metadata.json @@ -1,10 +1,10 @@ { - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-stores-oas/1.0.15-kbode.sdkE2E-b3", + "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-stores-oas/1.0.16", "name": "Shopper Stores OAS", "description": "", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-stores-oas", - "version": "1.0.15-kbode.sdkE2E-b3", + "version": "1.0.16", "categories": { "SDK Type": [ "Isomorphic", diff --git a/apis/shopper-stores-oas/exchange.json b/apis/shopper-stores-oas-1.0.16/exchange.json similarity index 75% rename from apis/shopper-stores-oas/exchange.json rename to apis/shopper-stores-oas-1.0.16/exchange.json index 9d023ca4..85bcbebe 100644 --- a/apis/shopper-stores-oas/exchange.json +++ b/apis/shopper-stores-oas-1.0.16/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-stores-oas-v1-bundled.yaml", + "main": "shopper-stores-oas-v1-public.yaml", "name": "Shopper Stores OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-stores-oas", - "version": "1.0.15-kbode.sdkE2E-b3", + "version": "1.0.16", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-stores-oas/shopper-stores-oas-v1-bundled.yaml b/apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-internal.yaml similarity index 95% rename from apis/shopper-stores-oas/shopper-stores-oas-v1-bundled.yaml rename to apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-internal.yaml index 3561241f..538899a6 100644 --- a/apis/shopper-stores-oas/shopper-stores-oas-v1-bundled.yaml +++ b/apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-internal.yaml @@ -88,7 +88,7 @@ paths: type: integer format: int64 default: 0 - maximum: 0 + minimum: 0 description: Used to retrieve the results based on a particular resource offset. responses: '200': @@ -96,7 +96,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StoreResult' + $ref: '#/components/schemas/Stores' examples: StoreSearchResult: $ref: '#/components/examples/StoreSearchResult' @@ -344,6 +344,36 @@ components: - title - type - detail + Offset: + default: 0 + minimum: 0 + format: int64 + description: The zero-based index of the first hit/data to include in the result. + type: integer + example: 0 + PaginatedResultBase: + description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + offset: + $ref: '#/components/schemas/Offset' + required: + - limit + - offset + - total + Stores: + description: Result object containing an paginated array of stores. + type: object + allOf: + - $ref: '#/components/schemas/PaginatedResultBase' + properties: + data: + description: The list of stores in the search result. + type: array + items: + $ref: '#/components/schemas/Store' parameters: organizationId: description: An identifier for the organization the request is being made by @@ -551,7 +581,7 @@ components: name: Khale Street Electronics phone: +1-978-580-2704 posEnabled: false - postalCode: 1843 + postalCode: '01843' stateCode: MA storeLocatorEnabled: true - address1: 110 Smith St @@ -564,7 +594,7 @@ components: name: Super Electronics phone: +1-401-312-6284 posEnabled: false - postalCode: 2903 + postalCode: '02903' stateCode: RI storeLocatorEnabled: true limit: 5 diff --git a/apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-public.yaml b/apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-public.yaml new file mode 100644 index 00000000..538899a6 --- /dev/null +++ b/apis/shopper-stores-oas-1.0.16/shopper-stores-oas-v1-public.yaml @@ -0,0 +1,607 @@ +openapi: 3.0.3 +info: + title: Shopper Stores + version: v1 + description: |- + # API Overview + + Provides access to stores via search or ID lookup. + + + ## Authentication & Authorization + + The Shopper Stores API requires a shopper access token from the [Shopper Login and API Access Service (SLAS).](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html) + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/stores: + get: + summary: Return stores identified by the IDs provided as input. + operationId: getStores + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/ids' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Returned details for specific stores. + content: + application/json: + schema: + $ref: '#/components/schemas/StoreResult' + examples: + StoresResult: + $ref: '#/components/examples/StoresResult' + '400': + description: A value constraint for query parameters was violated. Or, a combination of latitude and longitude, a combination of country code and postal code, or an invalid distance_unit was provided. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + MissingIds400: + $ref: '#/components/examples/MissingIds400' + security: + - ShopperToken: + - sfcc.shopper-stores + /organizations/{organizationId}/store-search: + get: + summary: Retrieve a list of stores for the given site that are within a configured distance of a geolocation. + description: | + - The distance is interpreted either in miles or kilometers, depending on the `distanceUnit` input parameter. + - The location is specified by either directly providing a latitude and longitude coordinate pair, or by providing a country and a postal code. If a postal code is passed, the resource looks in the system's geolocation mappings in Business Manager to find the coordinates for this postal code. If no matching geolocation is found, the resource returns an empty list of stores. If coordinates are passed, the values for country and postal code are ignored. + + To verify site latitude and longitude information in Business Manager: + - Navigate to **Merchant Tools -> Online Marketing -> Stores**. + - Select the applicable site. + - In the **Address** tab, verify that valid information is provided in the following fields: **Address**, **City**, **Postal Code**, **State**, and **Country**. For latitude and longitude values, you can manually enter values or provide all field values to auto-populate **Latitude** and **Longitude**. You must provide valid values for all of the previous fields for latitude and longitude to auto-populate **Latitude** and **Longitude** values. + operationId: searchStores + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/countryCode' + - $ref: '#/components/parameters/distanceUnit' + - $ref: '#/components/parameters/latitude' + - $ref: '#/components/parameters/longitude' + - $ref: '#/components/parameters/maxDistance' + - $ref: '#/components/parameters/postalCode' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + - name: limit + in: query + required: false + schema: + type: integer + format: int32 + default: 25 + maximum: 200 + description: Maximum records to retrieve per request, not to exceed 200. Defaults to 25. + - name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + minimum: 0 + description: Used to retrieve the results based on a particular resource offset. + responses: + '200': + description: Returned a list of stores for the given search parameters, up to the paging size, including their distance from the given geolocation and additional information on the pagination of objects. + content: + application/json: + schema: + $ref: '#/components/schemas/Stores' + examples: + StoreSearchResult: + $ref: '#/components/examples/StoreSearchResult' + '400': + description: A value constraint for query parameters was violated. Or, a combination of latitude and longitude, a combination of country code and postal code, or an invalid distance_unit was provided. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + MissingPostalCode400: + $ref: '#/components/examples/MissingPostalCode400' + security: + - ShopperToken: + - sfcc.shopper-stores +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc:shopper-stores: Allows read operations on shopper-stores + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-stores: Allows read operations on shopper-stores + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int64 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + Distance: + minimum: 0 + maximum: 20012 + format: double + description: The distance to the given geolocation where the stores will be searched, using the unit given in the attribute 'DistanceUnit' (miles or kilometers). + type: number + DistanceUnit: + description: The unit the distance attribute is measured in (either in miles or kilometers). + enum: + - km + - mi + type: string + Latitude: + minimum: -90 + maximum: 90 + format: double + description: The latitude of the store. + type: number + Longitude: + minimum: -180 + maximum: 180 + format: double + description: The longitude of the store. + type: number + PostalCode: + minLength: 3 + maxLength: 10 + description: The postal code of the store. + type: string + Store: + description: Document representing a store. + properties: + address1: + minLength: 1 + description: The primary address of the store. + type: string + address2: + description: The secondary address of the store. + type: string + city: + description: The city of the store. + type: string + countryCode: + $ref: '#/components/schemas/CountryCode' + distance: + $ref: '#/components/schemas/Distance' + distanceUnit: + $ref: '#/components/schemas/DistanceUnit' + email: + description: The email address of the store. + type: string + fax: + description: The fax number of the store. + type: string + id: + minLength: 1 + maxLength: 256 + description: The id of the store. + type: string + image: + description: The store image. + type: string + inventoryId: + maxLength: 256 + description: The inventory list id associated with this store. + type: string + latitude: + $ref: '#/components/schemas/Latitude' + longitude: + $ref: '#/components/schemas/Longitude' + name: + description: The store name. + type: string + phone: + description: The phone number of the store. + type: string + posEnabled: + description: Whether this store uses Store Point-of-Sale. + type: boolean + postalCode: + description: The postal code of the store. + allOf: + - $ref: '#/components/schemas/PostalCode' + stateCode: + description: The state code of the store. + type: string + storeEvents: + description: The store events. + type: string + storeHours: + description: The opening hours of the store. + type: string + storeLocatorEnabled: + description: Whether this store should show up in store locator results. + type: boolean + required: + - id + type: object + StoreResult: + description: Result object containing an array of stores. + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + description: The list of stores in the search result. + type: array + items: + $ref: '#/components/schemas/Store' + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + Offset: + default: 0 + minimum: 0 + format: int64 + description: The zero-based index of the first hit/data to include in the result. + type: integer + example: 0 + PaginatedResultBase: + description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + offset: + $ref: '#/components/schemas/Offset' + required: + - limit + - offset + - total + Stores: + description: Result object containing an paginated array of stores. + type: object + allOf: + - $ref: '#/components/schemas/PaginatedResultBase' + properties: + data: + description: The list of stores in the search result. + type: array + items: + $ref: '#/components/schemas/Store' + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + ids: + name: ids + in: query + description: The IDs of a requested stores (comma separated, max 50 IDs). + required: true + schema: + maxLength: 256 + minLength: 1 + type: string + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + countryCode: + name: countryCode + in: query + schema: + $ref: '#/components/schemas/CountryCode' + description: The two letter ISO country code, such as "US". This value is required when a postalCode is provided. + required: false + distanceUnit: + name: distanceUnit + in: query + description: The distance unit. Supported values are "mi" (miles) and "km" (kilometers). The default is "km". + required: false + schema: + $ref: '#/components/schemas/DistanceUnit' + latitude: + name: latitude + in: query + description: The geographical latitude to search for stores (value range -90.00 .. 90.00). This value is required when a longitude is provided. + required: false + schema: + $ref: '#/components/schemas/Latitude' + longitude: + name: longitude + in: query + description: The geographical longitude to search for stores (value range -180.00 .. 180.00). You must provide a longitude when a latitude is provided. + required: false + schema: + $ref: '#/components/schemas/Longitude' + maxDistance: + name: maxDistance + in: query + description: The area (radius) in distanceUnit where stores will be searched. + required: false + schema: + $ref: '#/components/schemas/Distance' + postalCode: + name: postalCode + in: query + description: The postal code, such as "84121". You must provide a countryCode when a postalCode is provided. + required: false + schema: + $ref: '#/components/schemas/PostalCode' + examples: + StoresResult: + value: + data: + - address1: 1487 Bay St + city: Springfield + countryCode: US + distance: 147.03 + distanceUnit: km + id: store9 + name: Springfield Media Store + phone: +1-413-413-6916 + posEnabled: false + postalCode: '01109' + stateCode: MA + storeEvents: Here are some store events. + storeHours: Here are the store hours + storeLocatorEnabled: true + - address1: 70 Wood Ave + city: Bridgeport + countryCode: US + distance: 198.36 + distanceUnit: km + email: store1@company.com + id: store11 + name: Electronics Super Store + phone: +1-203-965-7014 + posEnabled: false + postalCode: '06605' + stateCode: CT + storeLocatorEnabled: true + - address1: 239 Bridge St + city: Manchester + countryCode: US + distance: 219 + distanceUnit: km + id: store8 + name: Gardena Mart + phone: +1-603-715-9773 + posEnabled: false + postalCode: '03104' + stateCode: NH + storeLocatorEnabled: true + - address1: 150 Winthrop Ave + city: Lawrence + countryCode: US + distance: 242.77 + distanceUnit: km + id: store6 + name: Khale Street Electronics + phone: +1-978-580-2704 + posEnabled: false + postalCode: '01843' + stateCode: MA + storeLocatorEnabled: true + - address1: 110 Smith St + city: Providence + countryCode: US + distance: 245.02 + distanceUnit: km + email: store2@company.com + id: store2 + name: Super Electronics + phone: +1-401-312-6284 + posEnabled: false + postalCode: '02903' + stateCode: RI + storeLocatorEnabled: true + limit: 5 + total: 12 + MissingIds400: + value: + detail: 'Missing required query parameter(s): ''ids''' + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/missing-query-parameter + StoreSearchResult: + value: + data: + - address1: 1487 Bay St + city: Springfield + countryCode: US + distance: 147.03 + distanceUnit: km + id: store9 + name: Springfield Media Store + phone: +1-413-413-6916 + posEnabled: false + postalCode: '01109' + stateCode: MA + storeEvents: Here are some store events. + storeHours: Here are the store hours + storeLocatorEnabled: true + - address1: 70 Wood Ave + city: Bridgeport + countryCode: US + distance: 198.36 + distanceUnit: km + email: store1@company.com + id: store11 + name: Electronics Super Store + phone: +1-203-965-7014 + posEnabled: false + postalCode: '06605' + stateCode: CT + storeLocatorEnabled: true + - address1: 239 Bridge St + city: Manchester + countryCode: US + distance: 219 + distanceUnit: km + id: store8 + name: Gardena Mart + phone: +1-603-715-9773 + posEnabled: false + postalCode: '03104' + stateCode: NH + storeLocatorEnabled: true + - address1: 150 Winthrop Ave + city: Lawrence + countryCode: US + distance: 242.77 + distanceUnit: km + id: store6 + name: Khale Street Electronics + phone: +1-978-580-2704 + posEnabled: false + postalCode: '01843' + stateCode: MA + storeLocatorEnabled: true + - address1: 110 Smith St + city: Providence + countryCode: US + distance: 245.02 + distanceUnit: km + email: store2@company.com + id: store2 + name: Super Electronics + phone: +1-401-312-6284 + posEnabled: false + postalCode: '02903' + stateCode: RI + storeLocatorEnabled: true + limit: 5 + offset: 0 + total: 12 + MissingPostalCode400: + value: + title: Missing Postal Code + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/missing-postal-code + detail: The input parameter 'postal_code' is required when no coordinates are provided. diff --git a/package.json b/package.json index ff1a229e..528a1d6e 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "bundlesize": [ { "path": "lib/**/*.js", - "maxSize": "51 kB" + "maxSize": "53 kB" }, { "path": "commerce-sdk-isomorphic-with-deps.tgz", diff --git a/scripts/generate-oas.test.ts b/scripts/generate-oas.test.ts index 796359be..37db94f4 100644 --- a/scripts/generate-oas.test.ts +++ b/scripts/generate-oas.test.ts @@ -15,6 +15,7 @@ import { generateIndex, main, generateVersionFile, + getAllAPIDirectories, } from './generate-oas'; // Mock dependencies @@ -41,7 +42,8 @@ describe('generate-oas', () => { (fs.readJSONSync as jest.Mock).mockReturnValue({ main: 'api.yaml', assetId: 'shopper-orders-oas', - name: 'Shopper orders OAS', + name: 'Shopper Orders OAS', + apiVersion: 'v1', }); (fs.statSync as jest.Mock).mockReturnValue({isFile: () => true}); (fs.readdir as jest.Mock).mockImplementation((dir, callback) => { @@ -77,19 +79,19 @@ describe('generate-oas', () => { }); describe('resolveApiName', () => { - it('should handle special case for Shopper orders OAS', () => { - const result = resolveApiName('Shopper orders OAS'); - expect(result).toBe('ShopperOrders'); + it('should handle special case for Shopper Baskets OAS', () => { + const result = resolveApiName('Shopper Baskets OAS', 'v2'); + expect(result).toBe('ShopperBasketsV2'); }); it('should handle special case for Shopper Seo OAS', () => { - const result = resolveApiName('Shopper Seo OAS'); + const result = resolveApiName('Shopper Seo OAS', 'v1'); expect(result).toBe('ShopperSEO'); }); it('should handle regular API names', () => { - const result = resolveApiName('Shopper Baskets OAS'); - expect(result).toBe('ShopperBaskets'); + const result = resolveApiName('Shopper Orders OAS', 'v1'); + expect(result).toBe('ShopperOrders'); }); }); @@ -102,7 +104,7 @@ describe('generate-oas', () => { filepath: path.join(mockApiDirectory, 'shopperOrders', 'api.yaml'), filename: 'api.yaml', directoryName: 'shopperOrders', - name: 'Shopper orders OAS', + name: 'Shopper Orders OAS', apiName: 'ShopperOrders', }); }); @@ -131,7 +133,7 @@ describe('generate-oas', () => { inputSpec: '/path/to/shopper/api.yaml', outputDir: path.join(__dirname, '../src/lib/test-api'), templateDir: path.join(__dirname, '../templatesOas'), - skipValidateSpec: true, + flags: '--reserved-words-mappings delete=delete', }); }); @@ -198,4 +200,54 @@ describe('generate-oas', () => { ); }); }); + + describe('getAllDirectories', () => { + it('should return all directories in the given path', () => { + // Mock nested directory structure + (fs.readdirSync as jest.Mock).mockImplementation((dirPath: string) => { + if (dirPath === mockApiDirectory) { + return ['shopper-orders', 'shopper-baskets', 'admin']; + } + if (dirPath.endsWith('admin')) { + return ['customers', 'products']; + } + if (dirPath.endsWith('customers')) { + return ['nested-folder']; + } + return []; + }); + + (fs.lstatSync as jest.Mock).mockImplementation((itemPath: string) => ({ + isDirectory: () => !itemPath.includes('.'), + })); + + const result = getAllAPIDirectories(mockApiDirectory); + + expect(result).toEqual([ + 'shopper-orders', + 'shopper-baskets', + 'admin', + 'admin/customers', + 'admin/customers/nested-folder', + 'admin/products', + ]); + }); + + it('should handle errors gracefully when directory cannot be read', () => { + (fs.readdirSync as jest.Mock).mockImplementation(() => { + throw new Error('Permission denied'); + }); + + const consoleSpy = jest.spyOn(console, 'warn').mockImplementation(); + const result = getAllAPIDirectories('/invalid/path'); + + expect(result).toEqual([]); + expect(consoleSpy).toHaveBeenCalledWith( + 'Warning: Could not read directory /invalid/path:', + expect.any(Error) + ); + + consoleSpy.mockRestore(); + }); + }); }); diff --git a/scripts/generate-oas.ts b/scripts/generate-oas.ts index 5bfba7f0..66e3640e 100644 --- a/scripts/generate-oas.ts +++ b/scripts/generate-oas.ts @@ -37,39 +37,69 @@ function kebabToCamelCase(str: string): string { ); } -export function resolveApiName(name: string): string { - // Special cases for shopper-orders and shopper-seo where the API name has different casing then the name in exchange.json - if (name === 'Shopper orders OAS') { - return 'ShopperOrders'; +function appendVersionIfV2(name: string, version: string): string { + if (version === 'V1' || version === 'v1') { + return name; } - if (name === 'Shopper Seo OAS') { - return 'ShopperSEO'; + return name + version; +} + +export function resolveApiName(name: string, version: string): string { + let apiName; + + // Special handling for ShopperBasketV1 because we want to append V1 in this case + if (name === 'Shopper Baskets OAS' && version === 'v1') { + return 'ShopperBasketsV1'; } - if (name === 'Shopper Context OAS') { - return 'ShopperContexts'; + + if (name === 'Shopper Seo OAS') { + apiName = 'ShopperSEO'; + } else if (name === 'Shopper Context OAS') { + apiName = 'ShopperContexts'; + } else { + apiName = name.replace(/\s+/g, '').replace('OAS', ''); } - return name.replace(/\s+/g, '').replace('OAS', ''); + + return version !== 'v1' ? apiName + version.toUpperCase() : apiName; } +/** + * Extracts details needed for API generation from the exchange.json file contained within the given directory + * @param directory - The directory containing the exchange.json file + * @returns ApiSpecDetail - An object containing the details needed for API generation + */ export function getAPIDetailsFromExchange(directory: string): ApiSpecDetail { const exchangePath = path.join(directory, 'exchange.json'); if (fs.existsSync(exchangePath)) { const exchangeConfig = fs.readJSONSync( exchangePath ) as download.ExchangeConfig; + return { - filepath: path.join(directory, exchangeConfig.main), + filepath: path.join( + directory, + exchangeConfig.main.replace('-public.yaml', '-internal.yaml') + ), filename: exchangeConfig.main, directoryName: kebabToCamelCase( - exchangeConfig.assetId.replace('-oas', '') + appendVersionIfV2( + exchangeConfig.assetId.replace('-oas', ''), + exchangeConfig.apiVersion + ) ), - name: exchangeConfig.name, - apiName: resolveApiName(exchangeConfig.name), + name: + exchangeConfig.apiVersion === 'v2' + ? `${exchangeConfig.name} V2` + : exchangeConfig.name, + apiName: resolveApiName(exchangeConfig.name, exchangeConfig.apiVersion), }; } throw new Error(`Exchange file does not exist for ${directory}`); } +/** + * Invokes openapi-generator via raml-toolkit to generate SDKs + */ export function generateSDKs(apiSpecDetail: ApiSpecDetail): void { const {filepath, name, directoryName} = apiSpecDetail; if (fs.statSync(filepath).isFile() && filepath.includes('shopper')) { @@ -80,7 +110,8 @@ export function generateSDKs(apiSpecDetail: ApiSpecDetail): void { inputSpec: `${filepath}`, outputDir: `${outputDir}`, templateDir: `${TEMPLATE_DIRECTORY}`, - skipValidateSpec: true, + // We use this flag so that the generator can handle delete methods without prepending a '_' + flags: `--reserved-words-mappings delete=delete`, }); } catch (error) { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions @@ -106,6 +137,43 @@ export function generateVersionFile(): void { fs.writeFileSync(`${TARGET_DIRECTORY}/version.ts`, generatedVersion); } +/** + * Recursively finds and returns all subdirectories within the given base path with an exchange.json file + * @param basePath - The base path to search for exchange.json files + * @param relativePath - The relative path to the base path + * @returns An array of subdirectories with an exchange.json file + */ +export function getAllAPIDirectories( + basePath: string, + relativePath = '' +): string[] { + const fullPath = path.join(basePath, relativePath); + const directories: string[] = []; + + try { + const items = fs.readdirSync(fullPath); + + items.forEach(item => { + const itemPath = path.join(fullPath, item); + const relativeItemPath = relativePath + ? path.join(relativePath, item) + : item; + + // We only want to return directories with an exchange.json file as only directories with exchange.json are considered valid APIs + if (fs.lstatSync(itemPath).isDirectory()) { + if (fs.existsSync(path.join(itemPath, 'exchange.json'))) { + directories.push(relativeItemPath); + } + directories.push(...getAllAPIDirectories(basePath, relativeItemPath)); + } + }); + } catch (error) { + console.warn(`Warning: Could not read directory ${fullPath}:`, error); + } + + return directories; +} + export function copyStaticFiles(): void { const skipTestFiles = (src: string): boolean => !/\.test\.[a-z]+$/.test(src); fs.copySync(STATIC_DIRECTORY, TARGET_DIRECTORY, {filter: skipTestFiles}); @@ -126,14 +194,18 @@ export function main(): void { copyStaticFiles(); const apiSpecDetails: ApiSpecDetail[] = []; - const subDirectories: string[] = directories.filter((directory: string) => - fs.lstatSync(path.join(apiDirectory, directory)).isDirectory() - ); + const subDirectories: string[] = getAllAPIDirectories(apiDirectory); + subDirectories.forEach((directory: string) => { - const details = getAPIDetailsFromExchange( - path.join(apiDirectory, directory) - ); - apiSpecDetails.push(details); + try { + const details = getAPIDetailsFromExchange( + path.join(apiDirectory, directory) + ); + apiSpecDetails.push(details); + } catch (error: unknown) { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + console.log(`Skipping directory ${directory}: ${error}`); + } }); apiSpecDetails.forEach((apiSpecDetail: ApiSpecDetail) => { diff --git a/scripts/utils.ts b/scripts/utils.ts index d07d075e..6a61258f 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -7,21 +7,6 @@ /* eslint-disable import/prefer-default-export */ import {download} from '@commerce-apps/raml-toolkit'; -// TODO - THIS IS THE OLD WORKAROUND FOR THE SHOPPER CONTEXT API MODEL NAME CLASH -// DO WE STILL WANT THIS FOR THE OAS GENERATED SDK? - -// Editing the name of the Shopper Context API Model so our name is used for generating class name. -// This is hard-coded for now but in the future if we handle the case where type name and title clash better, this can be removed. -// function overwriteShopperContextName(apis: ApiMetadata): void { -// const shopperContextApi = apis.children.find( -// api => api.name.original === 'shopper-context' -// ); - -// if (shopperContextApi) { -// shopperContextApi.name = new Name('shopper-contexts'); -// } -// } - /** * Searches for an API by name and downloads it to a folder. * diff --git a/src/static/helpers/slasHelper.test.ts b/src/static/helpers/slasHelper.test.ts index 2406663a..61ed6961 100644 --- a/src/static/helpers/slasHelper.test.ts +++ b/src/static/helpers/slasHelper.test.ts @@ -241,18 +241,13 @@ describe('Authorize user', () => { }); // There should be no code_challenge for private client - const expectedReqOptions = { - accessToken: 'access_token', - client_id: 'client_id', - channel_id: 'site_id', - dnt: 'false', - hint: 'hint', - redirect_uri: 'redirect_uri', - refreshToken: 'refresh_token', - response_type: 'code', - usid: 'usid', + const unexpectedQueryParams = { + code_challenge: 'code_challenge', }; - expect(capturedQueryParams).toEqual(expectedReqOptions); + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + expect(capturedQueryParams).toEqual( + expect.not.objectContaining(unexpectedQueryParams) + ); }); }); diff --git a/src/test/requests.test.ts b/src/test/requests.test.ts index a52ba085..c7b4203a 100644 --- a/src/test/requests.test.ts +++ b/src/test/requests.test.ts @@ -14,7 +14,7 @@ import { ClientConfig, ClientConfigInit, ShopperLogin, - ShopperBaskets, + ShopperBasketsV1, } from '../lib'; const config: ClientConfigInit< @@ -78,7 +78,7 @@ describe('Requests with body', () => { .matchHeader('Content-Type', 'application/json') .reply(200); - const client = new ShopperBaskets(config); + const client = new ShopperBasketsV1(config); await client.createBasket({parameters: {siteId: 'SITE_ID'}, body}); expect(scope.isDone()).toBe(true); }); diff --git a/templatesOas/apis.mustache b/templatesOas/apis.mustache index 34e14fca..be9a3493 100644 --- a/templatesOas/apis.mustache +++ b/templatesOas/apis.mustache @@ -35,14 +35,12 @@ export enum {{operationIdCamelCase}}{{enumName}} { {{/stringEnums}} {{^stringEnums}} -export const {{operationIdCamelCase}}{{enumName}} = { +export type {{operationIdCamelCase}}{{enumName}} = {{#allowableValues}} {{#enumVars}} - {{{name}}}: {{{value}}}{{^-last}},{{/-last}} + {{{value}}}{{^-last}} |{{/-last}}{{#-last}};{{/-last}} {{/enumVars}} {{/allowableValues}} -} as const; -export type {{operationIdCamelCase}}{{enumName}} = typeof {{operationIdCamelCase}}{{enumName}}[keyof typeof {{operationIdCamelCase}}{{enumName}}]; {{/stringEnums}} {{/isEnum}} {{/allParams}} @@ -387,7 +385,7 @@ export class {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classnam {{/required}} {{/pathParams}} - const queryParams: {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters & QueryParameters = {}; + const queryParams: Partial<{{nickname}}QueryParameters> & QueryParameters = {}; {{#queryParams}} if (optionParams["{{paramName}}"] !== undefined) {