> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke Issuance Job

> Revoke all rewards issued by an issuance job

<Info>
  Scope required: `rewards.issue`
</Info>

This endpoint revokes all rewards that were issued by a given issuance job.
Revocation is processed asynchronously. The endpoint returns `202 Accepted`
and the job transitions to a `revoking` state while rewards are being
revoked in the background.

Only issuance jobs in a `completed` or `failed` state can be revoked. Jobs
that are `pending` or `processing` will return a `422` error. Jobs that are
already `revoking` or `revoked` will also return a `422` error.

### Parameters

<ParamField path="id" type="string" required>
  Issuance job ID
</ParamField>

<ParamField body="merchant_id" type="string" required>
  Merchant ID
</ParamField>

### Response

Returns `202 Accepted` with the issuance job object.

<ResponseField name="id" type="string">
  Issuance job ID
</ResponseField>

<ResponseField name="campaign_id" type="string">
  Campaign ID
</ResponseField>

<ResponseField name="variant_id" type="string">
  Variant ID
</ResponseField>

<ResponseField name="state" type="string">
  Job state: `revoking` after a successful revocation request
</ResponseField>

<ResponseField name="total_count" type="integer">
  Total number of identifiers submitted
</ResponseField>

<ResponseField name="processed_count" type="integer">
  Number of identifiers processed
</ResponseField>

<ResponseField name="success_count" type="integer">
  Number of rewards successfully issued
</ResponseField>

<ResponseField name="failure_count" type="integer">
  Number of failed issuances
</ResponseField>

<ResponseField name="progress_percent" type="integer">
  Completion percentage (0-100)
</ResponseField>

<ResponseField name="created_at" type="datetime">
  Job creation timestamp (ISO8601)
</ResponseField>

<ResponseField name="started_at" type="datetime">
  Processing start timestamp (ISO8601)
</ResponseField>

<ResponseField name="completed_at" type="datetime">
  Processing completion timestamp (ISO8601)
</ResponseField>

<RequestExample>
  ```bash Revoke Issuance Job theme={null}
  curl https://api.thanxsandbox.com/partner/issuance_jobs/job_xyz789/revoke \
    -X POST \
    -H 'X-ClientId: {client_id}' \
    -H 'Accept-Version: v4.0' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {access_token}' \
    -d '{
      "merchant_id": "k2lye10h32l5wzo"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 202 theme={null}
  {
    "issuance_job": {
      "id": "job_xyz789",
      "campaign_id": "camp_abc123",
      "variant_id": "var_treat1",
      "state": "revoking",
      "total_count": 2,
      "processed_count": 2,
      "success_count": 1,
      "failure_count": 1,
      "progress_percent": 100,
      "created_at": "2025-06-15T10:30:00Z",
      "started_at": "2025-06-15T10:30:05Z",
      "completed_at": "2025-06-15T10:30:15Z"
    }
  }
  ```
</ResponseExample>
