Skip to main content
PUT
Update despatch
To change individual fields use partial update: PATCH changes only the fields you send. The update is a full replacement and the lines are replaced too, but the order in which you send lines determines their identity: see line identity on update. Always send the lines in the same order Get despatch returned them, with only the fields you actually want to change edited in place.
  • DespatchType cannot be changed and DespatchNumber cannot be "Next" (7003).
  • A Lot that has already been consumed by an outbound transaction, or a serial number that has already been dispatched, blocks removing or reducing the line/entry it belongs to.
  • A despatch line linked to an order (see linked orders) cannot be updated to exceed the order line’s quantity (7115).
  • The API does not calculate amounts; send the totals as your system calculated them.

Error codes

Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, daily limit) 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 for customer endpoints; if sent, it is written to created records.

Required range: x >= 1

Path Parameters

despatchId
string<uuid>
required

Despatch ID.

Body

DespatchType
integer<int32>

Required. 2: Inbound despatch (goods receipt), -2: Outbound despatch (dispatch). Cannot be changed after the despatch is created.

Example:

-2

DespatchNumber
null | string

Required. Despatch number, unique within the company for the same DespatchType. Send "Next" on create to generate it automatically: from the company's despatch number series for the type, or, for an outbound despatch when the company uses e-Despatch, from the e-Despatch numbering. At most 20 characters.

Example:

"9446A4D834"

DocumentNumber
null | string

Document number (free text). At most 100 characters.

Example:

"2026-15"

Date
null | string<date-time>

Required. Despatch date. The date part is stored as the despatch date; if a time is sent it is stored as the despatch time, otherwise the current time is used.

Example:

"2026-09-21T10:30:00"

ActualDispatchDate
null | string<date-time>

Actual dispatch date.

Description
null | string

Description. At most 1000 characters.

CustomerCode
null | string

Required. Customer code (the customer's CustomerCode from GET /api/v1/customers). The despatch's address, title and tax fields are copied from the customer at the moment it is saved (the invoice address when the customer has one, otherwise the first address) and are not accepted in the request.

Example:

"C-0001"

CurrencyCode
null | string

Required. Currency code from GET /api/v1/definitions/currencies.

Example:

"TRY"

DueDays
integer<int32>

Payment term in days. Cannot be less than 0.

Example:

30

SharingCode
null | string

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

ShipmentDefinitionCode
null | string

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

DiscountTotal
number<double>

Total discount amount. Sent by the integrator, not calculated by the API.

Example:

0

SubTotal
number<double>

Subtotal (sum of the line amounts excluding taxes). Sent by the integrator, not calculated by the API.

Example:

1000

VatTotal
number<double>

Total VAT amount. Sent by the integrator, not calculated by the API.

Example:

200

AdditionalTaxTotal
number<double>

Total additional tax amount. Sent by the integrator, not calculated by the API.

Example:

0

WithholdingTotal
number<double>

Total withholding (tevkifat) amount. Sent by the integrator, not calculated by the API.

Example:

0

GrandTotal
number<double>

Grand total. Sent by the integrator, not calculated by the API.

Example:

1200

AverageExchangeRate
number<double>

Weighted average exchange rate of the lines. Sent by the integrator, not calculated by the API. Use 1 when everything is in the company's default currency.

Example:

1

Lines
object[]

Required, at least one line. On update, the order in which lines are sent determines their identity: the line at the same position as an existing line is treated as that line (its Lot/serial number and linked-order records move with it), a shorter list removes the trailing lines, a longer list adds new ones at the end.

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.