Skip to main content
PUT
Update customer
To change individual fields, use a partial update: PATCH changes only the fields you send. Only the main customer fields are updated. Sub-records such as Addresses and Telephones are not changed by this endpoint; use their own endpoints.
Update works as a full replace: fields you do not send are cleared or reset to their defaults. Read the customer with Get customer first and send it back with your changes.
CustomerCode cannot be "Next" on update.

Authorizations

Authorization
string
header
required

Access token obtained from the Noyax auth service with your API key.

Headers

X-UserID
integer<int32>
required

ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.

Required range: x >= 1
X-CompanyID
integer<int32>
required

ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.

Required range: x >= 1
X-PeriodID
integer<int32>

ID of the accounting period. Optional for customer endpoints; if sent, it is written to created records.

Required range: x >= 1

Path Parameters

customerId
string<uuid>
required

Customer ID.

Body

CustomerCode
null | string

Required. Unique within the company. Send "Next" on create to generate the code from the company's customer number series.

Example:

"0000382026"

Name
null | string

Required. Customer name.

Example:

"Örnek Ticaret A.Ş."

TaxNumber
null | string

Required. Digits only: 10 digits for a tax number (VKN) or 11 digits for a national ID number (TCKN).

Example:

"1234567890"

TaxOffice
null | string

Tax office name.

Example:

"Kadıköy"

InvoiceTitle
null | string

Title used on invoices. If empty, Name is used.

Example:

"Örnek Ticaret Anonim Şirketi"

Note
null | string

Free text note. Required when any ShowNoteOn* field is true.

Example:

"Deliveries on weekdays only."

DueDays
integer<int32>

Payment term in days. Cannot be less than 0.

Example:

30

DiscountRate
number<double>

Default discount rate (%) between 0 and 100.

Example:

5

Blacklisted
boolean

Marks the customer as blacklisted.

Example:

false

MovementType
integer<int32>

1: Supplier, 2: Buyer, 3: Supplier and buyer. 0 is saved as 1.

Example:

2

RiskLimit
number<double>

Risk limit amount. Cannot be less than 0. 0 means no risk limit.

Example:

250000

RiskControl
integer<int32>

How the risk limit is checked. 1: Current balance, 2: Sales amount. Must be 1 or 2 when RiskLimit is greater than 0.

Example:

1

RiskAction
integer<int32>

What happens when the risk limit is exceeded. 0: Continue, 1: Warn the user, 2: Stop the operation.

Example:

1

EInvoiceUser
boolean

Whether the customer is a registered e-invoice user.

Example:

true

EInvoiceScenario
integer<int32>

E-invoice scenario. Must be 1-9 when EInvoiceUser is true, 0 otherwise. 1: Commercial, 2: Basic, 3: Export, 4: Public, 5: HKS, 6: Energy, 7: Pharmaceutical/Medical device, 8: Investment incentive, 9: IDIS.

Example:

1

ShipmentDefinitionId
null | string<uuid>

ID of a shipment definition from GET /api/v1/definitions/shipment-definitions.

SharingCodeId
null | string<uuid>

Sharing code that limits who can see the customer. Empty means visible to everyone; otherwise it must be one of the user's sharing codes.

ShowNoteOnQuote
boolean

Show the note on quotes.

Example:

false

ShowNoteOnOrder
boolean

Show the note on orders.

Example:

false

ShowNoteOnWaybill
boolean

Show the note on waybills.

Example:

true

ShowNoteOnInvoice
boolean

Show the note on invoices.

Example:

false

IdentitySchemes
object[]

Additional identifiers (e.g. MERSISNO). Each SchemeID can be sent only once.

Response

OK

Success
boolean
required

Whether the operation succeeded.

Example:

true

ResultCode
string
required

"0000" on success. On failure, the code of the first error; all errors are listed in Errors.

Example:

"0000"

Data
object
required
Message
null | string

Error message when Success is false. Messages of all errors are joined into a single text.