Skip to main content

Consume a Code

Overview

This endpoint allows you to consume a code. It sets the fields is_consumed to TRUE and consumed_date to the current date-time on the server based on a valid scan_id

Preparation

  • In the campaign options Redirect tab, enable the Enable consumed feature checkbox
  • In the campaign options SCM T&T tab, add two scm fields:
    • is_consumed
    • consumed_date

Note: this endpoint should only be called once and should be carefully managed by the app.

POST: /api/v2/consumer/scan/{scan_id}/consume/

Body Parameters POST (application/json)

(an empty POST body has to be sent)

Response (200): Status OK

{ "detail": "Processed OK" }

Example of SCM fields after succesful consume call:

  • is_consumed: Yes
  • consumed_date: 2021-10-26T09:45:11.123169+00:00