Updating a Dealer
- Endpoint:
/vendor/dealer - HTTP Method:
PUT - Request Content-Type:
application/json - Response Content-Type:
application/json - Authorization: Valid AccessToken is required. (See: 2. Authentication – Obtaining AccessToken)
Description
This service allows updating an existing dealer (vendor) and its associated dealer user(s) information in the system. The request includes the dealer’s basic information and optionally the user information.
The dealer to be updated must be specified using the updateCode field. Fields not sent will retain their existing values in the system.
Header Information
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Valid token in Bearer {AccessToken} format |
| Content-Type | Yes | application/json |
Update Reference Field
| Field | Type | Required | Description |
|---|---|---|---|
| updateCode | string | Yes | Code of the dealer to update (must exist in the system) |
Request Body Fields
Vendor (Dealer) Information
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | Dealer code (must be unique) |
| erpCode | string | Yes | Dealer code in the ERP system (must be unique) |
| name | string | Yes | Dealer name |
| countryCode | string | Yes | Country code (e.g., "TR") |
| cityCode | string | No | City code |
| districtCode | string | No | District code |
| address | string | No | Address information |
| phone | string | No | Landline phone number |
| taxNumber | string | No | Tax number (for corporate dealers) |
| taxOffice | string | No | Tax office (for corporate dealers) |
| isCompany | boolean | Yes | true: Corporate, false: Individual |
| isForeignNational | boolean | No | Is foreign national |
| paymentSetId | string | No | Default payment set definition |
| currencyCode | string | No | Currency code (e.g., "TRY") |
| customerRepresentativeIds | array(string) | No | List of dealer representative IDs |
| usablePaymentSetDefinitionIds | array(string) | No | List of usable payment set IDs |
| parentTenantId | string | No | Parent tenant ID (for dealer hierarchy) |
- Example Request Body
- Successful Response
{
"code": "601",
"phone": "5000000000",
"erpCode": "601",
"countryCode": "TKM",
"cityCode": "10",
"districtCode": 494,
"currencyCode": "TRY",
"address": "test1111",
"taxNumber": "00000000000",
"paymentSetId": "00cfced3-c429-444e-8125-fff3a7fb553a",
"customerRepresentativeIds": [
"c0dc9553-4bb7-4611-9e93-1d58c65a3fa6",
"4b80f492-ed80-445d-943f-2125125e3667"
],
"isForeignNational": false,
"isCompany": false,
"name": "test dealer vendor01101",
"parentTenantId": "670683c1-2fe0-4846-87b2-6cba9b793ab2",
"usablePaymentSetDefinitionIds": [
"958949df-0d90-4851-bcb8-1acb62c4dc95",
"79ce2e5f-51cb-4d29-beca-955685e86c50"
],
"users": [
/* {
"canUseMobile": true,
"description": "test",
"email": "[email protected]",
"gsm": "5000000000",
"isActive": true,
"name": "John",
"surname": "Doe",
"roles": [
"61002d8f-8fdd-430a-96dd-c5d87f5c9bda"
],
"sendMail": false,
"userType": 8387,
"code": "test000feafasdvagvawerg",
"id": "79d12dbf-ef35-4e50-bdbe-a2df6bd5e316"
}*/
]
}
{
"status": "success",
"message": "Dealer successfully updated.",
"customerId": "1426472f-15fa-43a5-9930-9f80234594fd"
}
Notes and Best Practices
- updateCode: The dealer to be updated must be specified using this field.
- Partial Update: Fields not sent will retain their existing values.
- vendor and users: Fields can be sent together or separately.
- isCompany = false: Individual dealer; tax fields are optional.
- isCompany = true: Corporate dealer;
taxNumberandtaxOfficeare required. - sendRegisterMail = true: Sends an email to the user after update.
- Token renewal: If the token expires, the API returns
401 Unauthorized; a new token must be obtained and the request retried.