Google Sheet Extension
PDF to Pass
Image to Pass
The Delete Pass API enables you to archive digital passes by setting their state to EXPIRED. This endpoint moves the pass to the archived section of users' wallets based on its unique identifier.
All API requests must include your API key in the request headers:
"apikey": "your-api-key-here"
Include the pass ID in the URL path. No request body is required for this endpoint.
| Name | Type | Required | Description |
|---|---|---|---|
| cardId | string | Yes | Path parameter: unique identifier of the pass to be archived |
curl -X DELETE 'https://api.addtowallet.co/api/card/delete/66b6005bb7bddce8f05a3392' -H 'apikey: YOUR_API_KEY'
Upon successful archival, the API returns a JSON object containing:
{
"msg": "Card successfully marked as deleted",
"deleteStatus": {
"acknowledged": true,
"modifiedCount": 1,
"upsertedId": null,
"upsertedCount": 0,
"matchedCount": 1
}
}The API may return the following error status codes:
| Status Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid pass ID format |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient permissions to archive the pass |
| 404 | Not Found | The requested pass does not exist |
| 500 | Internal Server Error | Unexpected server error. Please contact support |
Example error response:
{
"success": false,
"error": "Pass not found",
"errorCode": "PASS_NOT_FOUND"
}