Skip to main content

Get email claims

You can use the Phosphor API to get multiple email claims or a specific email claim.

Get multiple email claims

Issue a GET request to the email-claims endpoint to get all email claims for an organization.

GET https://admin-api.phosphor.xyz/v1/email-claims

This is a paginated endpoint that returns results up to a certain limit.

  • Specify a cursor from the previous response return the next batch of results from the offset.
  • Specify an order_by that equals to created_at, expiration and claimed_at to order results by corresponding timestamps.
  • Specify an order_directionin ASC or DESC to sort results in an ascending or descending order.
  • Additional query parameters can be specified to further filter the results, including: collection_ids, item_ids, token_ids, email, active, claimed.
GET https://admin-api.phosphor.xyz/v1/email-claims?limit=1
Example response (abbreviated)
{
"cursor": "ZHRfMTY1NTkwNjI5NS44NTg0NTc.",
"has_more": true,
"results": [
{
"active": true,
"claimed": false,
"claimed_at": null,
"collection_id": "3a6ae429-192a-4844-9e3c-c3742725a4e7",
"created_at": "2022-03-22T18:28:35.549054+00:00",
"email": "aaa@bbb.com",
"expiration": "2022-04-21T18:28:35.549150+00:00",
"id": "299fe5f9-473a-4edf-81ed-ea39bb6b518b",
"item_id": "eaa4bbe2-b2c9-4c54-9900-50c5e42cc3d7",
"last_pin_code_email_sent_at": null,
"quantity": 1,
"token_id": "3",
"tx_hash": null,
"tx_payer": "SELLER",
"voucher_id": null
},
"total_results": 10
]
}
  • cursor indicates an offset from which the next batch of results begins.
  • has_more returns true if there are more results than already displayed.
  • results returns an array of email claims from the search.
  • total_results returns the total number of results from the response.

Get a specific email claim

Issue a GET request to the email-claims endpoint with an ID to get the email claim for the ID.

GET https://admin-api.phosphor.xyz/v1/email-claims/{claim_id}
Example response
{
"active": true,
"claimed": true,
"claimed_at": null,
"collection_id": "4bdef85c-3f50-4006-a713-2350da665f80",
"created_at": "2019-08-24T14:15:22Z",
"email": "string",
"expiration": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
"last_pin_code_email_sent_at": null,
"quantity": 1,
"token_id": "string",
"tx_hash": null,
"tx_payer": "BUYER",
"voucher_id": "1b5a607b-e5eb-4b17-80b0-5739c041e81b"
}