API referenceCoupon
Update Coupon
Update a coupon by ID. Include only fields you want to change; omit the rest. Empty strings, null, and 0 are ignored so they cannot wipe existing values. App connections need the booking:write or inventory:write scope.
POST
/coupon/{id}curl -X POST "https://dash.lockii.app/api/v1/coupon/{id}" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"uses": -9007199254740991,
"used": 0,
"staticDiscount": 0,
"percentageDiscount": 0,
"companyID": "string",
"archived": true
}'Authorization
x-api-keystringheaderAPI key from Settings → Integrations → API.
AuthorizationstringheaderThe same API key, or an OAuth access token, sent as Authorization: Bearer.
api_keystringqueryAPI key query parameter.
Parameters
idstringpathrequiredCoupon ID
Body
application/json
namestringCoupon name/code Omit to leave unchanged.
usesintegerMaximum uses, or -1 for unlimited uses Omit to leave unchanged.
usedintegerTimes used Omit to leave unchanged.
staticDiscountnumberFixed discount in cents Omit to leave unchanged.
percentageDiscountnumberPercentage discount points Omit to leave unchanged.
companyIDstringCompany ID. Defaults to the authenticated user's company. Omit to leave unchanged.
archivedbooleanOmit to leave unchanged.
Response
application/json
JSON result for this operation.
object
{}