Skip to main content

Creating a Customer

Description

Through this service, a customer record can be created just like via the Portal screen. Both individual and corporate customers are supported. Additionally, some optional fields used in the system (passportNo, districtCode, isForeignNational, title) can also be sent.

  • Endpoint: /vendor/customer
  • Method: POST
  • Request Content-Type: application/json Authorization: Valid AccessToken is required. (See: Section 1 – Obtaining AccessToken)

Request Body

Field NameTypeRequiredDescription
codestringYesCustomer or sub-customer user code (must be unique).
companyNamestringYes (if isCompany True)Company name for corporate customers.
firstNamestringYes (if isCompany False)First name for individual customers.
lastNamestringYes (if isCompany False)Last name for individual customers.
emailstringYesCustomer/sub-customer email address.
mobilestringYesMobile phone number.
phonestringNoLandline phone number.
countryCodestringYesCountry code (e.g., "TR").
cityCodestringNoCity code.
districtCodeintegerNoDistrict code (optional).
currencyCodeintegerYesCurrency ID.
erpCodestringYesERP code (must be unique).
isActivebooleanNoActive/Inactive status (true or false).
isCompanybooleanYesTrue for corporate, false for individual.
addressstringNoAddress information.
tcknstringYes (if isCompany False)National ID number for individual customers.
taxNumberstringYes (if isCompany True)Tax number for corporate customers.
taxOfficestringYes (if isCompany True)Tax office for corporate customers.
sendMailbooleanNoShould a registration email be sent (true or false).
addDefaultCurrentAccountbooleanNoShould a default current account be created automatically after registration.
paymentSetIdstringNoDefined payment set ERP code.
canUseMobilebooleanNoShould mobile access be allowed.
customerRepresentativeIdsarrayNoIDs of customer representatives.
passportNostringNoForeign ID/passport number.
isForeignNationalbooleanNoIs the customer a foreign national.
titlestringNoTitle or additional information (optional).

Example Request

  • Header: Authorization: Bearer {token}, Content-Type: application/json
  • Body: JSON
{  
"code": "5",
"phone": "5000000000",
"countryCode": "TR",
"cityCode": "10",
"districtCode": 494,
"currencyCode": "TRY",
"erpCode": "",
"address": "test",
"taxNumber": "",
"taxOffice": "Silifke",
"paymentSetId": "504978bf-bebd-40c5-89aa-b76f3a20341c",
"customerRepresentativeIds": [
"a90b225c-fa6e-418d-8c03-93946a05e355"
],
"isForeignNational": false,
"isCompany": false,
"companyName": "",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "5000000000",
"passportNo": "",
"canUseMobile": false,
"sendMail": true,
"isActive": true,
"tckn": "00000000000"
}