PUT /sale-discount-codes/{id}.json

PUT /sale-discount-codes/{id}.json

Path parameters

  • id integer(int64) Required

    Numeric ID of the instance

    Minimum value is 1.

application/json

Body Required

  • amount number(float) Required

    Amount

  • code string Required

    Code

  • createdAt string(date-time)

    Created at

  • id integer(int32)

    Id

  • saleId integer(int32) Required

    Sale

  • type string Required

    Type

    Values are percentage, shipping, or fixed_amount. Default value is fixed_amount.

  • updatedAt string(date-time)

    Updated at

PUT /sale-discount-codes/{id}.json
curl \
 --request PUT 'http://api.example.com/v1/sale-discount-codes/{id}.json' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"amount":42.0,"code":"string","createdAt":"2025-05-04T09:42:00Z","id":42,"saleId":42,"type":"fixed_amount","updatedAt":"2025-05-04T09:42:00Z"}'
Request examples
{
  "amount": 42.0,
  "code": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "id": 42,
  "saleId": 42,
  "type": "fixed_amount",
  "updatedAt": "2025-05-04T09:42:00Z"
}