unPLUGDevelopers

Management API · Offers

Void a code batch Coming soon

POST/v1/offers/{id}/code_batches/{batch_id}/void

Stops every unused code in the batch from working, for example after a leak. Used codes keep their history. A voided code fails at checkout with 422 code_invalid.

Permissions: Secret key with offers:write.

Request headers#

  • Idempotency-Keystring
    Any string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response with Idempotent-Replayed: true.
    Max Length 255

Path parameters#

  • idstring (uuid)Required
  • batch_idstring (uuid)Required

Response fields#

Returns 200 with CodeBatch

  • idstring (uuid)
  • offer_idstring (uuid)
  • prefixstring
  • quantityinteger
  • statusstring
  • created_atstring (date-time)

Error descriptions#

404Not found
not_found

No such offer or batch.

Any endpoint can also return the common errors.