POST v1/{organizationId}/tradeoffers/fetch

Fetch a trade offer to get total and line sums.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
organizationId

string

None.

Body Parameters

Model of the trade offer.

TradeOfferCreateFetch
NameDescriptionTypeAdditional information
ContactGuid

Dinero contact guid.

globally unique identifier

None.

ShowLinesInclVat

If your user (or your system) prefers to provide the line amounts incl. VAT, then this property should be set to true. All voucher lines will be assumed to have amounts incl VAT. If your lines are excl VAT, you do not need to set this property. It will defaults to false.

boolean

None.

Currency

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...

string

None.

Language

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

string

None.

ExternalReference

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

string

String length: inclusive between 0 and 128

Description

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

string

None.

Comment

User supplied comment on the voucher

string

None.

Date

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

string

None.

ProductLines

User supplied invoice lines. Minimum one.

Collection of CreateTradeOfferLine

Required

Address

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

string

None.

Sample:
{
  "ContactGuid": "eecdf286-9503-40ef-982d-6544d636a7e8",
  "ShowLinesInclVat": false,
  "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": [
    {
      "BaseAmountValue": 20.0,
      "ProductGuid": "17c89f9c-8f4d-4c56-aa3c-76beaca3e24c",
      "Description": "Flowers",
      "Comments": "Smells good",
      "Quantity": 5.0,
      "AccountNumber": 1000,
      "Unit": "parts",
      "Discount": 10.0,
      "LineType": "Product"
    },
    {
      "BaseAmountValue": 20.0,
      "ProductGuid": "17c89f9c-8f4d-4c56-aa3c-76beaca3e24c",
      "Description": "Flowers",
      "Comments": "Smells good",
      "Quantity": 5.0,
      "AccountNumber": 1000,
      "Unit": "parts",
      "Discount": 10.0,
      "LineType": "Product"
    }
  ],
  "Address": "Test Road 3 2100 Copenhagen Denmark"
}

Response Information

Resource Description

Returns the trade offer as json.

TradeOfferFetch
NameDescriptionType
ContactGuid

Dinero contact guid.

globally unique identifier
Number

The number of the voucher.

integer
ContactName

Contact name

string
ShowLinesInclVat

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

boolean
TotalExclVat

Total amount without vat

decimal number
TotalVatableAmount

Total amount to calculate the vat from

decimal number
TotalInclVat

Total amount incl. vat

decimal number
TotalNonVatableAmount

Total vat free amount

decimal number
TotalVat

Total vat amount

decimal number
TotalLines

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

Collection of TotalLine
Currency

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...

string
Language

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

string
ExternalReference

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

string
Description

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

string
Comment

User supplied comment on the voucher

string
Date

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

string
ProductLines

User supplied invoice lines. Minimum one.

Collection of TradeOfferLine
Address

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

string
Sample:
{
  "ContactGuid": "0573b647-5cd1-4ee8-88b2-b506094c0ac3",
  "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"
    }
  ],
  "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": "e652151a-157e-470d-9afb-a54f5c115b4f",
      "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": "e652151a-157e-470d-9afb-a54f5c115b4f",
      "Description": "Flowers",
      "Comments": "Smells good",
      "Quantity": 5.0,
      "AccountNumber": 1000,
      "Unit": "parts",
      "Discount": 10.0,
      "LineType": "Product"
    }
  ],
  "Address": "Test Road 3 2100 Copenhagen Denmark"
}