Skip to main content
PUT
Update purchase invoice
Only the descriptive fields of the purchase invoice can be updated: Description, DocumentNumber, ShipmentDefinitionCode, SharingCode, PrintDescription, Consolidated, ReturnedInvoiceNumber/ReturnedInvoiceDate, OrderReferenceNumber/OrderReferenceDate, BranchNumber/BranchTitle/BranchAddress, InvestmentIncentiveDocumentNumber/InvestmentIncentiveDocumentDate, EnergyPeriodStart/EnergyPeriodEnd and the extra structured fields (DeliveryInfo, PaymentMeans, ReferencedDespatches, CustomerIdentitySchemes, PublicSectorSpendingUnit, SgkInfo). The update is a full replacement of these fields: the ones you do not send are cleared. To change only some of them use partial update: PATCH changes only the fields you send. The lines, customer, date and time, invoice number, payment term, amounts, taxes, ProfileId/InvoiceTypeCode and exchange rate cannot be updated: if the request body contains any of them it is rejected (0002). To correct them, delete the purchase invoice and create it again, or issue a return invoice. An invoice that has already been sent to GİB cannot be deleted (3027), but its descriptive fields can still be updated. Changing Description also updates the description of the invoice’s customer ledger entry.
PUT /api/v1/purchase-invoices/{invoiceId}

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

invoiceId
string<uuid>
required

Purchase invoice ID.

Body

Description
null | string

Description. At most 1000 characters.

DocumentNumber
null | string

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

ShipmentDefinitionCode
null | string

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

SharingCode
null | string

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

PrintDescription
boolean

Whether the description should be printed on the invoice document.

Consolidated
boolean

Whether the invoice consolidates several despatches/orders. Free-form flag, not validated by the API.

ReturnedInvoiceNumber
null | string

Number of the invoice this one returns goods against (Alış/Satış İade). Free text, not validated against an existing invoice.

ReturnedInvoiceDate
null | string<date>

Date of the invoice this one returns goods against. Date only (yyyy-MM-dd), no time part.

Example:

"2026-10-15"

OrderReferenceNumber
null | string

Reference order number (free text, informational only).

OrderReferenceDate
null | string<date>

Date of the reference order. Date only (yyyy-MM-dd), no time part.

Example:

"2026-10-15"

BranchNumber
null | string

Branch number (informational).

BranchTitle
null | string

Branch title (informational).

BranchAddress
null | string

Branch address (informational).

InvestmentIncentiveDocumentNumber
null | string

Investment incentive certificate number.

InvestmentIncentiveDocumentDate
null | string<date>

Investment incentive certificate date. Date only (yyyy-MM-dd), no time part.

Example:

"2026-10-15"

EnergyPeriodStart
null | string<date-time>

Energy period start date/time, for energy sector invoices.

EnergyPeriodEnd
null | string<date-time>

Energy period end date/time, for energy sector invoices.

DeliveryInfo
null | object

Export delivery information. Stored and returned as sent, not validated.

PaymentMeans
object[]

Payment methods. Stored and returned as sent, not validated.

ReferencedDespatches
object[]

Referenced despatches. Stored and returned as sent, not validated.

CustomerIdentitySchemes
object[]

Customer identity schemes. Stored and returned as sent, not validated.

PublicSectorSpendingUnit
null | object

Public sector (Kamu) payer spending unit. Stored and returned as sent, not validated.

SgkInfo
null | object

SGK (social security) invoice information. Stored and returned as sent, not validated.

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.