@salesforce/b2c-tooling-sdk 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/guides/enrichment.json +291 -0
- package/data/guides/index.json +426 -37
- package/data/schemas/dw.schema.json +590 -0
- package/data/tooling/index.json +18 -9
- package/dist/esm/cli/base-command.d.ts +20 -1
- package/dist/esm/cli/base-command.js +61 -11
- package/dist/esm/cli/base-command.js.map +1 -1
- package/dist/esm/cli/cartridge-command.js +2 -1
- package/dist/esm/cli/cartridge-command.js.map +1 -1
- package/dist/esm/cli/command-search.d.ts +85 -0
- package/dist/esm/cli/command-search.js +147 -0
- package/dist/esm/cli/command-search.js.map +1 -0
- package/dist/esm/cli/config.d.ts +10 -1
- package/dist/esm/cli/config.js +18 -9
- package/dist/esm/cli/config.js.map +1 -1
- package/dist/esm/cli/hooks.d.ts +13 -0
- package/dist/esm/cli/hooks.js +11 -0
- package/dist/esm/cli/hooks.js.map +1 -1
- package/dist/esm/cli/index.d.ts +2 -0
- package/dist/esm/cli/index.js +2 -0
- package/dist/esm/cli/index.js.map +1 -1
- package/dist/esm/cli/instance-command.d.ts +1 -0
- package/dist/esm/cli/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.js.map +1 -1
- package/dist/esm/cli/mrt-command.d.ts +3 -2
- package/dist/esm/cli/mrt-command.js +4 -4
- package/dist/esm/cli/mrt-command.js.map +1 -1
- package/dist/esm/cli/oauth-command.d.ts +1 -0
- package/dist/esm/cli/ods-command.d.ts +1 -0
- package/dist/esm/cli/webdav-command.d.ts +1 -0
- package/dist/esm/clients/custom-apis.d.ts +36 -2
- package/dist/esm/clients/custom-apis.js +57 -4
- package/dist/esm/clients/custom-apis.js.map +1 -1
- package/dist/esm/clients/index.d.ts +1 -1
- package/dist/esm/clients/index.js +1 -1
- package/dist/esm/clients/index.js.map +1 -1
- package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
- package/dist/esm/clients/scapi-backend-utils.js +28 -1
- package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
- package/dist/esm/clients/scapi-fallback-backend.js +2 -2
- package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
- package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
- package/dist/esm/compat/dispatcher.js +2 -2
- package/dist/esm/compat/dispatcher.js.map +1 -1
- package/dist/esm/config/config-origins.d.ts +19 -0
- package/dist/esm/config/config-origins.js +11 -0
- package/dist/esm/config/config-origins.js.map +1 -0
- package/dist/esm/config/config-write.d.ts +86 -0
- package/dist/esm/config/config-write.js +296 -0
- package/dist/esm/config/config-write.js.map +1 -0
- package/dist/esm/config/dw-json-schema.d.ts +14 -0
- package/dist/esm/config/dw-json-schema.js +269 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -0
- package/dist/esm/config/dw-json.d.ts +2 -0
- package/dist/esm/config/dw-json.js +10 -6
- package/dist/esm/config/dw-json.js.map +1 -1
- package/dist/esm/config/index.d.ts +13 -4
- package/dist/esm/config/index.js +8 -3
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/instance-manager.d.ts +64 -28
- package/dist/esm/config/instance-manager.js +145 -63
- package/dist/esm/config/instance-manager.js.map +1 -1
- package/dist/esm/config/mapping.d.ts +5 -0
- package/dist/esm/config/mapping.js +20 -1
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/project-environment.d.ts +62 -0
- package/dist/esm/config/project-environment.js +113 -0
- package/dist/esm/config/project-environment.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +106 -37
- package/dist/esm/config/resolver.js.map +1 -1
- package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
- package/dist/esm/config/sources/dw-json-source.js +59 -23
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +70 -9
- package/dist/esm/config/sources/env-source.js +205 -47
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/sources/index.d.ts +1 -1
- package/dist/esm/config/sources/index.js +1 -1
- package/dist/esm/config/sources/index.js.map +1 -1
- package/dist/esm/config/types.d.ts +53 -3
- package/dist/esm/docs/search.js +3 -1
- package/dist/esm/docs/search.js.map +1 -1
- package/dist/esm/docs/types.d.ts +3 -1
- package/dist/esm/guidance/bundle.d.ts +33 -0
- package/dist/esm/guidance/bundle.js +268 -0
- package/dist/esm/guidance/bundle.js.map +1 -0
- package/dist/esm/guidance/catalog.d.ts +8 -1
- package/dist/esm/guidance/catalog.js +48 -6
- package/dist/esm/guidance/catalog.js.map +1 -1
- package/dist/esm/guidance/index.d.ts +1 -0
- package/dist/esm/guidance/index.js +1 -0
- package/dist/esm/guidance/index.js.map +1 -1
- package/dist/esm/guidance/types.d.ts +17 -1
- package/dist/esm/guidance/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operations/jobs/run-system-job.js +2 -2
- package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
- package/dist/esm/plugins/discovery.js +2 -1
- package/dist/esm/plugins/discovery.js.map +1 -1
- package/dist/esm/scapi/catalog.d.ts +5 -2
- package/dist/esm/scapi/catalog.js.map +1 -1
- package/dist/esm/scapi/index.d.ts +6 -2
- package/dist/esm/scapi/index.js +4 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +14 -3
- package/dist/esm/scapi/live.js +33 -5
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +26 -0
- package/dist/esm/scapi/local.js +143 -0
- package/dist/esm/scapi/local.js.map +1 -0
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +4 -2
- package/dist/esm/scapi/request.js.map +1 -1
- package/dist/esm/scapi/runtime.d.ts +5 -0
- package/dist/esm/scapi/runtime.js.map +1 -1
- package/dist/esm/scapi/schema-source.d.ts +90 -0
- package/dist/esm/scapi/schema-source.js +146 -0
- package/dist/esm/scapi/schema-source.js.map +1 -0
- package/dist/esm/scapi/worker-source.js +31 -7
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/telemetry/telemetry.d.ts +1 -0
- package/dist/esm/telemetry/telemetry.js +18 -1
- package/dist/esm/telemetry/telemetry.js.map +1 -1
- package/dist/esm/telemetry/types.d.ts +9 -0
- package/dist/esm/test-utils/config-isolation.js +21 -15
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/dist/esm/ux/agent-context.d.ts +69 -0
- package/dist/esm/ux/agent-context.js +133 -0
- package/dist/esm/ux/agent-context.js.map +1 -0
- package/dist/esm/ux/confirm.d.ts +27 -0
- package/dist/esm/ux/confirm.js +32 -0
- package/dist/esm/ux/confirm.js.map +1 -1
- package/dist/esm/ux/index.d.ts +2 -1
- package/dist/esm/ux/index.js +2 -1
- package/dist/esm/ux/index.js.map +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
- package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
- package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
- package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
- package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
- package/package.json +5 -2
- package/specs/scapi-schemas-v1.yaml +4 -1
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Price Books",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/price-books/price-books-oas-v1-public.yaml)\n\n# API Overview\n\nThe Price Books API provides full CRUD (Create, Read, Update, Delete) functionality for price books and price book entries within an organization.\n\nPrice books in Salesforce Commerce Cloud contain the pricing information for products. They can be organized in hierarchies where one price book can inherit from another (parent) price book. Each price book is associated with a specific currency and can be assigned to one or more sites.\n\nPrice book entries define the actual prices for products within a price book. Each entry carries one or more price scale tables, and each table has its own validity window and a set of quantity-based tiers (as absolute monetary amounts or percentage discounts). Entries have a composite identity of (priceBookId, productId).\n\n## Authentication & Authorization\n\nFor resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request.\n\nYou must include `sfcc.price-books` (read-only access) or `sfcc.price-books.rw` (read-write access) in the client ID used to generate the token. For a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor detailed setup instructions, see the Authorization for Admin APIs guide.\n\n## Response Details\n\n### Timeouts\n\nAdmin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)\n\n## Key Constraints\n\n- **Currency Immutability**: The currency code of a price book is immutable after creation. PATCH attempts to change it will be rejected.\n- **Parent Cycles**: Parent price book relationships that would create a cycle are rejected server-side.\n- **Site Assignments**: The `siteAssignments` field on a price book is read-only. Assignments are managed via the site-assignment endpoints on this API (`PUT`/`DELETE /price-books/{priceBookId}/site-assignments/{siteId}`).\n- **Price Tables**: The `priceTables` array in price book entries is replaced wholesale on PATCH; individual tables and their tiers cannot be updated independently.\n- **Price Book Type**: A price book with `type: feed_based` has its price entries sourced from an external feed pipeline. The price book container itself remains editable via this API, but price book entry write operations against a feed-based price book are rejected.\n\n## Use Cases\n\n### Create a Price Book\nCreate a new price book with a specific currency. The price book ID is client-supplied and immutable, so creation uses `PUT` with the ID in the path (create-or-replace upsert); there is no `POST` collection endpoint:\n```json\nPUT /organizations/{organizationId}/price-books/USD-list-prices\n{\n \"id\": \"USD-list-prices\",\n \"displayName\": \"USD List Prices\",\n \"currencyCode\": \"USD\",\n \"online\": true,\n \"validFrom\": \"2024-01-01T00:00:00.000Z\",\n \"validTo\": \"2024-12-31T23:59:59.999Z\"\n}\n```\n\n### Add a Price to a Product\nCreate or update a price book entry with a single amount tier:\n```json\nPUT /organizations/{organizationId}/price-books/{priceBookId}/price-book-entries/{productId}\n{\n \"productId\": \"product-001\",\n \"priceTables\": [\n {\n \"tiers\": [\n { \"type\": \"amount\", \"quantity\": 1, \"amount\": { \"currencyMnemonic\": \"USD\", \"value\": 99.99 } }\n ]\n }\n ],\n \"online\": true\n}\n```\n\n### Configure Tiered Pricing\nSet up time-scoped quantity-based pricing, mixing absolute amounts and percentage discounts:\n```json\nPUT /organizations/{organizationId}/price-books/{priceBookId}/price-book-entries/{productId}\n{\n \"productId\": \"product-002\",\n \"priceTables\": [\n {\n \"validFrom\": \"2026-11-25T00:00:00.000Z\",\n \"validTo\": \"2026-11-28T23:59:59.999Z\",\n \"tiers\": [\n { \"type\": \"amount\", \"quantity\": 1, \"amount\": { \"currencyMnemonic\": \"USD\", \"value\": 39.99 } },\n { \"type\": \"amount\", \"quantity\": 10, \"amount\": { \"currencyMnemonic\": \"USD\", \"value\": 34.99 } }\n ]\n },\n {\n \"validFrom\": \"2026-12-01T00:00:00.000Z\",\n \"tiers\": [\n { \"type\": \"amount\", \"quantity\": 1, \"amount\": { \"currencyMnemonic\": \"USD\", \"value\": 49.99 } },\n { \"type\": \"percentage\", \"quantity\": 10, \"percentage\": 15.0 }\n ]\n }\n ],\n \"online\": true\n}\n```\n\n### Find Active Price Books\nSearch for price books that are currently active (online) and valid:\n```json\n{\n \"query\": {\n \"boolQuery\": {\n \"must\": [\n {\n \"termQuery\": {\n \"fields\": [\"online\"],\n \"operator\": \"is\",\n \"values\": [true]\n }\n }\n ]\n }\n }\n}\n```\n\n### Search by Currency\nFind all price books for a specific currency:\n```json\n{\n \"query\": {\n \"termQuery\": {\n \"fields\": [\"currencyCode\"],\n \"operator\": \"is\",\n \"values\": [\"USD\"]\n }\n },\n \"sorts\": [\n {\n \"field\": \"displayName\",\n \"sortOrder\": \"asc\"\n }\n ]\n}\n```\n\n### Text Search\nSearch for price books by name or description:\n```json\n{\n \"query\": {\n \"textQuery\": {\n \"fields\": [\"id\", \"displayName\", \"description\"],\n \"searchPhrase\": \"sale\"\n }\n }\n}\n```\n\n## Related Resources\n\n- [Pricing and Price Books in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_pricing_and_price_books.htm)\n- [Price Books for Developers in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_price_books_for_developers.htm)\n\n## Related APIs\n\n- [Products (Admin)](https://developer.salesforce.com/docs/commerce/commerce-api/references/products?meta=Summary) — Manage products associated with price books.",
|
|
6
|
+
"version": "1.1.0",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "Product"
|
|
8
9
|
},
|
|
@@ -11,32 +12,202 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/product/price-books/v1",
|
|
12
13
|
"variables": {
|
|
13
14
|
"shortCode": {
|
|
15
|
+
"description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
|
|
14
16
|
"default": "shortCode"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"paths": {
|
|
20
|
-
"/organizations/{organizationId}/price-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
22
|
+
"/organizations/{organizationId}/price-books": {
|
|
23
|
+
"get": {
|
|
24
|
+
"summary": "Get a list of price books.",
|
|
25
|
+
"description": "Get a paginated list of price books for the organization.\n\nReturns all price books with their basic metadata. Use the search endpoint for filtered queries.\n",
|
|
26
|
+
"operationId": "getPriceBooks",
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "organizationId",
|
|
30
|
+
"in": "path",
|
|
31
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
32
|
+
"required": true,
|
|
33
|
+
"style": "simple",
|
|
34
|
+
"explode": false,
|
|
35
|
+
"schema": {
|
|
36
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
37
|
+
},
|
|
38
|
+
"example": "f_ecom_zzxy_prd"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "limit",
|
|
42
|
+
"in": "query",
|
|
43
|
+
"description": "Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.",
|
|
44
|
+
"required": false,
|
|
45
|
+
"style": "form",
|
|
46
|
+
"explode": true,
|
|
47
|
+
"schema": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"format": "int32",
|
|
50
|
+
"default": 25,
|
|
51
|
+
"maximum": 50,
|
|
52
|
+
"minimum": 1
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "offset",
|
|
57
|
+
"in": "query",
|
|
58
|
+
"description": "Used to retrieve the results based on a particular resource offset.",
|
|
59
|
+
"required": false,
|
|
60
|
+
"style": "form",
|
|
61
|
+
"explode": true,
|
|
62
|
+
"schema": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"format": "int32",
|
|
65
|
+
"default": 0,
|
|
66
|
+
"minimum": 0
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"responses": {
|
|
71
|
+
"200": {
|
|
72
|
+
"description": "Price books retrieved successfully.",
|
|
73
|
+
"content": {
|
|
74
|
+
"application/json": {
|
|
75
|
+
"schema": {
|
|
76
|
+
"$ref": "#/components/schemas/PriceBooks"
|
|
77
|
+
},
|
|
78
|
+
"examples": {
|
|
79
|
+
"PriceBooksListResult": {
|
|
80
|
+
"$ref": "#/components/examples/PriceBooksListResult"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"400": {
|
|
87
|
+
"$ref": "#/components/responses/400BadRequest_GetPriceBooks"
|
|
88
|
+
},
|
|
89
|
+
"401": {
|
|
90
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
91
|
+
},
|
|
92
|
+
"403": {
|
|
93
|
+
"$ref": "#/components/responses/403forbidden"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"security": [
|
|
97
|
+
{
|
|
98
|
+
"AmOAuth2": [
|
|
99
|
+
"sfcc.price-books",
|
|
100
|
+
"sfcc.price-books.rw"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"/organizations/{organizationId}/price-books/{priceBookId}": {
|
|
107
|
+
"get": {
|
|
108
|
+
"summary": "Get a price book.",
|
|
109
|
+
"description": "Get a price book by ID.\n\nReturns the price book with its metadata, including computed site assignments. The `siteAssignments` field is a read-only projection; assignments are managed via the site-assignment endpoints (PUT/DELETE /price-books/{priceBookId}/site-assignments/{siteId}).\n",
|
|
110
|
+
"operationId": "getPriceBook",
|
|
111
|
+
"parameters": [
|
|
112
|
+
{
|
|
113
|
+
"name": "organizationId",
|
|
114
|
+
"in": "path",
|
|
115
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
116
|
+
"required": true,
|
|
117
|
+
"style": "simple",
|
|
118
|
+
"explode": false,
|
|
119
|
+
"schema": {
|
|
120
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
121
|
+
},
|
|
122
|
+
"example": "f_ecom_zzxy_prd"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "priceBookId",
|
|
126
|
+
"in": "path",
|
|
127
|
+
"description": "The price book ID.",
|
|
128
|
+
"required": true,
|
|
129
|
+
"style": "simple",
|
|
130
|
+
"explode": false,
|
|
131
|
+
"schema": {
|
|
132
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"responses": {
|
|
137
|
+
"200": {
|
|
138
|
+
"description": "Price book retrieved successfully.",
|
|
139
|
+
"content": {
|
|
140
|
+
"application/json": {
|
|
141
|
+
"schema": {
|
|
142
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
143
|
+
},
|
|
144
|
+
"examples": {
|
|
145
|
+
"PriceBookRetrieved": {
|
|
146
|
+
"$ref": "#/components/examples/PriceBookRetrieved"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"401": {
|
|
153
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
154
|
+
},
|
|
155
|
+
"403": {
|
|
156
|
+
"$ref": "#/components/responses/403forbidden"
|
|
157
|
+
},
|
|
158
|
+
"404": {
|
|
159
|
+
"$ref": "#/components/responses/404NotFound_PriceBook"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"security": [
|
|
163
|
+
{
|
|
164
|
+
"AmOAuth2": [
|
|
165
|
+
"sfcc.price-books",
|
|
166
|
+
"sfcc.price-books.rw"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"put": {
|
|
172
|
+
"summary": "Create or replace a price book.",
|
|
173
|
+
"description": "Create a new price book or replace an existing one using the information provided.\n\nWhen replacing an existing price book, the entire price book is replaced with the information in the request. The currency code is immutable and must match the existing value. Attempts to change the currency code will be rejected.\n",
|
|
174
|
+
"operationId": "createOrUpdatePriceBook",
|
|
23
175
|
"parameters": [
|
|
24
176
|
{
|
|
25
177
|
"name": "organizationId",
|
|
26
178
|
"in": "path",
|
|
179
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
27
180
|
"required": true,
|
|
28
181
|
"style": "simple",
|
|
29
182
|
"explode": false,
|
|
30
183
|
"schema": {
|
|
31
184
|
"$ref": "#/components/schemas/OrganizationId"
|
|
185
|
+
},
|
|
186
|
+
"example": "f_ecom_zzxy_prd"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "priceBookId",
|
|
190
|
+
"in": "path",
|
|
191
|
+
"description": "The price book ID.",
|
|
192
|
+
"required": true,
|
|
193
|
+
"style": "simple",
|
|
194
|
+
"explode": false,
|
|
195
|
+
"schema": {
|
|
196
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
32
197
|
}
|
|
33
198
|
}
|
|
34
199
|
],
|
|
35
200
|
"requestBody": {
|
|
201
|
+
"description": "The price book",
|
|
36
202
|
"content": {
|
|
37
203
|
"application/json": {
|
|
38
204
|
"schema": {
|
|
39
|
-
"$ref": "#/components/schemas/
|
|
205
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
206
|
+
},
|
|
207
|
+
"examples": {
|
|
208
|
+
"CreatePriceBookRequest": {
|
|
209
|
+
"$ref": "#/components/examples/CreatePriceBookRequest"
|
|
210
|
+
}
|
|
40
211
|
}
|
|
41
212
|
}
|
|
42
213
|
},
|
|
@@ -44,134 +215,1735 @@
|
|
|
44
215
|
},
|
|
45
216
|
"responses": {
|
|
46
217
|
"200": {
|
|
47
|
-
"description": "Price
|
|
218
|
+
"description": "Price book replaced successfully.",
|
|
48
219
|
"content": {
|
|
49
220
|
"application/json": {
|
|
50
221
|
"schema": {
|
|
51
|
-
"$ref": "#/components/schemas/
|
|
222
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
223
|
+
},
|
|
224
|
+
"examples": {
|
|
225
|
+
"PriceBookReplaced": {
|
|
226
|
+
"$ref": "#/components/examples/PriceBookReplaced"
|
|
227
|
+
}
|
|
52
228
|
}
|
|
53
229
|
}
|
|
54
230
|
}
|
|
55
231
|
},
|
|
56
|
-
"
|
|
57
|
-
"description": "
|
|
232
|
+
"201": {
|
|
233
|
+
"description": "Price book created successfully.",
|
|
58
234
|
"content": {
|
|
59
|
-
"application/
|
|
235
|
+
"application/json": {
|
|
60
236
|
"schema": {
|
|
61
|
-
"$ref": "#/components/schemas/
|
|
237
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
238
|
+
},
|
|
239
|
+
"examples": {
|
|
240
|
+
"PriceBookCreated": {
|
|
241
|
+
"$ref": "#/components/examples/PriceBookCreated"
|
|
242
|
+
}
|
|
62
243
|
}
|
|
63
244
|
}
|
|
64
245
|
}
|
|
246
|
+
},
|
|
247
|
+
"400": {
|
|
248
|
+
"$ref": "#/components/responses/400BadRequest_CreateOrUpdatePriceBook"
|
|
249
|
+
},
|
|
250
|
+
"401": {
|
|
251
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
252
|
+
},
|
|
253
|
+
"403": {
|
|
254
|
+
"$ref": "#/components/responses/403forbidden"
|
|
65
255
|
}
|
|
66
256
|
},
|
|
67
257
|
"security": [
|
|
68
258
|
{
|
|
69
259
|
"AmOAuth2": [
|
|
70
|
-
"sfcc.price-books",
|
|
71
260
|
"sfcc.price-books.rw"
|
|
72
261
|
]
|
|
73
262
|
}
|
|
74
263
|
]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"components": {
|
|
79
|
-
"schemas": {
|
|
80
|
-
"OrganizationId": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"maxLength": 32,
|
|
83
|
-
"minLength": 1
|
|
84
264
|
},
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
265
|
+
"delete": {
|
|
266
|
+
"summary": "Delete a price book.",
|
|
267
|
+
"description": "Delete a price book by ID.\n\nThis operation permanently removes the price book and all its price book entries. Once deleted, the price book cannot be recovered.\n",
|
|
268
|
+
"operationId": "deletePriceBook",
|
|
269
|
+
"parameters": [
|
|
270
|
+
{
|
|
271
|
+
"name": "organizationId",
|
|
272
|
+
"in": "path",
|
|
273
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
274
|
+
"required": true,
|
|
275
|
+
"style": "simple",
|
|
276
|
+
"explode": false,
|
|
277
|
+
"schema": {
|
|
278
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
279
|
+
},
|
|
280
|
+
"example": "f_ecom_zzxy_prd"
|
|
96
281
|
},
|
|
97
|
-
|
|
98
|
-
"
|
|
282
|
+
{
|
|
283
|
+
"name": "priceBookId",
|
|
284
|
+
"in": "path",
|
|
285
|
+
"description": "The price book ID.",
|
|
286
|
+
"required": true,
|
|
287
|
+
"style": "simple",
|
|
288
|
+
"explode": false,
|
|
289
|
+
"schema": {
|
|
290
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"responses": {
|
|
295
|
+
"204": {
|
|
296
|
+
"description": "Price book deleted successfully. No content returned."
|
|
99
297
|
},
|
|
100
|
-
"
|
|
101
|
-
"$ref": "#/components/
|
|
298
|
+
"401": {
|
|
299
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
102
300
|
},
|
|
103
|
-
"
|
|
104
|
-
"$ref": "#/components/
|
|
301
|
+
"403": {
|
|
302
|
+
"$ref": "#/components/responses/403forbidden"
|
|
105
303
|
},
|
|
106
|
-
"
|
|
107
|
-
"$ref": "#/components/
|
|
304
|
+
"404": {
|
|
305
|
+
"$ref": "#/components/responses/404NotFound_PriceBook"
|
|
108
306
|
}
|
|
109
|
-
}
|
|
307
|
+
},
|
|
308
|
+
"security": [
|
|
309
|
+
{
|
|
310
|
+
"AmOAuth2": [
|
|
311
|
+
"sfcc.price-books.rw"
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
]
|
|
110
315
|
},
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
316
|
+
"patch": {
|
|
317
|
+
"summary": "Update a price book.",
|
|
318
|
+
"description": "Update a price book with the specified information.\n\nOnly the fields provided in the request body are updated. All other fields remain unchanged. The currency code is immutable and cannot be changed via PATCH.\n",
|
|
319
|
+
"operationId": "updatePriceBook",
|
|
320
|
+
"parameters": [
|
|
321
|
+
{
|
|
322
|
+
"name": "organizationId",
|
|
323
|
+
"in": "path",
|
|
324
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
325
|
+
"required": true,
|
|
326
|
+
"style": "simple",
|
|
327
|
+
"explode": false,
|
|
328
|
+
"schema": {
|
|
329
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
330
|
+
},
|
|
331
|
+
"example": "f_ecom_zzxy_prd"
|
|
120
332
|
},
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
|
|
333
|
+
{
|
|
334
|
+
"name": "priceBookId",
|
|
335
|
+
"in": "path",
|
|
336
|
+
"description": "The price book ID.",
|
|
337
|
+
"required": true,
|
|
338
|
+
"style": "simple",
|
|
339
|
+
"explode": false,
|
|
340
|
+
"schema": {
|
|
341
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"requestBody": {
|
|
346
|
+
"description": "The price book fields to update",
|
|
347
|
+
"content": {
|
|
348
|
+
"application/json": {
|
|
349
|
+
"schema": {
|
|
350
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
351
|
+
},
|
|
352
|
+
"examples": {
|
|
353
|
+
"UpdatePriceBookRequest": {
|
|
354
|
+
"$ref": "#/components/examples/UpdatePriceBookRequest"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
125
357
|
}
|
|
126
358
|
},
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
359
|
+
"required": true
|
|
360
|
+
},
|
|
361
|
+
"responses": {
|
|
362
|
+
"200": {
|
|
363
|
+
"description": "Price book updated successfully.",
|
|
364
|
+
"content": {
|
|
365
|
+
"application/json": {
|
|
366
|
+
"schema": {
|
|
367
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
368
|
+
},
|
|
369
|
+
"examples": {
|
|
370
|
+
"PriceBookUpdated": {
|
|
371
|
+
"$ref": "#/components/examples/PriceBookUpdated"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
131
375
|
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"Filter": {
|
|
136
|
-
"type": "object",
|
|
137
|
-
"additionalProperties": false,
|
|
138
|
-
"maxProperties": 1,
|
|
139
|
-
"minProperties": 1,
|
|
140
|
-
"properties": {
|
|
141
|
-
"boolFilter": {
|
|
142
|
-
"$ref": "#/components/schemas/BoolFilter"
|
|
143
376
|
},
|
|
144
|
-
"
|
|
145
|
-
"$ref": "#/components/
|
|
377
|
+
"400": {
|
|
378
|
+
"$ref": "#/components/responses/400BadRequest_CreateOrUpdatePriceBook"
|
|
146
379
|
},
|
|
147
|
-
"
|
|
148
|
-
"$ref": "#/components/
|
|
380
|
+
"401": {
|
|
381
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
149
382
|
},
|
|
150
|
-
"
|
|
151
|
-
"$ref": "#/components/
|
|
383
|
+
"403": {
|
|
384
|
+
"$ref": "#/components/responses/403forbidden"
|
|
152
385
|
},
|
|
153
|
-
"
|
|
154
|
-
"$ref": "#/components/
|
|
386
|
+
"404": {
|
|
387
|
+
"$ref": "#/components/responses/404NotFound_PriceBook"
|
|
155
388
|
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
389
|
+
},
|
|
390
|
+
"security": [
|
|
391
|
+
{
|
|
392
|
+
"AmOAuth2": [
|
|
393
|
+
"sfcc.price-books.rw"
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"/organizations/{organizationId}/price-books/{priceBookId}/price-book-entries": {
|
|
400
|
+
"get": {
|
|
401
|
+
"summary": "Get price book entries.",
|
|
402
|
+
"description": "Get a paginated list of price book entries for the specified price book.\n\nReturns all entries with their pricing information. Use the search endpoint for filtered queries.\n",
|
|
403
|
+
"operationId": "getPriceBookEntries",
|
|
404
|
+
"parameters": [
|
|
405
|
+
{
|
|
406
|
+
"name": "organizationId",
|
|
407
|
+
"in": "path",
|
|
408
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
409
|
+
"required": true,
|
|
410
|
+
"style": "simple",
|
|
411
|
+
"explode": false,
|
|
412
|
+
"schema": {
|
|
413
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
414
|
+
},
|
|
415
|
+
"example": "f_ecom_zzxy_prd"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "priceBookId",
|
|
419
|
+
"in": "path",
|
|
420
|
+
"description": "The price book ID.",
|
|
421
|
+
"required": true,
|
|
422
|
+
"style": "simple",
|
|
423
|
+
"explode": false,
|
|
424
|
+
"schema": {
|
|
425
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "limit",
|
|
430
|
+
"in": "query",
|
|
431
|
+
"description": "Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 50.",
|
|
432
|
+
"required": false,
|
|
433
|
+
"style": "form",
|
|
434
|
+
"explode": true,
|
|
435
|
+
"schema": {
|
|
436
|
+
"type": "integer",
|
|
437
|
+
"format": "int32",
|
|
438
|
+
"default": 50,
|
|
439
|
+
"maximum": 200,
|
|
440
|
+
"minimum": 1
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "offset",
|
|
445
|
+
"in": "query",
|
|
446
|
+
"description": "Used to retrieve the results based on a particular resource offset.",
|
|
447
|
+
"required": false,
|
|
448
|
+
"style": "form",
|
|
449
|
+
"explode": true,
|
|
450
|
+
"schema": {
|
|
451
|
+
"type": "integer",
|
|
452
|
+
"format": "int32",
|
|
453
|
+
"default": 0,
|
|
454
|
+
"minimum": 0
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"responses": {
|
|
459
|
+
"200": {
|
|
460
|
+
"description": "Price book entries retrieved successfully.",
|
|
461
|
+
"content": {
|
|
462
|
+
"application/json": {
|
|
463
|
+
"schema": {
|
|
464
|
+
"$ref": "#/components/schemas/PriceBookEntries"
|
|
465
|
+
},
|
|
466
|
+
"examples": {
|
|
467
|
+
"PriceBookEntriesListResult": {
|
|
468
|
+
"$ref": "#/components/examples/PriceBookEntriesListResult"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"401": {
|
|
475
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
476
|
+
},
|
|
477
|
+
"403": {
|
|
478
|
+
"$ref": "#/components/responses/403forbidden"
|
|
479
|
+
},
|
|
480
|
+
"404": {
|
|
481
|
+
"$ref": "#/components/responses/404NotFound_PriceBook"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"security": [
|
|
485
|
+
{
|
|
486
|
+
"AmOAuth2": [
|
|
487
|
+
"sfcc.price-books",
|
|
488
|
+
"sfcc.price-books.rw"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"/organizations/{organizationId}/price-books/{priceBookId}/price-book-entries/{productId}": {
|
|
495
|
+
"get": {
|
|
496
|
+
"summary": "Get a price book entry.",
|
|
497
|
+
"description": "Get a price book entry by product ID and price book ID.\n\nReturns the pricing information for a specific product in the price book, including tiered pricing if configured.\n",
|
|
498
|
+
"operationId": "getPriceBookEntry",
|
|
499
|
+
"parameters": [
|
|
500
|
+
{
|
|
501
|
+
"name": "organizationId",
|
|
502
|
+
"in": "path",
|
|
503
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
504
|
+
"required": true,
|
|
505
|
+
"style": "simple",
|
|
506
|
+
"explode": false,
|
|
507
|
+
"schema": {
|
|
508
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
509
|
+
},
|
|
510
|
+
"example": "f_ecom_zzxy_prd"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "priceBookId",
|
|
514
|
+
"in": "path",
|
|
515
|
+
"description": "The price book ID.",
|
|
516
|
+
"required": true,
|
|
517
|
+
"style": "simple",
|
|
518
|
+
"explode": false,
|
|
519
|
+
"schema": {
|
|
520
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "productId",
|
|
525
|
+
"in": "path",
|
|
526
|
+
"description": "The product ID.",
|
|
527
|
+
"required": true,
|
|
528
|
+
"style": "simple",
|
|
529
|
+
"explode": false,
|
|
530
|
+
"schema": {
|
|
531
|
+
"$ref": "#/components/schemas/ProductId"
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
],
|
|
535
|
+
"responses": {
|
|
536
|
+
"200": {
|
|
537
|
+
"description": "Price book entry retrieved successfully.",
|
|
538
|
+
"content": {
|
|
539
|
+
"application/json": {
|
|
540
|
+
"schema": {
|
|
541
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
542
|
+
},
|
|
543
|
+
"examples": {
|
|
544
|
+
"PriceBookEntryRetrieved": {
|
|
545
|
+
"$ref": "#/components/examples/PriceBookEntryRetrieved"
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"401": {
|
|
552
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
553
|
+
},
|
|
554
|
+
"403": {
|
|
555
|
+
"$ref": "#/components/responses/403forbidden"
|
|
556
|
+
},
|
|
557
|
+
"404": {
|
|
558
|
+
"$ref": "#/components/responses/404NotFound_GetPriceBookEntry"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"security": [
|
|
562
|
+
{
|
|
563
|
+
"AmOAuth2": [
|
|
564
|
+
"sfcc.price-books",
|
|
565
|
+
"sfcc.price-books.rw"
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
"put": {
|
|
571
|
+
"summary": "Create or replace a price book entry.",
|
|
572
|
+
"description": "Create a new price book entry or replace an existing one using the information provided.\n\nWhen replacing an existing entry, the entire entry is replaced with the information in the request. The priceTables array, if provided, replaces any existing tiered pricing.\n",
|
|
573
|
+
"operationId": "createOrUpdatePriceBookEntry",
|
|
574
|
+
"parameters": [
|
|
575
|
+
{
|
|
576
|
+
"name": "organizationId",
|
|
577
|
+
"in": "path",
|
|
578
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
579
|
+
"required": true,
|
|
580
|
+
"style": "simple",
|
|
581
|
+
"explode": false,
|
|
582
|
+
"schema": {
|
|
583
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
584
|
+
},
|
|
585
|
+
"example": "f_ecom_zzxy_prd"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "priceBookId",
|
|
589
|
+
"in": "path",
|
|
590
|
+
"description": "The price book ID.",
|
|
591
|
+
"required": true,
|
|
592
|
+
"style": "simple",
|
|
593
|
+
"explode": false,
|
|
594
|
+
"schema": {
|
|
595
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"name": "productId",
|
|
600
|
+
"in": "path",
|
|
601
|
+
"description": "The product ID.",
|
|
602
|
+
"required": true,
|
|
603
|
+
"style": "simple",
|
|
604
|
+
"explode": false,
|
|
605
|
+
"schema": {
|
|
606
|
+
"$ref": "#/components/schemas/ProductId"
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
"requestBody": {
|
|
611
|
+
"description": "The price book entry",
|
|
612
|
+
"content": {
|
|
613
|
+
"application/json": {
|
|
614
|
+
"schema": {
|
|
615
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
616
|
+
},
|
|
617
|
+
"examples": {
|
|
618
|
+
"CreatePriceBookEntryRequest": {
|
|
619
|
+
"$ref": "#/components/examples/CreatePriceBookEntryRequest"
|
|
620
|
+
},
|
|
621
|
+
"CreatePriceBookEntryWithTiersRequest": {
|
|
622
|
+
"$ref": "#/components/examples/CreatePriceBookEntryWithTiersRequest"
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"required": true
|
|
628
|
+
},
|
|
629
|
+
"responses": {
|
|
630
|
+
"200": {
|
|
631
|
+
"description": "Price book entry replaced successfully.",
|
|
632
|
+
"content": {
|
|
633
|
+
"application/json": {
|
|
634
|
+
"schema": {
|
|
635
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
636
|
+
},
|
|
637
|
+
"examples": {
|
|
638
|
+
"PriceBookEntryReplaced": {
|
|
639
|
+
"$ref": "#/components/examples/PriceBookEntryReplaced"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"201": {
|
|
646
|
+
"description": "Price book entry created successfully.",
|
|
647
|
+
"content": {
|
|
648
|
+
"application/json": {
|
|
649
|
+
"schema": {
|
|
650
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
651
|
+
},
|
|
652
|
+
"examples": {
|
|
653
|
+
"PriceBookEntryCreated": {
|
|
654
|
+
"$ref": "#/components/examples/PriceBookEntryCreated"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"400": {
|
|
661
|
+
"$ref": "#/components/responses/400BadRequest_PriceBookEntry"
|
|
662
|
+
},
|
|
663
|
+
"401": {
|
|
664
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
665
|
+
},
|
|
666
|
+
"403": {
|
|
667
|
+
"$ref": "#/components/responses/403forbidden"
|
|
668
|
+
},
|
|
669
|
+
"404": {
|
|
670
|
+
"$ref": "#/components/responses/404NotFound_CreateOrUpdatePriceBookEntry"
|
|
671
|
+
},
|
|
672
|
+
"422": {
|
|
673
|
+
"$ref": "#/components/responses/422UnprocessableContent_PriceBookEntry"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"security": [
|
|
677
|
+
{
|
|
678
|
+
"AmOAuth2": [
|
|
679
|
+
"sfcc.price-books.rw"
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"delete": {
|
|
685
|
+
"summary": "Delete a price book entry.",
|
|
686
|
+
"description": "Delete a price book entry by product ID and price book ID.\n\nThis operation permanently removes the price book entry. Once deleted, the entry is not recoverable; a subsequent PUT for the same product creates a new entry rather than restoring the deleted one.\n",
|
|
687
|
+
"operationId": "deletePriceBookEntry",
|
|
688
|
+
"parameters": [
|
|
689
|
+
{
|
|
690
|
+
"name": "organizationId",
|
|
691
|
+
"in": "path",
|
|
692
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
693
|
+
"required": true,
|
|
694
|
+
"style": "simple",
|
|
695
|
+
"explode": false,
|
|
696
|
+
"schema": {
|
|
697
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
698
|
+
},
|
|
699
|
+
"example": "f_ecom_zzxy_prd"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "priceBookId",
|
|
703
|
+
"in": "path",
|
|
704
|
+
"description": "The price book ID.",
|
|
705
|
+
"required": true,
|
|
706
|
+
"style": "simple",
|
|
707
|
+
"explode": false,
|
|
708
|
+
"schema": {
|
|
709
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"name": "productId",
|
|
714
|
+
"in": "path",
|
|
715
|
+
"description": "The product ID.",
|
|
716
|
+
"required": true,
|
|
717
|
+
"style": "simple",
|
|
718
|
+
"explode": false,
|
|
719
|
+
"schema": {
|
|
720
|
+
"$ref": "#/components/schemas/ProductId"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
"responses": {
|
|
725
|
+
"204": {
|
|
726
|
+
"description": "Price book entry deleted successfully. No content returned."
|
|
727
|
+
},
|
|
728
|
+
"401": {
|
|
729
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
730
|
+
},
|
|
731
|
+
"403": {
|
|
732
|
+
"$ref": "#/components/responses/403forbidden"
|
|
733
|
+
},
|
|
734
|
+
"404": {
|
|
735
|
+
"$ref": "#/components/responses/404NotFound_GetPriceBookEntry"
|
|
736
|
+
},
|
|
737
|
+
"422": {
|
|
738
|
+
"$ref": "#/components/responses/422UnprocessableContent_PriceBookEntry"
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
"security": [
|
|
742
|
+
{
|
|
743
|
+
"AmOAuth2": [
|
|
744
|
+
"sfcc.price-books.rw"
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
|
+
"patch": {
|
|
750
|
+
"summary": "Update a price book entry.",
|
|
751
|
+
"description": "Update a price book entry with the specified information.\n\nOnly the fields provided in the request body are updated. All other fields remain unchanged. The priceTables array, if provided, replaces the existing tiered pricing wholesale.\n",
|
|
752
|
+
"operationId": "updatePriceBookEntry",
|
|
753
|
+
"parameters": [
|
|
754
|
+
{
|
|
755
|
+
"name": "organizationId",
|
|
756
|
+
"in": "path",
|
|
757
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
758
|
+
"required": true,
|
|
759
|
+
"style": "simple",
|
|
760
|
+
"explode": false,
|
|
761
|
+
"schema": {
|
|
762
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
763
|
+
},
|
|
764
|
+
"example": "f_ecom_zzxy_prd"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "priceBookId",
|
|
768
|
+
"in": "path",
|
|
769
|
+
"description": "The price book ID.",
|
|
770
|
+
"required": true,
|
|
771
|
+
"style": "simple",
|
|
772
|
+
"explode": false,
|
|
773
|
+
"schema": {
|
|
774
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "productId",
|
|
779
|
+
"in": "path",
|
|
780
|
+
"description": "The product ID.",
|
|
781
|
+
"required": true,
|
|
782
|
+
"style": "simple",
|
|
783
|
+
"explode": false,
|
|
784
|
+
"schema": {
|
|
785
|
+
"$ref": "#/components/schemas/ProductId"
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
],
|
|
789
|
+
"requestBody": {
|
|
790
|
+
"description": "The price book entry fields to update",
|
|
791
|
+
"content": {
|
|
792
|
+
"application/json": {
|
|
793
|
+
"schema": {
|
|
794
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
795
|
+
},
|
|
796
|
+
"examples": {
|
|
797
|
+
"UpdatePriceBookEntryRequest": {
|
|
798
|
+
"$ref": "#/components/examples/UpdatePriceBookEntryRequest"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"required": true
|
|
804
|
+
},
|
|
805
|
+
"responses": {
|
|
806
|
+
"200": {
|
|
807
|
+
"description": "Price book entry updated successfully.",
|
|
808
|
+
"content": {
|
|
809
|
+
"application/json": {
|
|
810
|
+
"schema": {
|
|
811
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
812
|
+
},
|
|
813
|
+
"examples": {
|
|
814
|
+
"PriceBookEntryUpdated": {
|
|
815
|
+
"$ref": "#/components/examples/PriceBookEntryUpdated"
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"400": {
|
|
822
|
+
"$ref": "#/components/responses/400BadRequest_PriceBookEntry"
|
|
823
|
+
},
|
|
824
|
+
"401": {
|
|
825
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
826
|
+
},
|
|
827
|
+
"403": {
|
|
828
|
+
"$ref": "#/components/responses/403forbidden"
|
|
829
|
+
},
|
|
830
|
+
"404": {
|
|
831
|
+
"$ref": "#/components/responses/404NotFound_GetPriceBookEntry"
|
|
832
|
+
},
|
|
833
|
+
"422": {
|
|
834
|
+
"$ref": "#/components/responses/422UnprocessableContent_PriceBookEntry"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
"security": [
|
|
838
|
+
{
|
|
839
|
+
"AmOAuth2": [
|
|
840
|
+
"sfcc.price-books.rw"
|
|
841
|
+
]
|
|
842
|
+
}
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"/organizations/{organizationId}/price-books/{priceBookId}/site-assignments": {
|
|
847
|
+
"get": {
|
|
848
|
+
"summary": "Get price book site assignments.",
|
|
849
|
+
"description": "Get the list of sites the specified price book is assigned to.\n\nA price book resolves prices only on the sites it is assigned to, so this is the set of sites on which the book is live. The list is bounded and is not paginated. The same information is also available as the read-only `siteAssignments` field on the price book itself.\n",
|
|
850
|
+
"operationId": "getPriceBookSiteAssignments",
|
|
851
|
+
"parameters": [
|
|
852
|
+
{
|
|
853
|
+
"name": "organizationId",
|
|
854
|
+
"in": "path",
|
|
855
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
856
|
+
"required": true,
|
|
857
|
+
"style": "simple",
|
|
858
|
+
"explode": false,
|
|
859
|
+
"schema": {
|
|
860
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
861
|
+
},
|
|
862
|
+
"example": "f_ecom_zzxy_prd"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "priceBookId",
|
|
866
|
+
"in": "path",
|
|
867
|
+
"description": "The price book ID.",
|
|
868
|
+
"required": true,
|
|
869
|
+
"style": "simple",
|
|
870
|
+
"explode": false,
|
|
871
|
+
"schema": {
|
|
872
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
"responses": {
|
|
877
|
+
"200": {
|
|
878
|
+
"description": "Site assignments retrieved successfully.",
|
|
879
|
+
"content": {
|
|
880
|
+
"application/json": {
|
|
881
|
+
"schema": {
|
|
882
|
+
"$ref": "#/components/schemas/SiteAssignments"
|
|
883
|
+
},
|
|
884
|
+
"examples": {
|
|
885
|
+
"SiteAssignmentsListResult": {
|
|
886
|
+
"$ref": "#/components/examples/SiteAssignmentsListResult"
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
"401": {
|
|
893
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
894
|
+
},
|
|
895
|
+
"403": {
|
|
896
|
+
"$ref": "#/components/responses/403forbidden"
|
|
897
|
+
},
|
|
898
|
+
"404": {
|
|
899
|
+
"$ref": "#/components/responses/404NotFound_PriceBook"
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
"security": [
|
|
903
|
+
{
|
|
904
|
+
"AmOAuth2": [
|
|
905
|
+
"sfcc.price-books",
|
|
906
|
+
"sfcc.price-books.rw"
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"/organizations/{organizationId}/price-books/{priceBookId}/site-assignments/{siteId}": {
|
|
913
|
+
"put": {
|
|
914
|
+
"summary": "Assign a price book to a site.",
|
|
915
|
+
"description": "Assign the specified price book to the specified site, making the book live on that site.\n\nThe assignment is idempotent and fully specified by the path, so no request body is required. Returns `201 Created` when the price book was not previously assigned to the site, and `200 OK` when the assignment already existed. This is a container-level operation and is therefore permitted for both `standard` and `feed_based` price books.\n",
|
|
916
|
+
"operationId": "createOrUpdatePriceBookSiteAssignment",
|
|
917
|
+
"parameters": [
|
|
918
|
+
{
|
|
919
|
+
"name": "organizationId",
|
|
920
|
+
"in": "path",
|
|
921
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
922
|
+
"required": true,
|
|
923
|
+
"style": "simple",
|
|
924
|
+
"explode": false,
|
|
925
|
+
"schema": {
|
|
926
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
927
|
+
},
|
|
928
|
+
"example": "f_ecom_zzxy_prd"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"name": "priceBookId",
|
|
932
|
+
"in": "path",
|
|
933
|
+
"description": "The price book ID.",
|
|
934
|
+
"required": true,
|
|
935
|
+
"style": "simple",
|
|
936
|
+
"explode": false,
|
|
937
|
+
"schema": {
|
|
938
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "siteId",
|
|
943
|
+
"in": "path",
|
|
944
|
+
"description": "The ID of the site the price book is assigned to.",
|
|
945
|
+
"required": true,
|
|
946
|
+
"style": "simple",
|
|
947
|
+
"explode": false,
|
|
948
|
+
"schema": {
|
|
949
|
+
"$ref": "#/components/schemas/SiteId"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"responses": {
|
|
954
|
+
"200": {
|
|
955
|
+
"description": "The price book was already assigned to the site.",
|
|
956
|
+
"content": {
|
|
957
|
+
"application/json": {
|
|
958
|
+
"schema": {
|
|
959
|
+
"$ref": "#/components/schemas/SiteAssignment"
|
|
960
|
+
},
|
|
961
|
+
"examples": {
|
|
962
|
+
"SiteAssignmentUpdated": {
|
|
963
|
+
"$ref": "#/components/examples/SiteAssignmentUpdated"
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"201": {
|
|
970
|
+
"description": "The price book was assigned to the site successfully.",
|
|
971
|
+
"content": {
|
|
972
|
+
"application/json": {
|
|
973
|
+
"schema": {
|
|
974
|
+
"$ref": "#/components/schemas/SiteAssignment"
|
|
975
|
+
},
|
|
976
|
+
"examples": {
|
|
977
|
+
"SiteAssignmentCreated": {
|
|
978
|
+
"$ref": "#/components/examples/SiteAssignmentCreated"
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"401": {
|
|
985
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
986
|
+
},
|
|
987
|
+
"403": {
|
|
988
|
+
"$ref": "#/components/responses/403forbidden"
|
|
989
|
+
},
|
|
990
|
+
"404": {
|
|
991
|
+
"$ref": "#/components/responses/404NotFound_SiteAssignment"
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
"security": [
|
|
995
|
+
{
|
|
996
|
+
"AmOAuth2": [
|
|
997
|
+
"sfcc.price-books.rw"
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
]
|
|
1001
|
+
},
|
|
1002
|
+
"delete": {
|
|
1003
|
+
"summary": "Unassign a price book from a site.",
|
|
1004
|
+
"description": "Remove the assignment of the specified price book from the specified site, so the book is no longer live on that site.\n\nThis is a container-level operation and is therefore permitted for both `standard` and `feed_based` price books. No content is returned.\n",
|
|
1005
|
+
"operationId": "deletePriceBookSiteAssignment",
|
|
1006
|
+
"parameters": [
|
|
1007
|
+
{
|
|
1008
|
+
"name": "organizationId",
|
|
1009
|
+
"in": "path",
|
|
1010
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
1011
|
+
"required": true,
|
|
1012
|
+
"style": "simple",
|
|
1013
|
+
"explode": false,
|
|
1014
|
+
"schema": {
|
|
1015
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1016
|
+
},
|
|
1017
|
+
"example": "f_ecom_zzxy_prd"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"name": "priceBookId",
|
|
1021
|
+
"in": "path",
|
|
1022
|
+
"description": "The price book ID.",
|
|
1023
|
+
"required": true,
|
|
1024
|
+
"style": "simple",
|
|
1025
|
+
"explode": false,
|
|
1026
|
+
"schema": {
|
|
1027
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"name": "siteId",
|
|
1032
|
+
"in": "path",
|
|
1033
|
+
"description": "The ID of the site the price book is assigned to.",
|
|
1034
|
+
"required": true,
|
|
1035
|
+
"style": "simple",
|
|
1036
|
+
"explode": false,
|
|
1037
|
+
"schema": {
|
|
1038
|
+
"$ref": "#/components/schemas/SiteId"
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
],
|
|
1042
|
+
"responses": {
|
|
1043
|
+
"204": {
|
|
1044
|
+
"description": "Site assignment removed successfully. No content returned."
|
|
1045
|
+
},
|
|
1046
|
+
"401": {
|
|
1047
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
1048
|
+
},
|
|
1049
|
+
"403": {
|
|
1050
|
+
"$ref": "#/components/responses/403forbidden"
|
|
1051
|
+
},
|
|
1052
|
+
"404": {
|
|
1053
|
+
"$ref": "#/components/responses/404NotFound_SiteAssignment"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"security": [
|
|
1057
|
+
{
|
|
1058
|
+
"AmOAuth2": [
|
|
1059
|
+
"sfcc.price-books.rw"
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"/organizations/{organizationId}/price-book-search": {
|
|
1066
|
+
"post": {
|
|
1067
|
+
"summary": "Search for price books.",
|
|
1068
|
+
"description": "Searches for price books.\n\nThe query attribute specifies a complex query that can be used to narrow down the search. These are the searchable attributes:\n- id - String\n- displayName - String\n- description - String\n- currencyCode - String\n- parent - String\n- validFrom - DateTime\n- validTo - DateTime\n- online - Boolean\n- siteId - String\n\nThe output of the query can also be sorted. These are the sortable attributes:\n- id - String\n- displayName - String\n- description - String\n- currencyCode - String\n- parent - String\n- validFrom - DateTime\n- validTo - DateTime\n- online - Boolean\n",
|
|
1069
|
+
"operationId": "searchPriceBooks",
|
|
1070
|
+
"parameters": [
|
|
1071
|
+
{
|
|
1072
|
+
"name": "organizationId",
|
|
1073
|
+
"in": "path",
|
|
1074
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
1075
|
+
"required": true,
|
|
1076
|
+
"style": "simple",
|
|
1077
|
+
"explode": false,
|
|
1078
|
+
"schema": {
|
|
1079
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1080
|
+
},
|
|
1081
|
+
"example": "f_ecom_zzxy_prd"
|
|
1082
|
+
}
|
|
1083
|
+
],
|
|
1084
|
+
"requestBody": {
|
|
1085
|
+
"description": "The search request document",
|
|
1086
|
+
"content": {
|
|
1087
|
+
"application/json": {
|
|
1088
|
+
"schema": {
|
|
1089
|
+
"$ref": "#/components/schemas/PriceBookSearchRequest"
|
|
1090
|
+
},
|
|
1091
|
+
"examples": {
|
|
1092
|
+
"PriceBookSearchRequestBody": {
|
|
1093
|
+
"$ref": "#/components/examples/PriceBookSearchRequestBody"
|
|
1094
|
+
},
|
|
1095
|
+
"PriceBookSearchRequestWithFilter": {
|
|
1096
|
+
"$ref": "#/components/examples/PriceBookSearchRequestWithFilter"
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
"required": true
|
|
1102
|
+
},
|
|
1103
|
+
"responses": {
|
|
1104
|
+
"200": {
|
|
1105
|
+
"description": "Price books searched successfully.",
|
|
1106
|
+
"content": {
|
|
1107
|
+
"application/json": {
|
|
1108
|
+
"schema": {
|
|
1109
|
+
"$ref": "#/components/schemas/PriceBookSearchResult"
|
|
1110
|
+
},
|
|
1111
|
+
"examples": {
|
|
1112
|
+
"PriceBookSearchResult": {
|
|
1113
|
+
"$ref": "#/components/examples/PriceBookSearchResult"
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
"400": {
|
|
1120
|
+
"$ref": "#/components/responses/400BadRequest_SearchPriceBooks"
|
|
1121
|
+
},
|
|
1122
|
+
"401": {
|
|
1123
|
+
"$ref": "#/components/responses/401unauthorized"
|
|
1124
|
+
},
|
|
1125
|
+
"403": {
|
|
1126
|
+
"$ref": "#/components/responses/403forbidden"
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
"security": [
|
|
1130
|
+
{
|
|
1131
|
+
"AmOAuth2": [
|
|
1132
|
+
"sfcc.price-books",
|
|
1133
|
+
"sfcc.price-books.rw"
|
|
1134
|
+
]
|
|
1135
|
+
}
|
|
1136
|
+
]
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
"components": {
|
|
1141
|
+
"schemas": {
|
|
1142
|
+
"OrganizationId": {
|
|
1143
|
+
"type": "string",
|
|
1144
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
1145
|
+
"example": "f_ecom_zzxy_prd",
|
|
1146
|
+
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
1147
|
+
},
|
|
1148
|
+
"Total": {
|
|
1149
|
+
"type": "integer",
|
|
1150
|
+
"format": "int32",
|
|
1151
|
+
"default": 0,
|
|
1152
|
+
"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.",
|
|
1153
|
+
"example": 10,
|
|
1154
|
+
"minimum": 0
|
|
1155
|
+
},
|
|
1156
|
+
"ResultBase": {
|
|
1157
|
+
"type": "object",
|
|
1158
|
+
"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.",
|
|
1159
|
+
"properties": {
|
|
1160
|
+
"limit": {
|
|
1161
|
+
"type": "integer",
|
|
1162
|
+
"format": "int32",
|
|
1163
|
+
"description": "Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.",
|
|
1164
|
+
"example": 10
|
|
1165
|
+
},
|
|
1166
|
+
"total": {
|
|
1167
|
+
"$ref": "#/components/schemas/Total"
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
"required": [
|
|
1171
|
+
"limit",
|
|
1172
|
+
"total"
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
"Offset": {
|
|
1176
|
+
"type": "integer",
|
|
1177
|
+
"format": "int32",
|
|
1178
|
+
"default": 0,
|
|
1179
|
+
"description": "The zero-based index of the first hit/data to include in the result.",
|
|
1180
|
+
"example": 0,
|
|
1181
|
+
"minimum": 0
|
|
1182
|
+
},
|
|
1183
|
+
"PaginatedResultBase": {
|
|
1184
|
+
"allOf": [
|
|
1185
|
+
{
|
|
1186
|
+
"$ref": "#/components/schemas/ResultBase"
|
|
1187
|
+
}
|
|
1188
|
+
],
|
|
1189
|
+
"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`.",
|
|
1190
|
+
"properties": {
|
|
1191
|
+
"offset": {
|
|
1192
|
+
"$ref": "#/components/schemas/Offset"
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
"required": [
|
|
1196
|
+
"limit",
|
|
1197
|
+
"offset",
|
|
1198
|
+
"total"
|
|
1199
|
+
]
|
|
1200
|
+
},
|
|
1201
|
+
"PriceBookId": {
|
|
1202
|
+
"type": "string",
|
|
1203
|
+
"description": "The ID of the price book.",
|
|
1204
|
+
"example": "USD-list-prices",
|
|
1205
|
+
"maxLength": 256,
|
|
1206
|
+
"minLength": 1
|
|
1207
|
+
},
|
|
1208
|
+
"CurrencyCode": {
|
|
1209
|
+
"type": "string",
|
|
1210
|
+
"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.",
|
|
1211
|
+
"example": "USD",
|
|
1212
|
+
"pattern": "^([A-Z][A-Z][A-Z]|N/A)$"
|
|
1213
|
+
},
|
|
1214
|
+
"SiteId": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"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",
|
|
1217
|
+
"example": "RefArch",
|
|
1218
|
+
"maxLength": 32,
|
|
1219
|
+
"minLength": 1
|
|
1220
|
+
},
|
|
1221
|
+
"SiteAssignment": {
|
|
1222
|
+
"type": "object",
|
|
1223
|
+
"description": "Document representing a site assignment on a price book.",
|
|
1224
|
+
"properties": {
|
|
1225
|
+
"id": {
|
|
1226
|
+
"allOf": [
|
|
1227
|
+
{
|
|
1228
|
+
"$ref": "#/components/schemas/SiteId"
|
|
1229
|
+
}
|
|
1230
|
+
]
|
|
1231
|
+
},
|
|
1232
|
+
"displayName": {
|
|
1233
|
+
"type": "string",
|
|
1234
|
+
"description": "The display name of the site.",
|
|
1235
|
+
"example": "RefArch Store",
|
|
1236
|
+
"maxLength": 256
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
"required": [
|
|
1240
|
+
"id"
|
|
1241
|
+
]
|
|
1242
|
+
},
|
|
1243
|
+
"PriceBook": {
|
|
1244
|
+
"type": "object",
|
|
1245
|
+
"additionalProperties": {
|
|
1246
|
+
"description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.",
|
|
1247
|
+
"example": "c_trackingId",
|
|
1248
|
+
"title": "Additional Property Support"
|
|
1249
|
+
},
|
|
1250
|
+
"description": "Document representing a price book.",
|
|
1251
|
+
"properties": {
|
|
1252
|
+
"id": {
|
|
1253
|
+
"allOf": [
|
|
1254
|
+
{
|
|
1255
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1256
|
+
}
|
|
1257
|
+
]
|
|
1258
|
+
},
|
|
1259
|
+
"displayName": {
|
|
1260
|
+
"type": "string",
|
|
1261
|
+
"description": "The display name of the price book.",
|
|
1262
|
+
"example": "USD List Prices",
|
|
1263
|
+
"maxLength": 256
|
|
1264
|
+
},
|
|
1265
|
+
"description": {
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"description": "The detailed description of the price book.",
|
|
1268
|
+
"example": "Standard list prices for USD currency",
|
|
1269
|
+
"maxLength": 4000
|
|
1270
|
+
},
|
|
1271
|
+
"currencyCode": {
|
|
1272
|
+
"allOf": [
|
|
1273
|
+
{
|
|
1274
|
+
"$ref": "#/components/schemas/CurrencyCode"
|
|
1275
|
+
}
|
|
1276
|
+
],
|
|
1277
|
+
"description": "The currency used by the price book. This can be specified only on create."
|
|
1278
|
+
},
|
|
1279
|
+
"type": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"description": "The price book type. 'standard' price books are fully editable via this API. For 'feed_based' price books, the price entries are sourced from an external feed pipeline: the price book container itself (its metadata, such as displayName, description, online, and validity dates) remains editable via this API, but price book entry write operations against a feed_based price book are rejected. This is a read-only, server-assigned attribute; price books created via this API are always 'standard'.",
|
|
1282
|
+
"enum": [
|
|
1283
|
+
"standard",
|
|
1284
|
+
"feed_based"
|
|
1285
|
+
],
|
|
1286
|
+
"example": "standard",
|
|
1287
|
+
"readOnly": true
|
|
1288
|
+
},
|
|
1289
|
+
"parent": {
|
|
1290
|
+
"allOf": [
|
|
1291
|
+
{
|
|
1292
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1293
|
+
}
|
|
1294
|
+
],
|
|
1295
|
+
"description": "The ID of another price book which is the base for this price book."
|
|
1296
|
+
},
|
|
1297
|
+
"validFrom": {
|
|
1298
|
+
"type": "string",
|
|
1299
|
+
"format": "date-time",
|
|
1300
|
+
"description": "The validity start date and time of the price book.",
|
|
1301
|
+
"example": "2024-01-01T00:00:00Z"
|
|
1302
|
+
},
|
|
1303
|
+
"validTo": {
|
|
1304
|
+
"type": "string",
|
|
1305
|
+
"format": "date-time",
|
|
1306
|
+
"description": "The validity end date and time of the price book.",
|
|
1307
|
+
"example": "2024-12-31T23:59:59.999Z"
|
|
1308
|
+
},
|
|
1309
|
+
"online": {
|
|
1310
|
+
"type": "boolean",
|
|
1311
|
+
"description": "Specifies whether the price book is online (true) or not (false). If unspecified on create, the default value is false.",
|
|
1312
|
+
"example": true
|
|
1313
|
+
},
|
|
1314
|
+
"siteAssignments": {
|
|
1315
|
+
"type": "array",
|
|
1316
|
+
"description": "The list of sites to which the price book is assigned. This is a read-only computed attribute; assignments are managed via the site-assignment endpoints on this price book (PUT/DELETE /price-books/{priceBookId}/site-assignments/{siteId}).",
|
|
1317
|
+
"items": {
|
|
1318
|
+
"$ref": "#/components/schemas/SiteAssignment"
|
|
1319
|
+
},
|
|
1320
|
+
"maxItems": 100,
|
|
1321
|
+
"readOnly": true
|
|
1322
|
+
},
|
|
1323
|
+
"creationDate": {
|
|
1324
|
+
"type": "string",
|
|
1325
|
+
"format": "date-time",
|
|
1326
|
+
"description": "The date and time the price book was created.",
|
|
1327
|
+
"example": "2024-01-01T00:00:00Z",
|
|
1328
|
+
"readOnly": true
|
|
1329
|
+
},
|
|
1330
|
+
"lastModified": {
|
|
1331
|
+
"type": "string",
|
|
1332
|
+
"format": "date-time",
|
|
1333
|
+
"description": "The date and time the price book was last modified.",
|
|
1334
|
+
"example": "2024-01-15T10:30:00Z",
|
|
1335
|
+
"readOnly": true
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1338
|
+
"required": [
|
|
1339
|
+
"currencyCode",
|
|
1340
|
+
"id"
|
|
1341
|
+
]
|
|
1342
|
+
},
|
|
1343
|
+
"PriceBooks": {
|
|
1344
|
+
"allOf": [
|
|
1345
|
+
{
|
|
1346
|
+
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
1347
|
+
}
|
|
1348
|
+
],
|
|
1349
|
+
"description": "Document representing a paginated list of price books.",
|
|
1350
|
+
"properties": {
|
|
1351
|
+
"data": {
|
|
1352
|
+
"type": "array",
|
|
1353
|
+
"description": "The collection of price books.",
|
|
1354
|
+
"items": {
|
|
1355
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
1356
|
+
},
|
|
1357
|
+
"maxItems": 50
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
"required": [
|
|
1361
|
+
"data"
|
|
1362
|
+
]
|
|
1363
|
+
},
|
|
1364
|
+
"ErrorResponse": {
|
|
1365
|
+
"type": "object",
|
|
1366
|
+
"additionalProperties": true,
|
|
1367
|
+
"properties": {
|
|
1368
|
+
"title": {
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
"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",
|
|
1371
|
+
"example": "You do not have enough credit",
|
|
1372
|
+
"maxLength": 256
|
|
1373
|
+
},
|
|
1374
|
+
"type": {
|
|
1375
|
+
"type": "string",
|
|
1376
|
+
"description": "A URI reference [RFC3986] that identifies the\nproblem type. This specification encourages that, when\ndereferenced, it provide human-readable documentation for the\nproblem type (e.g., using HTML [W3C.REC-html5-20141028]). When\nthis member is not present, its value is assumed to be\n\"about:blank\". It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
|
|
1377
|
+
"example": "NotEnoughMoney",
|
|
1378
|
+
"maxLength": 2048
|
|
1379
|
+
},
|
|
1380
|
+
"detail": {
|
|
1381
|
+
"type": "string",
|
|
1382
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
1383
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
1384
|
+
},
|
|
1385
|
+
"instance": {
|
|
1386
|
+
"type": "string",
|
|
1387
|
+
"description": "A URI reference that identifies the specific\noccurrence of the problem. It may or may not yield further\ninformation if dereferenced. It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
|
|
1388
|
+
"example": "/account/12345/msgs/abc",
|
|
1389
|
+
"maxLength": 2048
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"required": [
|
|
1393
|
+
"detail",
|
|
1394
|
+
"title",
|
|
1395
|
+
"type"
|
|
1396
|
+
]
|
|
1397
|
+
},
|
|
1398
|
+
"InvalidQueryParameterErrorResponse": {
|
|
1399
|
+
"allOf": [
|
|
1400
|
+
{
|
|
1401
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1402
|
+
}
|
|
1403
|
+
],
|
|
1404
|
+
"description": "Returned when a specified query parameter value is invalid."
|
|
1405
|
+
},
|
|
1406
|
+
"PriceBookNotFoundErrorResponse": {
|
|
1407
|
+
"allOf": [
|
|
1408
|
+
{
|
|
1409
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1410
|
+
}
|
|
1411
|
+
],
|
|
1412
|
+
"description": "Returned when the specified price book does not exist.",
|
|
1413
|
+
"properties": {
|
|
1414
|
+
"priceBookId": {
|
|
1415
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
},
|
|
1419
|
+
"CurrencyImmutableErrorResponse": {
|
|
1420
|
+
"allOf": [
|
|
1421
|
+
{
|
|
1422
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1423
|
+
}
|
|
1424
|
+
],
|
|
1425
|
+
"description": "Returned when attempting to change the currency code of an existing price book."
|
|
1426
|
+
},
|
|
1427
|
+
"ParentCycleDetectedErrorResponse": {
|
|
1428
|
+
"allOf": [
|
|
1429
|
+
{
|
|
1430
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1431
|
+
}
|
|
1432
|
+
],
|
|
1433
|
+
"description": "Returned when a price book parent relationship would create a cycle."
|
|
1434
|
+
},
|
|
1435
|
+
"ProductId": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"description": "The id (SKU) of the product.",
|
|
1438
|
+
"example": "apple-ipod-classic",
|
|
1439
|
+
"maxLength": 100,
|
|
1440
|
+
"minLength": 1
|
|
1441
|
+
},
|
|
1442
|
+
"NonNegativeMoney": {
|
|
1443
|
+
"type": "object",
|
|
1444
|
+
"description": "A combination of a currency and a non-negative amount of that currency.",
|
|
1445
|
+
"properties": {
|
|
1446
|
+
"currencyMnemonic": {
|
|
1447
|
+
"$ref": "#/components/schemas/CurrencyCode"
|
|
1448
|
+
},
|
|
1449
|
+
"value": {
|
|
1450
|
+
"type": "number",
|
|
1451
|
+
"format": "double",
|
|
1452
|
+
"description": "The amount of money for the given currency. Must not be negative.",
|
|
1453
|
+
"example": 1234.56,
|
|
1454
|
+
"minimum": 0
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
"required": [
|
|
1458
|
+
"value"
|
|
1459
|
+
]
|
|
1460
|
+
},
|
|
1461
|
+
"PriceScaleAmount": {
|
|
1462
|
+
"type": "object",
|
|
1463
|
+
"description": "A quantity tier priced as an absolute monetary amount.",
|
|
1464
|
+
"properties": {
|
|
1465
|
+
"type": {
|
|
1466
|
+
"type": "string",
|
|
1467
|
+
"description": "Discriminator value identifying this tier as an absolute monetary amount.",
|
|
1468
|
+
"enum": [
|
|
1469
|
+
"amount"
|
|
1470
|
+
],
|
|
1471
|
+
"example": "amount"
|
|
1472
|
+
},
|
|
1473
|
+
"quantity": {
|
|
1474
|
+
"type": "integer",
|
|
1475
|
+
"format": "int32",
|
|
1476
|
+
"description": "The minimum quantity required for this tier.",
|
|
1477
|
+
"example": 10,
|
|
1478
|
+
"maximum": 1000000,
|
|
1479
|
+
"minimum": 1
|
|
1480
|
+
},
|
|
1481
|
+
"amount": {
|
|
1482
|
+
"allOf": [
|
|
1483
|
+
{
|
|
1484
|
+
"$ref": "#/components/schemas/NonNegativeMoney"
|
|
1485
|
+
}
|
|
1486
|
+
],
|
|
1487
|
+
"description": "The tier price as a Money object (amount and currency). The value must not be negative. The currency must match the enclosing price book's currency."
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
"required": [
|
|
1491
|
+
"amount",
|
|
1492
|
+
"quantity",
|
|
1493
|
+
"type"
|
|
1494
|
+
]
|
|
1495
|
+
},
|
|
1496
|
+
"PriceScalePercentage": {
|
|
1497
|
+
"type": "object",
|
|
1498
|
+
"description": "A quantity tier priced as a percentage discount.",
|
|
1499
|
+
"properties": {
|
|
1500
|
+
"type": {
|
|
1501
|
+
"type": "string",
|
|
1502
|
+
"description": "Discriminator value identifying this tier as a percentage discount.",
|
|
1503
|
+
"enum": [
|
|
1504
|
+
"percentage"
|
|
1505
|
+
],
|
|
1506
|
+
"example": "percentage"
|
|
1507
|
+
},
|
|
1508
|
+
"quantity": {
|
|
1509
|
+
"type": "integer",
|
|
1510
|
+
"format": "int32",
|
|
1511
|
+
"description": "The minimum quantity required for this tier.",
|
|
1512
|
+
"example": 10,
|
|
1513
|
+
"maximum": 1000000,
|
|
1514
|
+
"minimum": 1
|
|
1515
|
+
},
|
|
1516
|
+
"percentage": {
|
|
1517
|
+
"type": "number",
|
|
1518
|
+
"format": "double",
|
|
1519
|
+
"description": "The percentage discount for this tier, expressed as a number between 0 and 100.",
|
|
1520
|
+
"example": 15,
|
|
1521
|
+
"maximum": 100,
|
|
1522
|
+
"minimum": 0
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"required": [
|
|
1526
|
+
"percentage",
|
|
1527
|
+
"quantity",
|
|
1528
|
+
"type"
|
|
1529
|
+
]
|
|
1530
|
+
},
|
|
1531
|
+
"PriceScaleEntry": {
|
|
1532
|
+
"description": "A single quantity tier within a price scale table. A tier is either an absolute monetary amount or a percentage discount, discriminated by the 'type' property.",
|
|
1533
|
+
"discriminator": {
|
|
1534
|
+
"propertyName": "type",
|
|
1535
|
+
"mapping": {
|
|
1536
|
+
"amount": "#/components/schemas/PriceScaleAmount",
|
|
1537
|
+
"percentage": "#/components/schemas/PriceScalePercentage"
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
"oneOf": [
|
|
1541
|
+
{
|
|
1542
|
+
"$ref": "#/components/schemas/PriceScaleAmount"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"$ref": "#/components/schemas/PriceScalePercentage"
|
|
1546
|
+
}
|
|
1547
|
+
]
|
|
1548
|
+
},
|
|
1549
|
+
"PriceScaleTable": {
|
|
1550
|
+
"type": "object",
|
|
1551
|
+
"description": "A price scale table associates a validity window with a set of quantity tiers. A single price book entry can have multiple tables to express overlapping pricing schedules for the same product.",
|
|
1552
|
+
"properties": {
|
|
1553
|
+
"validFrom": {
|
|
169
1554
|
"type": "string",
|
|
1555
|
+
"format": "date-time",
|
|
1556
|
+
"description": "The start of the validity window during which this price scale table applies. If omitted, the table is valid immediately.",
|
|
1557
|
+
"example": "2026-11-25T00:00:00Z"
|
|
1558
|
+
},
|
|
1559
|
+
"validTo": {
|
|
1560
|
+
"type": "string",
|
|
1561
|
+
"format": "date-time",
|
|
1562
|
+
"description": "The end of the validity window during which this price scale table applies. If omitted, the table is valid indefinitely.",
|
|
1563
|
+
"example": "2026-11-28T23:59:59.999Z"
|
|
1564
|
+
},
|
|
1565
|
+
"tiers": {
|
|
1566
|
+
"type": "array",
|
|
1567
|
+
"description": "The quantity-based tiers for this table. On PUT the table is replaced wholesale; individual tiers cannot be updated independently.",
|
|
1568
|
+
"items": {
|
|
1569
|
+
"$ref": "#/components/schemas/PriceScaleEntry"
|
|
1570
|
+
},
|
|
1571
|
+
"maxItems": 20,
|
|
1572
|
+
"minItems": 1
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
"required": [
|
|
1576
|
+
"tiers"
|
|
1577
|
+
]
|
|
1578
|
+
},
|
|
1579
|
+
"PriceBookEntry": {
|
|
1580
|
+
"type": "object",
|
|
1581
|
+
"additionalProperties": {
|
|
1582
|
+
"description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.",
|
|
1583
|
+
"example": "c_trackingId",
|
|
1584
|
+
"title": "Additional Property Support"
|
|
1585
|
+
},
|
|
1586
|
+
"description": "Document representing a price book entry. A price book entry has a composite identity of (priceBookId, productId); there is no standalone POST endpoint, use PUT for upsert.",
|
|
1587
|
+
"properties": {
|
|
1588
|
+
"productId": {
|
|
1589
|
+
"allOf": [
|
|
1590
|
+
{
|
|
1591
|
+
"$ref": "#/components/schemas/ProductId"
|
|
1592
|
+
}
|
|
1593
|
+
],
|
|
1594
|
+
"description": "The product ID for this price book entry."
|
|
1595
|
+
},
|
|
1596
|
+
"priceTables": {
|
|
1597
|
+
"type": "array",
|
|
1598
|
+
"description": "The list of price scale tables for this product. Each table carries its own validity window and a set of quantity-based tiers. Multiple tables let a merchandiser define overlapping schedules (for example, Black Friday prices alongside regular prices) for the same product in the same price book.",
|
|
1599
|
+
"items": {
|
|
1600
|
+
"$ref": "#/components/schemas/PriceScaleTable"
|
|
1601
|
+
},
|
|
1602
|
+
"maxItems": 10
|
|
1603
|
+
},
|
|
1604
|
+
"creationDate": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"format": "date-time",
|
|
1607
|
+
"description": "The date and time the price book entry was created.",
|
|
1608
|
+
"example": "2024-01-01T00:00:00Z",
|
|
1609
|
+
"readOnly": true
|
|
1610
|
+
},
|
|
1611
|
+
"lastModified": {
|
|
1612
|
+
"type": "string",
|
|
1613
|
+
"format": "date-time",
|
|
1614
|
+
"description": "The date and time the price book entry was last modified.",
|
|
1615
|
+
"example": "2024-01-15T10:30:00Z",
|
|
1616
|
+
"readOnly": true
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"required": [
|
|
1620
|
+
"productId"
|
|
1621
|
+
]
|
|
1622
|
+
},
|
|
1623
|
+
"PriceBookEntries": {
|
|
1624
|
+
"allOf": [
|
|
1625
|
+
{
|
|
1626
|
+
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
1627
|
+
}
|
|
1628
|
+
],
|
|
1629
|
+
"description": "Document representing a paginated list of price book entries.",
|
|
1630
|
+
"properties": {
|
|
1631
|
+
"data": {
|
|
1632
|
+
"type": "array",
|
|
1633
|
+
"description": "The collection of price book entries.",
|
|
1634
|
+
"items": {
|
|
1635
|
+
"$ref": "#/components/schemas/PriceBookEntry"
|
|
1636
|
+
},
|
|
1637
|
+
"maxItems": 200
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
"required": [
|
|
1641
|
+
"data"
|
|
1642
|
+
]
|
|
1643
|
+
},
|
|
1644
|
+
"PriceBookEntryNotFoundErrorResponse": {
|
|
1645
|
+
"allOf": [
|
|
1646
|
+
{
|
|
1647
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1648
|
+
}
|
|
1649
|
+
],
|
|
1650
|
+
"description": "Returned when the specified price book entry does not exist.",
|
|
1651
|
+
"properties": {
|
|
1652
|
+
"priceBookId": {
|
|
1653
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1654
|
+
},
|
|
1655
|
+
"productId": {
|
|
1656
|
+
"$ref": "#/components/schemas/ProductId"
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
"ValidationErrorResponse": {
|
|
1661
|
+
"allOf": [
|
|
1662
|
+
{
|
|
1663
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1664
|
+
}
|
|
1665
|
+
],
|
|
1666
|
+
"description": "Returned when the request body fails validation."
|
|
1667
|
+
},
|
|
1668
|
+
"InvalidTimeRangeErrorResponse": {
|
|
1669
|
+
"allOf": [
|
|
1670
|
+
{
|
|
1671
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1672
|
+
}
|
|
1673
|
+
],
|
|
1674
|
+
"description": "Returned when a time range is invalid because its end (validTo) precedes its start (validFrom); for example, a price scale table's validity window."
|
|
1675
|
+
},
|
|
1676
|
+
"TierCurrencyMismatchErrorResponse": {
|
|
1677
|
+
"allOf": [
|
|
1678
|
+
{
|
|
1679
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1680
|
+
}
|
|
1681
|
+
],
|
|
1682
|
+
"description": "Returned when a price scale tier specifies a currency that differs from the enclosing price book's currency.",
|
|
1683
|
+
"properties": {
|
|
1684
|
+
"tierCurrency": {
|
|
1685
|
+
"$ref": "#/components/schemas/CurrencyCode"
|
|
1686
|
+
},
|
|
1687
|
+
"priceBookCurrency": {
|
|
1688
|
+
"$ref": "#/components/schemas/CurrencyCode"
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
"DuplicateTierQuantityErrorResponse": {
|
|
1693
|
+
"allOf": [
|
|
1694
|
+
{
|
|
1695
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1696
|
+
}
|
|
1697
|
+
],
|
|
1698
|
+
"description": "Returned when two or more tiers in the same price scale table declare the same quantity, which the backend keys tiers by.",
|
|
1699
|
+
"properties": {
|
|
1700
|
+
"quantity": {
|
|
1701
|
+
"type": "integer",
|
|
1702
|
+
"format": "int32",
|
|
1703
|
+
"description": "The duplicated tier quantity.",
|
|
1704
|
+
"example": 10,
|
|
1705
|
+
"maximum": 1000000,
|
|
1706
|
+
"minimum": 1
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
"ProductNotFoundErrorResponse": {
|
|
1711
|
+
"allOf": [
|
|
1712
|
+
{
|
|
1713
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1714
|
+
}
|
|
1715
|
+
],
|
|
1716
|
+
"description": "Returned when the specified product does not exist.",
|
|
1717
|
+
"properties": {
|
|
1718
|
+
"productId": {
|
|
1719
|
+
"$ref": "#/components/schemas/ProductId"
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
"FeedBasedPriceBookNotSupportedErrorResponse": {
|
|
1724
|
+
"allOf": [
|
|
1725
|
+
{
|
|
1726
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1727
|
+
}
|
|
1728
|
+
],
|
|
1729
|
+
"description": "Returned when attempting a price book entry write against a feed_based price book.",
|
|
1730
|
+
"properties": {
|
|
1731
|
+
"priceBookId": {
|
|
1732
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"SiteAssignments": {
|
|
1737
|
+
"allOf": [
|
|
1738
|
+
{
|
|
1739
|
+
"$ref": "#/components/schemas/ResultBase"
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"description": "Document representing the list of site assignments on a price book. The list is bounded (a price book is live on a small set of sites) and is not paginated.",
|
|
1743
|
+
"properties": {
|
|
1744
|
+
"data": {
|
|
1745
|
+
"type": "array",
|
|
1746
|
+
"description": "The collection of sites the price book is assigned to.",
|
|
1747
|
+
"items": {
|
|
1748
|
+
"$ref": "#/components/schemas/SiteAssignment"
|
|
1749
|
+
},
|
|
1750
|
+
"maxItems": 100
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
"required": [
|
|
1754
|
+
"data"
|
|
1755
|
+
]
|
|
1756
|
+
},
|
|
1757
|
+
"SiteNotFoundErrorResponse": {
|
|
1758
|
+
"allOf": [
|
|
1759
|
+
{
|
|
1760
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
"description": "Returned when the site referenced by a site-assignment operation does not exist.",
|
|
1764
|
+
"properties": {
|
|
1765
|
+
"siteId": {
|
|
1766
|
+
"$ref": "#/components/schemas/SiteId"
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
"Query": {
|
|
1771
|
+
"type": "object",
|
|
1772
|
+
"additionalProperties": false,
|
|
1773
|
+
"description": "A set of objects that define criteria used to select records. A query can contain one of the following:\n* `MatchAllQuery`\n - Matches all documents.\n* `TermQuery`\n - Matches one or more documents against one or more document fields.\n* `TextQuery`\n - Matches text against one or more fields.\n* `BoolQuery`\n - Allows construction of a logical expression of multiple queries.\n* `FilteredQuery`\n - Allows a filter to be applied to a query.\n* `NestedQuery`\n - Allows you to query on nested documents.\n - _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._",
|
|
1774
|
+
"example": {
|
|
1775
|
+
"filteredQuery": {
|
|
1776
|
+
"query": {
|
|
1777
|
+
"textQuery": {
|
|
1778
|
+
"fields": [
|
|
1779
|
+
"couponId"
|
|
1780
|
+
],
|
|
1781
|
+
"searchPhrase": "disabled"
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
"filter": {
|
|
1785
|
+
"termFilter": {
|
|
1786
|
+
"field": "enabled",
|
|
1787
|
+
"operator": "is",
|
|
1788
|
+
"values": [
|
|
1789
|
+
false
|
|
1790
|
+
]
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
"maxProperties": 1,
|
|
1796
|
+
"minProperties": 1,
|
|
1797
|
+
"properties": {
|
|
1798
|
+
"boolQuery": {
|
|
1799
|
+
"$ref": "#/components/schemas/BoolQuery"
|
|
1800
|
+
},
|
|
1801
|
+
"filteredQuery": {
|
|
1802
|
+
"$ref": "#/components/schemas/FilteredQuery"
|
|
1803
|
+
},
|
|
1804
|
+
"matchAllQuery": {
|
|
1805
|
+
"$ref": "#/components/schemas/MatchAllQuery"
|
|
1806
|
+
},
|
|
1807
|
+
"nestedQuery": {
|
|
1808
|
+
"$ref": "#/components/schemas/NestedQuery"
|
|
1809
|
+
},
|
|
1810
|
+
"termQuery": {
|
|
1811
|
+
"$ref": "#/components/schemas/TermQuery"
|
|
1812
|
+
},
|
|
1813
|
+
"textQuery": {
|
|
1814
|
+
"$ref": "#/components/schemas/TextQuery"
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
"BoolQuery": {
|
|
1819
|
+
"type": "object",
|
|
1820
|
+
"additionalProperties": false,
|
|
1821
|
+
"description": "A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:\n \n - `must`, which combines as an `AND` operator.\n - `should`, which combines as an `OR` operator.\n - `must_not`, which combines as a `NOT` operator.\n \nIf `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:\n\n (must-1 AND must-1 AND ...)\n AND (should-1 OR should-2 OR ...)\n AND NOT (must_not-1 OR must_not-2 OR ...)\n",
|
|
1822
|
+
"example": {
|
|
1823
|
+
"must": [
|
|
1824
|
+
{
|
|
1825
|
+
"textQuery": {
|
|
1826
|
+
"fields": [
|
|
1827
|
+
"couponId"
|
|
1828
|
+
],
|
|
1829
|
+
"searchPhrase": "DEAL"
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
"textQuery": {
|
|
1834
|
+
"fields": [
|
|
1835
|
+
"description"
|
|
1836
|
+
],
|
|
1837
|
+
"searchPhrase": "Big bargain deal"
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
],
|
|
1841
|
+
"mustNot": [
|
|
1842
|
+
{
|
|
1843
|
+
"termQuery": {
|
|
1844
|
+
"fields": [
|
|
1845
|
+
"enabled"
|
|
1846
|
+
],
|
|
1847
|
+
"operator": "is",
|
|
1848
|
+
"values": [
|
|
1849
|
+
false
|
|
1850
|
+
]
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
"properties": {
|
|
1856
|
+
"must": {
|
|
1857
|
+
"type": "array",
|
|
1858
|
+
"description": "List of queries to be evaluated as an `AND` operator.",
|
|
1859
|
+
"items": {
|
|
1860
|
+
"$ref": "#/components/schemas/Query"
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"mustNot": {
|
|
1864
|
+
"type": "array",
|
|
1865
|
+
"description": "List of queries to be evaluated as a `NOT` operator.",
|
|
1866
|
+
"items": {
|
|
1867
|
+
"$ref": "#/components/schemas/Query"
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
"should": {
|
|
1871
|
+
"type": "array",
|
|
1872
|
+
"description": "List of queries to be evaluated as an `OR` operator.",
|
|
1873
|
+
"items": {
|
|
1874
|
+
"$ref": "#/components/schemas/Query"
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
"Filter": {
|
|
1880
|
+
"type": "object",
|
|
1881
|
+
"additionalProperties": false,
|
|
1882
|
+
"description": "Contains a set of objects that define criteria used to select records. A filter can contain one of the following:\n * `TermFilter`\n - Matches records where a field (or fields) exactly matches some simple value (including `null`).\n * `RangeFilter`\n - Matches records where a field value lies within a specified range.\n * `Range2Filter`\n - Matches records in a specified range across fields.\n * `QueryFilter`\n - Matches records based on a query.\n * `BoolFilter`\n - Provides filtering of records using a set of filters combined using a logical operator.",
|
|
1883
|
+
"maxProperties": 1,
|
|
1884
|
+
"minProperties": 1,
|
|
1885
|
+
"properties": {
|
|
1886
|
+
"boolFilter": {
|
|
1887
|
+
"$ref": "#/components/schemas/BoolFilter"
|
|
1888
|
+
},
|
|
1889
|
+
"queryFilter": {
|
|
1890
|
+
"$ref": "#/components/schemas/QueryFilter"
|
|
1891
|
+
},
|
|
1892
|
+
"range2Filter": {
|
|
1893
|
+
"$ref": "#/components/schemas/Range2Filter"
|
|
1894
|
+
},
|
|
1895
|
+
"rangeFilter": {
|
|
1896
|
+
"$ref": "#/components/schemas/RangeFilter"
|
|
1897
|
+
},
|
|
1898
|
+
"termFilter": {
|
|
1899
|
+
"$ref": "#/components/schemas/TermFilter"
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
"BoolFilter": {
|
|
1904
|
+
"type": "object",
|
|
1905
|
+
"additionalProperties": false,
|
|
1906
|
+
"description": "Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.",
|
|
1907
|
+
"example": {
|
|
1908
|
+
"operator": "and",
|
|
1909
|
+
"filters": [
|
|
1910
|
+
{
|
|
1911
|
+
"termFilter": {
|
|
1912
|
+
"field": "id",
|
|
1913
|
+
"operator": "is",
|
|
1914
|
+
"values": [
|
|
1915
|
+
"myId"
|
|
1916
|
+
]
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
"termFilter": {
|
|
1921
|
+
"field": "couponId",
|
|
1922
|
+
"operator": "is",
|
|
1923
|
+
"values": [
|
|
1924
|
+
"couponOne"
|
|
1925
|
+
]
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
]
|
|
1929
|
+
},
|
|
1930
|
+
"properties": {
|
|
1931
|
+
"filters": {
|
|
1932
|
+
"type": "array",
|
|
1933
|
+
"description": "A list of filters that are logically combined by an operator.",
|
|
1934
|
+
"items": {
|
|
1935
|
+
"$ref": "#/components/schemas/Filter"
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
"operator": {
|
|
1939
|
+
"type": "string",
|
|
1940
|
+
"description": "The logical operator that is used to combine the filters.",
|
|
170
1941
|
"enum": [
|
|
171
1942
|
"and",
|
|
172
1943
|
"or",
|
|
173
1944
|
"not"
|
|
174
|
-
]
|
|
1945
|
+
],
|
|
1946
|
+
"example": "and"
|
|
175
1947
|
}
|
|
176
1948
|
},
|
|
177
1949
|
"required": [
|
|
@@ -180,6 +1952,7 @@
|
|
|
180
1952
|
},
|
|
181
1953
|
"QueryFilter": {
|
|
182
1954
|
"type": "object",
|
|
1955
|
+
"description": "Wraps any query and allows it to be used as a filter.",
|
|
183
1956
|
"properties": {
|
|
184
1957
|
"query": {
|
|
185
1958
|
"$ref": "#/components/schemas/Query"
|
|
@@ -191,45 +1964,71 @@
|
|
|
191
1964
|
},
|
|
192
1965
|
"Field": {
|
|
193
1966
|
"type": "string",
|
|
1967
|
+
"description": "Name of the field. Might be a custom field name prefixed with c_.",
|
|
1968
|
+
"example": "couponId",
|
|
194
1969
|
"maxLength": 260
|
|
195
1970
|
},
|
|
196
1971
|
"Range2Filter": {
|
|
197
1972
|
"type": "object",
|
|
198
1973
|
"additionalProperties": false,
|
|
1974
|
+
"description": "Allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.\n\nThe first range (R1) is defined by a pair of attributes (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.\n\nThe second range (R2) is defined by `fromValue` and `toValue`.\n\nThe filter mode specifies the method used to compare the two ranges:\n\n* `overlap`: R1 overlaps fully or partially with R2.\n* `containing`: R1 contains R2.\n* `contained`: R1 is contained in R2.\n\nThe range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
1975
|
+
"example": {
|
|
1976
|
+
"fromField": "validFrom",
|
|
1977
|
+
"toField": "validTo",
|
|
1978
|
+
"filterMode": "overlap",
|
|
1979
|
+
"fromValue": "2007-01-01T00:00:00.000Z",
|
|
1980
|
+
"toValue": "2017-01-01T00:00:00.000Z"
|
|
1981
|
+
},
|
|
199
1982
|
"properties": {
|
|
200
1983
|
"filterMode": {
|
|
201
1984
|
"type": "string",
|
|
202
1985
|
"default": "overlap",
|
|
1986
|
+
"description": "Compare mode: overlap, containing, or contained.",
|
|
203
1987
|
"enum": [
|
|
204
1988
|
"overlap",
|
|
205
1989
|
"containing",
|
|
206
1990
|
"contained"
|
|
207
|
-
]
|
|
1991
|
+
],
|
|
1992
|
+
"example": "overlap"
|
|
208
1993
|
},
|
|
209
1994
|
"fromField": {
|
|
210
1995
|
"allOf": [
|
|
211
1996
|
{
|
|
212
1997
|
"$ref": "#/components/schemas/Field"
|
|
213
1998
|
}
|
|
214
|
-
]
|
|
1999
|
+
],
|
|
2000
|
+
"description": "The field name of the field that starts the first range.",
|
|
2001
|
+
"example": "validFrom"
|
|
215
2002
|
},
|
|
216
2003
|
"fromInclusive": {
|
|
217
2004
|
"type": "boolean",
|
|
218
|
-
"default": true
|
|
2005
|
+
"default": true,
|
|
2006
|
+
"description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
2007
|
+
"example": true
|
|
2008
|
+
},
|
|
2009
|
+
"fromValue": {
|
|
2010
|
+
"description": "The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
2011
|
+
"example": "2007-01-01T00:00:00.000Z"
|
|
219
2012
|
},
|
|
220
|
-
"fromValue": {},
|
|
221
2013
|
"toField": {
|
|
222
2014
|
"allOf": [
|
|
223
2015
|
{
|
|
224
2016
|
"$ref": "#/components/schemas/Field"
|
|
225
2017
|
}
|
|
226
|
-
]
|
|
2018
|
+
],
|
|
2019
|
+
"description": "The field name of the field that ends the first range.",
|
|
2020
|
+
"example": "validTo"
|
|
227
2021
|
},
|
|
228
2022
|
"toInclusive": {
|
|
229
2023
|
"type": "boolean",
|
|
230
|
-
"default": true
|
|
2024
|
+
"default": true,
|
|
2025
|
+
"description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
2026
|
+
"example": true
|
|
231
2027
|
},
|
|
232
|
-
"toValue": {
|
|
2028
|
+
"toValue": {
|
|
2029
|
+
"description": "The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
2030
|
+
"example": "2017-01-01T00:00:00.000Z"
|
|
2031
|
+
}
|
|
233
2032
|
},
|
|
234
2033
|
"required": [
|
|
235
2034
|
"fromField",
|
|
@@ -238,49 +2037,64 @@
|
|
|
238
2037
|
},
|
|
239
2038
|
"RangeFilter": {
|
|
240
2039
|
"type": "object",
|
|
2040
|
+
"description": "Allows you to restrict a search result to hits that have values for a given attribute that fall within a given value range. The range filter supports several value types and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
241
2041
|
"properties": {
|
|
242
2042
|
"field": {
|
|
243
2043
|
"allOf": [
|
|
244
2044
|
{
|
|
245
2045
|
"$ref": "#/components/schemas/Field"
|
|
246
2046
|
}
|
|
247
|
-
]
|
|
2047
|
+
],
|
|
2048
|
+
"description": "The search field.",
|
|
2049
|
+
"example": "validFrom"
|
|
248
2050
|
},
|
|
249
2051
|
"from": {
|
|
2052
|
+
"description": "The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
250
2053
|
"oneOf": [
|
|
251
2054
|
{
|
|
252
2055
|
"type": "string",
|
|
253
|
-
"format": "date-time"
|
|
2056
|
+
"format": "date-time",
|
|
2057
|
+
"example": "2007-01-01T00:00:00Z"
|
|
254
2058
|
},
|
|
255
2059
|
{
|
|
256
|
-
"type": "integer"
|
|
2060
|
+
"type": "integer",
|
|
2061
|
+
"example": 1
|
|
257
2062
|
},
|
|
258
2063
|
{
|
|
259
|
-
"type": "number"
|
|
2064
|
+
"type": "number",
|
|
2065
|
+
"example": 1
|
|
260
2066
|
}
|
|
261
2067
|
]
|
|
262
2068
|
},
|
|
263
2069
|
"fromInclusive": {
|
|
264
2070
|
"type": "boolean",
|
|
265
|
-
"default": true
|
|
2071
|
+
"default": true,
|
|
2072
|
+
"description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
2073
|
+
"example": true
|
|
266
2074
|
},
|
|
267
2075
|
"to": {
|
|
2076
|
+
"description": "The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
268
2077
|
"oneOf": [
|
|
269
2078
|
{
|
|
270
2079
|
"type": "string",
|
|
271
|
-
"format": "date-time"
|
|
2080
|
+
"format": "date-time",
|
|
2081
|
+
"example": "2007-01-02T00:00:00Z"
|
|
272
2082
|
},
|
|
273
2083
|
{
|
|
274
|
-
"type": "integer"
|
|
2084
|
+
"type": "integer",
|
|
2085
|
+
"example": 2
|
|
275
2086
|
},
|
|
276
2087
|
{
|
|
277
|
-
"type": "number"
|
|
2088
|
+
"type": "number",
|
|
2089
|
+
"example": 2
|
|
278
2090
|
}
|
|
279
2091
|
]
|
|
280
2092
|
},
|
|
281
2093
|
"toInclusive": {
|
|
282
2094
|
"type": "boolean",
|
|
283
|
-
"default": true
|
|
2095
|
+
"default": true,
|
|
2096
|
+
"description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
|
|
2097
|
+
"example": true
|
|
284
2098
|
}
|
|
285
2099
|
},
|
|
286
2100
|
"required": [
|
|
@@ -290,16 +2104,26 @@
|
|
|
290
2104
|
"TermFilter": {
|
|
291
2105
|
"type": "object",
|
|
292
2106
|
"additionalProperties": false,
|
|
2107
|
+
"description": "Allows you to restrict a search result to hits that match exactly one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criteria you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.",
|
|
2108
|
+
"example": {
|
|
2109
|
+
"field": "id",
|
|
2110
|
+
"operator": "is",
|
|
2111
|
+
"values": [
|
|
2112
|
+
"myId"
|
|
2113
|
+
]
|
|
2114
|
+
},
|
|
293
2115
|
"properties": {
|
|
294
2116
|
"field": {
|
|
295
2117
|
"allOf": [
|
|
296
2118
|
{
|
|
297
2119
|
"$ref": "#/components/schemas/Field"
|
|
298
2120
|
}
|
|
299
|
-
]
|
|
2121
|
+
],
|
|
2122
|
+
"description": "The filter field."
|
|
300
2123
|
},
|
|
301
2124
|
"operator": {
|
|
302
2125
|
"type": "string",
|
|
2126
|
+
"description": "The operator used to compare the field's values with the given values.",
|
|
303
2127
|
"enum": [
|
|
304
2128
|
"is",
|
|
305
2129
|
"one_of",
|
|
@@ -309,12 +2133,15 @@
|
|
|
309
2133
|
"greater",
|
|
310
2134
|
"not_in",
|
|
311
2135
|
"neq"
|
|
312
|
-
]
|
|
2136
|
+
],
|
|
2137
|
+
"example": "is"
|
|
313
2138
|
},
|
|
314
2139
|
"values": {
|
|
315
2140
|
"type": "array",
|
|
2141
|
+
"description": "The filter values.",
|
|
316
2142
|
"items": {
|
|
317
|
-
"type": "string"
|
|
2143
|
+
"type": "string",
|
|
2144
|
+
"example": "myId"
|
|
318
2145
|
}
|
|
319
2146
|
}
|
|
320
2147
|
},
|
|
@@ -326,6 +2153,26 @@
|
|
|
326
2153
|
"FilteredQuery": {
|
|
327
2154
|
"type": "object",
|
|
328
2155
|
"additionalProperties": false,
|
|
2156
|
+
"description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
|
|
2157
|
+
"example": {
|
|
2158
|
+
"query": {
|
|
2159
|
+
"textQuery": {
|
|
2160
|
+
"fields": [
|
|
2161
|
+
"couponId"
|
|
2162
|
+
],
|
|
2163
|
+
"searchPhrase": "disabled"
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
"filter": {
|
|
2167
|
+
"termFilter": {
|
|
2168
|
+
"field": "enabled",
|
|
2169
|
+
"operator": "is",
|
|
2170
|
+
"values": [
|
|
2171
|
+
false
|
|
2172
|
+
]
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
329
2176
|
"properties": {
|
|
330
2177
|
"filter": {
|
|
331
2178
|
"$ref": "#/components/schemas/Filter"
|
|
@@ -340,14 +2187,62 @@
|
|
|
340
2187
|
]
|
|
341
2188
|
},
|
|
342
2189
|
"MatchAllQuery": {
|
|
343
|
-
"type": "object"
|
|
2190
|
+
"type": "object",
|
|
2191
|
+
"description": "Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints."
|
|
344
2192
|
},
|
|
345
2193
|
"NestedQuery": {
|
|
346
2194
|
"type": "object",
|
|
347
2195
|
"additionalProperties": false,
|
|
2196
|
+
"description": "Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints. \n\nA `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.\n",
|
|
2197
|
+
"example": {
|
|
2198
|
+
"path": "order.shippingAddresses",
|
|
2199
|
+
"query": {
|
|
2200
|
+
"boolQuery": {
|
|
2201
|
+
"must": [
|
|
2202
|
+
{
|
|
2203
|
+
"boolQuery": {
|
|
2204
|
+
"must": [
|
|
2205
|
+
{
|
|
2206
|
+
"termQuery": {
|
|
2207
|
+
"fields": [
|
|
2208
|
+
"order.shippingAddresses.firstName"
|
|
2209
|
+
],
|
|
2210
|
+
"operator": "is",
|
|
2211
|
+
"values": [
|
|
2212
|
+
"John"
|
|
2213
|
+
]
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
]
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"boolQuery": {
|
|
2221
|
+
"must": [
|
|
2222
|
+
{
|
|
2223
|
+
"termQuery": {
|
|
2224
|
+
"fields": [
|
|
2225
|
+
"order.shippingAddresses.lastName"
|
|
2226
|
+
],
|
|
2227
|
+
"operator": "is",
|
|
2228
|
+
"values": [
|
|
2229
|
+
"Doe"
|
|
2230
|
+
]
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
]
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
]
|
|
2237
|
+
}
|
|
2238
|
+
},
|
|
2239
|
+
"scoreMode": "avg"
|
|
2240
|
+
},
|
|
348
2241
|
"properties": {
|
|
349
2242
|
"path": {
|
|
350
2243
|
"type": "string",
|
|
2244
|
+
"description": "The path to the nested document.",
|
|
2245
|
+
"example": "order.shippingAddresses",
|
|
351
2246
|
"maxLength": 2048
|
|
352
2247
|
},
|
|
353
2248
|
"query": {
|
|
@@ -355,12 +2250,14 @@
|
|
|
355
2250
|
},
|
|
356
2251
|
"scoreMode": {
|
|
357
2252
|
"type": "string",
|
|
2253
|
+
"description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
|
|
358
2254
|
"enum": [
|
|
359
2255
|
"avg",
|
|
360
2256
|
"total",
|
|
361
2257
|
"max",
|
|
362
2258
|
"none"
|
|
363
|
-
]
|
|
2259
|
+
],
|
|
2260
|
+
"example": "avg"
|
|
364
2261
|
}
|
|
365
2262
|
},
|
|
366
2263
|
"required": [
|
|
@@ -370,9 +2267,11 @@
|
|
|
370
2267
|
},
|
|
371
2268
|
"TermQuery": {
|
|
372
2269
|
"type": "object",
|
|
2270
|
+
"description": "A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.\n\n**Limitations:**\n\n* The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.\n* A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.",
|
|
373
2271
|
"properties": {
|
|
374
2272
|
"fields": {
|
|
375
2273
|
"type": "array",
|
|
2274
|
+
"description": "The document fields that the values are matched against, combined with the operator.",
|
|
376
2275
|
"items": {
|
|
377
2276
|
"$ref": "#/components/schemas/Field"
|
|
378
2277
|
},
|
|
@@ -380,6 +2279,7 @@
|
|
|
380
2279
|
},
|
|
381
2280
|
"operator": {
|
|
382
2281
|
"type": "string",
|
|
2282
|
+
"description": "Returns the operator to use for the term query.",
|
|
383
2283
|
"enum": [
|
|
384
2284
|
"is",
|
|
385
2285
|
"one_of",
|
|
@@ -389,23 +2289,30 @@
|
|
|
389
2289
|
"greater",
|
|
390
2290
|
"not_in",
|
|
391
2291
|
"neq"
|
|
392
|
-
]
|
|
2292
|
+
],
|
|
2293
|
+
"example": "is"
|
|
393
2294
|
},
|
|
394
2295
|
"values": {
|
|
395
2296
|
"type": "array",
|
|
2297
|
+
"description": "The values that the fields are compared against, combined with the operator.",
|
|
396
2298
|
"items": {
|
|
2299
|
+
"example": "myCouponId",
|
|
397
2300
|
"oneOf": [
|
|
398
2301
|
{
|
|
399
|
-
"type": "string"
|
|
2302
|
+
"type": "string",
|
|
2303
|
+
"example": "myCouponId"
|
|
400
2304
|
},
|
|
401
2305
|
{
|
|
402
|
-
"type": "number"
|
|
2306
|
+
"type": "number",
|
|
2307
|
+
"example": 1
|
|
403
2308
|
},
|
|
404
2309
|
{
|
|
405
|
-
"type": "boolean"
|
|
2310
|
+
"type": "boolean",
|
|
2311
|
+
"example": true
|
|
406
2312
|
},
|
|
407
2313
|
{
|
|
408
|
-
"type": "integer"
|
|
2314
|
+
"type": "integer",
|
|
2315
|
+
"example": 1
|
|
409
2316
|
}
|
|
410
2317
|
]
|
|
411
2318
|
}
|
|
@@ -419,16 +2326,26 @@
|
|
|
419
2326
|
"TextQuery": {
|
|
420
2327
|
"type": "object",
|
|
421
2328
|
"additionalProperties": false,
|
|
2329
|
+
"description": "A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.",
|
|
2330
|
+
"example": {
|
|
2331
|
+
"fields": [
|
|
2332
|
+
"couponId"
|
|
2333
|
+
],
|
|
2334
|
+
"searchPhrase": "limit"
|
|
2335
|
+
},
|
|
422
2336
|
"properties": {
|
|
423
2337
|
"fields": {
|
|
424
2338
|
"type": "array",
|
|
2339
|
+
"description": "The document fields that the search phrase matches against.",
|
|
425
2340
|
"items": {
|
|
426
2341
|
"$ref": "#/components/schemas/Field"
|
|
427
2342
|
},
|
|
428
2343
|
"minItems": 1
|
|
429
2344
|
},
|
|
430
2345
|
"searchPhrase": {
|
|
431
|
-
"type": "string"
|
|
2346
|
+
"type": "string",
|
|
2347
|
+
"description": "A search phrase, which can include multiple terms separated by spaces.",
|
|
2348
|
+
"example": "campaign summer"
|
|
432
2349
|
}
|
|
433
2350
|
},
|
|
434
2351
|
"required": [
|
|
@@ -436,46 +2353,45 @@
|
|
|
436
2353
|
"searchPhrase"
|
|
437
2354
|
]
|
|
438
2355
|
},
|
|
439
|
-
"String256": {
|
|
440
|
-
"type": "string",
|
|
441
|
-
"maxLength": 256
|
|
442
|
-
},
|
|
443
2356
|
"Sort": {
|
|
444
2357
|
"type": "object",
|
|
445
2358
|
"additionalProperties": false,
|
|
2359
|
+
"description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
|
|
2360
|
+
"example": {
|
|
2361
|
+
"field": "couponId",
|
|
2362
|
+
"sortOrder": "desc"
|
|
2363
|
+
},
|
|
446
2364
|
"properties": {
|
|
447
2365
|
"field": {
|
|
448
|
-
"
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
]
|
|
2366
|
+
"type": "string",
|
|
2367
|
+
"description": "The name of the field to sort on.",
|
|
2368
|
+
"example": "couponId",
|
|
2369
|
+
"maxLength": 256
|
|
453
2370
|
},
|
|
454
2371
|
"sortOrder": {
|
|
455
2372
|
"type": "string",
|
|
456
2373
|
"default": "asc",
|
|
2374
|
+
"description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
|
|
457
2375
|
"enum": [
|
|
458
2376
|
"asc",
|
|
459
2377
|
"desc"
|
|
460
|
-
]
|
|
2378
|
+
],
|
|
2379
|
+
"example": "asc"
|
|
461
2380
|
}
|
|
462
2381
|
},
|
|
463
2382
|
"required": [
|
|
464
2383
|
"field"
|
|
465
2384
|
]
|
|
466
2385
|
},
|
|
467
|
-
"Offset": {
|
|
468
|
-
"type": "integer",
|
|
469
|
-
"format": "int32",
|
|
470
|
-
"default": 0,
|
|
471
|
-
"minimum": 0
|
|
472
|
-
},
|
|
473
2386
|
"SearchRequest": {
|
|
474
2387
|
"type": "object",
|
|
2388
|
+
"description": "Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.",
|
|
475
2389
|
"properties": {
|
|
476
2390
|
"limit": {
|
|
477
2391
|
"type": "integer",
|
|
478
2392
|
"format": "int32",
|
|
2393
|
+
"description": "Maximum records to retrieve per request, not to exceed 200.",
|
|
2394
|
+
"example": 10,
|
|
479
2395
|
"maximum": 200,
|
|
480
2396
|
"minimum": 1
|
|
481
2397
|
},
|
|
@@ -484,6 +2400,7 @@
|
|
|
484
2400
|
},
|
|
485
2401
|
"sorts": {
|
|
486
2402
|
"type": "array",
|
|
2403
|
+
"description": "The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.",
|
|
487
2404
|
"items": {
|
|
488
2405
|
"$ref": "#/components/schemas/Sort"
|
|
489
2406
|
}
|
|
@@ -503,47 +2420,22 @@
|
|
|
503
2420
|
"$ref": "#/components/schemas/SearchRequest"
|
|
504
2421
|
}
|
|
505
2422
|
],
|
|
506
|
-
"
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
"type": "object",
|
|
518
|
-
"properties": {
|
|
519
|
-
"limit": {
|
|
520
|
-
"type": "integer",
|
|
521
|
-
"format": "int32"
|
|
2423
|
+
"description": "Document representing a search request for price books. The query is a potentially complex set of expressions.\n\nSearchable attributes:\n- id (String)\n- displayName (String)\n- description (String)\n- currencyCode (String)\n- parent (String)\n- validFrom (DateTime)\n- validTo (DateTime)\n- online (Boolean)\n- siteId (String)\n\nSortable attributes:\n- id (String)\n- displayName (String)\n- description (String)\n- currencyCode (String)\n- parent (String)\n- validFrom (DateTime)\n- validTo (DateTime)\n- online (Boolean)\n",
|
|
2424
|
+
"example": {
|
|
2425
|
+
"limit": 2,
|
|
2426
|
+
"query": {
|
|
2427
|
+
"textQuery": {
|
|
2428
|
+
"fields": [
|
|
2429
|
+
"id",
|
|
2430
|
+
"description"
|
|
2431
|
+
],
|
|
2432
|
+
"searchPhrase": "USD"
|
|
2433
|
+
}
|
|
522
2434
|
},
|
|
523
|
-
"
|
|
524
|
-
"$ref": "#/components/schemas/Total"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
"required": [
|
|
528
|
-
"limit",
|
|
529
|
-
"total"
|
|
530
|
-
]
|
|
531
|
-
},
|
|
532
|
-
"PaginatedResultBase": {
|
|
533
|
-
"allOf": [
|
|
534
|
-
{
|
|
535
|
-
"$ref": "#/components/schemas/ResultBase"
|
|
536
|
-
}
|
|
537
|
-
],
|
|
538
|
-
"properties": {
|
|
539
|
-
"offset": {
|
|
540
|
-
"$ref": "#/components/schemas/Offset"
|
|
541
|
-
}
|
|
2435
|
+
"offset": 0
|
|
542
2436
|
},
|
|
543
2437
|
"required": [
|
|
544
|
-
"
|
|
545
|
-
"offset",
|
|
546
|
-
"total"
|
|
2438
|
+
"query"
|
|
547
2439
|
]
|
|
548
2440
|
},
|
|
549
2441
|
"PaginatedSearchResult": {
|
|
@@ -553,18 +2445,67 @@
|
|
|
553
2445
|
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
554
2446
|
}
|
|
555
2447
|
],
|
|
2448
|
+
"description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
|
|
2449
|
+
"example": {
|
|
2450
|
+
"limit": 1,
|
|
2451
|
+
"hits": [
|
|
2452
|
+
{
|
|
2453
|
+
"couponId": "coupon1",
|
|
2454
|
+
"creationDate": "2019-10-20T12:00:00Z",
|
|
2455
|
+
"description": "This coupon is used to give 10% off stuff.",
|
|
2456
|
+
"enabled": false,
|
|
2457
|
+
"exportedCodeCount": 0,
|
|
2458
|
+
"lastModified": "2019-10-30T04:23:59Z",
|
|
2459
|
+
"redemptionCount": 3,
|
|
2460
|
+
"redemptionLimits": {
|
|
2461
|
+
"limitPerCode": 1,
|
|
2462
|
+
"limitPerCustomer": 1,
|
|
2463
|
+
"limitPerTimeFrame": {
|
|
2464
|
+
"limit": 2,
|
|
2465
|
+
"redemptionTimeFrame": 24
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
"singleCode": "MyCode",
|
|
2469
|
+
"systemCodesConfig": {
|
|
2470
|
+
"codePrefix": "SG",
|
|
2471
|
+
"numberOfCodes": 500000
|
|
2472
|
+
},
|
|
2473
|
+
"totalCodesCount": 50,
|
|
2474
|
+
"type": "single_code"
|
|
2475
|
+
}
|
|
2476
|
+
],
|
|
2477
|
+
"query": {
|
|
2478
|
+
"textQuery": {
|
|
2479
|
+
"fields": [
|
|
2480
|
+
"id",
|
|
2481
|
+
"description"
|
|
2482
|
+
],
|
|
2483
|
+
"searchPhrase": "stuff"
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
"sorts": [
|
|
2487
|
+
{
|
|
2488
|
+
"field": "couponId",
|
|
2489
|
+
"sortOrder": "desc"
|
|
2490
|
+
}
|
|
2491
|
+
],
|
|
2492
|
+
"offset": 2,
|
|
2493
|
+
"total": 8
|
|
2494
|
+
},
|
|
556
2495
|
"properties": {
|
|
557
2496
|
"query": {
|
|
558
2497
|
"$ref": "#/components/schemas/Query"
|
|
559
2498
|
},
|
|
560
2499
|
"sorts": {
|
|
561
2500
|
"type": "array",
|
|
2501
|
+
"description": "The sorting that was applied to the result.",
|
|
562
2502
|
"items": {
|
|
563
2503
|
"$ref": "#/components/schemas/Sort"
|
|
564
2504
|
}
|
|
565
2505
|
},
|
|
566
2506
|
"hits": {
|
|
567
2507
|
"type": "array",
|
|
2508
|
+
"description": "The sorted array of search hits. Can be empty.",
|
|
568
2509
|
"items": {
|
|
569
2510
|
"type": "object"
|
|
570
2511
|
}
|
|
@@ -574,163 +2515,1038 @@
|
|
|
574
2515
|
"query"
|
|
575
2516
|
]
|
|
576
2517
|
},
|
|
577
|
-
"
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
"
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
"$ref": "#/components/schemas/SiteId"
|
|
598
|
-
}
|
|
599
|
-
]
|
|
2518
|
+
"PriceBookSearchResult": {
|
|
2519
|
+
"additionalProperties": false,
|
|
2520
|
+
"allOf": [
|
|
2521
|
+
{
|
|
2522
|
+
"$ref": "#/components/schemas/PaginatedSearchResult"
|
|
2523
|
+
}
|
|
2524
|
+
],
|
|
2525
|
+
"description": "Document representing a price book search result.",
|
|
2526
|
+
"example": {
|
|
2527
|
+
"limit": 2,
|
|
2528
|
+
"offset": 0,
|
|
2529
|
+
"total": 10,
|
|
2530
|
+
"query": {
|
|
2531
|
+
"textQuery": {
|
|
2532
|
+
"fields": [
|
|
2533
|
+
"id",
|
|
2534
|
+
"displayName"
|
|
2535
|
+
],
|
|
2536
|
+
"searchPhrase": "USD"
|
|
2537
|
+
}
|
|
600
2538
|
},
|
|
601
|
-
"
|
|
602
|
-
|
|
603
|
-
|
|
2539
|
+
"hits": [
|
|
2540
|
+
{
|
|
2541
|
+
"id": "USD-list-prices",
|
|
2542
|
+
"displayName": "USD List Prices",
|
|
2543
|
+
"currencyCode": "USD",
|
|
2544
|
+
"online": true
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
"id": "USD-sale-prices",
|
|
2548
|
+
"displayName": "USD Sale Prices",
|
|
2549
|
+
"currencyCode": "USD",
|
|
2550
|
+
"online": true
|
|
2551
|
+
}
|
|
2552
|
+
]
|
|
2553
|
+
},
|
|
2554
|
+
"properties": {
|
|
2555
|
+
"hits": {
|
|
2556
|
+
"type": "array",
|
|
2557
|
+
"description": "The sorted array of price book search hits. The array can be empty if there are no hits.",
|
|
2558
|
+
"items": {
|
|
2559
|
+
"$ref": "#/components/schemas/PriceBook"
|
|
2560
|
+
},
|
|
2561
|
+
"maxItems": 200
|
|
604
2562
|
}
|
|
605
2563
|
},
|
|
606
2564
|
"required": [
|
|
607
|
-
"
|
|
2565
|
+
"hits"
|
|
608
2566
|
]
|
|
609
2567
|
},
|
|
610
|
-
"
|
|
611
|
-
"
|
|
2568
|
+
"MalformedSearchParameterErrorResponse": {
|
|
2569
|
+
"allOf": [
|
|
2570
|
+
{
|
|
2571
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2572
|
+
}
|
|
2573
|
+
],
|
|
2574
|
+
"description": "Returned when the search query is malformed or invalid."
|
|
2575
|
+
},
|
|
2576
|
+
"UnqueryableFieldErrorResponse": {
|
|
2577
|
+
"allOf": [
|
|
2578
|
+
{
|
|
2579
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2580
|
+
}
|
|
2581
|
+
],
|
|
2582
|
+
"description": "Returned when a search query uses a field that is not searchable.",
|
|
612
2583
|
"properties": {
|
|
613
|
-
"
|
|
614
|
-
"allOf": [
|
|
615
|
-
{
|
|
616
|
-
"$ref": "#/components/schemas/PriceBookId"
|
|
617
|
-
}
|
|
618
|
-
]
|
|
619
|
-
},
|
|
620
|
-
"displayName": {
|
|
2584
|
+
"field": {
|
|
621
2585
|
"type": "string",
|
|
2586
|
+
"description": "The field name that is not searchable.",
|
|
2587
|
+
"example": "invalid_field",
|
|
622
2588
|
"maxLength": 256
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
"
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
"parent": {
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
"FieldNotSortableErrorResponse": {
|
|
2593
|
+
"allOf": [
|
|
2594
|
+
{
|
|
2595
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2596
|
+
}
|
|
2597
|
+
],
|
|
2598
|
+
"description": "Returned when a search query sorts on a field that is not sortable.",
|
|
2599
|
+
"properties": {
|
|
2600
|
+
"field": {
|
|
636
2601
|
"type": "string",
|
|
2602
|
+
"description": "The field name that is not sortable.",
|
|
2603
|
+
"example": "invalid_sort",
|
|
637
2604
|
"maxLength": 256
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
},
|
|
2609
|
+
"responses": {
|
|
2610
|
+
"400BadRequest_GetPriceBooks": {
|
|
2611
|
+
"description": "Bad Request. Returned when a specified parameter value is invalid.",
|
|
2612
|
+
"content": {
|
|
2613
|
+
"application/problem+json": {
|
|
2614
|
+
"schema": {
|
|
2615
|
+
"$ref": "#/components/schemas/InvalidQueryParameterErrorResponse"
|
|
2616
|
+
},
|
|
2617
|
+
"examples": {
|
|
2618
|
+
"InvalidQueryParameterErrorResponseExample": {
|
|
2619
|
+
"$ref": "#/components/examples/InvalidQueryParameterErrorResponseExample"
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
"401unauthorized": {
|
|
2626
|
+
"description": "Your access token is invalid or expired and can’t be used to identify a user.",
|
|
2627
|
+
"content": {
|
|
2628
|
+
"application/problem+json": {
|
|
2629
|
+
"schema": {
|
|
2630
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2631
|
+
},
|
|
2632
|
+
"examples": {
|
|
2633
|
+
"UnauthorizedExample": {
|
|
2634
|
+
"$ref": "#/components/examples/UnauthorizedExample"
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
},
|
|
2640
|
+
"403forbidden": {
|
|
2641
|
+
"description": "Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.",
|
|
2642
|
+
"content": {
|
|
2643
|
+
"application/problem+json": {
|
|
2644
|
+
"schema": {
|
|
2645
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2646
|
+
},
|
|
2647
|
+
"examples": {
|
|
2648
|
+
"ForbiddenExample": {
|
|
2649
|
+
"$ref": "#/components/examples/ForbiddenExample"
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
},
|
|
2655
|
+
"404NotFound_PriceBook": {
|
|
2656
|
+
"description": "Not Found. The specified price book does not exist.",
|
|
2657
|
+
"content": {
|
|
2658
|
+
"application/problem+json": {
|
|
2659
|
+
"schema": {
|
|
2660
|
+
"$ref": "#/components/schemas/PriceBookNotFoundErrorResponse"
|
|
2661
|
+
},
|
|
2662
|
+
"examples": {
|
|
2663
|
+
"PriceBookNotFoundErrorResponseExample": {
|
|
2664
|
+
"$ref": "#/components/examples/PriceBookNotFoundErrorResponseExample"
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
"400BadRequest_CreateOrUpdatePriceBook": {
|
|
2671
|
+
"description": "Bad Request. Returned when attempting to change an immutable field or create a parent cycle.",
|
|
2672
|
+
"content": {
|
|
2673
|
+
"application/problem+json": {
|
|
2674
|
+
"schema": {
|
|
2675
|
+
"oneOf": [
|
|
2676
|
+
{
|
|
2677
|
+
"$ref": "#/components/schemas/CurrencyImmutableErrorResponse"
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
"$ref": "#/components/schemas/ParentCycleDetectedErrorResponse"
|
|
2681
|
+
}
|
|
2682
|
+
]
|
|
2683
|
+
},
|
|
2684
|
+
"examples": {
|
|
2685
|
+
"CurrencyImmutableErrorResponseExample": {
|
|
2686
|
+
"$ref": "#/components/examples/CurrencyImmutableErrorResponseExample"
|
|
2687
|
+
},
|
|
2688
|
+
"ParentCycleDetectedErrorResponseExample": {
|
|
2689
|
+
"$ref": "#/components/examples/ParentCycleDetectedErrorResponseExample"
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
},
|
|
2695
|
+
"404NotFound_GetPriceBookEntry": {
|
|
2696
|
+
"description": "Not Found. The specified price book entry or price book does not exist.",
|
|
2697
|
+
"content": {
|
|
2698
|
+
"application/problem+json": {
|
|
2699
|
+
"schema": {
|
|
2700
|
+
"oneOf": [
|
|
2701
|
+
{
|
|
2702
|
+
"$ref": "#/components/schemas/PriceBookEntryNotFoundErrorResponse"
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"$ref": "#/components/schemas/PriceBookNotFoundErrorResponse"
|
|
2706
|
+
}
|
|
2707
|
+
]
|
|
2708
|
+
},
|
|
2709
|
+
"examples": {
|
|
2710
|
+
"PriceBookEntryNotFoundErrorResponseExample": {
|
|
2711
|
+
"$ref": "#/components/examples/PriceBookEntryNotFoundErrorResponseExample"
|
|
2712
|
+
},
|
|
2713
|
+
"PriceBookNotFoundErrorResponseExample": {
|
|
2714
|
+
"$ref": "#/components/examples/PriceBookNotFoundErrorResponseExample"
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
},
|
|
2720
|
+
"400BadRequest_PriceBookEntry": {
|
|
2721
|
+
"description": "Bad Request. Returned when the request contains invalid data. Beyond generic schema validation, the following business-logic\nvalidations return distinct error types: an invalid time range (validTo before validFrom), a tier currency that does not\nmatch the price book currency, and duplicate tier quantities within a single price table.\n",
|
|
2722
|
+
"content": {
|
|
2723
|
+
"application/problem+json": {
|
|
2724
|
+
"schema": {
|
|
2725
|
+
"oneOf": [
|
|
2726
|
+
{
|
|
2727
|
+
"$ref": "#/components/schemas/ValidationErrorResponse"
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"$ref": "#/components/schemas/InvalidTimeRangeErrorResponse"
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
"$ref": "#/components/schemas/TierCurrencyMismatchErrorResponse"
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
"$ref": "#/components/schemas/DuplicateTierQuantityErrorResponse"
|
|
2737
|
+
}
|
|
2738
|
+
]
|
|
2739
|
+
},
|
|
2740
|
+
"examples": {
|
|
2741
|
+
"ValidationErrorResponseExample": {
|
|
2742
|
+
"$ref": "#/components/examples/ValidationErrorResponseExample"
|
|
2743
|
+
},
|
|
2744
|
+
"InvalidTimeRangeErrorResponseExample": {
|
|
2745
|
+
"$ref": "#/components/examples/InvalidTimeRangeErrorResponseExample"
|
|
2746
|
+
},
|
|
2747
|
+
"TierCurrencyMismatchErrorResponseExample": {
|
|
2748
|
+
"$ref": "#/components/examples/TierCurrencyMismatchErrorResponseExample"
|
|
2749
|
+
},
|
|
2750
|
+
"DuplicateTierQuantityErrorResponseExample": {
|
|
2751
|
+
"$ref": "#/components/examples/DuplicateTierQuantityErrorResponseExample"
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
},
|
|
2757
|
+
"404NotFound_CreateOrUpdatePriceBookEntry": {
|
|
2758
|
+
"description": "Not Found. The specified price book or product does not exist.",
|
|
2759
|
+
"content": {
|
|
2760
|
+
"application/problem+json": {
|
|
2761
|
+
"schema": {
|
|
2762
|
+
"oneOf": [
|
|
2763
|
+
{
|
|
2764
|
+
"$ref": "#/components/schemas/PriceBookNotFoundErrorResponse"
|
|
2765
|
+
},
|
|
2766
|
+
{
|
|
2767
|
+
"$ref": "#/components/schemas/ProductNotFoundErrorResponse"
|
|
2768
|
+
}
|
|
2769
|
+
]
|
|
2770
|
+
},
|
|
2771
|
+
"examples": {
|
|
2772
|
+
"PriceBookNotFoundErrorResponseExample": {
|
|
2773
|
+
"$ref": "#/components/examples/PriceBookNotFoundErrorResponseExample"
|
|
2774
|
+
},
|
|
2775
|
+
"ProductNotFoundErrorResponseExample": {
|
|
2776
|
+
"$ref": "#/components/examples/ProductNotFoundErrorResponseExample"
|
|
2777
|
+
}
|
|
654
2778
|
}
|
|
655
|
-
},
|
|
656
|
-
"creationDate": {
|
|
657
|
-
"type": "string",
|
|
658
|
-
"format": "date-time"
|
|
659
|
-
},
|
|
660
|
-
"lastModified": {
|
|
661
|
-
"type": "string",
|
|
662
|
-
"format": "date-time"
|
|
663
2779
|
}
|
|
664
|
-
}
|
|
665
|
-
"required": [
|
|
666
|
-
"currencyCode",
|
|
667
|
-
"id"
|
|
668
|
-
]
|
|
2780
|
+
}
|
|
669
2781
|
},
|
|
670
|
-
"
|
|
671
|
-
"
|
|
672
|
-
"
|
|
673
|
-
{
|
|
674
|
-
"
|
|
2782
|
+
"422UnprocessableContent_PriceBookEntry": {
|
|
2783
|
+
"description": "Unprocessable Entity. Price book entry write operations are not supported for a `feed_based` price book, whose entries are sourced from an external feed pipeline. The price book container itself remains editable.",
|
|
2784
|
+
"content": {
|
|
2785
|
+
"application/problem+json": {
|
|
2786
|
+
"schema": {
|
|
2787
|
+
"$ref": "#/components/schemas/FeedBasedPriceBookNotSupportedErrorResponse"
|
|
2788
|
+
},
|
|
2789
|
+
"examples": {
|
|
2790
|
+
"FeedBasedPriceBookNotSupportedErrorResponseExample": {
|
|
2791
|
+
"$ref": "#/components/examples/FeedBasedPriceBookNotSupportedErrorResponseExample"
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
675
2794
|
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
2795
|
+
}
|
|
2796
|
+
},
|
|
2797
|
+
"404NotFound_SiteAssignment": {
|
|
2798
|
+
"description": "Not Found. The specified price book or site does not exist.",
|
|
2799
|
+
"content": {
|
|
2800
|
+
"application/problem+json": {
|
|
2801
|
+
"schema": {
|
|
2802
|
+
"oneOf": [
|
|
2803
|
+
{
|
|
2804
|
+
"$ref": "#/components/schemas/PriceBookNotFoundErrorResponse"
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
"$ref": "#/components/schemas/SiteNotFoundErrorResponse"
|
|
2808
|
+
}
|
|
2809
|
+
]
|
|
2810
|
+
},
|
|
2811
|
+
"examples": {
|
|
2812
|
+
"PriceBookNotFoundErrorResponseExample": {
|
|
2813
|
+
"$ref": "#/components/examples/PriceBookNotFoundErrorResponseExample"
|
|
2814
|
+
},
|
|
2815
|
+
"SiteNotFoundErrorResponseExample": {
|
|
2816
|
+
"$ref": "#/components/examples/SiteNotFoundErrorResponseExample"
|
|
2817
|
+
}
|
|
682
2818
|
}
|
|
683
2819
|
}
|
|
684
|
-
}
|
|
685
|
-
"required": [
|
|
686
|
-
"hits",
|
|
687
|
-
"limit",
|
|
688
|
-
"offset",
|
|
689
|
-
"total"
|
|
690
|
-
]
|
|
2820
|
+
}
|
|
691
2821
|
},
|
|
692
|
-
"
|
|
693
|
-
"
|
|
694
|
-
"
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
"
|
|
2822
|
+
"400BadRequest_SearchPriceBooks": {
|
|
2823
|
+
"description": "Bad Request. Returned when the search query is malformed or contains invalid fields.",
|
|
2824
|
+
"content": {
|
|
2825
|
+
"application/problem+json": {
|
|
2826
|
+
"schema": {
|
|
2827
|
+
"oneOf": [
|
|
2828
|
+
{
|
|
2829
|
+
"$ref": "#/components/schemas/MalformedSearchParameterErrorResponse"
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
"$ref": "#/components/schemas/UnqueryableFieldErrorResponse"
|
|
2833
|
+
},
|
|
2834
|
+
{
|
|
2835
|
+
"$ref": "#/components/schemas/FieldNotSortableErrorResponse"
|
|
2836
|
+
}
|
|
2837
|
+
]
|
|
2838
|
+
},
|
|
2839
|
+
"examples": {
|
|
2840
|
+
"MalformedSearchParameterErrorResponseExample": {
|
|
2841
|
+
"$ref": "#/components/examples/MalformedSearchParameterErrorResponseExample"
|
|
2842
|
+
},
|
|
2843
|
+
"UnqueryableFieldErrorResponseExample": {
|
|
2844
|
+
"$ref": "#/components/examples/UnqueryableFieldErrorResponseExample"
|
|
2845
|
+
},
|
|
2846
|
+
"FieldNotSortableErrorResponseExample": {
|
|
2847
|
+
"$ref": "#/components/examples/FieldNotSortableErrorResponseExample"
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
710
2850
|
}
|
|
711
|
-
}
|
|
712
|
-
"required": [
|
|
713
|
-
"detail",
|
|
714
|
-
"title",
|
|
715
|
-
"type"
|
|
716
|
-
]
|
|
2851
|
+
}
|
|
717
2852
|
}
|
|
718
2853
|
},
|
|
719
2854
|
"parameters": {
|
|
720
2855
|
"organizationId": {
|
|
721
2856
|
"name": "organizationId",
|
|
722
2857
|
"in": "path",
|
|
2858
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
723
2859
|
"required": true,
|
|
724
2860
|
"style": "simple",
|
|
725
2861
|
"explode": false,
|
|
726
2862
|
"schema": {
|
|
727
2863
|
"$ref": "#/components/schemas/OrganizationId"
|
|
2864
|
+
},
|
|
2865
|
+
"example": "f_ecom_zzxy_prd"
|
|
2866
|
+
},
|
|
2867
|
+
"priceBookId": {
|
|
2868
|
+
"name": "priceBookId",
|
|
2869
|
+
"in": "path",
|
|
2870
|
+
"description": "The price book ID.",
|
|
2871
|
+
"required": true,
|
|
2872
|
+
"style": "simple",
|
|
2873
|
+
"explode": false,
|
|
2874
|
+
"schema": {
|
|
2875
|
+
"$ref": "#/components/schemas/PriceBookId"
|
|
2876
|
+
}
|
|
2877
|
+
},
|
|
2878
|
+
"productId": {
|
|
2879
|
+
"name": "productId",
|
|
2880
|
+
"in": "path",
|
|
2881
|
+
"description": "The product ID.",
|
|
2882
|
+
"required": true,
|
|
2883
|
+
"style": "simple",
|
|
2884
|
+
"explode": false,
|
|
2885
|
+
"schema": {
|
|
2886
|
+
"$ref": "#/components/schemas/ProductId"
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"siteId": {
|
|
2890
|
+
"name": "siteId",
|
|
2891
|
+
"in": "path",
|
|
2892
|
+
"description": "The ID of the site the price book is assigned to.",
|
|
2893
|
+
"required": true,
|
|
2894
|
+
"style": "simple",
|
|
2895
|
+
"explode": false,
|
|
2896
|
+
"schema": {
|
|
2897
|
+
"$ref": "#/components/schemas/SiteId"
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
"examples": {
|
|
2902
|
+
"PriceBooksListResult": {
|
|
2903
|
+
"summary": "Successful price books list retrieval",
|
|
2904
|
+
"description": "Example of a paginated list of price books returned by GET /price-books.",
|
|
2905
|
+
"value": {
|
|
2906
|
+
"limit": 25,
|
|
2907
|
+
"offset": 0,
|
|
2908
|
+
"total": 2,
|
|
2909
|
+
"data": [
|
|
2910
|
+
{
|
|
2911
|
+
"id": "USD-list-prices",
|
|
2912
|
+
"displayName": "USD List Prices",
|
|
2913
|
+
"description": "Standard list prices for USD currency",
|
|
2914
|
+
"currencyCode": "USD",
|
|
2915
|
+
"online": true,
|
|
2916
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
2917
|
+
"lastModified": "2024-01-15T10:30:00.000Z"
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
"id": "EUR-list-prices",
|
|
2921
|
+
"displayName": "EUR List Prices",
|
|
2922
|
+
"currencyCode": "EUR",
|
|
2923
|
+
"online": true,
|
|
2924
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
2925
|
+
"lastModified": "2024-01-01T00:00:00.000Z"
|
|
2926
|
+
}
|
|
2927
|
+
]
|
|
2928
|
+
}
|
|
2929
|
+
},
|
|
2930
|
+
"UnauthorizedExample": {
|
|
2931
|
+
"value": {
|
|
2932
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
2933
|
+
"title": "Unauthorized",
|
|
2934
|
+
"detail": "Unauthorized request"
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
"ForbiddenExample": {
|
|
2938
|
+
"value": {
|
|
2939
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
|
|
2940
|
+
"title": "Forbidden",
|
|
2941
|
+
"detail": "Access to requested resource forbidden"
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
"PriceBookRetrieved": {
|
|
2945
|
+
"summary": "Price book retrieved successfully",
|
|
2946
|
+
"description": "Example of a price book returned by GET /price-books/{priceBookId}, including site assignments.",
|
|
2947
|
+
"value": {
|
|
2948
|
+
"id": "USD-list-prices",
|
|
2949
|
+
"displayName": "USD List Prices",
|
|
2950
|
+
"description": "Standard list prices for USD currency",
|
|
2951
|
+
"currencyCode": "USD",
|
|
2952
|
+
"type": "standard",
|
|
2953
|
+
"parent": "base-prices",
|
|
2954
|
+
"online": true,
|
|
2955
|
+
"validFrom": "2024-01-01T00:00:00.000Z",
|
|
2956
|
+
"validTo": "2024-12-31T23:59:59.999Z",
|
|
2957
|
+
"siteAssignments": [
|
|
2958
|
+
{
|
|
2959
|
+
"id": "RefArch",
|
|
2960
|
+
"displayName": "RefArch Store"
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
"id": "RefArchGlobal",
|
|
2964
|
+
"displayName": "RefArch Global"
|
|
2965
|
+
}
|
|
2966
|
+
],
|
|
2967
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
2968
|
+
"lastModified": "2024-01-15T10:30:00.000Z"
|
|
2969
|
+
}
|
|
2970
|
+
},
|
|
2971
|
+
"CreatePriceBookRequest": {
|
|
2972
|
+
"summary": "Create a new price book",
|
|
2973
|
+
"description": "Example request body for creating a new price book with a currency code and validity window. Currency is immutable after creation.",
|
|
2974
|
+
"value": {
|
|
2975
|
+
"id": "USD-list-prices",
|
|
2976
|
+
"displayName": "USD List Prices",
|
|
2977
|
+
"description": "Standard list prices for USD currency",
|
|
2978
|
+
"currencyCode": "USD",
|
|
2979
|
+
"online": true,
|
|
2980
|
+
"validFrom": "2024-01-01T00:00:00.000Z",
|
|
2981
|
+
"validTo": "2024-12-31T23:59:59.999Z"
|
|
2982
|
+
}
|
|
2983
|
+
},
|
|
2984
|
+
"PriceBookReplaced": {
|
|
2985
|
+
"summary": "Price book replaced successfully",
|
|
2986
|
+
"description": "Example of a price book returned after a successful replace via PUT /price-books/{priceBookId}, where the entire resource is replaced with the request body.",
|
|
2987
|
+
"value": {
|
|
2988
|
+
"id": "USD-list-prices",
|
|
2989
|
+
"displayName": "USD List Prices",
|
|
2990
|
+
"description": "Standard list prices for USD currency",
|
|
2991
|
+
"currencyCode": "USD",
|
|
2992
|
+
"type": "standard",
|
|
2993
|
+
"online": true,
|
|
2994
|
+
"validFrom": "2024-01-01T00:00:00.000Z",
|
|
2995
|
+
"validTo": "2024-12-31T23:59:59.999Z",
|
|
2996
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
2997
|
+
"lastModified": "2024-06-15T14:25:00.000Z"
|
|
2998
|
+
}
|
|
2999
|
+
},
|
|
3000
|
+
"PriceBookCreated": {
|
|
3001
|
+
"summary": "Price book created successfully",
|
|
3002
|
+
"description": "Example of a price book returned after successful creation via PUT /price-books/{priceBookId}.",
|
|
3003
|
+
"value": {
|
|
3004
|
+
"id": "USD-list-prices",
|
|
3005
|
+
"displayName": "USD List Prices",
|
|
3006
|
+
"description": "Standard list prices for USD currency",
|
|
3007
|
+
"currencyCode": "USD",
|
|
3008
|
+
"type": "standard",
|
|
3009
|
+
"online": true,
|
|
3010
|
+
"validFrom": "2024-01-01T00:00:00.000Z",
|
|
3011
|
+
"validTo": "2024-12-31T23:59:59.999Z",
|
|
3012
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3013
|
+
"lastModified": "2024-01-01T00:00:00.000Z"
|
|
3014
|
+
}
|
|
3015
|
+
},
|
|
3016
|
+
"UpdatePriceBookRequest": {
|
|
3017
|
+
"summary": "Update an existing price book",
|
|
3018
|
+
"description": "Example request body for updating an existing price book. The currencyCode must match the existing value; attempts to change it are rejected.",
|
|
3019
|
+
"value": {
|
|
3020
|
+
"id": "USD-list-prices",
|
|
3021
|
+
"currencyCode": "USD",
|
|
3022
|
+
"displayName": "USD List Prices - Updated",
|
|
3023
|
+
"description": "Updated standard list prices for USD currency",
|
|
3024
|
+
"online": false
|
|
3025
|
+
}
|
|
3026
|
+
},
|
|
3027
|
+
"PriceBookUpdated": {
|
|
3028
|
+
"summary": "Price book updated successfully",
|
|
3029
|
+
"description": "Example of a price book returned after a successful partial update via PATCH /price-books/{priceBookId}.",
|
|
3030
|
+
"value": {
|
|
3031
|
+
"id": "USD-list-prices",
|
|
3032
|
+
"displayName": "USD List Prices - Updated",
|
|
3033
|
+
"description": "Updated standard list prices for USD currency",
|
|
3034
|
+
"currencyCode": "USD",
|
|
3035
|
+
"online": false,
|
|
3036
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3037
|
+
"lastModified": "2024-06-15T14:25:00.000Z"
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
"PriceBookEntriesListResult": {
|
|
3041
|
+
"summary": "Successful price book entries list retrieval",
|
|
3042
|
+
"description": "Example of a paginated list of price book entries, showing both simple and tiered pricing.",
|
|
3043
|
+
"value": {
|
|
3044
|
+
"limit": 25,
|
|
3045
|
+
"offset": 0,
|
|
3046
|
+
"total": 150,
|
|
3047
|
+
"data": [
|
|
3048
|
+
{
|
|
3049
|
+
"productId": "product-001",
|
|
3050
|
+
"priceTables": [
|
|
3051
|
+
{
|
|
3052
|
+
"tiers": [
|
|
3053
|
+
{
|
|
3054
|
+
"type": "amount",
|
|
3055
|
+
"quantity": 1,
|
|
3056
|
+
"amount": {
|
|
3057
|
+
"currencyMnemonic": "USD",
|
|
3058
|
+
"value": 99.99
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
]
|
|
3062
|
+
}
|
|
3063
|
+
],
|
|
3064
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3065
|
+
"lastModified": "2024-01-01T00:00:00.000Z"
|
|
3066
|
+
},
|
|
3067
|
+
{
|
|
3068
|
+
"productId": "product-002",
|
|
3069
|
+
"priceTables": [
|
|
3070
|
+
{
|
|
3071
|
+
"validFrom": "2026-11-25T00:00:00.000Z",
|
|
3072
|
+
"validTo": "2026-11-28T23:59:59.999Z",
|
|
3073
|
+
"tiers": [
|
|
3074
|
+
{
|
|
3075
|
+
"type": "amount",
|
|
3076
|
+
"quantity": 1,
|
|
3077
|
+
"amount": {
|
|
3078
|
+
"currencyMnemonic": "USD",
|
|
3079
|
+
"value": 39.99
|
|
3080
|
+
}
|
|
3081
|
+
},
|
|
3082
|
+
{
|
|
3083
|
+
"type": "amount",
|
|
3084
|
+
"quantity": 10,
|
|
3085
|
+
"amount": {
|
|
3086
|
+
"currencyMnemonic": "USD",
|
|
3087
|
+
"value": 34.99
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
]
|
|
3091
|
+
}
|
|
3092
|
+
],
|
|
3093
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3094
|
+
"lastModified": "2024-02-15T10:00:00.000Z"
|
|
3095
|
+
}
|
|
3096
|
+
]
|
|
3097
|
+
}
|
|
3098
|
+
},
|
|
3099
|
+
"PriceBookEntryRetrieved": {
|
|
3100
|
+
"summary": "Price book entry retrieved successfully",
|
|
3101
|
+
"description": "Example of a price book entry returned by GET /price-books/{priceBookId}/price-book-entries/{productId}.",
|
|
3102
|
+
"value": {
|
|
3103
|
+
"productId": "product-001",
|
|
3104
|
+
"priceTables": [
|
|
3105
|
+
{
|
|
3106
|
+
"tiers": [
|
|
3107
|
+
{
|
|
3108
|
+
"type": "amount",
|
|
3109
|
+
"quantity": 1,
|
|
3110
|
+
"amount": {
|
|
3111
|
+
"currencyMnemonic": "USD",
|
|
3112
|
+
"value": 99.99
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
]
|
|
3116
|
+
}
|
|
3117
|
+
],
|
|
3118
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3119
|
+
"lastModified": "2024-01-15T10:30:00.000Z"
|
|
3120
|
+
}
|
|
3121
|
+
},
|
|
3122
|
+
"CreatePriceBookEntryRequest": {
|
|
3123
|
+
"summary": "Create or update a price book entry",
|
|
3124
|
+
"description": "Example request body for creating or replacing a price book entry via PUT upsert with a single amount tier.",
|
|
3125
|
+
"value": {
|
|
3126
|
+
"productId": "product-001",
|
|
3127
|
+
"priceTables": [
|
|
3128
|
+
{
|
|
3129
|
+
"tiers": [
|
|
3130
|
+
{
|
|
3131
|
+
"type": "amount",
|
|
3132
|
+
"quantity": 1,
|
|
3133
|
+
"amount": {
|
|
3134
|
+
"currencyMnemonic": "USD",
|
|
3135
|
+
"value": 99.99
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
]
|
|
3139
|
+
}
|
|
3140
|
+
]
|
|
3141
|
+
}
|
|
3142
|
+
},
|
|
3143
|
+
"CreatePriceBookEntryWithTiersRequest": {
|
|
3144
|
+
"summary": "Create a price book entry with tiered pricing",
|
|
3145
|
+
"description": "Example request body creating an entry with time-scoped price tables and both absolute and percentage tiers. On PATCH, the priceTables array is replaced wholesale.",
|
|
3146
|
+
"value": {
|
|
3147
|
+
"productId": "product-002",
|
|
3148
|
+
"priceTables": [
|
|
3149
|
+
{
|
|
3150
|
+
"validFrom": "2026-11-25T00:00:00.000Z",
|
|
3151
|
+
"validTo": "2026-11-28T23:59:59.999Z",
|
|
3152
|
+
"tiers": [
|
|
3153
|
+
{
|
|
3154
|
+
"type": "amount",
|
|
3155
|
+
"quantity": 1,
|
|
3156
|
+
"amount": {
|
|
3157
|
+
"currencyMnemonic": "USD",
|
|
3158
|
+
"value": 39.99
|
|
3159
|
+
}
|
|
3160
|
+
},
|
|
3161
|
+
{
|
|
3162
|
+
"type": "amount",
|
|
3163
|
+
"quantity": 10,
|
|
3164
|
+
"amount": {
|
|
3165
|
+
"currencyMnemonic": "USD",
|
|
3166
|
+
"value": 34.99
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
]
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
"validFrom": "2026-12-01T00:00:00.000Z",
|
|
3173
|
+
"tiers": [
|
|
3174
|
+
{
|
|
3175
|
+
"type": "amount",
|
|
3176
|
+
"quantity": 1,
|
|
3177
|
+
"amount": {
|
|
3178
|
+
"currencyMnemonic": "USD",
|
|
3179
|
+
"value": 49.99
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
{
|
|
3183
|
+
"type": "percentage",
|
|
3184
|
+
"quantity": 10,
|
|
3185
|
+
"percentage": 15
|
|
3186
|
+
}
|
|
3187
|
+
]
|
|
3188
|
+
}
|
|
3189
|
+
]
|
|
3190
|
+
}
|
|
3191
|
+
},
|
|
3192
|
+
"PriceBookEntryReplaced": {
|
|
3193
|
+
"summary": "Price book entry replaced successfully",
|
|
3194
|
+
"description": "Example of a price book entry returned after a successful replace via PUT /price-books/{priceBookId}/price-book-entries/{productId}, where the entire entry is replaced with the request body.",
|
|
3195
|
+
"value": {
|
|
3196
|
+
"productId": "product-001",
|
|
3197
|
+
"priceTables": [
|
|
3198
|
+
{
|
|
3199
|
+
"tiers": [
|
|
3200
|
+
{
|
|
3201
|
+
"type": "amount",
|
|
3202
|
+
"quantity": 1,
|
|
3203
|
+
"amount": {
|
|
3204
|
+
"currencyMnemonic": "USD",
|
|
3205
|
+
"value": 89.99
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
]
|
|
3209
|
+
}
|
|
3210
|
+
],
|
|
3211
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3212
|
+
"lastModified": "2024-06-15T14:35:00.000Z"
|
|
3213
|
+
}
|
|
3214
|
+
},
|
|
3215
|
+
"PriceBookEntryCreated": {
|
|
3216
|
+
"summary": "Price book entry created successfully",
|
|
3217
|
+
"description": "Example of a price book entry returned after successful creation via PUT upsert.",
|
|
3218
|
+
"value": {
|
|
3219
|
+
"productId": "product-001",
|
|
3220
|
+
"priceTables": [
|
|
3221
|
+
{
|
|
3222
|
+
"tiers": [
|
|
3223
|
+
{
|
|
3224
|
+
"type": "amount",
|
|
3225
|
+
"quantity": 1,
|
|
3226
|
+
"amount": {
|
|
3227
|
+
"currencyMnemonic": "USD",
|
|
3228
|
+
"value": 99.99
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
]
|
|
3232
|
+
}
|
|
3233
|
+
],
|
|
3234
|
+
"creationDate": "2024-06-15T14:30:00.000Z",
|
|
3235
|
+
"lastModified": "2024-06-15T14:30:00.000Z"
|
|
3236
|
+
}
|
|
3237
|
+
},
|
|
3238
|
+
"UpdatePriceBookEntryRequest": {
|
|
3239
|
+
"summary": "Update a price book entry",
|
|
3240
|
+
"description": "Example partial update via PATCH; the priceTables array provided replaces the entry's existing tables wholesale.",
|
|
3241
|
+
"value": {
|
|
3242
|
+
"productId": "product-001",
|
|
3243
|
+
"priceTables": [
|
|
3244
|
+
{
|
|
3245
|
+
"tiers": [
|
|
3246
|
+
{
|
|
3247
|
+
"type": "amount",
|
|
3248
|
+
"quantity": 1,
|
|
3249
|
+
"amount": {
|
|
3250
|
+
"currencyMnemonic": "USD",
|
|
3251
|
+
"value": 89.99
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
]
|
|
3255
|
+
}
|
|
3256
|
+
]
|
|
3257
|
+
}
|
|
3258
|
+
},
|
|
3259
|
+
"PriceBookEntryUpdated": {
|
|
3260
|
+
"summary": "Price book entry updated successfully",
|
|
3261
|
+
"description": "Example of a price book entry returned after a successful partial update via PATCH /price-books/{priceBookId}/price-book-entries/{productId}.",
|
|
3262
|
+
"value": {
|
|
3263
|
+
"productId": "product-001",
|
|
3264
|
+
"priceTables": [
|
|
3265
|
+
{
|
|
3266
|
+
"tiers": [
|
|
3267
|
+
{
|
|
3268
|
+
"type": "amount",
|
|
3269
|
+
"quantity": 1,
|
|
3270
|
+
"amount": {
|
|
3271
|
+
"currencyMnemonic": "USD",
|
|
3272
|
+
"value": 89.99
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
]
|
|
3276
|
+
}
|
|
3277
|
+
],
|
|
3278
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3279
|
+
"lastModified": "2024-06-15T14:35:00.000Z"
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
"SiteAssignmentsListResult": {
|
|
3283
|
+
"summary": "Site assignments retrieved successfully",
|
|
3284
|
+
"description": "Example of the list of sites a price book is assigned to, returned by GET /price-books/{priceBookId}/site-assignments.",
|
|
3285
|
+
"value": {
|
|
3286
|
+
"limit": 2,
|
|
3287
|
+
"total": 2,
|
|
3288
|
+
"data": [
|
|
3289
|
+
{
|
|
3290
|
+
"id": "RefArch",
|
|
3291
|
+
"displayName": "RefArch Store"
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
"id": "RefArchGlobal",
|
|
3295
|
+
"displayName": "RefArch Global"
|
|
3296
|
+
}
|
|
3297
|
+
]
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
3300
|
+
"SiteAssignmentUpdated": {
|
|
3301
|
+
"summary": "Price book site assignment confirmed",
|
|
3302
|
+
"description": "Example of a site assignment returned when the price book was already assigned to the site (200) via PUT /price-books/{priceBookId}/site-assignments/{siteId}.",
|
|
3303
|
+
"value": {
|
|
3304
|
+
"id": "RefArch",
|
|
3305
|
+
"displayName": "RefArch Store"
|
|
3306
|
+
}
|
|
3307
|
+
},
|
|
3308
|
+
"SiteAssignmentCreated": {
|
|
3309
|
+
"summary": "Price book assigned to site successfully",
|
|
3310
|
+
"description": "Example of a site assignment returned after binding a price book to a site that was not previously assigned (201) via PUT /price-books/{priceBookId}/site-assignments/{siteId}.",
|
|
3311
|
+
"value": {
|
|
3312
|
+
"id": "RefArch",
|
|
3313
|
+
"displayName": "RefArch Store"
|
|
3314
|
+
}
|
|
3315
|
+
},
|
|
3316
|
+
"PriceBookSearchRequestBody": {
|
|
3317
|
+
"summary": "Basic price book search request",
|
|
3318
|
+
"description": "Example of a text-query search that returns price books whose id or displayName contains \"USD\", sorted by id ascending.",
|
|
3319
|
+
"value": {
|
|
3320
|
+
"limit": 10,
|
|
3321
|
+
"offset": 0,
|
|
3322
|
+
"query": {
|
|
3323
|
+
"textQuery": {
|
|
3324
|
+
"fields": [
|
|
3325
|
+
"id",
|
|
3326
|
+
"displayName"
|
|
3327
|
+
],
|
|
3328
|
+
"searchPhrase": "USD"
|
|
3329
|
+
}
|
|
3330
|
+
},
|
|
3331
|
+
"sorts": [
|
|
3332
|
+
{
|
|
3333
|
+
"field": "id",
|
|
3334
|
+
"sortOrder": "asc"
|
|
3335
|
+
}
|
|
3336
|
+
]
|
|
3337
|
+
}
|
|
3338
|
+
},
|
|
3339
|
+
"PriceBookSearchRequestWithFilter": {
|
|
3340
|
+
"summary": "Price book search with term query filter",
|
|
3341
|
+
"description": "Example of a boolean-query search combining term filters for currencyCode and online, sorted by displayName ascending.",
|
|
3342
|
+
"value": {
|
|
3343
|
+
"limit": 25,
|
|
3344
|
+
"offset": 0,
|
|
3345
|
+
"query": {
|
|
3346
|
+
"boolQuery": {
|
|
3347
|
+
"must": [
|
|
3348
|
+
{
|
|
3349
|
+
"termQuery": {
|
|
3350
|
+
"fields": [
|
|
3351
|
+
"currencyCode"
|
|
3352
|
+
],
|
|
3353
|
+
"operator": "is",
|
|
3354
|
+
"values": [
|
|
3355
|
+
"USD"
|
|
3356
|
+
]
|
|
3357
|
+
}
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
"termQuery": {
|
|
3361
|
+
"fields": [
|
|
3362
|
+
"online"
|
|
3363
|
+
],
|
|
3364
|
+
"operator": "is",
|
|
3365
|
+
"values": [
|
|
3366
|
+
true
|
|
3367
|
+
]
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
]
|
|
3371
|
+
}
|
|
3372
|
+
},
|
|
3373
|
+
"sorts": [
|
|
3374
|
+
{
|
|
3375
|
+
"field": "displayName",
|
|
3376
|
+
"sortOrder": "asc"
|
|
3377
|
+
}
|
|
3378
|
+
]
|
|
3379
|
+
}
|
|
3380
|
+
},
|
|
3381
|
+
"PriceBookSearchResult": {
|
|
3382
|
+
"summary": "Successful price book search result",
|
|
3383
|
+
"description": "Example of a successful price book search response with pagination, sorting, and multiple hits.",
|
|
3384
|
+
"value": {
|
|
3385
|
+
"limit": 3,
|
|
3386
|
+
"offset": 0,
|
|
3387
|
+
"total": 10,
|
|
3388
|
+
"query": {
|
|
3389
|
+
"textQuery": {
|
|
3390
|
+
"fields": [
|
|
3391
|
+
"id",
|
|
3392
|
+
"displayName"
|
|
3393
|
+
],
|
|
3394
|
+
"searchPhrase": "USD"
|
|
3395
|
+
}
|
|
3396
|
+
},
|
|
3397
|
+
"sorts": [
|
|
3398
|
+
{
|
|
3399
|
+
"field": "id",
|
|
3400
|
+
"sortOrder": "asc"
|
|
3401
|
+
}
|
|
3402
|
+
],
|
|
3403
|
+
"hits": [
|
|
3404
|
+
{
|
|
3405
|
+
"id": "USD-list-prices",
|
|
3406
|
+
"displayName": "USD List Prices",
|
|
3407
|
+
"description": "Standard list prices for USD currency",
|
|
3408
|
+
"currencyCode": "USD",
|
|
3409
|
+
"online": true,
|
|
3410
|
+
"validFrom": "2024-01-01T00:00:00.000Z",
|
|
3411
|
+
"validTo": "2024-12-31T23:59:59.999Z",
|
|
3412
|
+
"creationDate": "2024-01-01T00:00:00.000Z",
|
|
3413
|
+
"lastModified": "2024-01-15T10:30:00.000Z"
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
"id": "USD-sale-prices",
|
|
3417
|
+
"displayName": "USD Sale Prices",
|
|
3418
|
+
"description": "Promotional sale prices for USD currency",
|
|
3419
|
+
"currencyCode": "USD",
|
|
3420
|
+
"parent": "USD-list-prices",
|
|
3421
|
+
"online": true,
|
|
3422
|
+
"validFrom": "2024-06-01T00:00:00.000Z",
|
|
3423
|
+
"validTo": "2024-08-31T23:59:59.999Z",
|
|
3424
|
+
"creationDate": "2024-05-15T00:00:00.000Z",
|
|
3425
|
+
"lastModified": "2024-06-01T08:00:00.000Z"
|
|
3426
|
+
},
|
|
3427
|
+
{
|
|
3428
|
+
"id": "USD-vip-prices",
|
|
3429
|
+
"displayName": "USD VIP Prices",
|
|
3430
|
+
"description": "Special prices for VIP customers in USD",
|
|
3431
|
+
"currencyCode": "USD",
|
|
3432
|
+
"parent": "USD-list-prices",
|
|
3433
|
+
"online": true,
|
|
3434
|
+
"creationDate": "2024-02-01T00:00:00.000Z",
|
|
3435
|
+
"lastModified": "2024-02-10T14:20:00.000Z"
|
|
3436
|
+
}
|
|
3437
|
+
]
|
|
3438
|
+
}
|
|
3439
|
+
},
|
|
3440
|
+
"InvalidQueryParameterErrorResponseExample": {
|
|
3441
|
+
"value": {
|
|
3442
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-query-parameter",
|
|
3443
|
+
"detail": "Invalid query parameter.",
|
|
3444
|
+
"title": "Invalid Query Parameter"
|
|
3445
|
+
}
|
|
3446
|
+
},
|
|
3447
|
+
"PriceBookNotFoundErrorResponseExample": {
|
|
3448
|
+
"value": {
|
|
3449
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/price-book-not-found",
|
|
3450
|
+
"detail": "The price book with ID 'USD-list-prices' was not found.",
|
|
3451
|
+
"title": "Price Book Not Found"
|
|
3452
|
+
}
|
|
3453
|
+
},
|
|
3454
|
+
"CurrencyImmutableErrorResponseExample": {
|
|
3455
|
+
"value": {
|
|
3456
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/currency-immutable",
|
|
3457
|
+
"detail": "The currency code of a price book cannot be changed after creation.",
|
|
3458
|
+
"title": "Currency Immutable"
|
|
3459
|
+
}
|
|
3460
|
+
},
|
|
3461
|
+
"ParentCycleDetectedErrorResponseExample": {
|
|
3462
|
+
"value": {
|
|
3463
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/parent-cycle-detected",
|
|
3464
|
+
"detail": "The specified parent price book would create a cycle in the price book hierarchy.",
|
|
3465
|
+
"title": "Parent Cycle Detected"
|
|
3466
|
+
}
|
|
3467
|
+
},
|
|
3468
|
+
"PriceBookEntryNotFoundErrorResponseExample": {
|
|
3469
|
+
"value": {
|
|
3470
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/price-book-entry-not-found",
|
|
3471
|
+
"detail": "The price book entry for product 'apple-ipod-classic' in price book 'USD-list-prices' was not found.",
|
|
3472
|
+
"title": "Price Book Entry Not Found"
|
|
3473
|
+
}
|
|
3474
|
+
},
|
|
3475
|
+
"ValidationErrorResponseExample": {
|
|
3476
|
+
"value": {
|
|
3477
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
|
|
3478
|
+
"detail": "The request body is malformed or contains invalid data.",
|
|
3479
|
+
"title": "Validation"
|
|
3480
|
+
}
|
|
3481
|
+
},
|
|
3482
|
+
"InvalidTimeRangeErrorResponseExample": {
|
|
3483
|
+
"value": {
|
|
3484
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-time-range",
|
|
3485
|
+
"detail": "The time range is invalid: 'validTo' must not be before 'validFrom'.",
|
|
3486
|
+
"title": "Invalid Time Range"
|
|
3487
|
+
}
|
|
3488
|
+
},
|
|
3489
|
+
"TierCurrencyMismatchErrorResponseExample": {
|
|
3490
|
+
"value": {
|
|
3491
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/tier-currency-mismatch",
|
|
3492
|
+
"detail": "The tier currency 'USD' does not match the price book currency 'USD'.",
|
|
3493
|
+
"title": "Tier Currency Mismatch"
|
|
3494
|
+
}
|
|
3495
|
+
},
|
|
3496
|
+
"DuplicateTierQuantityErrorResponseExample": {
|
|
3497
|
+
"value": {
|
|
3498
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/duplicate-tier-quantity",
|
|
3499
|
+
"detail": "Duplicate tier quantity '10' within a single price table. Each tier in a price table must have a distinct quantity.",
|
|
3500
|
+
"title": "Duplicate Tier Quantity"
|
|
3501
|
+
}
|
|
3502
|
+
},
|
|
3503
|
+
"ProductNotFoundErrorResponseExample": {
|
|
3504
|
+
"value": {
|
|
3505
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found",
|
|
3506
|
+
"detail": "The product with ID 'apple-ipod-classic' was not found.",
|
|
3507
|
+
"title": "Product Not Found"
|
|
3508
|
+
}
|
|
3509
|
+
},
|
|
3510
|
+
"FeedBasedPriceBookNotSupportedErrorResponseExample": {
|
|
3511
|
+
"value": {
|
|
3512
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/feed-based-price-book-not-supported",
|
|
3513
|
+
"detail": "Price book entry write operations are not supported for the feed-based price book 'USD-list-prices'. Its price entries are sourced from an external feed pipeline.",
|
|
3514
|
+
"title": "Feed Based Price Book Not Supported"
|
|
3515
|
+
}
|
|
3516
|
+
},
|
|
3517
|
+
"SiteNotFoundErrorResponseExample": {
|
|
3518
|
+
"value": {
|
|
3519
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/site-not-found",
|
|
3520
|
+
"detail": "The site with ID 'RefArch' was not found.",
|
|
3521
|
+
"title": "Site Not Found"
|
|
3522
|
+
}
|
|
3523
|
+
},
|
|
3524
|
+
"MalformedSearchParameterErrorResponseExample": {
|
|
3525
|
+
"value": {
|
|
3526
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-search-parameter",
|
|
3527
|
+
"detail": "The search query contains invalid syntax. Please check the query structure and try again.",
|
|
3528
|
+
"title": "Malformed Search Parameter"
|
|
3529
|
+
}
|
|
3530
|
+
},
|
|
3531
|
+
"UnqueryableFieldErrorResponseExample": {
|
|
3532
|
+
"value": {
|
|
3533
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unqueryable-field",
|
|
3534
|
+
"detail": "The field 'invalid_field' is not a searchable attribute for price books. Valid fields are: id, displayName, description, currencyCode, parent, validFrom, validTo, online, siteId.",
|
|
3535
|
+
"title": "Unqueryable Field"
|
|
3536
|
+
}
|
|
3537
|
+
},
|
|
3538
|
+
"FieldNotSortableErrorResponseExample": {
|
|
3539
|
+
"value": {
|
|
3540
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/field-not-sortable",
|
|
3541
|
+
"detail": "The field 'invalid_sort' is not a sortable attribute for price books. Valid sortable fields are: id, displayName, description, currencyCode, parent, validFrom, validTo, online.",
|
|
3542
|
+
"title": "Field Not Sortable"
|
|
728
3543
|
}
|
|
729
3544
|
}
|
|
730
3545
|
},
|
|
731
3546
|
"securitySchemes": {
|
|
732
3547
|
"AmOAuth2": {
|
|
733
3548
|
"type": "oauth2",
|
|
3549
|
+
"description": "OAuth 2.0 security scheme for Account Manager authentication.\nRequired for all admin API endpoints.\n",
|
|
734
3550
|
"flows": {
|
|
735
3551
|
"clientCredentials": {
|
|
736
3552
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
@@ -738,6 +3554,12 @@
|
|
|
738
3554
|
"sfcc.price-books": "Read access to price books",
|
|
739
3555
|
"sfcc.price-books.rw": "Read and write access to price books"
|
|
740
3556
|
}
|
|
3557
|
+
},
|
|
3558
|
+
"authorizationCode": {
|
|
3559
|
+
"authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
|
|
3560
|
+
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
3561
|
+
"refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
3562
|
+
"scopes": {}
|
|
741
3563
|
}
|
|
742
3564
|
}
|
|
743
3565
|
}
|