Debit Note

Update the metadata of an existing debit note

Changed on

Update the metadata of an existing debit note. The keys you send are merged into the debit note's metadata: new keys are added, existing keys are overwritten, and keys you leave out are kept as they are. Set a key to null to remove it.

Only metadata can be updated; the rest of the debit note is what was reported to ZATCA and cannot change. Metadata values must be non-empty strings, and keys cannot contain . or start with $.

patch/zatca/debit-notes/{id}/

Request

  • Base URL
    https://api.wafeq.com/v1
  • URL
    https://api.wafeq.com/v1/zatca/debit-notes/{id}/
  • Auth
    API key in header Authorization

Path parameters

idstring required

The unique identifier of the document.

Headers

X-ZATCA-Branchstring

If the account is under a Group VAT, then it is required to be the TIN of the instance under the Group VAT. Otherwise it is optional and can be used as a branch name

X-ZATCA-Connected-Account-Idstring

The unique identifier of the connected account you're operating on behalf of.

Connected accounts should be used only for Platforms and White Label integrations that onboard customers and report documents on their behalf. Omit the X-ZATCA-Connected-Account-Id header when registering devices or reporting documents for your own organization. See the Platforms and White Label guide.

X-ZATCA-Environmentstring

The ZATCA environment to use, one of ['production', 'simulation']. A ZATCA API key (starting with zatca_live_ or zatca_sim_) already names its environment, so the header is optional with it and must match it when sent. Other API keys and OAuth tokens need it.

Request body

metadataobject

The metadata keys to set. Keys left out are kept as they are; set a key to null to remove it.

Response

The document with its merged metadata

created_tsstring date-time required

The datetime in UTC when the document was created.

metadataobject required

The metadata of the document.

qr_code_datastring required

Base64 encoded QR code data.

referencestring required

The reference of the document.

reported_tsstring date-time nullable required

The datetime in UTC when the document was reported/cleared.

responseunknown required
sent_tsstring date-time nullable required

The datetime in UTC when the document was sent.

statusstring required

The status of the document.

Changes