Customer card creation
POST
/v1/client-card
const url = 'https://api-admin.billz.ai/v1/client-card';const options = { method: 'POST', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"customer_id":"00000000-0000-0000-0000-000000000000"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-admin.billz.ai/v1/client-card \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \ --data '{ "customer_id": "00000000-0000-0000-0000-000000000000" }'Issues the customer one more card with a generated code. The first card is created together with the customer (POST /v1/client), so after the call the customer has two cards, and each further call adds another one.
id in the response is the customer identifier, not the card identifier. The customer’s cards are in cards of the GET /v1/customer/{id} response.
Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”platform-id
string
Platform identifier. A static value is used for integrations.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
customer_id
required
Identifier of the customer for whom the card is created.
string format: uuid
Example
{ "customer_id": "00000000-0000-0000-0000-000000000000"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
id
Customer identifier from the request (not the card identifier)
string format: uuid
card_code
Generated card code (barcode)
string
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "card_code": "example"}