ReDoc documentation

carts/{cartId}/shipping-discount

carts/{cartId}/shipping-discount

Remove the shipping discount from the given cart, if any. Idempotent: removing a cart with no discount set is a no-op, not an error.

Request
path Parameters
cartId
required
integer
Responses
401

401 Unauthorized

500

Internal Server error

default

Unexpected error

delete/V1/carts/{cartId}/shipping-discount
Response samples
{
  • "code": 0,
  • "errors": [
    ],
  • "message": "string",
  • "parameters": [
    ],
  • "trace": "string"
}

carts/{cartId}/shipping-discount

Get the active shipping discount on the given cart.

Request
path Parameters
cartId
required
integer
Responses
200

200 Success.

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

get/V1/carts/{cartId}/shipping-discount
Response samples
{
  • "actor_user_id": 0,
  • "actor_user_type": 0,
  • "amount": 0,
  • "applied_amount": 0,
  • "base_amount": 0,
  • "base_applied_amount": 0,
  • "cart_id": 0,
  • "reason": "string"
}

carts/{cartId}/shipping-discount

Set (or replace) the shipping discount on the given cart.

Request
path Parameters
cartId
required
integer
Request Body schema:
amount
required
number

Discount amount, in the cart's quote currency (not base currency - see ShippingDiscountManagement::convertToBaseCurrency())

reason
required
string
Responses
401

401 Unauthorized

500

Internal Server error

default

Unexpected error

post/V1/carts/{cartId}/shipping-discount
Request samples
{
  • "amount": 0,
  • "reason": "string"
}
Response samples
{
  • "code": 0,
  • "errors": [
    ],
  • "message": "string",
  • "parameters": [
    ],
  • "trace": "string"
}