Listing and Retrieving Customers
Endpoint
| Purpose | Endpoint | Description |
|---|---|---|
| List all customers | GET /vendor/customers | Returns a paginated list of customers. |
| Single customer detail (by code) | GET /vendor/customer/{code} | Details of the specified customer code. |
| Single customer detail (by erpCode) | GET /vendor/customer/{erpCode} | Customer information by ERP code. |
HTTP Information
- HTTP Method:
GET - Request Content-Type:
application/json(optional) - Response Content-Type:
application/json - Authorization: Valid AccessToken is required. (See: 2. Authentication)
Description
This service is used to list customer data or view detailed information of a specific customer.
- If
codeorerpCodeparameter is provided, only that customer is returned. - If no parameter is provided, all records are returned with pagination.
Header Information
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Token in Bearer {AccessToken} format |
| Content-Type | No | application/json |
Route Parameters (Single Record)
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | One of the two required | Customer user code |
erpCode | string | One of the two required | Customer ERP code |
Only one parameter should be used. If neither is provided, the system returns all records.
Query Parameters (Listing)
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page to retrieve (default: 1) |
pageSize | integer | No | Number of records per page (default: 10, max: 100) |
### Response Body {#response-body}
- Single Customer
- Paginated List
{
"status": "success",
"customer": {
"code": "NT55073821",
"companyName": null,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "5000000000",
"phone": null,
"countryCode": null,
"cityCode": null,
"currenyCode": "TRY",
"erpCode": "",
"address": null,
"isActive": true,
"isCompany": false,
"tckn": "00000000000",
"taxNumber": null,
"taxOffice": null,
"paymentSetId": "504978bf-bebd-40c5-89aa-b76f3a20341c"
}
}
{
"data": [
{
"code": "NT55073821",
"companyName": null,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "5000000000",
"phone": null,
"countryCode": null,
"cityCode": null,
"currenyCode": "TRY",
"erpCode": "",
"address": null,
"isActive": true,
"isCompany": false,
"tckn": null,
"taxNumber": null,
"taxOffice": null,
"paymentSetId": "504978bf-bebd-40c5-89aa-b76f3a20341c"
},
{
"code": "225552sssssss7777722",
"companyName": "",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "5000000000",
"phone": null,
"countryCode": null,
"cityCode": null,
"currenyCode": null,
"erpCode": null,
"address": "",
"isActive": false,
"isCompany": false,
"tckn": null,
"taxNumber": null,
"taxOffice": null,
"paymentSetId": null
}
]
}
Usage Notes
- Filtering: If both
codeanderpCodeare sent, onlycodeis considered. - Pagination: If
pageandpageSizeare not specified, the first 10 records are returned by default. - Field Consistency: Field names are the same in
GET /vendor/customerandPUT /vendor/customerservices. - Performance: Filtering is recommended for large datasets for better performance.
- Authorization: If the token has expired, a 401 error is returned; re-authentication is required.