Skip to main content
PATCH
Partially update customer
Send only the fields you want to change; fields you do not send keep their current values. Rules and examples: partial update.
  • A field that is not sent stays unchanged, a field sent as null is cleared.
  • Validation runs on the whole merged record; setting a required field to null is rejected.
  • Sub-records (addresses, telephones, bank accounts, …) are not changed here; use their own endpoints.

Error codes

Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, request limits) are not repeated here.

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; 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

ShipmentDefinitionCode
null | string

Shipment definition code from GET /api/v1/definitions/shipment-definitions.

Example:

"KARAYOLU-1"

SharingCode
null | string

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

ShowNoteOnDespatch
boolean

Show the note on despatches.

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

Response data. Null when Success is false.

Message
null | string

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