> ## 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.

# Get Issuance Job

> Returns the status of a reward issuance job

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

This endpoint returns the current status of a reward issuance job. Use this
to poll for completion after initiating an issuance via
[Issue Rewards](/partner/campaigns/issue-rewards).

When the job reaches the `completed` state, a `summary` field is included
with success and failure counts. If any issuances failed, the `summary`
includes a `failures` array with details about each failure.

### Parameters

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

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

### Response

<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: `pending`, `processing`, `completed`, or `failed`
</ResponseField>

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

<ResponseField name="processed_count" type="integer">
  Number of identifiers processed so far
</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), null if not started
</ResponseField>

<ResponseField name="completed_at" type="datetime">
  Processing completion timestamp (ISO8601), null if not completed
</ResponseField>

<ResponseField name="summary" type="hash">
  Completion summary (only present when state is `completed`)

  <Expandable title="summary">
    <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="failures" type="array">
      Failure details

      <Expandable title="failure">
        <ResponseField name="identifier_index" type="integer">
          Position in the original identifiers array
        </ResponseField>

        <ResponseField name="identifier_type" type="string">
          Identifier type (`email` or `phone`)
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message describing the failure
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

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

<ResponseExample>
  ```json Response Example theme={null}
  {
    "issuance_job": {
      "id": "job_xyz789",
      "campaign_id": "camp_abc123",
      "variant_id": "var_treat1",
      "state": "completed",
      "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",
      "summary": {
        "success_count": 1,
        "failure_count": 1,
        "failures": [
          {
            "identifier_index": 1,
            "identifier_type": "phone",
            "error": "User not found"
          }
        ]
      }
    }
  }
  ```
</ResponseExample>
