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

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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
guid

Guid of the invoice

globally unique identifier

Required

organizationId

string

None.

Body Parameters

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.

TimestampObject
NameDescriptionTypeAdditional information
Timestamp

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.

string

None.

Sample:
{
  "Timestamp": "00000000020A5EA8"
}

Response Information

Resource Description

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

CreatedResponse
NameDescriptionType
Guid

The id of the object

globally unique identifier
TimeStamp

Timestamp of version. To avoid concurrency issues.

string
Sample:
{
  "Guid": "defb57d1-8fd5-4571-8e6f-292abeff71ef",
  "TimeStamp": "00000000020A5EA8"
}