List trade offers

Retrieve a list of trade offers for the organization.

Query parameters

NameDescription
fields string

A comma separated list of fields to include in the response. Possible values are: Number, Guid, TimeStamp, ContactName, ContactGuid, Address, Date, Comment, Description, ExternalReference, Language, Currency, TotalExclVat, TotalVatableAmount, TotalInclVat, TotalNonVatableAmount, TotalVat, HasGeneratedAnyVouchers, Status, CreatedAt, UpdatedAt and DeletedAt. If left empty it defaults to guid, contactName, date, description. Note that ProductLines and TotalLines are NOT available when fetching a list. Notice that it's not case sensitive, the property name will be returned the way you request it. If null, defaults to 'guid,contactName,date,description' (notice small start letter).

Default value is guid,contactName,date,description

queryFilter string

Filter specific for trade offers. Filtering can be applied to following fields: ExternalReference, ContactName, Address, Comment, Description, HasGeneratedAnyVouchers, Currency, Date and Number. See API documentation for filtering format. If left empty no filtering is applied.

changesSince string

[Generic Filter Option] Only return trade offers that was created, deleted or updated at or after given time. If left empty, this filter will not be applied, and trade offers will be returned regardless of change history. The time must be UTC and in the format 'YYYY-MM-DDTHH:mm:ssZ' example: '2015-08-18T06:36:22Z'.

deletedOnly boolean

[Generic Filter Option] Only select deleted trade offers. If left empty, will defaults to false.

Default value is False

freeTextSearch string

A free text search performed on Number, ContactName, Description and TotalInclTax

page integer

The 0-based page number

Default value is 0

pageSize integer

The maximum number of items to include in a page. Maximum 1000.

Default value is 100

sort string

A comma separated list of fields to sort on. Possible values are: TradeOfferNumber, TradeOfferDate, Status and ContactName.

Default value is TradeOfferNumber

sortOrder string

Valid values are ascending or descending.

Default value is descending

organizationId string

Returns

200 (OK) Returns a collection of trade offers (with only the requested fields).

NameDescription
Collection TradeOffer[] Show model
NameDescription
HasGeneratedAnyVouchers boolean

OBSOLETE: Use Status instead. Equivalent of Status == Invoiced. Is true if any vouchers has been generated based on this trade offer.

ContactGuid globally unique identifier

Dinero contact guid.

Status string

Status of the trade offer. Possible values are Draft, Invoiced, CustomerAccepted, CustomerDeclined, UserAccepted, UserDeclined

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 TradeOfferLine[] 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.

Collection containing the result of the request.

Pagination PaginationDetails Show model
NameDescription
MaxPageSizeAllowed integer

Maximum number of result pr. page.

PageSize integer

Number of result pr. page.

Result integer

Number of results returned in the collection.

ResultWithoutFilter integer

Result count before pagination.

Page integer

The 0-based page number.

Pagination information.

v1/{organizationId}/tradeoffers?fields={fields}&queryFilter={queryFilter}&changesSince={changesSince}&deletedOnly={deletedOnly}&freeTextSearch={freeTextSearch}&page={page}&pageSize={pageSize}&sort={sort}&sortOrder={sortOrder}

Response Formats

{
  "Collection": [
    {
      "HasGeneratedAnyVouchers": true,
      "ContactGuid": "80258cd9-42cb-4692-a85e-02f3a218528c",
      "Status": "Invoiced",
      "Guid": "8935b105-b26b-4b17-92e3-779136c7ab33",
      "TimeStamp": "00000000020A5EA8",
      "CreatedAt": "2019-08-23T11:27:29.421383Z",
      "UpdatedAt": "2019-08-23T11:27:29.421383Z",
      "DeletedAt": "2019-08-23T11:27:29.421383Z",
      "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": "c8bad6e4-7be0-4bc0-b9e5-31a04b615bed",
      "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": "b039e9f8-4255-4f50-b077-c1427f0a8619",
          "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": "b039e9f8-4255-4f50-b077-c1427f0a8619",
          "Description": "Flowers",
          "Comments": "Smells good",
          "Quantity": 5.0,
          "AccountNumber": 1000,
          "Unit": "parts",
          "Discount": 10.0,
          "LineType": "Product"
        }
      ],
      "Address": "Test Road 3 2100 Copenhagen Denmark"
    },
    {
      "HasGeneratedAnyVouchers": true,
      "ContactGuid": "80258cd9-42cb-4692-a85e-02f3a218528c",
      "Status": "Invoiced",
      "Guid": "8935b105-b26b-4b17-92e3-779136c7ab33",
      "TimeStamp": "00000000020A5EA8",
      "CreatedAt": "2019-08-23T11:27:29.421383Z",
      "UpdatedAt": "2019-08-23T11:27:29.421383Z",
      "DeletedAt": "2019-08-23T11:27:29.421383Z",
      "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": "c8bad6e4-7be0-4bc0-b9e5-31a04b615bed",
      "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": "b039e9f8-4255-4f50-b077-c1427f0a8619",
          "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": "b039e9f8-4255-4f50-b077-c1427f0a8619",
          "Description": "Flowers",
          "Comments": "Smells good",
          "Quantity": 5.0,
          "AccountNumber": 1000,
          "Unit": "parts",
          "Discount": 10.0,
          "LineType": "Product"
        }
      ],
      "Address": "Test Road 3 2100 Copenhagen Denmark"
    }
  ],
  "Pagination": {
    "MaxPageSizeAllowed": 0,
    "PageSize": 0,
    "Result": 0,
    "ResultWithoutFilter": 0,
    "Page": 0
  }
}