Skip to main content

Listing and Retrieving Customers

Endpoint

PurposeEndpointDescription
List all customersGET /vendor/customersReturns 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 code or erpCode parameter is provided, only that customer is returned.
  • If no parameter is provided, all records are returned with pagination.

Header Information

HeaderRequiredDescription
AuthorizationYesToken in Bearer {AccessToken} format
Content-TypeNoapplication/json

Route Parameters (Single Record)

ParameterTypeRequiredDescription
codestringOne of the two requiredCustomer user code
erpCodestringOne of the two requiredCustomer ERP code

Only one parameter should be used. If neither is provided, the system returns all records.

Query Parameters (Listing)

ParameterTypeRequiredDescription
pageintegerNoPage to retrieve (default: 1)
pageSizeintegerNoNumber of records per page (default: 10, max: 100)

### Response Body {#response-body}

{  
"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"
}
}

Usage Notes

  • Filtering: If both code and erpCode are sent, only code is considered.
  • Pagination: If page and pageSize are not specified, the first 10 records are returned by default.
  • Field Consistency: Field names are the same in GET /vendor/customer and PUT /vendor/customer services.
  • 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.