Update a promo code
Updates a code's terms. The CODE ITSELF IS IMMUTABLE — renaming it would rewrite what already-placed orders say they used, and the redemption history would attach to a string no buyer ever typed. To change the spelling, deactivate this one and create another.
Lowering usage_limit below the redemptions already taken does not revoke them; the code simply refuses from then on.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://sandbox.505pay.link/v1/marketplace/promos/admin/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "kind": "percent", "value": 1 }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"kind": "percent",
"value": 0,
"max_discount_cents": 0,
"free_shipping": true,
"auto_apply": true,
"max_shipping_discount_cents": 1,
"min_subtotal_cents": 0,
"starts_at": "2019-08-24T14:15:22Z",
"ends_at": "2019-08-24T14:15:22Z",
"usage_limit": 0,
"per_buyer_limit": 0,
"active": true,
"description": "string",
"redeemed_count": 0
}{
"error": "not_found",
"message": "resource not found",
"request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}{
"error": "not_found",
"message": "resource not found",
"request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}{
"error": "not_found",
"message": "resource not found",
"request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}{
"error": "not_found",
"message": "resource not found",
"request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}{
"error": "rate_limit_exceeded",
"message": "too many requests",
"request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}Was this page helpful?