Menu
Update Custom Discount For Cart
Update Custom Discount For Cart
PUT
/v2/carts/{cartID}/custom-discounts/{customdiscountID}Use it in a workflow
- Add a step and choose the Elastic Path connector.
- Pick the Update Custom Discount For Cart action (under Carts).
- Fill in the fields below, then reference the result from later steps as
{{updateCustomDiscountForCart.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"data": {
"amount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"description": "string",
"discount_code": "string",
"discount_engine": "string",
"external_id": "string",
"type": "string",
"id": "00000000-0000-0000-0000-000000000000",
"relationships": {
"item": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "cart_item"
}
}
}
}
}
Response
Returns 200 with an object. Read it in later steps with {{updateCustomDiscountForCart.response.data.<field>}}.
{
"data": {
"amount": {},
"description": "string",
"discount_code": "string",
"discount_engine": "string",
"external_id": "string",
"type": "string",
"id": "00000000-0000-0000-0000-000000000000",
"relationships": {
"item": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "cart_item"
}
}
}
}
}
Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.
Was this page helpful?