Elastic Path Custom Discounts API
With custom discounts, you can allow your shoppers to apply discounts from external services to their purchases. To apply custom discounts to carts and cart items, you need to set `custom_discounts_enabled` field to `true` in your [Cart Settings](/docs/api/carts/put-v-2-settings-cart).You cannot add custom discounts to an empty cart.:::caution- You can apply up to five custom discounts to cart and cart item.- The stores that use [simple calculation method](/guides/How-To/Carts/calculate-totals) do not support custom discounts.:::
Elastic Path Custom Discounts API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Custom Discounts. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.
This API exposes 7 operations across 4 paths, and defines 13 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.
Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Elastic Path Custom Discounts API declares
1 security scheme
for authenticating requests.
It accepts HTTP bearer tokens (BearerToken).
By default, every request must be authenticated.
Paths & Operations 7
Across 4 paths, the API surfaces 7 operations — 3 DELETE, 2 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.
With custom discounts, you can allow your shoppers to apply discounts from external services to their purchases. To apply custom discounts to carts and cart items, you need to set…
Schemas 13
The contract defines 13 schemas that model the data the API accepts and returns. The most detailed are CartsCustomDiscountsResponseObject (8 properties), CartsCustomDiscountsObject (8 properties), Response.ErrorItem (5 properties), CartsBulkCustomDiscounts (2 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Elastic Path 12
Other APIs Elastic Path publishes across the network.