Book credit note

Book credit note

Query parameters

NameDescription
guid globally unique identifier

Guid of the credit note to book

Required

organizationId string

Request model

Data used for the booking transaction
NameDescription
Number integer

Optional. If specified, the voucher will be created with this number. If the number is already taken the booking of the voucher will fail.

Timestamp string

Timestamp to validate against. This is a safety measure to ensure that an API partner is only making changes 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

200 (ok) if the credit note has been successfully been booked.

NameDescription
PaymentDate string

The invoice's payment date. This should be in the format YYYY-MM-DD e.g. 2015-12-02

PaymentStatus string

An invoice can have payment status Draft, Booked, Paid, OverPaid or Overdue

PaymentConditionNumberOfDays integer

Number of days until payment deadline.

PaymentConditionType string

Type of payment condition. Valid types are: Netto, NettoCash, CurrentMonthOut. Note that if you use NettoCash, PaymentConditionNumberOfDays should be zero.

FikCode string

FIK code (Fælles Indbetalings Kort)

DepositAccountNumber integer

The deposit account to register payments on

Status string

An sales voucher can have status Draft or Booked

ContactGuid globally unique identifier

Dinero contact guid.

Guid globally unique identifier

The guid of the voucher

TimeStamp string

Timestamp of version. To avoid concurrency issues.

CreatedAt date

Time of creation

UpdatedAt date

Time of last update

DeletedAt date

Time of deletion. Null unless the object is deleted.

Number integer

The number of the voucher.

ContactName string

Contact name

ShowLinesInclVat boolean

If true, the user prefers the invoice to be displayed with lines incl vat.

TotalExclVat decimal number

Total amount without vat

TotalVatableAmount decimal number

Total amount to calculate the vat from

TotalInclVat decimal number

Total amount incl. vat

TotalNonVatableAmount decimal number

Total vat free amount

TotalVat decimal number

Total vat amount

TotalLines TotalLine[] Show model
NameDescription
Type string

The type of total line. Options are: SubTotal, SubTotalWithVat, SubTotalWithoutVat, Vat and Total.

TotalAmount decimal number

Value to display

Position integer

Position in which it should be displayed, if part of a list of total lines. 0-based index.

Label string

Label text

Total lines. SubTotal, Vat and Total. Only lines valid for display in the current context are returned.

InvoiceTemplateId globally unique identifier

Template id to use for design.

Currency string

The currency used on the voucher. Defaults to DKK if null. Dinero will assign days date currency rate for the given currency. Currencies are given i format: DKK, EUR, USD ect...

Language string

The language to be used in the voucher. Available languages are 'da-DK' and 'en-GB'. Defaults to 'da-DK'.

ExternalReference string

Your external id This can be used for ID'ing in external apps/services e.g. a web shop. The maximum length is 128 characters

Description string

User supplied description of the voucher e.g. 'Custom Invoice description'. Defaults to document type e.g. 'Invoice', 'Offer', 'Creditnote' using the selected language.

Comment string

User supplied comment on the voucher

Date string

The date of the creation/issuing. This should be in the format YYYY-MM-DD e.g. 2015-12-02. Defaults to today.

ProductLines InvoiceLine[] Show model
NameDescription
AccountName string

Name of the Account

BaseAmountValue decimal number

Amount excl. VAT

BaseAmountValueInclVat decimal number

Base amount incl. VAT

TotalAmount decimal number

Total of the line excl VAT

TotalAmountInclVat decimal number

Total of the line incl VAT

ProductGuid globally unique identifier

The guid of product. If product guid is set, description should be null.

Description string

A description of the product. If no ProductGuid, this field is required. This field will always have a value on the read model, even if a ProductGuid is set.

Comments string

User supplied comment

Quantity decimal number

Quantity

AccountNumber integer

Account number

Unit string

Product unit. Available unit types: hours, parts, km, day, week, month, kilogram, cubicMetre, set, litre, box, case, carton, metre, package, shipment, squareMetre, session, tonne.

Discount decimal number

Discount for the current line. Specified in percentage from 0 to 100.

LineType string

Type. Either Product or Text line. Text is used for creating bold lines only with text displayed, these lines are purely visual and have no effect on the voucher. Text lines should only contain a description. Product lines are the actual lines of the invoice used for accounting and total calculations.

User supplied invoice lines. Minimum one.

Address string

Contact address (linebreaks are allowed '\n'). When null is specified the address defaults to the contacts address.

v1/{organizationId}/sales/creditnotes/{guid}/book

Requests Formats

{
  "Number": null,
  "Timestamp": "00000000020A5EA8"
}

Response Formats

{
  "PaymentDate": "2015-12-02",
  "PaymentStatus": "Overdue",
  "PaymentConditionNumberOfDays": 8,
  "PaymentConditionType": "Netto",
  "FikCode": "+71<000000016460909+12345678<",
  "DepositAccountNumber": 55000,
  "Status": "Draft",
  "ContactGuid": "728c4d5c-0f3e-444b-b336-f0a4639f0c52",
  "Guid": "ceba8d8e-0b9c-40c9-a829-4954b0124d83",
  "TimeStamp": "00000000020A5EA8",
  "CreatedAt": "2019-09-22T12:19:28.9173003Z",
  "UpdatedAt": "2019-09-22T12:19:28.9173003Z",
  "DeletedAt": "2019-09-22T12:19:28.9173003Z",
  "Number": 12,
  "ContactName": "Donald Duck",
  "ShowLinesInclVat": false,
  "TotalExclVat": 200.0,
  "TotalVatableAmount": 200.0,
  "TotalInclVat": 250.0,
  "TotalNonVatableAmount": 0.0,
  "TotalVat": 50.0,
  "TotalLines": [
    {
      "Type": "SubTotal",
      "TotalAmount": 200.0,
      "Position": 0,
      "Label": "Subtotal"
    },
    {
      "Type": "SubTotal",
      "TotalAmount": 200.0,
      "Position": 0,
      "Label": "Subtotal"
    }
  ],
  "InvoiceTemplateId": "483b24a6-3f2a-45fd-988c-2ea06eada7be",
  "Currency": "DKK",
  "Language": "en-GB",
  "ExternalReference": "Fx. WebshopSpecialId: 42",
  "Description": "Description of document type. Fx.: invoice, credit note or offer",
  "Comment": "Very very important comment",
  "Date": "2015-12-02",
  "ProductLines": [
    {
      "AccountName": "Bank",
      "BaseAmountValue": 20.0,
      "BaseAmountValueInclVat": 25.0,
      "TotalAmount": 100.0,
      "TotalAmountInclVat": 125.0,
      "ProductGuid": "fed09ecb-7ff3-47f6-877b-d752184028a5",
      "Description": "Flowers",
      "Comments": "Smells good",
      "Quantity": 5.0,
      "AccountNumber": 1000,
      "Unit": "parts",
      "Discount": 10.0,
      "LineType": "Product"
    },
    {
      "AccountName": "Bank",
      "BaseAmountValue": 20.0,
      "BaseAmountValueInclVat": 25.0,
      "TotalAmount": 100.0,
      "TotalAmountInclVat": 125.0,
      "ProductGuid": "fed09ecb-7ff3-47f6-877b-d752184028a5",
      "Description": "Flowers",
      "Comments": "Smells good",
      "Quantity": 5.0,
      "AccountNumber": 1000,
      "Unit": "parts",
      "Discount": 10.0,
      "LineType": "Product"
    }
  ],
  "Address": "Test Road 3 2100 Copenhagen Denmark"
}