Search gift cards
const url = 'https://api-admin.billz.ai/v1/gift-card/search?page=2&limit=10&types=CERTIFICATE&use_type=SINGLE&from_created_at=01.12.2024&to_created_at=31.12.2024&from_expire_at=01.12.2024&to_expire_at=31.12.2024&from_sold_at=01.12.2024&to_sold_at=31.12.2024&from_used_at=01.12.2024&to_used_at=31.12.2024&show_stats=true&from=190';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-admin.billz.ai/v1/gift-card/search?page=2&limit=10&types=CERTIFICATE&use_type=SINGLE&from_created_at=01.12.2024&to_created_at=31.12.2024&from_expire_at=01.12.2024&to_expire_at=31.12.2024&from_sold_at=01.12.2024&to_sold_at=31.12.2024&from_used_at=01.12.2024&to_used_at=31.12.2024&show_stats=true&from=190' \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Error codes: 404 — object not found; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Card barcode
Status: NEW, ACTIVE, USED, CLOSED, EXPIRED
Page number
Example
2Page size
Example
10Card type: CERTIFICATE or VOUCHER
Example
CERTIFICATEUsage type: SINGLE or MULTIPLE
Example
SINGLEStart of the creation period
Example
01.12.2024End of the creation period
Example
31.12.2024Start of the expiry period
Example
01.12.2024End of the expiry period
Example
31.12.2024Start of the sale period
Example
01.12.2024End of the sale period
Example
31.12.2024Start of the usage period
Example
01.12.2024End of the usage period
Example
31.12.2024Add statistics to the response
Example
trueExample
190Header Parameters
Section titled “Header Parameters”Platform identifier. A static value is used for integrations.
Responses
Section titled “Responses”Successful response
object
Card fields: id, gift_card_type, code, amount, sale_order_id, seller_id, activated_at, expire_type, expire_period, expired_at, status, created_at, deleted_at, user_id, use_type, last_use_date, list_id, error_msg
object
Summary indicators
object
Total count
Examplegenerated
{ "cards": [ { "sold_at": "example", "sale_order_number": "example", "last_used_at": "example", "last_use_order_number": "example", "left_amount": 1, "with_nominal": true, "id": 1, "gift_card_type": "example", "code": "example", "amount": 1, "sale_order_id": "example", "seller_id": "example", "activated_at": "example", "expire_type": "example", "expire_period": "example", "expired_at": "example", "status": "example", "created_at": "example", "deleted_at": 1, "user_id": "example", "use_type": "example", "last_use_date": "example", "list_id": 1, "error_msg": "example", "company_id": "example" } ], "stats": {}, "total": 1}