Skip to main content

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

HeaderRequiredDescription
AuthorizationYesValid token in Bearer {AccessToken} format
Content-TypeYesapplication/json

Update Reference Field

FieldTypeRequiredDescription
updateCodestringYesCode of the dealer to update (must exist in the system)

Request Body Fields

Vendor (Dealer) Information

FieldTypeRequiredDescription
codestringYesDealer code (must be unique)
erpCodestringYesDealer code in the ERP system (must be unique)
namestringYesDealer name
countryCodestringYesCountry code (e.g., "TR")
cityCodestringNoCity code
districtCodestringNoDistrict code
addressstringNoAddress information
phonestringNoLandline phone number
taxNumberstringNoTax number (for corporate dealers)
taxOfficestringNoTax office (for corporate dealers)
isCompanybooleanYestrue: Corporate, false: Individual
isForeignNationalbooleanNoIs foreign national
paymentSetIdstringNoDefault payment set definition
currencyCodestringNoCurrency code (e.g., "TRY")
customerRepresentativeIdsarray(string)NoList of dealer representative IDs
usablePaymentSetDefinitionIdsarray(string)NoList of usable payment set IDs
parentTenantIdstringNoParent tenant ID (for dealer hierarchy)
{  
"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"
}*/
]
}

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; taxNumber and taxOffice are 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.