addToWallet.co
Workspaces
Pricing
API Docs
Tutorial Blog
Tools
Google Sheet Extension
PDF to Pass
Image to Pass
QR Code Generator
Barcode Generator
Integrations
© 2026 Hazelnut Ventures LLC. All Rights Reserved.
FAQsTrustContact Us
Overview
AuthenticationPass JSON GeneratorCreate PassGet PassUpdate PassDelete PassNotificationsGet Credits
Create TemplateList TemplatesGet TemplateUpdate TemplateDelete TemplateDynamic Pass Gen
Create Loyalty TemplateManage LoyaltyActivity Log
List User GroupsAdd UserList UsersUpdate UserDelete UserBatch Status

Get Batch Status API

Overview

The Get Batch Status API allows you to check the processing status of asynchronous batch operations such as creating or updating multiple passes. This endpoint provides real-time information about the progress, success/failure details, and results of batch operations. Use this endpoint to monitor long-running operations and handle any errors that occurred during processing.

Base URL

https://app.addtowallet.co
GET/api/v2/batch/status/:batchId

Path Parameters

  • batchId (string): The unique identifier of the batch operation to check

Authentication

All API requests must include your API key in the request headers:

"apikey": "your-api-key-here"

Request Example

GET /api/v2/batch/status/batch_66b6005bb7bddce8f05a3400
apikey: your-api-key-here

Response

The API returns detailed information about the batch operation status:

Results

  • results.successful (array): Array of successfully processed items with details passId
  • results.processing (array): Array of processing items with details
  • results.failed (array): Array of failed items

Response Example

{
  "processed": 1,
  "total": 2,
  "success": 1,
  "failed": 0,
  "createdAt": "2025-09-08T17:55:35.455Z",
  "dynamicPassId": "68bf18981f2430ea0622e14a",
  "lastUpdatedAt": "2025-09-08T17:55:46.115Z",
  "message": "Created 1 of 2 passes...",
  "progress": 0.5,
  "successful": [
    {
      "_customerId": "68bf18981f2430ea0622e14e",
      "name": "AddTowallet.co",
      "email": "[email protected]",
      "org": "test",
      "passId": "68bf18a0fd78024404330b8b"
    }
  ],
  "processing": [
    {
      "_customerId": "68bf18981f2430ea0622e14f",
      "name": "John Doe",
      "email": "[email protected]"
      org: "test"
    }
  ]
}

Response Fields

  • • processed: Number of items that have been processed
  • • total: Total number of items in the batch
  • • success: Number of successfully processed items
  • • failed: Number of failed items
  • • progress: Completion progress (0 to 1)
  • • message: Current status message
  • • successful: Array of completed items (includes passId)
  • • processing: Array of in-flight items (only present within 30 minutes if any are pending)
  • • failed: Array of items without passId after 30 minutes or [] when nothing is processing within the 30-minute window

Polling for Updates

For batch operations that are still processing, you should poll this endpoint periodically to check for updates. Recommended polling intervals:

  • Every 2-5 seconds for small batches (<50 items)
  • Every 5-10 seconds for medium batches (50-200 items)
  • Every 10-30 seconds for large batches (>200 items)

Best Practices

  • • Use exponential backoff for polling to reduce server load
  • • Stop polling once status becomes "completed" or "failed"
  • • Implement timeout handling for very long-running operations
Error CodeDescription
400Bad Request - Invalid batchId format.
401Unauthorized - Missing or invalid API key.
403Forbidden - Insufficient permissions to access the batch.
404Not Found - Batch with the specified ID does not exist.
429Too Many Requests - API rate limit exceeded. Please wait before making additional requests.
500Internal Server Error - Unexpected server error while retrieving batch status. Please contact support.