v1

latestOpenAPI 3.0.0Apache 2.02026-07-2410185524.2 KB
Promo Codes

update promo code

Updates a specific promo code

For custom components:

RaiselyComponents.api.one('promo_codes', '{uuid}').patch(data = {}, params = {}, headers = {}) => Promise<{result}>

:fa-gears: See Restie Response Data for a more detailed overview of responses through the client wrapper

patch/promo_codes/{uuid}

Path parameters

uuidstring required

The uuid of the record

Headers

Authorizationstring

A valid HTTP Bearer token, required to access private records.

Request body

Example request

{
  "data": {
    "code": "10OFF",
    "discountAmount": 10,
    "discountType": "PERCENTAGE",
    "endDate": "2022-12-01T00:00:00.000Z",
    "maxUses": 100,
    "startDate": "2022-12-01T00:00:00.000Z",
    "uses": 50
  }
}

Response

The resulting Promo Code record

Example response

{
  "data": {
    "code": "10OFF",
    "discountAmount": 10,
    "discountType": "PERCENTAGE",
    "endDate": "2022-12-01T00:00:00.000Z",
    "maxUses": 100,
    "startDate": "2022-12-01T00:00:00.000Z",
    "uses": 50,
    "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
  }
}