Create credit note for invoice

Generate and saves a credit note draft of a given booked invoice.

Query parameters

NameDescription
guid globally unique identifier

Guid of the invoice

Required

organizationId string

Request model

Optional timestamp. If given validate that you got the latest version. This can be used to ensure that the invoice has not been changed since you last fetched it. Defaults to latest version of the invoice.
NameDescription
Timestamp string

Timestamp to validate against. If left empty, default to newest version. This is an optional safety measure, making it possible to ensure that changes are made to the latest version of the entity. The timestamp is generated on Dinero's server every time the entity is updated, and is returned as a part of CreatedResponse and UpdatedResponse. It's also available on the entity itself. If you get a timestamp outdated exception (error code 58), you will need to get the latest version of the enity and use its timestamp.

Returns

201 (created) if the credit note is created. The CreatedResponse contains the timestamp and guid of the created credit note.

NameDescription
Guid globally unique identifier

The id of the object

TimeStamp string

Timestamp of version. To avoid concurrency issues.

v1/{organizationId}/invoices/{guid}/generate-creditnote

Requests Formats

{
  "Timestamp": "00000000020A5EA8"
}

Response Formats

{
  "Guid": "e3d624ad-0713-4680-97b3-c668b37412fb",
  "TimeStamp": "00000000020A5EA8"
}