Listing & Retrieving a Dealer
Endpoints
- List all dealers:
GET /vendor/dealer - Single dealer details (by code):
GET /vendor/dealer/{code} - Single dealer details (by erpCode):
GET /vendor/dealer/{erpCode}
HTTP Method: GET
Request Content-Type: application/json
Response Content-Type: application/json
Authorization: Valid AccessToken is required.
(See: 2. Authentication – Obtaining AccessToken)
Description
This service allows listing dealer records in the system or retrieving details of a single dealer.
- If searched using
codeorerpCodeparameter, only the single dealer record is returned. - If no parameter is provided, the system returns all dealers in a paginated format.
- Multiple parameters cannot be used at the same time.
Header Information
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Valid token in Bearer {AccessToken} format |
| Content-Type | Yes | application/json |
Route Parameters – Single Record Retrieval
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | One of the two required | Dealer user code |
| erpCode | string | One of the two required | Dealer ERP code |
Only one of the code or erpCode parameters should be used.
Query Parameters – Pagination (Listing)
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number to retrieve (default: 1) |
| pageSize | integer | No | Number of records per page (default: 10, maximum: 100) |
Response Body – Vendor (Dealer) Fields
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | Dealer user code (unique) |
| name | string | Yes | Dealer name (individual or corporate) |
| address | string | No | Dealer address information |
| cityCode | string | No | City code |
| districtCode | string | No | District code |
| countryCode | string | Yes | Country code (e.g., "TR") |
| erpCode | string | Yes | ERP code (unique) |
| taxNumber | string | Conditional | Tax number (required if isCompany = true) |
| taxOffice | string | Conditional | Tax office (required if isCompany = true) |
| isCompany | boolean | Yes | true if corporate, false if individual |
| isIndividual | boolean | Yes | true if individual customer |
| isForeignNational | boolean | No | Is foreign national |
| phone | string | No | Phone number |
| paymentSetDefinitionId | string | No | Payment set definition ID |
| usablePaymentSetDefinitionIds | array | No | Usable payment set definitions |
| paymentExCurrencyType | string | No | Payment currency type |
| parentTenantId | string | No | Parent dealer/customer ID |
| customerRepresentativeIds | array | No | List of customer representative IDs |
| isActive | boolean | No | Active/inactive status |
| users | array | No | List of dealer users |
Response Body – User (Dealer User) Fields
| Field | Type | Required | Description |
|---|---|---|---|
| userCode | string | Yes | User code |
| name | string | Yes | User first name |
| surname | string | Yes | User last name |
| string | Yes | User email address | |
| gsm | string | Yes | Mobile phone |
| title | string | No | Title |
| description | string | No | Description |
| erpCode | string | No | ERP code |
| isActive | boolean | No | Active/inactive status |
| isIndividual | boolean | Yes | Is individual user |
| isForeignNational | boolean | No | Is foreign national |
| paymentExCurrencyType | string | No | Payment currency type |
| roles | array | No | List of roles |
| sendRegisterMail | boolean | No | Send registration email? |
| taxNumber | string | Conditional | Tax number (required if isCompany = true) |
| taxOffice | string | Conditional | Tax office (required if isCompany = true) |
| userType | string | No | User type |
| canUseMobile | boolean | No | Mobile usage permission |
- Example Response (Single)
- Example cURL (Single)
{
"status": "success",
"dealer": {
"code": "601",
"name": "test dealer vendor01101",
"address": "test1111",
"cityCode": "10",
"districtCode": 494,
"countryCode": "TKM",
"erpCode": "601",
"taxNumber": "00000000000",
"taxOffice": null,
"isCompany": false,
"paymentSetId": null,
"usablePaymentSetDefinitionIds": [
"958949df-0d90-4851-bcb8-1acb62c4dc95",
"79ce2e5f-51cb-4d29-beca-955685e86c50"
],
"parentTenantId": "670683c1-2fe0-4846-87b2-6cba9b793ab2",
"customerRepresentativeIds": [
"c0dc9553-4bb7-4611-9e93-1d58c65a3fa6",
"4b80f492-ed80-445d-943f-2125125e3667"
],
"currenyCode": null,
"isActive": true,
"users": []
}
}
curl --location 'https://pgw.netahsilatdemo.com/vendor/dealer/601' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJwd3N2MS5hcGkiLCJlcnB2MS5hcGkiLCJjYXR2MS5hcGkiLCJ2ZW5kb3J2MS5hcGkiXSwiYWN0b3J0Ijoic2VydmljZSIsInJvbGUiOiJzZXJ2aWNlIiwiVW5pcXVlIjoiYTI3NmYyOGEtOWMwYS00NGYxLWIxNjgtMTJiMGY3NTEwMWYzIiwiVGVuYW50SWQiOiI2NzA2ODNjMS0yZmUwLTQ4NDYtODdiMi02Y2JhOWI3OTNhYjIiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL2V4cGlyYXRpb24iOiI2Mzg5NjE5NDQzNzQ5NjM1ODYiLCJuYmYiOjE3NjA0MjQ4MzcsImV4cCI6MTc2MDU5NzYzNywiaWF0IjoxNzYwNDI0ODM3LCJpc3MiOiJzc28uYXBpIiwiYXVkIjoiZWNvenVtLnNzbyJ9.G0FFvRyNF_qCYQvUjvDWzGuf05JpJujSgC5ZMV9_BIQ'
- Example Response (Multiple)
- Example cURL (Multiple)
{
"data": [
{
"code": "NT23421002",
"name": "Test Dealer 0704",
"address": null,
"cityCode": null,
"districtCode": null,
"countryCode": null,
"erpCode": null,
"taxNumber": "00000000000",
"taxOffice": null,
"isCompany": false,
"paymentSetId": "504978bf-bebd-40c5-89aa-b76f3a20341c",
"usablePaymentSetDefinitionIds": [],
"parentTenantId": "670683c1-2fe0-4846-87b2-6cba9b793ab2",
"customerRepresentativeIds": [
"55f45998-2e72-47e6-97c6-2645e207fe3c"
],
"currenyCode": null,
"isActive": true,
"users": [
{
"userCode": "",
"name": "Test ",
"surname": "Dealer",
"email": "[email protected]",
"gsm": "5000000000",
"title": null,
"description": "",
"erpCode": "",
"isActive": true,
"isCompany": false,
"phone": null,
"countryCode": null,
"cityCode": null,
"currenyCode": null,
"address": null,
"isForeignNational": false,
"tckn": "00000000000",
"paymentSetId": "504978bf-bebd-40c5-89aa-b76f3a20341c",
"roles": [
"A5A29750-5D00-43CF-BEB9-8A8B8EC2781E"
],
"canUseMobile": true,
"id": "aa167cfa-ca39-4d98-8930-aebb107d16c9"
}
]
}
]
}
curl --location 'https://pgw.netahsilatdemo.com/vendor/dealer?page=1&pageSize=10' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJwd3N2MS5hcGkiLCJlcnB2MS5hcGkiLCJjYXR2MS5hcGkiLCJ2ZW5kb3J2MS5hcGkiXSwiYWN0b3J0Ijoic2VydmljZSIsInJvbGUiOiJzZXJ2aWNlIiwiVW5pcXVlIjoiYTI3NmYyOGEtOWMwYS00NGYxLWIxNjgtMTJiMGY3NTEwMWYzIiwiVGVuYW50SWQiOiI2NzA2ODNjMS0yZmUwLTQ4NDYtODdiMi02Y2JhOWI3OTNhYjIiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL2V4cGlyYXRpb24iOiI2Mzg5NjE5NDQzNzQ5NjM1ODYiLCJuYmYiOjE3NjA0MjQ4MzcsImV4cCI6MTc2MDU5NzYzNywiaWF0IjoxNzYwNDI0ODM3LCJpc3MiOiJzc28uYXBpIiwiYXVkIjoiZWNvenVtLnNzbyJ9.G0FFvRyNF_qCYQvUjvDWzGuf05JpJujSgC5ZMV9_BIQ'
Notes
-
If
pageorpageSizeparameters are not provided, default valuespage=1,pageSize=10are used. -
If queried using
codeorerpCode, only a single record is returned. -
For dealers with
isCompany = true,taxNumberandtaxOfficeare required. -
The
usersarray contains the dealer’s users and can be empty. -
The
usablePaymentSetDefinitionIdsparameter supports multiple payment set definitions.