Add Custom Discount To Cart Item
POST/v2/carts/:cartID/items/:cartitemID/custom-discounts
Use this endpoint to add a custom discount to cart item.
Request
Path Parameters
Specifies the ID for the cart.
Specifies the unique identifier for the cart item.
- application/json
Body
Specifies an amount to be applied for the custom discount. It must be less than zero.
Specifies a description for the custom discount.
Specifies the discount code used for the custom discount.
Specifies from where the custom discount is applied. For example, Talon.one.
Specifies an external id for the custom discount.
Specifies the type of the resource. Always custom_discount
.
Responses
- 200
- 401
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
data object
amount object
Specifies an amount to be applied for the custom discount. It must be less than zero.
The currency set for the custom discount.
The formatted value for the custom discount.
Specifies a description for the custom discount.
Specifies the discount code used for the custom discount.
Specifies from where the custom discount is applied. For example, Talon.one.
Specifies an external id for the custom discount.
Specifies the type of the resource. Always custom_discount
.
Specifies the UUID of the custom discount.
{
"data": {
"amount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"description": "string",
"discount_code": "string",
"discount_engine": "string",
"external_id": "string",
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}