### Query the documentation with HTTP GET Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Use this HTTP GET request to ask a question about the documentation. Provide the `ask` and `goal` query parameters to receive a direct answer with relevant excerpts and sources. ```http GET https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor.md?ask=&goal= ``` -------------------------------- ### Return Methods Response Example Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/returns Example JSON response from the return methods request. Save the `returnMethod`, `paidBy`, `carrierServiceRoute.eswCarrierIdentifier`, `carrierServiceRoute.id`, and `carrierServiceRoute.isPaperlessRoute` values for later use. ```json { "returnMethods": [ { "returnMethod": "PUDO", "paidBy": "Retailer", "carrierServiceRoute": { "id": "", "eswCarrierIdentifier": "", "isPaperlessRoute": false, "isLocationRequired": true } } ] } ``` -------------------------------- ### Multiplier advice response example Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Example JSON response from the Multiplier Advice endpoint, showing the structure with categories, multipliers, rounding configurations, and currency displays. The response is abridged for brevity. ```json { "id": "ma-001-de", "version": "4.0.1", "countryIso": "DE", "lastUpdated": "2024-05-01T08:00:00Z", "tenantIdentifier": "ACME", "categories": [ { "id": "ApparelAccessories", "multipliers": [ { "fromCurrencyIso": "GBP", "toCurrencyIso": "EUR", "value": 1.52, "adjustedValue": 1.52 } ], "roundingConfigurations": [ { "currencyIso": "EUR", "currencyExponent": 2, "direction": "Up", "model": "none.none" } ], "currencyDisplays": [ { "currencyIso": "EUR", "currencySymbol": "€", "currencyExponent": 2, "decimalSeparator": ",", "thousandSeparator": ".", "showTrailingZeros": true, "configurationString": "€#,##0.00" } ] } ] } ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/authentication Perform an HTTP GET request to the documentation URL with `ask` and `goal` query parameters to retrieve a direct answer and relevant excerpts. `ask` is the immediate question; `goal` describes the user's ultimate objective for better-tailored responses. ```http GET https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/authentication.md?ask=&goal= ``` -------------------------------- ### PreOrder Response (201 Created) Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/checkout Example response from the PreOrder API. Contains preOrderCode, orderNumber, redirectUrl, and shopperAccessToken (null for guests). ```json { "preOrderCode": "", "orderNumber": "", "redirectUrl": "", "shopperAccessToken": null } ``` -------------------------------- ### Example Request for Get All Advice Source: https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/api-methods/standard-advice/get-all-advice-for-a-brand Example request to the endpoint with the tenant code ACMECO. Requires a bearer token and Accept header. ```sh GET /api/4.0/StandardAdvice/ACMECO Authorization: Bearer Accept: application/json ``` -------------------------------- ### GET /v2//Order/{brandOrderReference} Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/order Reads back an order using its brand order reference. Use this endpoint to confirm that an order exists and that all articles have the status 'Created' after submission. ```APIDOC ## [GET] /v2//Order/{brandOrderReference} ### Description Reads back an order using its brand order reference. Use this endpoint to confirm that an order exists and that all articles have the status 'Created' after submission. ### Method GET ### Endpoint /v2//Order/ORD-2026-0001 ### Parameters #### Path Parameters - **tenantCode** (string) - Required - The tenant code. - **brandOrderReference** (string) - Required - The brand's order reference (e.g., ORD-2026-0001). ### Response #### Success Response (200) - **lineItems[].articles[]** (array) - Each article has a status field. #### Response Example ```json { "lineItems": [ { "articles": [ { "status": "Created" } ] } ] } ``` ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://developer.esw.com/agentic-commerce/agentic-commerce-overview/merchant-centre-integrations/microsoft-merchant-center-setup Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer with relevant excerpts and sources. ```http GET https://developer.esw.com/agentic-commerce/agentic-commerce-overview/merchant-centre-integrations/microsoft-merchant-center-setup.md?ask=&goal= ``` -------------------------------- ### curl POST to create return order Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/returns Sends the return-order.json body to the sandbox API. Uses $ESW_TOKEN for authorization. The response contains returnOrderNumber, returnsListingsGuid, returnItems[].id, label, isPaperlessRoute, and paymentRedirectUrl. ```sh curl --request POST "https://api.sandbox.esw.com/returns/v1//orders/ORD-2026-0001/return-orders" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Content-Type: application/json" \ --data @return-order.json ``` -------------------------------- ### Make an authenticated call to Pricing Advisor Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/authentication Send the access token in the Authorization header. This example calls Pricing Advisor, which is read-only, so it is safe as a smoke test. Replace with your tenant code. A 200 response confirms credentials, scope, and tenant code are valid. ```sh export ESW_TOKEN="" curl "https://pricing-advisor-api.sandbox.eshopworld.com/api/4.0/MultiplierAdvice//DE" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Accept: application/json" ``` -------------------------------- ### Query Documentation with HTTP GET Request Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup/composable-storefront-setup-with-scapi-and-pwa Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup/composable-storefront-setup-with-scapi-and-pwa.md?ask=&goal= ``` -------------------------------- ### GET /returns/v1//location/ Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/returns Finds nearby drop-off locations for a return when the selected return method requires a location. Use the shopper's country and postal code along with the selected carrier service route. ```APIDOC ## [GET] /returns/v1//location/ ### Description Finds nearby drop-off locations for a return when the selected return method requires a location. Use the shopper's country and postal code along with the selected carrier service route. ### Method GET ### Endpoint `/returns/v1//location/` ### Parameters #### Path Parameters - **identifier** (string) - Required - The identifier for the API context. #### Query Parameters - **CountryCode** (string) - Required - The shopper's country ISO code. - **PostalCode** (string) - Required - The shopper's postal code. - **RouteType** (string) - Required - Set to `Inbound` for returns. - **CarrierServiceRouteId** (string) - Required - The selected carrier service route ID. - **MaxDistanceInKms** (number) - Optional - Maximum distance in kilometers. - **MaxLocations** (number) - Optional - Maximum number of locations to return. ### Response #### Success Response (200) - **locations** (array) - List of nearby drop-off locations. - **id** (string) - Location ID to use in `dropOffLocation` when creating the return. - Additional fields optional. ### Request Example ```sh curl --get "https://api.sandbox.esw.com/returns/v1//location/" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Accept: application/json" \ --data-urlencode "CountryCode=" \ --data-urlencode "PostalCode=" \ --data-urlencode "RouteType=Inbound" \ --data-urlencode "CarrierServiceRouteId=" \ --data-urlencode "MaxDistanceInKms=5" \ --data-urlencode "MaxLocations=10" ``` ``` -------------------------------- ### Cartridge path sequence for initial installation Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup/composable-storefront-setup-with-scapi-and-pwa Set the cartridge path in this order during initial installation: int_eshopworld_headless:int_eshopworld_core:app_someother_cartridge. ```ruby int_eshopworld_headless:int_eshopworld_core:app_someother_cartridge ``` -------------------------------- ### Query this documentation via HTTP GET Source: https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/github-copilot Performs an HTTP GET request on the documentation URL with `ask` and `goal` query parameters to retrieve a direct answer and relevant excerpts when the answer is not explicitly present on the page. `ask` is the immediate question; `goal` describes the user's ultimate outcome to help GitBook tailor the answer. ```text GET https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/github-copilot.md?ask=&goal= ``` -------------------------------- ### POST /returns/v1//return-methods/ORD-2026-0001 Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/returns Retrieves the supported return methods for a specific order and items. Use this before creating a return to determine available shipping options. ```APIDOC ## [POST] /returns/v1//return-methods/ORD-2026-0001 ### Description Retrieves the supported return methods for a specific order and items. Use this before creating a return to determine available shipping options. ### Method POST ### Endpoint `/returns/v1//return-methods/ORD-2026-0001` ### Parameters #### Path Parameters - **identifier** (string) - Required - The identifier for the API context. - **ORD-2026-0001** (string) - Required - The order number. #### Request Body - **returnItems** (array) - Required - List of items to return. - **id** (string) - Required - Item ID from the order response. - **productCode** (string) - Required - The product code (e.g., SKU). - **lineItemId** (string) - Required - The line item identifier. ### Response #### Success Response (200) - **returnMethods** (array) - List of available return methods. - **returnMethod** (string) - The return method type: `Postal`, `PUDO`, `Collection`, or `Store`. - **paidBy** (string) - Who pays for the return: `Unpaid`, `Retailer`, or `Shopper`. - **carrierServiceRoute** (object) - Carrier route details. - **id** (string) - Carrier service route ID. - **eswCarrierIdentifier** (string) - Carrier identifier. - **isPaperlessRoute** (boolean) - Whether the route is paperless. - **isLocationRequired** (boolean) - Whether a drop-off location is required. ### Request Example ```sh curl --request POST "https://api.sandbox.esw.com/returns/v1//return-methods/ORD-2026-0001" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "returnItems": [ { "id": "", "productCode": "SKU-00123", "lineItemId": "1" } ] }' ``` #### Response Example ```json { "returnMethods": [ { "returnMethod": "PUDO", "paidBy": "Retailer", "carrierServiceRoute": { "id": "", "eswCarrierIdentifier": "", "isPaperlessRoute": false, "isLocationRequired": true } } ] } ``` ``` -------------------------------- ### fxRates JSON example Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Shows the structure of an fxRates array entry with from, to, and rate fields. The rate is a double; multiply a from amount by it to get the to amount. ```json "fxRates": [ { "from": "EUR", "to": "USD", "rate": 1.0872 } ] ``` -------------------------------- ### Download and install the ESW skill Source: https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/cursor Downloads the ESW API integration skill and unzips it into a skills folder Cursor reads. Use the first unzip command to install for this repository only (commit it so your team gets it too), or the second to install for every project on your machine. Keep the folder name 'esw-api-integration' to match the skill's name. ```sh curl -L -o esw-api-integration.zip https://developer.esw.com/esw-api-integration.zip # For this repository only (commit it so your team gets it too) unzip esw-api-integration.zip -d .agents/skills/ # Or for every project on your machine unzip esw-api-integration.zip -d ~/.cursor/skills/ ``` -------------------------------- ### POST /v2//Order/{brandOrderReference}/OrderActivity Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/order Sends an activity for the entire order, such as cancellation. Use this endpoint to cancel the whole order. ```APIDOC ## [POST] /v2//Order/{brandOrderReference}/OrderActivity ### Description Sends an activity for the entire order, such as cancellation. Use this endpoint to cancel the whole order. ### Method POST ### Endpoint /v2//Order/ORD-2026-0001/OrderActivity ### Parameters #### Path Parameters - **tenantCode** (string) - Required - The tenant code. - **brandOrderReference** (string) - Required - The brand's order reference (e.g., ORD-2026-0001). #### Request Body - **activityStatus** (string) - Required - The activity status: 'Cancel'. - **reasonCode** (string) - Required - The reason code: 'ShopperCancel', 'RetailerCancel', or 'Fraud'. - **transactionReference** (string) - Required - A unique transaction reference (UUID). - **transactionDateTime** (string) - Required - The transaction timestamp in ISO 8601 format. - **actionedBy** (string) - Required - Who initiated the action: 'Retailer', 'Shopper', or 'EShopWorld'. ### Response #### Success Response (202) Accepted - The request was accepted for processing. #### Request Example ```json { "activityStatus": "Cancel", "reasonCode": "ShopperCancel", "transactionReference": "D6F80A12-3C4E-4A7D-8E9F-1B2C3D4E5F60", "transactionDateTime": "2026-10-02T10:30:00.000Z", "actionedBy": "Shopper" } ``` ``` -------------------------------- ### Query this documentation via HTTP GET Source: https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/cursor Perform an HTTP GET request on the page URL with 'ask' and 'goal' query parameters to query the documentation. 'ask' is the immediate question; 'goal' is the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```text GET https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/cursor.md?ask=&goal= ``` -------------------------------- ### Query the documentation with ask and goal parameters Source: https://developer.esw.com/fulfillment-api/resources/tutorials Perform an HTTP GET request to the tutorials page with `ask` and `goal` query parameters to get a direct answer and relevant excerpts. `ask` is the immediate question; `goal` describes the user's ultimate objective. Use this when the answer is not explicitly on the page or you need additional context. ```http GET https://developer.esw.com/fulfillment-api/resources/tutorials.md?ask=&goal= ``` -------------------------------- ### Sandbox quickstart (read-only) Source: https://developer.esw.com/readme Sets sandbox credentials, requests an access token from ESW STS, and makes a read-only call to the Pricing Advisor API for Germany. Requires sandbox credentials from ESW. ```sh # 1. Set your sandbox credentials from ESW export ESW_CLIENT_ID="" export ESW_CLIENT_SECRET="" export ESW_TENANT_CODE="" # 2. Request an access token from ESW STS ESW_TOKEN=$(curl -s -X POST "https://security-sts.sandbox.eshopworld.com/connect/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "scope=pricing.advisor.api.all" \ --data-urlencode "client_id=$ESW_CLIENT_ID" \ --data-urlencode "client_secret=$ESW_CLIENT_SECRET" | jq -r .access_token) # 3. Make a read-only call: Pricing Advisor multipliers for Germany curl "https://pricing-advisor-api.sandbox.eshopworld.com/api/4.0/MultiplierAdvice/$ESW_TENANT_CODE/DE" \ -H "Authorization: Bearer $ESW_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### GET /api/4.0/MultiplierAdvice/{tenantCode} Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Retrieves all markets configured for a tenant. Call this endpoint at start-up or on a schedule to discover every market configured for your tenant. ```APIDOC ## [GET] /api/4.0/MultiplierAdvice/{tenantCode} ### Description Retrieves all markets configured for a tenant. Call this endpoint at start-up or on a schedule to discover every market configured for your tenant. ### Method GET ### Endpoint /api/4.0/MultiplierAdvice/{tenantCode} ### Parameters #### Path Parameters - **tenantCode** (string) - Required - The tenant code, which is case-sensitive. ### Response #### Success Response (200) Returns a list of all markets configured for the tenant. ### Error Handling - **401** - Token missing or expired. Fix: Request a new token and resend. - **403** - Token lacks the Pricing Advisor scope. Fix: Request a token with `pricing.advisor.api.all`. - **400** - Invalid `tenantCode`. Fix: Check the exact tenant code, which is case-sensitive. ``` -------------------------------- ### Annotated full response example Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Complete PricingAdviceResponse with comments explaining each field. Includes id, version, tenant, country, FX rates, categories with duty/tax/fee, rounding and display configs, and merchandise pricing model. ```json { // Unique ID — store for audit/archived retrieval "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", // Version 42 — if this increases, reprice your products "version": "42", "tenantIdentifier": "my-brand-001", "countryIso": "US", // Advice was last updated 14 March 2025 at 10:30 UTC "lastUpdated": "2025-03-14T10:30:00Z", "fxRates": [ { "from": "EUR", // Brand's home currency "to": "USD", // US market currency "rate": 1.0872 // Multiply EUR price by 1.0872 to get USD } ], "categories": [ { // Category ID — match against your product's category field "id": "ApparelAccessories", // Estimated US import duty: 12.5% "estimatedDuty": 12.5, // US has no federal VAT, so tax = 0 here "estimatedTax": 0.0, // Platform service/compliance fee: 0.5% "estimatedFee": 0.5, // Retailer has configured a 2.3% adjustment for this market "retailerAdjustment": 2.3, // How to round final USD prices — see Tutorial 5 "roundingConfigurations": [ { "currencyIso": "USD", "currencyExponent": 2, "direction": "Up", "model": "Standard" } ], // How to display USD prices — see Tutorial 5 "currencyDisplays": [ { "currencyIso": "USD", "currencySymbol": "$", "currencyExponent": 2, "decimalSeparator": ".", "thousandSeparator": ",", "showTrailingZeros": true, "configurationString": "$ #,##0.00" } ] } ], "merchandisePricingModel": { // The source prices already include duty and tax "id": "DutyAndTaxIncluded", "applicableRates": ["estimatedDuty", "estimatedTax"] // This means: only apply estimatedFee and retailerAdjustment // Do NOT add estimatedDuty or estimatedTax — they are already in the price } } ``` -------------------------------- ### Sample API response for PreOrder creation Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/postman-collection Example JSON response from the PreOrder API. Contains the preOrderCode, orderNumber, and redirectUrl to open Checkout. ```json { "preOrderCode": "e23afa68-9675-4012-8d63-df1517c624cc", "orderNumber": "e23afa68-9675-4012-8d63-df1517c624cc", "redirectUrl": "https://checkout-ui.sandbox.eshopworld.com/au/e23afa68-9675-4012-8d63-df1517c624cc" } ``` -------------------------------- ### Ruby example of checking applicableRates Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Illustrates how to use applicableRates to determine which rates to apply. Rates listed in applicableRates are already included and should be skipped. ```ruby applicableRates = ["estimatedDuty", "estimatedTax"] Rates to apply = all category rates EXCEPT those in applicableRates = ["estimatedFee", "retailerAdjustment"] ``` -------------------------------- ### GET /api/4.0/StandardAdvice/{id}/archived Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Retrieves an archived StandardAdvice record by its ID. Use this endpoint to audit a past price and check which rates applied when an order was placed. ```APIDOC ## [GET] /api/4.0/StandardAdvice/{id}/archived ### Description Retrieves an archived StandardAdvice record by its ID. Use this endpoint to audit a past price and check which rates applied when an order was placed. ### Method GET ### Endpoint /api/4.0/StandardAdvice/{id}/archived ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the advice record to retrieve. ### Response #### Success Response (200) The archived response has the same structure as the current one, with the `version`, `lastUpdated`, and values from that point in time. ### Error Handling - **401** - Token missing or expired. Fix: Request a new token and resend. - **403** - Token lacks the Pricing Advisor scope. Fix: Request a token with `pricing.advisor.api.all`. - **404** - The `id` does not match any record. Fix: Fetch current advice again to get a valid `id`. ``` -------------------------------- ### GET /api/4.0/MultiplierAdvice/{id}/archived Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Retrieves an archived MultiplierAdvice record by its ID. Use this endpoint to audit a past price and check which rates applied when an order was placed. ```APIDOC ## [GET] /api/4.0/MultiplierAdvice/{id}/archived ### Description Retrieves an archived MultiplierAdvice record by its ID. Use this endpoint to audit a past price and check which rates applied when an order was placed. ### Method GET ### Endpoint /api/4.0/MultiplierAdvice/{id}/archived ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the advice record to retrieve. ### Response #### Success Response (200) The archived response has the same structure as the current one, with the `version`, `lastUpdated`, and values from that point in time. ### Error Handling - **401** - Token missing or expired. Fix: Request a new token and resend. - **403** - Token lacks the Pricing Advisor scope. Fix: Request a token with `pricing.advisor.api.all`. - **404** - The `id` does not match any record. Fix: Fetch current advice again to get a valid `id`. ``` -------------------------------- ### Query Documentation with GET Request Source: https://developer.esw.com/checkout-api/resources/order-confirmation-webhook/order-confirmation-sample-integration Use this HTTP GET request to query the documentation for additional information. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/checkout-api/resources/order-confirmation-webhook/order-confirmation-sample-integration.md?ask=&goal= ``` -------------------------------- ### Download and install the ESW skill Source: https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/github-copilot Downloads the ESW API integration skill and unzips it into a skills folder that Copilot reads. Use the repository-specific path to commit it for your team, or the user-level path for every project on your machine. Copilot also reads `.agents/skills/` and `.claude/skills/`; keep the folder name `esw-api-integration` to match the skill's name. ```sh curl -L -o esw-api-integration.zip https://developer.esw.com/esw-api-integration.zip # For this repository only (commit it so your team gets it too) unzip esw-api-integration.zip -d .github/skills/ # Or for every project on your machine unzip esw-api-integration.zip -d ~/.copilot/skills/ ``` -------------------------------- ### Sample response for STS token request Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/postman-collection Example JSON response from the STS token endpoint. Contains the access token, expiration time, token type, and scope. ```json { "access_token": "", "expires_in": 3600, "token_type": "Bearer", "scope": "checkout.preorder.api.all" } ``` -------------------------------- ### Example Upload by Tenant Code (JSON) Source: https://developer.esw.com/customs-catalog-api/resources/tutorials/uploading-a-catalog Concrete example of uploading a catalog using a tenant code. Shows a minimal product object with productCode, name, description, material, and countryOfOrigin. ```http POST /api/v2/RetailerCatalog/TenantCode/my-tenant-001 Authorization: Bearer Content-Type: application/json [ { "productCode": "SKU-00123", "name": "Classic Leather Wallet", "description": "Slim bifold wallet in full-grain leather", "material": "Full-grain cowhide leather", "countryOfOrigin": "IT" } ] ``` -------------------------------- ### Successful token response Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/authentication Example JSON response from the STS token endpoint. The access_token is used in the Authorization header for API calls. expires_in indicates token lifetime in seconds. ```json { "access_token": "", "expires_in": 3600, "token_type": "Bearer", "scope": "pricing.advisor.api.all" } ``` -------------------------------- ### PartialResult JSON example Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/fulfillment Use PartialResult when some items are packed and others are not. Include every ordered item in itemsResult. ESW ships the packed items and handles failed units based on failureReason. ```json { "confirmationId": "PPK-78543-WH01-20261002092200", "confirmationDateTime": "2026-10-02T09:22:00.000Z", "eswOrderReference": "", "tenantCode": "", "pickPackResponse": { "status": "PartialResult", "itemsResult": [ { "productCode": "SKU-00123", "quantityConfirmed": 1, "quantityFailed": 0, "status": "Success", "failureReason": "NotDefined" }, { "productCode": "SKU-00456", "quantityConfirmed": 2, "quantityFailed": 1, "status": "PartialResult", "failureReason": "Damaged", "problemMessage": "One unit has a broken buckle. Moved to quarantine." } ] } } ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/agentic-commerce/agentic-commerce-overview/merchant-centre-integrations/google-merchant-center-setup Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/agentic-commerce/agentic-commerce-overview/merchant-centre-integrations/google-merchant-center-setup.md?ask=&goal= ``` -------------------------------- ### Check return eligibility with curl Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/returns GET /returns/v1//orders/ORD-2026-0001 to look up the order by its orderReference. Use the response to confirm the order and items remain eligible, checking fields like noOfArticlesAvailableForReturn and returnPeriodExpired. ```sh curl "https://api.sandbox.esw.com/returns/v1//orders/ORD-2026-0001" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Accept: application/json" ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup Use this HTTP GET request to query the GitBook documentation when the answer is not explicitly present on the page. The `ask` parameter is the specific, self-contained question; `goal` describes the user's ultimate objective to help GitBook tailor the answer. ```http GET https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup.md?ask=&goal= ``` -------------------------------- ### Import EswInit Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup/composable-storefront-setup-with-scapi-and-pwa Imports the EswInit component from the ESW components directory to initialize ESW in the storefront. ```js import {EswInit} from '../../esw/components/esw-init' ``` -------------------------------- ### Point project instructions at AGENTS.md Source: https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/github-copilot Adds a line to `.github/copilot-instructions.md` or the `AGENTS.md` at your repository root to direct Copilot to the ESW agents documentation and use the ESW sandbox unless told otherwise. ```markdown When working with ESW (eShopWorld) APIs, follow https://developer.esw.com/agents.md. Use the ESW sandbox unless told otherwise. ``` -------------------------------- ### Example request: GET /api/4.0/MultiplierAdvice/ACMECO Source: https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/api-methods/multiplier-advice/get-all-multipliers-for-a-brand Example request to retrieve all available multiplier pricing advice for a brand. Uses Bearer token authentication and Accept: application/json. ```sh GET /api/4.0/MultiplierAdvice/ACMECO Authorization: Bearer Accept: application/json ``` -------------------------------- ### Get an STS access token with curl Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/postman-collection Use this curl command to request an STS access token from the sandbox environment. Replace and with your credentials. The response includes an access_token to use in subsequent API calls. ```sh curl --location --request POST "https://security-sts.sandbox.eshopworld.com/connect/token" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "scope=checkout.preorder.api.all" \ --data-urlencode "client_id=" \ --data-urlencode "client_secret=" ``` -------------------------------- ### Ruby: localPrice calculation using fxRate.rate Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Practical usage showing how to compute the local price by multiplying the home price by the fxRate.rate. ```ruby localPrice = homePrice × fxRate.rate ``` -------------------------------- ### Pricing setPrice.isml starting from Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/cartridge-setup/sfra Displays “starting from” for product sets. ```html
${Resource.msg('label.starting_from', 'pricing', null)} ${product.price.min.sales.formatted} ${product.price.sales.formatted}
``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/order-api/order-api/concepts/charges-and-balances Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective for a better answer. ```http GET https://developer.esw.com/order-api/order-api/concepts/charges-and-balances.md?ask=&goal= ``` -------------------------------- ### Look up historical advice Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Use the advice record's `id` to audit a past price, for example to check which rates applied when an order was placed. The archived response has the same structure as the current one, with the `version`, `lastUpdated`, and values from that point in time. ```http GET /api/4.0/MultiplierAdvice/{id}/archived GET /api/4.0/StandardAdvice/{id}/archived ``` -------------------------------- ### curl request to Standard Advice for price breakdown Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Calls the Standard Advice endpoint to get duties and taxes separately. The response includes fxRates, estimatedTax, estimatedDuty, estimatedFee, retailerAdjustment, and merchandisePricingModel. Use this when you want to show duties and taxes separately. ```sh curl "https://pricing-advisor-api.sandbox.eshopworld.com/api/4.0/StandardAdvice//DE" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Accept: application/json" ``` -------------------------------- ### Ruby pseudocode for correct price calculation Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Pseudocode showing how to build ratesToApply by excluding applicableRates, then calculate totalRatePercent, convertedPrice, and localisedPrice. Use this to avoid double-counting duty or tax. ```ruby applicableRates = advice.merchandisePricingModel.applicableRates category = find category matching product.category ratesToApply = [] if "estimatedDuty" not in applicableRates: ratesToApply += category.estimatedDuty if "estimatedTax" not in applicableRates: ratesToApply += category.estimatedTax if "estimatedFee" not in applicableRates: ratesToApply += category.estimatedFee if "retailerAdjustment" not in applicableRates: ratesToApply += category.retailerAdjustment totalRatePercent = sum(ratesToApply) convertedPrice = homePrice × fxRate.rate localisedPrice = convertedPrice × (1 + totalRatePercent / 100) ``` -------------------------------- ### Example response for ChapterClassifications (GET and POST) Source: https://developer.esw.com/customs-catalog-api/resources/tutorials/classifying-products Example JSON response returned by both GET and POST variants. Contains pagination metadata and a results array with classificationId, classificationCode, and classificationDesc fields. ```json { "currentPage": 1, "pageCount": 2, "pageSize": 50, "rowCount": 64, "results": [ { "classificationId": "clf-4201", "classificationCode": "4202.32", "classificationDesc": "Apparel & Accessories > Leather Goods > Wallets & Small Leather Goods" }, { "classificationId": "clf-4203", "classificationCode": "4202.33", "classificationDesc": "Apparel & Accessories > Leather Goods > Wallets & Small Leather Goods" } ] } ``` -------------------------------- ### Console Output for Return Methods Search Source: https://developer.esw.com/returns-api/resources/postman-collection/shopper-return-journey Example console output after a successful response. Shows origin/destination country, return admin centre, available methods with carrier and route IDs, and confirmation that carrierServiceRouteId was saved for Step 4. Also notes that PUDO is available and suggests running Step 4 to find drop-off locations. ```text Origin country: IE Destination country: DE Return admin centre: IEDUB Available methods (2): Method: Postal | Paid by: Retailer | Carrier: DHLE | RouteId: ROUTE-001 Method: PUDO | Paid by: Retailer | Carrier: DHLE | RouteId: ROUTE-002 ✓ carrierServiceRouteId saved for Step 4: ROUTE-001 Update this variable if you want to search locations for a different method. ℹ PUDO available — run Step 4 to find drop-off locations for the shopper. ``` -------------------------------- ### Fetch multiplier advice with curl Source: https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/pricing-advisor Use this curl command to request multiplier advice for a specific country (e.g., DE) from the Pricing Advisor API. Requires a valid access token stored in ESW_TOKEN and the tenant code. The endpoint is GET /api/4.0/MultiplierAdvice/{tenantCode}/{countryIso}. ```sh curl "https://pricing-advisor-api.sandbox.eshopworld.com/api/4.0/MultiplierAdvice//DE" \ --header "Authorization: Bearer $ESW_TOKEN" \ --header "Accept: application/json" ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/returns-api/grp-returns-api/concepts Perform an HTTP GET request to the documentation URL with the `ask` and `goal` query parameters. `ask` is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/returns-api/grp-returns-api/concepts.md?ask=&goal= ``` -------------------------------- ### Caching strategy with GET endpoints Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Recommended caching pattern: fetch all countries on startup, refresh per country periodically, and fetch on demand after cache miss. Avoid calling the API for every price calculation. ```ruby On startup: GET /StandardAdvice/{tenantCode} → cache all countries Every N mins: GET /StandardAdvice/{tenantCode}/{country} → refresh per country On demand: GET /StandardAdvice/{tenantCode}/{country} → after cache miss ``` -------------------------------- ### Example request: GET /api/4.0/StandardAdvice/ACMECO/DE Source: https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/api-methods/standard-advice/get-latest-advice-for-a-country Example request for the Get Latest Advice endpoint using tenant code ACMECO and country code DE. Includes Authorization and Accept headers. A 404 response indicates ESW has not configured pricing advice for the requested country under your tenant; contact ESW to enable the country rather than retrying. ```sh GET /api/4.0/StandardAdvice/ACMECO/DE Authorization: Bearer Accept: application/json ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/business-manager-configuration/merchant-tools/site-preferences/checkout-preferences Use this HTTP GET request to query the documentation when additional information is needed. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective for better answers. ```http GET https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/business-manager-configuration/merchant-tools/site-preferences/checkout-preferences.md?ask=&goal= ``` -------------------------------- ### GET Error File Example for my-tenant-001 Source: https://developer.esw.com/customs-catalog-api/resources/tutorials/managing-invalid-products Example request to download the latest error file for tenant 'my-tenant-001' and search type 'InvalidProducts'. ```http GET /api/v2/InvalidProducts/Invalid/File/my-tenant-001/InvalidProducts Authorization: Bearer ``` -------------------------------- ### Example request with Authorization header Source: https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/api-methods/standard-advice/get-archived-advice-by-id Example request using a specific advice ID (`adv-de-20240601-003`) with Bearer token authentication and Accept header. ```sh GET /api/4.0/StandardAdvice/adv-de-20240601-003/archived Authorization: Bearer Accept: application/json ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/pricing/pricing-models Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/pricing/pricing-models.md?ask=&goal= ``` -------------------------------- ### Last page of GET Inventory Availability response Source: https://developer.esw.com/inventory/inventory-api/concepts/pagination Example response from GET /inventory/v1/{identifier}/skus/availability when all records have been returned. The continuationToken is null, indicating no additional page to retrieve. ```json { "pageSize": 500, "itemCount": 2, "continuationToken": null, "skus": [ { "sku": "SKU123", "quantity": 57 }, { "sku": "SKU456", "quantity": 12 } ] } ``` -------------------------------- ### Sample Response Code (JSON) Source: https://developer.esw.com/pricing-advisor-api/resources/tutorials/standard-pricing-advice Example JSON response from the Standard Pricing Advice API. Includes unique ID, version, tenant identifier, country ISO, last updated timestamp, FX rates, categories with duty/tax/fee/rounding/display configurations, and merchandise pricing model. Use for audit/archived retrieval and to interpret pricing advice. ```json { // Unique ID — store for audit/archived retrieval "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", // Version 42 — if this increases, reprice your products "version": "42", "tenantIdentifier": "my-brand-001", "countryIso": "US", // Advice was last updated 14 March 2025 at 10:30 UTC "lastUpdated": "2025-03-14T10:30:00Z", "fxRates": [ { "from": "EUR", // Brand's home currency "to": "USD", // US market currency "rate": 1.0872 // Multiply EUR price by 1.0872 to get USD } ], "categories": [ { // Category ID — match against your product's category field "id": "ApparelAccessories", // Estimated US import duty: 12.5% "estimatedDuty": 12.5, // US has no federal VAT, so tax = 0 here "estimatedTax": 0.0, // Platform service/compliance fee: 0.5% "estimatedFee": 0.5, // Retailer has configured a 2.3% adjustment for this market "retailerAdjustment": 2.3, // How to round final USD prices — see Tutorial 5 "roundingConfigurations": [ { "currencyIso": "USD", "currencyExponent": 2, "direction": "Up", "model": "Standard" } ], // How to display USD prices — see Tutorial 5 "currencyDisplays": [ { "currencyIso": "USD", "currencySymbol": "$", "currencyExponent": 2, "decimalSeparator": ".", "thousandSeparator": ",", "showTrailingZeros": true, "configurationString": "$ #,##0.00" } ] } ], "merchandisePricingModel": { // The source prices already include duty and tax "id": "DutyAndTaxIncluded", "applicableRates": ["estimatedDuty", "estimatedTax"] // This means: only apply estimatedFee and retailerAdjustment // Do NOT add estimatedDuty or estimatedTax — they are already in the price } } ``` -------------------------------- ### Query documentation with ask and goal parameters Source: https://developer.esw.com/package-api/package-api/concepts/ship-from-anywhere Use this HTTP GET request to query the documentation when the answer is not explicitly present on the page. The `ask` parameter is the immediate question, and `goal` describes the user's ultimate objective. The response contains a direct answer and relevant excerpts. ```http GET https://developer.esw.com/package-api/package-api/concepts/ship-from-anywhere.md?ask=&goal= ``` -------------------------------- ### GET Inventory Availability response with continuationToken Source: https://developer.esw.com/inventory/inventory-api/concepts/pagination Example response from GET /inventory/v1/{identifier}/skus/availability when more records are available. The continuationToken is a non-null string used to request the next page. ```json { "pageSize": 500, "itemCount": 500, "continuationToken": "", "skus": [ { "sku": "SKU123", "quantity": 57 } ] } ```