Skip to content

Customers ​

The merchant's record of the people who buy from them.

List the merchant's customers​

GET
/customers

Authorizations​

apiKey

The key the merchant issued you, sent verbatim including its bik_ prefix. Bione stores only a hash, so a lost key cannot be recovered — it has to be reissued.

Type
API Key (header: api-key)

Parameters​

Query Parameters

page
Type
integer
Minimum
1
Default
1
pageSize
Type
integer
Minimum
1
Default
20
q

Search name

Type
string

Responses​

A page of customers.

application/json
JSON
{
  
"code": 0,
  
"message": "string",
  
"data": {
  
  
"items": [
  
  
  
{
  
  
  
  
"id": "string",
  
  
  
  
"organizationId": "string",
  
  
  
  
"userId": "string",
  
  
  
  
"fullName": "string",
  
  
  
  
"phone": "string",
  
  
  
  
"email": "string",
  
  
  
  
"lifetimeSpend": "string",
  
  
  
  
"cashbackBalance": "string",
  
  
  
  
"ordersCount": 0,
  
  
  
  
"lastOrderAt": "string",
  
  
  
  
"createdAt": "string",
  
  
  
  
"updatedAt": "string"
  
  
  
}
  
  
],
  
  
"total": 0,
  
  
"page": 0,
  
  
"pageSize": 0,
  
  
"totalPages": 0
  
},
  
"messages": {
  
  
"uz": "string",
  
  
"ru": "string",
  
  
"en": "string"
  
},
  
"status_code": 200,
  
"time": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Create or update a customer by phone​

POST
/customers

Keyed on the phone number, so sending the same one again updates the existing record instead of creating a second. That makes an address-book sync safe to re-run.
No Bione account is created for the person. A contact in your system is not evidence they have transacted, and an account is someone's identity rather than a row in a CRM. The person gets one when they sign in to Bione with this number, which also attaches this record to it; until then userId is null and the orders route cannot take them as its customer.
The number is stored as claimed, not verified. Nobody has proved they hold it, so it grants nothing until that person proves it at sign-in, which is also what attaches this record to their account.

Authorizations​

apiKey

The key the merchant issued you, sent verbatim including its bik_ prefix. Bione stores only a hash, so a lost key cannot be recovered — it has to be reissued.

Type
API Key (header: api-key)

Request Body​

application/json
JSON
{
  
"phone": "+998901234567",
  
"fullName": "string"
}

Responses​

The customer record.

application/json
JSON
{
  
"code": 0,
  
"message": "string",
  
"data": {
  
  
"id": "string",
  
  
"organizationId": "string",
  
  
"userId": "string",
  
  
"fullName": "string",
  
  
"phone": "string",
  
  
"email": "string",
  
  
"lifetimeSpend": "string",
  
  
"cashbackBalance": "string",
  
  
"ordersCount": 0,
  
  
"lastOrderAt": "string",
  
  
"createdAt": "string",
  
  
"updatedAt": "string"
  
},
  
"messages": {
  
  
"uz": "string",
  
  
"ru": "string",
  
  
"en": "string"
  
},
  
"status_code": 200,
  
"time": "string"
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI

Get one customer​

GET
/customers/{id}

Authorizations​

apiKey

The key the merchant issued you, sent verbatim including its bik_ prefix. Bione stores only a hash, so a lost key cannot be recovered — it has to be reissued.

Type
API Key (header: api-key)

Responses​

The customer.

application/json
JSON
{
  
"code": 0,
  
"message": "string",
  
"data": {
  
  
"id": "string",
  
  
"organizationId": "string",
  
  
"userId": "string",
  
  
"fullName": "string",
  
  
"phone": "string",
  
  
"email": "string",
  
  
"lifetimeSpend": "string",
  
  
"cashbackBalance": "string",
  
  
"ordersCount": 0,
  
  
"lastOrderAt": "string",
  
  
"createdAt": "string",
  
  
"updatedAt": "string"
  
},
  
"messages": {
  
  
"uz": "string",
  
  
"ru": "string",
  
  
"en": "string"
  
},
  
"status_code": 200,
  
"time": "string"
}

Playground​

Authorization

Samples​

Powered by VitePress OpenAPI