Skip to content

Update a credit's expiration date

Request

Changes the expiration date of a single credit ledger entry. The entry is identified by its sk (in the form ${customerId}#${timestamp}). The new expiration date is rounded down to the top of the hour and must be more than 1 hour in the future; the entry's current expiration must also be more than 1 hour away. If the customer has an active redemption code whose end date is after the new expiration date, the request is rejected. This forwards to our backend.

Security
api_key
Path
idstringrequired

The customer ID number.

Bodyapplication/jsonrequired
skstringrequired

The sort key (sk) of the credit ledger entry to update, in the form ${customerId}#${timestamp}.

expirationDatestringrequired

The new expiration date as an ISO-8601 date-time string (e.g. 2024-06-06T05:00:00.000Z). It is rounded down to the top of the hour and must be more than 1 hour in the future.

curl -i -X PATCH \
  'https://public.inveterateapi.com/v2.0/admin/members/{id}/credits/expiration' \
  -H 'Content-Type: application/json' \
  -H 'X-Inveterate-Api-Key: YOUR_API_KEY_HERE' \
  -d '{
    "sk": "string",
    "expirationDate": "string"
  }'

Responses

Returned upon successful direct action to our database. Action is immediate.

Bodyapplication/json
messagestringrequired

The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

dataobjectrequired

The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

Response
{ "message": "Success", "data": { "id": 1, "name": "John Doe" } }