NAV
javascript

TL;DR

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/customers",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Add these three headers to your requests.

Header Value What is this?
X-AppSecretToken YOUR_PRIVATE_TOKEN This identifies your app. This is your secret token. Try using the value demo.
X-AgreementGrantToken YOUR_AGREEMENT_GRANT_TOKEN This identifies the grant issued by an agreement, to allow your app to access their data. Try using the value demo.
Content-Type application/json We’re a JSON based api. This tells us that you agree with us on using JSON.

Issue a GET to https://restapi.e-conomic.com/customers and see what is returned.

Next try getting https://restapi.e-conomic.com and see what is available.

Introduction

Welcome to the E-conomic REST API Documentation!

The e-conomic API is a document based JSON REST API. We have tried to make it human-readable and approachable for developers with limited understanding of the inner-workings of e-conomic.

For more indepth information about e-conomic please look at e-copedia link Dansk Svensk Norsk

Demo authentication

If you wish to try out the API before registering a developer agreement, you can do this using the demo agreement. There are two ways of doing that.

Via query string

The first way is really easy. Just append the query string ?demo=true to your request URL. You only need to this on the first request, then all links in the API will have that query string appended. All 401 Not Authorized responses also include a demo link to that exact resource. This allows for easy browsing of the API when discovering what is available.

Example: https://restapi.e-conomic.com/customers?demo=true

Via headers

The second way is one that allows for an easy “hello world” application. This mimics the authentication flow you will have to use when you create your own app. Just specify HTTP header tokens X-AgreementGrantToken: demo and X-AppSecretToken: demo. That way you can create an application and connect just as you would if you had a real integration. But without the need to register.

Tools we use every day

We use these tools all day every day when working with our REST API. They make things easy for us, and we think they could help you as well.

JSON Formatter Chrome Extension

This extension formats all JSON in a nice and readable manner. But the absolute best thing is that it makes all links clickable. If you just want to start exploring our API without having to register or set up authentication, then just install this extension, go to https://restapi.e-conomic.com?demo=true and follow the links. This by far the most powerful tool when exploring our API.

https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa

Advanced REST Client Chrome Plugin

This tool makes it easy to send requests to our API, and inspect the response. Just add your headers and start GET'ing and POST'ing.

https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

Chrome Developer Extensions

If you are building a browser JavaScript app, nothing beats the developer tools already embedded in the browser. Just hit F12 and start inspecting your requests.

Fiddler

When you don’t have the luxury of the Chrome Developer Tools and need to debug your own application, then Fiddler is absolutely one of the best tools out there. Head on over to Telerik and download it.

http://www.telerik.com/fiddler

All resources and collections have a property “self” which value is a unique URL that represents that exact resource or collection. The self link for a collection will also contain any pagination, filtering or sorting applied.

Collections vs. Resources

The e-conomic REST Api is a json document based API, that consists of a number of resources and collections of resources. Collections are named after the type of resource that can be found in the collection, and then pluralized. For example a collection of customers is called just that: https://restapi.e-conomic.com/customers.

Each resource in the collection will contain a self link, that is made up of the collection self link with the resource identifier appended. So customer #20 will have the following self link; https://restapi.e-conomic.com/customers/20.

Annotated errors

When creating or updating data through the rest api validation will be made on the supplied data before any create/update operation is executed. If any errors are found in the supplied data your operation will not be accepted and you will get a 400 Bad Request resonse back that, amongst other things, details the errors found.

The annotated errors are formatted to match the data sent in the request payload. That means that we return a document with the properties that fail validation, where the value of each property has been replaced with an error object. The valid properties are removed from the document, making it easy to match up with a UI that already matches up with the request payload.

The response will look like this:

Property Description
message A general message explaining the error
developerHint A general hit given to developers to help solve the error
httpStatusCode The HTTP status code returned
errors A listing of all errors found in annotated form

The annotated errors are formatted to match the data sent in the request payload. That means that we return a document with the properties that fail validation, where the value of each property has been replaced with an error object. The valid properties are removed from the document, making it easy to match up with a UI that already matches up with the request payload.

The following JSFiddle example will show you the result of an errornous request.

See example of an errornous request in JSFiddle

Errors

//example of a response for a failed POST operation.

{
    "message": "Validation error.",
    "developerHint": "Inspect validation errors and correct your request.",
    "logId": "c7ca5bc2-ad2d-4639-93f9-b22ba88c97d7",
    "httpStatusCode": 400,
    "errors": {
        "currency": {
            "errors": [
                {
                    "errorCode": "E06000",
                    "message": "currency does not exist.",
                    "value": "ZUL",
                    "developerHint": "Find a list of currencies at https://restapi.e-conomic.com/currencies."
                }
            ]
        },
        "customer": {
            "errors": [
                {
                    "errorCode": "E06000",
                    "message": "customer does not exist.",
                    "value": "987987987",
                    "developerHint": "Find a list of resources at https://restapi.e-conomic.com/customers."
                }
            ]
        },
        "lines": [
            {
                "arrayIndex": 0,
                "unit": {
                    "errors": [
                        {
                            "errorCode": "E06000",
                            "message": "unit does not exist.",
                            "value": 10,
                            "developerHint": "Find a list of units at https://restapi.e-conomic.com/units."
                        }
                    ]
                },
                "unitNetPrice": {
                    "errors": [
                        {
                            "errorCode": "E04740",
                            "message": "unitNetPrice scale cannot be greater then two decimal places.",
                            "value": 10.12345,
                            "developerHint": "Please check the format of your data."
                        }
                    ]
                }
            },
            {
                "arrayIndex": 1,
                "product": {
                    "errors": [
                        {
                            "errorCode": "E04500",
                            "message": "No identifiers present on product. Please include either a self link or a productNumber.",
                            "developerHint": "Find a list of resources at https://restapi.e-conomic.com/products."
                        }
                    ]
                }
            }
        ],
        "quantity": {
            "errors": [
                {
                    "errorCode": "E04730",
                    "message": "Property quantity must have a value when product is set.",
                    "developerHint": "Please check your request data."
                }
            ]
        }
    },
    "logTime": "2015-03-12T16:44:56"
}

The example to the right shows a POST operation to invoices-experimental/drafts containing a single invoice with 3 lines. There are a total of 6 errors found 3 on the invoice, 2 on line 1 and 1 on line 2.

A specific error consists of the following information or a subset there of:

Property Description
errorCode The error code associated with this particular error
message A text describing the error
value The value sent in
developerHint A message to developers to try to help them resolve the issue

If multiple errors are found on a specific property the errors array will contain multiple error objects.

Array index

The “arrayIndex” property is a bit special. In our example it is present on the invoice lines level but it may also be present on the invoice level in a different operation. The arrayIndex specify, in our example, what line the errors where found on. If our operation would have been a POST containing multiple invoices arrayIndex, on the invoice level, would have been present and would here specify what invoice the errors was found on.

Errors on the invoice level

These are the errors found on the invoice level:

"currency": {
    "errors": [
        {
            "errorCode": "E06000",
            "message": "currency does not exist.",
            "value": "ZUL",
            "developerHint": "Find a list of currencies at https://restapi.e-conomic.com/currencies."
        }
    ]
}

"customer": {
    "errors": [
        {
            "errorCode": "E06000",
            "message": "customer does not exist.",
            "value": "987987987",
            "developerHint": "Find a list of resources at https://restapi.e-conomic.com/customers."
        }
    ]
}

"quantity": {
    "errors": [
        {
            "errorCode": "E04730",
            "message": "Property quantity must have a value when product is set.",
            "developerHint": "Please check your request data."
        }
    ]
}

Errors on the invoice line level

These are the errors found on the invoice line level:

"lines": [
    {
        "arrayIndex": 0,
        "unit": {
            "errors": [
                {
                    "errorCode": "E06000",
                    "message": "unit does not exist.",
                    "value": 10,
                    "developerHint": "Find a list of units at https://restapi.e-conomic.com/units."
                }
            ]
        },
        "unitNetPrice": {
            "errors": [
                {
                    "errorCode": "E04740",
                    "message": "unitNetPrice scale cannot be greater then two decimal places.",
                    "value": 10.12345,
                    "developerHint": "Please check the format of your data."
                }
            ]
        }
    },
    {
        "arrayIndex": 1,
        "product": {
            "errors": [
                {
                    "errorCode": "E04500",
                    "message": "No identifiers present on product. Please include either a self link or a productNumber.",
                    "developerHint": "Find a list of resources at https://restapi.e-conomic.com/products."
                }
            ]
        }
    }
]

This structure looks a bit different than the errors on the invoice level, specifically the addition of a “arrayIndex” property. This property tells us which line the errors was found on. So in our example above we found 2 errors on the first line (unit and unitNetPrice) and 1 error on the second line (product).

Versioning

Currently we offer no versioning of the API. Some endpoints will be stable and others will be experimental. This is displayed directly on the home resource of the API. As endpoints move out of their experimental mode and become stable, we’ll update the home resource to reflect this.

Later on, as our API evolves, we might find it necessary to add versioning. But calling directly on the root of the API will always provide you with the latest API version.

Pagination

We use pagination on our collections. If nothing else is specified the collection endpoints will return 20 resources. URL parameters will allow you to increase this to 1.000 resources and to skip pages if necessary. Each endpoint offers convenient links to navigate through the pagination. The examples below is what you would get on a resource with 40 entries.

First page

https://restapi.e-conomic.com/invoices/drafts?skippages=0&pagesize=20

Next page

https://restapi.e-conomic.com/invoices/drafts?skippages=1&pagesize=20

Last page

https://restapi.e-conomic.com/invoices/drafts?skippages=2&pagesize=20

Filtering

Filtering is enabled on all collection endpoints but not on all properties.

Filtering on collections can be done using the query string parameter filter. A filter is made up of a set of predicates, and follows a syntax inspired by mongoDB. A predicate is made up of a property name, an operator and a value.

Example: ?filter=name$eq:Joe

This matches all resources with the value Joe in the property name.

Predicates can be chained using either of the logical operators AND and OR.

Example: ?filter=name$eq:Joe$and:city$like:*port

Filtering on strings is case insensitive.

Specifying Operator affinity

If you want to control the operator affinity then you can use parentheses.

An example is: ?filter=name$eq:Joe$and:(city$like:*port$or:age$lt:40)

Filter Operators

The allowed filtering operators are:

Operator Syntax
Equals “$eq:”
Not equals “$ne:”
Greater than “$gt:”
Greater than or equal “$gte:”
Less than “$lt:”
Less than or equal “$lte:”
Substring match “$like:”
And also “$and:”
Or else “$or:”
In “$in:”
Not In “$nin:”

Substring matching

The $like: filter supports both using wildcards (*) and not using wildcards. If no wildcards are used, the expression is considered a contains expression and effectively becomes a filter with a wildcard at the start of the string and one at the end of the string.

Escaping special characters in your filter

In order to not interfere with the parsing of the filter expression, certain escape sequences are necessary.

Using null values in your filter

Should you want to filter for the non existence of a property (i.e. null value) you can use the null escape sequence.

$null:

Using in and not in operators

To determine whether a specified value matches any value in (or not in) a list you filter using the $in: or $nin: operator. The list to filter by has to be inclosed in brackets and values seperated by commas.

customerNumber$in:[2,5,7,22,45]

We only allow in and not in operators on numeric properties. So it is not possible to use on string properties. It is possible to also use the $null: keyword if you wish to include that in the filter.

Information about what properties allow filtering can be found in the schema for the collection. Each property that allows filtering has the property "filterable": true set. If you try to sort on something that isn’t allowed the server will respond with a status code 400.

Sorting

Sorting on strings is case insensitive.

Sort ascending

Sorting on collections can be done using the query string parameter ‘sort’.

?sort=name

Sort descending

The default sort direction is ascending, but this can be turned by prepending a minus (-).

?sort=-name

Sort by multiple properties

If you need to sort by multiple properties these can just be separated by commas. Mixing of directions is allowed.

?sort=-name,age

Sort alphabetically

In certain cases you might want to enforce that even numeric values are sorted alphabetically, so 1000 is less than 30. In those cases you can prepend the sort property with a tilde (~).

?sort=~name

Information about what properties are sortable can be found in the schema for the collection. Each property that allows sorting has the property "sortable": true set. The property the collection is sorted by by default has the property defaultSorting set to either ascending or descending.

HTTP Status Codes

The REST API returns these HTTP status codes.

Code Text Description
200 OK Everything is OK
201 Created When you create resources, this is what you get. This will be accompanied by the created resource in the body and a location header with a link to the created resource.
204 No Content In certain cases there is nothing to return. So we will let you know by returning a 204.
400 Bad Request The request you made was somehow malformed. A malformed request could be failed validation on creation or updating. If you try to filter on something that isn’t filterable this is also what you’ll see. Whenever possible we will also try to include a developer hint to help you get around this issue.
401 Unauthorized The credentials you supplied us with weren’t correct, or perhaps you forgot them all together. If an agreement has revoked the grant they gave your app, this is what you will see.
403 Forbidden You won’t necessarily have access to everything. So even though you were authorized we might still deny access to certain resources. This depends on the roles asked for when the grant was issued.
404 Not Found This is returned when you try to request something that doesn’t exist. This could be a resource that has been deleted or just a url you tried to hack. If you see a lot of these, it could be an indication that you aren’t using the links provided by the API. You should never need to concatenate any urls. The API should provide you with the links needed.
405 Method Not Allowed Not all endpoints support all http methods. If you try issue a PUT request to a collection resource this is what you get.
415 Unsupported Media Type Our API is a JSON api. If you ask us to give you anything else, we give you this, and tell you why in the JSON body of the response.
500 Internal Server Error We don’t like to see these, and they are flagged in our logs. When you see this, something went wrong on our end. Either try again, or contact our support.
501 Not Implemented The API is still evolving, and sometimes our resources will link to stuff that we haven’t implemented yet.

Endpoints

This section contains documentation of all our public endpoints. Our home resource lists our endpoints as either stable, experimental or deprecated. In this documentation we’ll also flag endpoints that are either experimental and deprecated.

Please note that we might have endpoints listed on our home resource that we haven’t added documentation for yet.

Accounting Years

Accounting years define time spans for when your financial events take place. An accounting year can span anywhere from 6 to 18 months depending on when in your company life it is placed.

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /accounting-years

Schema name

accounting-years.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

closed, fromDate, toDate, year

Sortable properties

closed, fromDate, toDate, year

Default sorting

fromDate : ascending

Properties

Name Type Format Description
closed boolean Determines if the accounting year is closed for further transactions.
entries string uri A link to a collection of all entries booked in the accounting year.
fromDate string full-date The first date in the accounting year in the format YYYY-MM-DD. Except for the first accounting year on an agreement, it must be the date immediately following the previous accounting year, and thus must be the first day of a month. The first accounting year on an agreement can begin on any day of the month.
periods string uri A link to the collection of accounting year periods on an agreement.
self string uri A unique link reference to the accounting year item.
toDate string full-date The last date in the accounting year in the format YYYY-MM-DD. It must be the last date in the last month of the accounting year. An accounting year can at most have a duration of 18 months.
totals string uri A link to the chart of accounts with the years total in base currency.
vouchers string uri A link to a collection of vouchers created in the accounting year.
year string The calendar year or years spanned by the accounting year in the format YYYY or YYYY/YYYY.

GET /accounting-years/:accountingYear

Schema name

accounting-years.accountingYear.get.schema.json

Return type

This method returns a single object

Filterable properties

closed, fromDate, toDate, year

Sortable properties

closed, fromDate, toDate, year

Default sorting

fromDate : ascending

Properties

Name Type Format Description
closed boolean If true this indicates that the accounting year is closed for further transactions.
entries string uri A link to a collection of all entries booked in the accounting year.
fromDate string full-date The first date in the accounting year in the format YYYY-MM-DD. Except for the first accounting year on an agreement, it must be the date immediately following the previous accounting year, and thus must be the first day of a month. The first accounting year on an agreement can begin on any day of the month.
periods string uri A link to the collection of accounting year periods in the accounting year.
self string uri A unique link reference to the accounting year item.
toDate string full-date The last date in the accounting year in the format YYYY-MM-DD. It must be the last date in the last month of the accounting year. An accounting year can at most have a duration of 18 months.
totals string uri A link to the chart of accounts with the years total in base currency.
vouchers string uri A link to a collection of vouchers created in the accounting year. This requires that international ledger is enabled.
year string The calendar year or years spanned by the accounting year in the format YYYY or YYYY/YYYY.

GET /accounting-years/:accountingYear/entries

Schema name

accounting-years.accountingYear.entries.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, date

Sortable properties

currency, date

Properties

Name Type Format Max length Min value Values Description
account object The account the entry is connected to.
account.accountNumber integer 1 A unique identifier of the account.
account.self string uri A unique reference to the account resource.
amount number The total entry amount.
amountInBaseCurrency number The total entry amount in base currency.
currency string The ISO 4217 currency code of the entry.
date string full-date Entry issue date. The date is formatted according to ISO-8601(YYYY-MM-DD).
departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entryNumber integer The unique identifier of the entry line.
entryType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of entry.
project object A reference to any project this entry might be related to. This requires the projects module to be enabled.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
self string uri A unique reference to the accounting year entries resource.
text string 255 A short description about the entry.
vatAccount object The account for VAT.
vatAccount.self string uri A unique link reference to the vatAccount item.
vatAccount.vatCode string 5 The unique identifier of the vat account.
voucherNumber integer The identifier of the voucher this entry belongs to.

GET /accounting-years/:accountingYear/totals

Schema name

accounting-years.accountingYear.totals.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

account.accountNumber, fromDate, toDate

Sortable properties

account.accountNumber, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Description
account object The account used.
account.accountNumber integer The account number.
account.self string uri A unique reference to the account resource.
fromDate string full-date The first date in the period formated according to ISO-8601 (YYYY-MM-DD).
self string uri A unique reference to the account accounting year totals resource.
toDate string full-date The last date in the period formated according to ISO-8601 (YYYY-MM-DD).
totalInBaseCurrency number The total entry amount in base currency for the accounting year.

GET /accounting-years/:accountingYear/periods

Schema name

accounting-years.accountingYear.periods.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

closed, fromDate, toDate

Sortable properties

closed, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Max length Min value Description
accountingYear object The accounting year the period is part of.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string 10 A unique identifier of the accounting year.
closed boolean If true this indicates that the accounting period is closed for further transactions.
entries string uri A link to a collection of all entries booked in the period.
fromDate string full-date The first date in the period formated according to ISO-8601 (YYYY-MM-DD).
periodNumber integer 1 A unique identifier of the period.
self string uri A unique link reference to the period item.
toDate string full-date The last date in the period formated according to ISO-8601 (YYYY-MM-DD).
totals string uri A link to the chart of accounts with the periods total in base currency.

GET /accounting-years/:accountingYear/periods/:accountingYearPeriod

Schema name

accounting-years.accountingYear.periods.accountingYearPeriod.get.schema.json

Return type

This method returns a single object

Filterable properties

closed, fromDate, toDate

Sortable properties

closed, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Max length Min value Description
accountingYear object The accounting year the period is part of.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string 4 A unique identifier of the accounting year.
closed boolean If true this indicates that the accounting period is closed for further transactions.
entries string uri A link to a collection of all entries booked in the period.
fromDate string full-date The first date in the period formatted according to ISO-8601(YYYY-MM-DD).
periodNumber integer 1 A unique identifier of the period.
self string uri A unique link reference to the period item.
toDate string full-date The last date in the period formatted according to ISO-8601(YYYY-MM-DD).
totals string uri A link to the chart of accounts with the periods total in base currency.

GET /accounting-years/:accountingYear/periods/:accountingYearPeriod/entries

Schema name

accounting-years.accountingYear.periods.accountingYearPeriod.entries.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, date

Sortable properties

currency, date

Properties

Name Type Format Max length Min value Values Description
account object The account the entry is connected to.
account.accountNumber integer 1 A unique identifier of the account.
account.self string uri A unique reference to the account resource.
amount number The total entry amount.
amountInBaseCurrency number The total entry amount in base currency.
currency string The ISO 4217 currency code of the entry.
date string full-date Invoice issue date. The date is formatted according to ISO-8601(YYYY-MM-DD).
departmentalDistribution object The departmental distribution the entry is connected to.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entryNumber integer The unique identifier of the entry line.
entryType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of entry.
pdf object References a pdf representation of this entry.
pdf.self string uri The unique reference of the pdf representation for this entry.
project object The project the entry is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
self string uri A unique reference to the entry resource.
text string 255 A short description about the entry.
vatAccount object The account for VAT.
vatAccount.self string uri A unique link reference to the vatAccount item.
vatAccount.vatCode string 5 The unique identifier of the vat account.
voucherNumber integer The identifier of the voucher this entry belongs to.

GET /accounting-years/:accountingYear/periods/:accountingYearPeriod/totals

Schema name

accounting-years.accountingYear.periods.accountingYearPeriod.totals.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

account.accountNumber, fromDate, toDate

Sortable properties

account.accountNumber, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Description
account object A reference to the account totaled.
account.accountNumber integer The account number.
account.self string uri A unique reference to the account resource.
fromDate string full-date The first date in the period formatted according to ISO-8601(YYYY-MM-DD).
self string uri A unique reference to the totals resource.
toDate string full-date The last date in the period formatted according to ISO-8601(YYYY-MM-DD).
totalInBaseCurrency number The total entry amount in base currency for the accounting year period.

GET /accounting-years/:accountingYear/vouchers

Schema name

accounting-years.accountingYear.vouchers.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

date, lines.amount, lines.supplier.supplierNumber, numberSeries, voucherNumber, voucherType

Filterable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Sortable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Properties

Name Type Format Read-only Max length Min value Values Description
attachment string uri A unique link reference to the attachment resource for this voucher item.
booked boolean True Is this voucher booked or not.
date string full-date Voucher issue date. The date is formatted according to ISO-8601 (YYYY-MM-DD). This is part of the unique identifier of a voucher. The other part of the unique identifier is the voucherId.
dueDate string full-date The date the voucher is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type ‘duedate’.
lines array An array containing the specific voucher lines.
lines.accruals object This is used to divide payments into equal sizes over a certain period of time.
lines.accruals.account object The account used by the accruals.
lines.accruals.account.accountNumber integer The account number.
lines.accruals.account.self string uri A unique reference to the account resource.
lines.accruals.endDate string full-date Accruals end date. The date is formatted according to ISO-8601.
lines.accruals.self string uri A unique link reference to the accruals item.
lines.accruals.startDate string full-date Accruals start date. The date is formatted according to ISO-8601.
lines.amount number The amount on the invoice line.
lines.amountInBaseCurrency number If you use base currency this must be the same as amount or not specified at all.
lines.booked boolean True Is this voucher booked or not.
lines.contraAccount object The contra account.
lines.contraAccount.accountNumber integer The account number.
lines.contraAccount.accountType Enum profitAndLoss, status The contra account must be of either ProfitAndLoss or Status type.
lines.contraAccount.self string uri A unique reference to the account resource.
lines.contraVatAccount object The contra account for VAT.
lines.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
lines.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
lines.contraVatAmount number The amount of VAT on the voucher on the contra account.
lines.contraVatAmountInBaseCurrency number The amount of VAT on the voucher on the contra account in base currency.
lines.currency string 3 The currency the invoice is specified in.
lines.department object A reference to the department that this voucher is credited to.
lines.department.departmentNumber integer The unique identifier of the department.
lines.department.self string uri A unique link reference to the department item.
lines.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
lines.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
lines.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
lines.document string uri The unique reference to the file.
lines.entryNumber integer True The unique identifier of the invoice line.
lines.exchangeRate number The exchange rate between the base currency and the invoice currency.
lines.remittanceInformation object
lines.remittanceInformation.creditorId string 50 This could be the IBAN/SWIFT no, bank account no, bankgiro no or postgiro no depending on the payment type.
lines.remittanceInformation.creditorInvoiceId string 30 The OCR or message sent together with the creditorId.
lines.remittanceInformation.paymentType object The payment type used.
lines.remittanceInformation.paymentType.paymentTypeNumber integer The unique identifier of the payment type.
lines.remittanceInformation.paymentType.self string uri A unique link reference to the paymentType item.
lines.remittanceInformation.self string uri A unique link reference to the remittanceInformation item.
lines.supplier object The supplier is the vendor from whom you buy your goods.
lines.supplier.self string uri A unique self reference of the supplier.
lines.supplier.supplierNumber integer The supplier number is a unique numerical identifier.
lines.supplierInvoiceNumber string The unique identifier of the supplier invoice gotten from the supplier.
lines.text string 250 The text on the voucher line.
lines.vatAccount object The account for VAT.
lines.vatAccount.self string uri A unique link reference to the vatAccount item.
lines.vatAccount.vatCode string 5 The unique identifier of the vat account.
lines.vatAmount number The amount of VAT on the voucher. Used if the line has a VAT account.
lines.vatAmountInBaseCurrency number The amount of VAT on the voucher in base currency.
numberSeries object The number series corresponding to the voucher type.
numberSeries.numberSeriesNumber integer The unique identifier of the number series.
numberSeries.self string uri A unique link reference to the number series item.
remainder number True Remaining amount to be paid.
remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
self string uri A unique link reference to the voucher item.
voucherId number True Part of the unique identifier of a voucher. The other part of the unique identifier is the date.
voucherNumber object The number series corresponding to the voucher type.
voucherNumber.displayVoucherNumber string True This is a concatenation of the prefix and voucherNumber.
voucherNumber.prefix string The number series prefix.
voucherNumber.voucherNumber number The number of the voucher.
voucherType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of voucher. Must be SupplierInvoice.

GET /accounting-years/:accountingYear/vouchers/:voucherId

Schema name

accounting-years.accountingYear.vouchers.voucherId.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

date, lines.amount, lines.supplier.supplierNumber, numberSeries, voucherNumber, voucherType

Filterable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Sortable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Properties

Name Type Format Read-only Max length Values Description
attachment string uri A unique link reference to the attachment resource for this voucher item.
booked boolean True Is this voucher booked or not.
date string full-date Voucher issue date. The date is formatted according to ISO-8601 (YYYY-MM-DD).
dueDate string full-date The date the voucher is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
lines array An array containing the specific voucher lines.
lines.accruals object This is used to divide payments into equal sizes over a certain period of time.
lines.accruals.account object The account used by the accruals.
lines.accruals.account.accountNumber integer The account number.
lines.accruals.account.self string uri A unique reference to the account resource.
lines.accruals.endDate string full-date Accruals end date. The date is formatted according to ISO-8601.
lines.accruals.self string uri A unique link reference to the accruals item.
lines.accruals.startDate string full-date Accruals start date. The date is formatted according to ISO-8601.
lines.amount number The amount on the invoice line.
lines.amountInBaseCurrency number If you use base currency this must be the same as amount or not specified at all.
lines.booked boolean True Is this voucher booked or not.
lines.contraAccount object The contra account.
lines.contraAccount.accountNumber integer The account number.
lines.contraAccount.accountType Enum profitAndLoss, status The contra account must be of either ProfitAndLoss or Status type.
lines.contraAccount.self string uri A unique reference to the account resource.
lines.contraVatAccount object The contra account for VAT.
lines.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
lines.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
lines.contraVatAmount number The amount of VAT on the voucher on the contra account.
lines.contraVatAmountInBaseCurrency number The amount of VAT on the voucher on the contra account in base currency.
lines.currency string 3 The currency the invoice is specified in.
lines.department object A reference to the department that this voucher will be connected with.
lines.department.departmentNumber integer The unique identifier of the department.
lines.department.self string uri A unique link reference to the department item.
lines.document string uri The unique reference to the file.
lines.entryNumber integer True The unique identifier of the invoice line.
lines.exchangeRate number The exchange rate between the base currency and the invoice currency.
lines.remittanceInformation object
lines.remittanceInformation.creditorId string 50 This could be the IBAN/SWIFT no, bank account no, bankgiro no or postgiro no depending on the payment type.
lines.remittanceInformation.creditorInvoiceId string 30 The OCR or message sent together with the creditorId.
lines.remittanceInformation.paymentType object The payment type used.
lines.remittanceInformation.paymentType.paymentTypeNumber integer The unique identifier of the payment type.
lines.remittanceInformation.paymentType.self string uri A unique link reference to the paymentType item.
lines.remittanceInformation.self string uri A unique link reference to the remittanceInformation item.
lines.supplier object The supplier is the vendor from whom you buy your goods.
lines.supplier.self string uri A unique self reference of the supplier.
lines.supplier.supplierNumber integer The supplier number is a unique numerical identifier.
lines.supplierInvoiceNumber string The unique identifier of the supplier invoice gotten from the supplier.
lines.text string 250 The text on the voucher line.
lines.vatAccount object The account for VAT.
lines.vatAccount.self string uri A unique link reference to the vatAccount item.
lines.vatAccount.vatCode string 5 The unique identifier of the vat account.
lines.vatAmount number The amount of VAT on the voucher. Used if the line has a VAT account.
lines.vatAmountInBaseCurrency number The amount of VAT on the voucher in base currency.
numberSeries object The number series corresponding to the voucher type.
numberSeries.numberSeriesNumber integer The unique identifier of the number series.
numberSeries.self string uri A unique link reference to the number series item.
remainder number True Remaining amount to be paid.
remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
self string uri A unique link reference to the voucher item.
voucherId number True Part of the unique identifier of a voucher.
voucherNumber object The number series corresponding to the voucher type.
voucherNumber.displayVoucherNumber string True This is a concatenation of the prefix and voucherNumber.
voucherNumber.prefix string The number series prefix.
voucherNumber.voucherNumber number The number of the voucher.
voucherType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of voucher. Must be SupplierInvoice.

GET /accounting-years/:accountingYear/vouchers/:voucherId/:date

Schema name

accounting-years.accountingYear.vouchers.voucherId.date.get.schema.json

Return type

This method returns a single object

Required properties

date, lines.amount, lines.supplier.supplierNumber, numberSeries, voucherNumber, voucherType

Filterable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Sortable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Properties

Name Type Format Read-only Max length Values Description
attachment string uri A unique link reference to the attachment resource for this voucher item.
booked boolean True Is this voucher booked or not.
date string full-date Voucher issue date. The date is formatted according to ISO-8601 (YYYY-MM-DD).
dueDate string full-date The date the voucher is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
lines array An array containing the specific voucher lines.
lines.accruals object This is used to divide payments into equal sizes over a certain period of time.
lines.accruals.account object The account used by the accruals.
lines.accruals.account.accountNumber integer The account number.
lines.accruals.account.self string uri A unique reference to the account resource.
lines.accruals.endDate string full-date Accruals end date. The date is formatted according to ISO-8601.
lines.accruals.self string uri A unique link reference to the accruals item.
lines.accruals.startDate string full-date Accruals start date. The date is formatted according to ISO-8601.
lines.amount number The amount on the invoice line.
lines.amountInBaseCurrency number If you use base currency this must be the same as amount or not specified at all.
lines.booked boolean True Is this voucher booked or not.
lines.contraAccount object The contra account.
lines.contraAccount.accountNumber integer The account number.
lines.contraAccount.accountType Enum profitAndLoss, status The contra account must be of either ProfitAndLoss or Status type.
lines.contraAccount.self string uri A unique reference to the account resource.
lines.contraVatAccount object The contra account for VAT.
lines.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
lines.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
lines.contraVatAmount number The amount of VAT on the voucher on the contra account.
lines.contraVatAmountInBaseCurrency number The amount of VAT on the voucher on the contra account in base currency.
lines.currency string 3 The currency the invoice is specified in.
lines.department object A reference to the department that this voucher will be connected with.
lines.department.departmentNumber integer The unique identifier of the department.
lines.department.self string uri A unique link reference to the department item.
lines.document string uri The unique reference to the file.
lines.entryNumber integer True The unique identifier of the invoice line.
lines.exchangeRate number The exchange rate between the base currency and the invoice currency.
lines.remittanceInformation object
lines.remittanceInformation.creditorId string 50 This could be the IBAN/SWIFT no, bank account no, bankgiro no or postgiro no depending on the payment type.
lines.remittanceInformation.creditorInvoiceId string 30 The OCR or message sent together with the creditorId.
lines.remittanceInformation.paymentType object The payment type used.
lines.remittanceInformation.paymentType.paymentTypeNumber integer The unique identifier of the payment type.
lines.remittanceInformation.paymentType.self string uri A unique link reference to the paymentType item.
lines.remittanceInformation.self string uri A unique link reference to the remittanceInformation item.
lines.supplier object The supplier is the vendor from whom you buy your goods.
lines.supplier.self string uri A unique self reference of the supplier.
lines.supplier.supplierNumber integer The supplier number is a unique numerical identifier.
lines.supplierInvoiceNumber string The unique identifier of the supplier invoice gotten from the supplier.
lines.text string 250 The text on the voucher line.
lines.vatAccount object The account for VAT.
lines.vatAccount.self string uri A unique link reference to the vatAccount item.
lines.vatAccount.vatCode string 5 The unique identifier of the vat account.
lines.vatAmount number The amount of VAT on the voucher. Used if the line has a VAT account.
lines.vatAmountInBaseCurrency number The amount of VAT on the voucher in base currency.
numberSeries object The number series corresponding to the voucher type.
numberSeries.numberSeriesNumber integer The unique identifier of the number series.
numberSeries.self string uri A unique link reference to the number series item.
remainder number True Remaining amount to be paid.
remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
self string uri A unique link reference to the voucher item.
voucherId number True Part of the unique identifier of a voucher.
voucherNumber object The number series corresponding to the voucher type.
voucherNumber.displayVoucherNumber string True This is a concatenation of the prefix and voucherNumber.
voucherNumber.prefix string The number series prefix.
voucherNumber.voucherNumber number The number of the voucher.
voucherType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of voucher. Must be SupplierInvoice.

Accounts

Accounts are the records in the general ledger where companies record the monetary transactions

GET /accounts

Schema name

accounts.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

accountNumber, accountType, balance, barred, blockDirectEntries, debitCredit, name

Sortable properties

accountNumber, accountType, balance, blockDirectEntries, debitCredit, name

Default sorting

accountNumber : ascending

Properties

Name Type Format Max length Values Description
accountingYears string uri A link to a list of accounting years for which the account is usable.
accountNumber integer The account’s number.
accountsSummed array An array of the account intervals used for calculating the total for this account.
accountsSummed.fromAccount object The first account in the interval.
accountsSummed.fromAccount.accountNumber integer Account number of the first account in the interval.
accountsSummed.fromAccount.self string uri The unique self link of the first account in the interval.
accountsSummed.toAccount object The last account in the interval.
accountsSummed.toAccount.accountNumber integer Account number of the last account in the interval.
accountsSummed.toAccount.self string uri The unique self link of the last account in the interval.
accountType Enum profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
balance number The current balanace of the account.
barred boolean Shows if the account is barred from being used.
blockDirectEntries boolean Determines if the account can be manually updated with entries.
contraAccount object The default contra account of the account.
contraAccount.accountNumber integer Account number of the contra account.
contraAccount.self string uri The unique self link of the contra account.
debitCredit Enum debit, credit Describes the default update type of the account.
draftBalance number The current balance of the account including draft (not yet booked) entries.
name string 125 The name of the account.
self string uri A unique reference to the account ressource.
totalFromAccount object The account from which the sum total for this account is calculated.
totalFromAccount.accountNumber integer Account number of the first account.
totalFromAccount.self string uri The unique self link of the first account.
vatAccount object
vatAccount.self string uri The unique self link of the VAT code.
vatAccount.vatCode string 5 The VAT code of the VAT account for this account.

GET /accounts/:accountNumber

Schema name

accounts.accountNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

accountNumber, accountType, balance, barred, blockDirectEntries, debitCredit, name

Sortable properties

accountNumber, accountType, balance, blockDirectEntries, debitCredit, name

Properties

Name Type Format Max length Values Description
accountingYears string uri A link to a list of accounting years for which the account is usable.
accountNumber integer The account’s number.
accountsSummed array An array of the account intervals used for calculating the total for this account.
accountsSummed.fromAccount object The first account in the interval.
accountsSummed.fromAccount.accountNumber integer Account number of the first account in the interval.
accountsSummed.fromAccount.self string uri The unique self link of the first account in the interval.
accountsSummed.toAccount object The last account in the interval.
accountsSummed.toAccount.accountNumber integer Account number of the last account in the interval.
accountsSummed.toAccount.self string uri The unique self link of the last account in the interval.
accountType Enum profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
balance number The current balanace of the account.
barred boolean Shows if the account is barred from being used.
blockDirectEntries boolean Determines if the account can be manually updated with entries.
contraAccount object The default contra account of the account.
contraAccount.accountNumber integer Account number of the contra account.
contraAccount.self string uri The unique self link of the contra account.
debitCredit Enum debit, credit Describes the default update type of the account.
draftBalance number The current balance of the account including draft (not yet booked) entries.
name string 125 The name of the account.
self string uri A unique reference to the account ressource.
totalFromAccount object The account from which the sum total for this account is calculated.
totalFromAccount.accountNumber integer Account number of the first account.
totalFromAccount.self string uri The unique self link of the first account.
vatAccount object
vatAccount.self string uri The unique self link of the VAT code.
vatAccount.vatCode string 5 The VAT code of the VAT account for this account.

GET /accounts/:accountNumber/accounting-years

Schema name

accounts.accountNumber.accounting-years.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

closed, fromDate, toDate, year

Sortable properties

closed, fromDate, toDate, year

Default sorting

fromDate : ascending

Properties

Name Type Format Description
closed boolean Determines if the accounting year is closed for further transactions.
entries string uri A link to a collection of all entries booked in the accounting year.
fromDate string full-date The first date in the accounting year formated according to ISO-8601 (YYYY-MM-DD). Except for the first accounting year on an agreement, it must be the date immediately following the previous accounting year, and thus must be the first day of a month. The first accounting year on an agreement can begin on any day of the month.
periods string uri A link to the collection of accounting year periods on an agreement.
self string uri A unique link reference to the accounting year item.
toDate string full-date The last date in the accounting year formated according to ISO-8601 (YYYY-MM-DD). It must be the last date in the last month of the accounting year. An accounting year can at most have a duration of 18 months.
totals string uri A link to the chart of accounts with the years total in base currency.
vouchers string uri A link to a collection of vouchers created in the accounting year.
year string The calendar year or years spanned by the accounting year formatted according to ISO-8601(YYYY-MM-DD).

GET /accounts/:accountNumber/accounting-years/:accountingYear

Schema name

accounts.accountNumber.accounting-years.accountingYear.get.schema.json

Return type

This method returns a single object

Filterable properties

closed, fromDate, toDate, year

Sortable properties

closed, fromDate, toDate, year

Default sorting

fromDate : ascending

Properties

Name Type Format Description
closed boolean Determines if the accounting year is closed for further transactions.
entries string uri A link to a collection of all entries booked in the accounting year.
fromDate string full-date The first date in the accounting year formatted according to ISO-8601(YYYY-MM-DD). Except for the first accounting year on an agreement, it must be the date immediately following the previous accounting year, and thus must be the first day of a month. The first accounting year on an agreement can begin on any day of the month.
periods string uri A link to the collection of accounting year periods on an agreement.
self string uri A unique link reference to the accounting year item.
toDate string full-date The last date in the accounting year formatted according to ISO-8601(YYYY-MM-DD). It must be the last date in the last month of the accounting year. An accounting year can at most have a duration of 18 months.
totals string uri A link to the chart of accounts with the years total in base currency.
vouchers string uri A link to a collection of vouchers created in the accounting year.
year string The calendar year or years spanned by the accounting year formatted according to ISO-8601(YYYY-MM-DD).

GET /accounts/:accountNumber/accounting-years/:accountingYear/entries

Schema name

accounts.accountNumber.accounting-years.accountingYear.entries.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, date

Sortable properties

currency, date

Properties

Name Type Format Max length Min value Values Description
account object The account the entry is connected to.
account.accountNumber integer 1 A unique identifier of the account.
account.self string uri A unique reference to the account resource.
amount number The total entry amount.
amountInBaseCurrency number The total entry amount in base currency.
currency string The ISO 4217 currency code of the entry.
date string full-date Invoice issue date. The date is formatted according to ISO-8601(YYYY-MM-DD).
departmentalDistribution object The departmental distribution the entry is connected to.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entryNumber integer The unique identifier of the entry line.
entryType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of entry.
pdf object References a pdf representation of this entry.
pdf.self string uri The unique reference of the pdf representation for this entry.
project object The project the entry is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
self string uri A unique reference to the accounting year entries resource.
text string 255 A short description about the entry.
vatAccount object The account for VAT.
vatAccount.self string uri A unique link reference to the vatAccount item.
vatAccount.vatCode string 5 The unique identifier of the vat account.
voucherNumber integer The identifier of the voucher this entry belongs to.

GET /accounts/:accountNumber/accounting-years/:accountingYear/totals

Schema name

accounts.accountNumber.accounting-years.accountingYear.totals.get.schema.json

Return type

This method returns a single object

Filterable properties

account.accountNumber, fromDate, toDate

Sortable properties

account.accountNumber, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Description
account object The account used.
account.accountNumber integer The account number.
account.self string uri A unique reference to the account resource.
fromDate string full-date The first date in the period formated according to ISO-8601 (YYYY-MM-DD).
toDate string full-date The last date in the period formated according to ISO-8601 (YYYY-MM-DD).
totalInBaseCurrency number The total entry amount in base currency for the accounting year.

GET /accounts/:accountNumber/accounting-years/:accountingYear/vouchers

Schema name

accounts.accountNumber.accounting-years.accountingYear.vouchers.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

date, lines.amount, lines.supplier.supplierNumber, numberSeries, voucherType

Filterable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Sortable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Properties

Name Type Format Read-only Max length Values Description
booked boolean True Is this voucher booked or not.
date string full-date Voucher issue date. The date is formatted according to ISO-8601 (YYYY-MM-DD).
dueDate string full-date The date the voucher is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type ‘duedate’.
lines array An array containing the specific voucher lines.
lines.accruals object This is used to divide payments into equal sizes over a certain period of time.
lines.accruals.account object The account used by the accruals.
lines.accruals.account.accountNumber integer The account number.
lines.accruals.account.self string uri A unique reference to the account resource.
lines.accruals.endDate string full-date Accruals end date. The date is formatted according to ISO-8601.
lines.accruals.self string uri A unique link reference to the accruals item.
lines.accruals.startDate string full-date Accruals start date. The date is formatted according to ISO-8601.
lines.amount number The amount on the invoice line.
lines.amountInBaseCurrency number If you use base currency this must be the same as amount or not specified at all.
lines.booked boolean True Is this voucher booked or not.
lines.contraAccount object The contra account.
lines.contraAccount.accountNumber integer The account number.
lines.contraAccount.accountType Enum profitAndLoss, status The contra account must be of either ProfitAndLoss or Status type.
lines.contraAccount.self string uri A unique reference to the account resource.
lines.contraVatAccount object The contra account for VAT.
lines.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
lines.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
lines.contraVatAmount number The amount of VAT on the voucher on the contra account.
lines.contraVatAmountInBaseCurrency number The amount of VAT on the voucher on the contra account in base currency.
lines.currency string 3 The currency the invoice is specified in.
lines.department object A reference to the department that this voucher will be connected with.
lines.department.departmentNumber integer The unique identifier of the department.
lines.department.self string uri A unique link reference to the department item.
lines.document string uri The unique reference to the file.
lines.entryNumber integer True The unique identifier of the invoice line.
lines.exchangeRate number The exchange rate between the base currency and the invoice currency.
lines.remittanceInformation object
lines.remittanceInformation.creditorId string 50 This could be the IBAN/SWIFT no, bank account no, bankgiro no or postgiro no depending on the payment type.
lines.remittanceInformation.creditorInvoiceId string 30 The OCR or message sent together with the creditorId.
lines.remittanceInformation.paymentType object The payment type used.
lines.remittanceInformation.paymentType.paymentTypeNumber integer The unique identifier of the payment type.
lines.remittanceInformation.paymentType.self string uri A unique link reference to the paymentType item.
lines.remittanceInformation.self string uri A unique link reference to the remittanceInformation item.
lines.supplier object The supplier is the vendor from whom you buy your goods.
lines.supplier.self string uri A unique self reference of the supplier.
lines.supplier.supplierNumber integer The supplier number is a unique numerical identifier.
lines.supplierInvoiceNumber string The unique identifier of the supplier invoice gotten from the supplier.
lines.text string 250 The text on the voucher line.
lines.vatAccount object The account for VAT.
lines.vatAccount.self string uri A unique link reference to the vatAccount item.
lines.vatAccount.vatCode string 5 The unique identifier of the vat account.
lines.vatAmount number The amount of VAT on the voucher. Used if the line has a VAT account.
lines.vatAmountInBaseCurrency number The amount of VAT on the voucher in base currency.
numberSeries object The number series corresponding to the voucher type.
numberSeries.numberSeriesNumber integer The unique identifier of the number series.
numberSeries.self string uri A unique link reference to the number series item.
remainder number True Remaining amount to be paid.
remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
self string uri A unique reference to the accounting year vouchers resource.
voucherType Enum supplierInvoice The type of voucher. Must be SupplierInvoice.

GET /accounts/:accountNumber/accounting-years/:accountingYear/periods

Schema name

accounts.accountNumber.accounting-years.accountingYear.periods.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

closed, fromDate, toDate

Sortable properties

closed, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Max length Min value Description
accountingYear object The accounting year the period is part of.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string 4 A unique identifier of the accounting year.
closed boolean Determines if the period is closed for further transactions.
entries string uri A link to a collection of all entries booked in the period.
fromDate string full-date The first date in the period formated according to ISO-8601 (YYYY-MM-DD).
periodNumber integer 1 A unique identifier of the period.
self string uri A unique link reference to the period item.
toDate string full-date The last date in the period formated according to ISO-8601 (YYYY-MM-DD).
totals string uri A link to the chart of accounts with the periods total in base currency.

GET /accounts/:accountNumber/accounting-years/:accountingYear/periods/accountingYearPeriod

Schema name

accounts.accountNumber.accounting-years.accountingYear.periods.accountingYearPeriod.get.schema.json

Return type

This method returns a single object

Filterable properties

closed, fromDate, toDate

Sortable properties

closed, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Max length Min value Description
accountingYear object The accounting year the period is part of.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string 4 A unique identifier of the accounting year.
closed boolean Determines if the period is closed for further transactions.
entries string uri A link to a collection of all entries booked in the period.
fromDate string full-date The first date in the period formatted according to ISO-8601(YYYY-MM-DD).
periodNumber integer 1 A unique identifier of the period.
self string uri A unique link reference to the period item.
toDate string full-date The last date in the period formatted according to ISO-8601(YYYY-MM-DD).
totals string uri A link to the chart of accounts with the periods total in base currency.

GET /accounts/:accountNumber/accounting-years/:accountingYear/periods/accountingYearPeriod/entries

Schema name

accounts.accountNumber.accounting-years.accountingYear.periods.accountingYearPeriod.entries.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, date

Sortable properties

currency, date

Properties

Name Type Format Max length Min value Values Description
account object The account the entry is connected to.
account.accountNumber integer 1 A unique identifier of the account.
account.self string uri A unique reference to the account resource.
amount number The total entry amount.
amountInBaseCurrency number The total entry amount in base currency.
currency string The ISO 4217 currency code of the entry.
date string full-date Invoice issue date. The date is formatted according to ISO-8601(YYYY-MM-DD).
departmentalDistribution object The departmental distribution the entry is connected to.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entryNumber integer The unique identifier of the entry line.
entryType Enum customerInvoice, customerPayment, supplierInvoice, supplierPayment, financeVoucher, reminder, openingEntry, transferredOpeningEntry, systemEntry, manualDebtorInvoice The type of entry.
pdf object References a pdf representation of this entry.
pdf.self string uri The unique reference of the pdf representation for this entry.
project object The project the entry is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
self string uri A unique reference to the accounting year period entries resource.
text string 255 A short description about the entry.
vatAccount object The account for VAT.
vatAccount.self string uri A unique link reference to the vatAccount item.
vatAccount.vatCode string 5 The unique identifier of the vat account.
voucherNumber integer The identifier of the voucher this entry belongs to.

GET /accounts/:accountNumber/accounting-years/:accountingYear/periods/accountingYearPeriod/totals

Schema name

accounts.accountNumber.accounting-years.accountingYear.periods.accountingYearPeriod.totals.get.schema.json

Return type

This method returns a single object

Filterable properties

account.accountNumber, fromDate, toDate

Sortable properties

account.accountNumber, fromDate, toDate

Default sorting

fromDate : ascending

Properties

Name Type Format Description
account object The account used.
account.accountNumber integer The account number.
account.self string uri A unique reference to the account resource.
fromDate string full-date The first date in the period formatted according to ISO-8601(YYYY-MM-DD).
toDate string full-date The last date in the period formatted according to ISO-8601(YYYY-MM-DD).
totalInBaseCurrency number The total entry amount in base currency for the accounting year period.

GET /accounts/:accountNumber/accounting-years/:accountingYear/periods/accountingYearPeriod/vouchers

Schema name

accounts.accountNumber.accounting-years.accountingYear.periods.accountingYearPeriod.vouchers.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

date, lines.amount, lines.supplier.supplierNumber, numberSeries, voucherType

Filterable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Sortable properties

lines.accruals.account.accountNumber, lines.contraAccount.accountNumber, lines.contraAccount.accountType

Properties

Name Type Format Read-only Max length Values Description
booked boolean True Is this voucher booked or not.
date string full-date Voucher issue date. The date is formatted according to ISO-8601 (YYYY-MM-DD).
dueDate string full-date The date the voucher is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
lines array An array containing the specific voucher lines.
lines.accruals object This is used to divide payments into equal sizes over a certain period of time.
lines.accruals.account object The account used by the accruals.
lines.accruals.account.accountNumber integer The account number.
lines.accruals.account.self string uri A unique reference to the account resource.
lines.accruals.endDate string full-date Accruals end date. The date is formatted according to ISO-8601(YYYY-MM-DD).
lines.accruals.self string uri A unique link reference to the accruals item.
lines.accruals.startDate string full-date Accruals start date. The date is formatted according to ISO-8601(YYYY-MM-DD).
lines.amount number The amount on the invoice line.
lines.amountInBaseCurrency number If you use base currency this must be the same as amount or not specified at all.
lines.booked boolean True Is this voucher booked or not.
lines.contraAccount object The contra account.
lines.contraAccount.accountNumber integer The account number.
lines.contraAccount.accountType Enum profitAndLoss, status The contra account must be of either ProfitAndLoss or Status type.
lines.contraAccount.self string uri A unique reference to the account resource.
lines.contraVatAccount object The contra account for VAT.
lines.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
lines.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
lines.contraVatAmount number The amount of VAT on the voucher on the contra account.
lines.contraVatAmountInBaseCurrency number The amount of VAT on the voucher on the contra account in base currency.
lines.currency string 3 The currency the invoice is specified in.
lines.department object A reference to the department that this voucher will be connected with.
lines.department.departmentNumber integer The unique identifier of the department.
lines.department.self string uri A unique link reference to the department item.
lines.document string uri The unique reference to the file.
lines.entryNumber integer True The unique identifier of the invoice line.
lines.exchangeRate number The exchange rate between the base currency and the invoice currency.
lines.remittanceInformation object
lines.remittanceInformation.creditorId string 50 This could be the IBAN/SWIFT no, bank account no, bankgiro no or postgiro no depending on the payment type.
lines.remittanceInformation.creditorInvoiceId string 30 The OCR or message sent together with the creditorId.
lines.remittanceInformation.paymentType object The payment type used.
lines.remittanceInformation.paymentType.paymentTypeNumber integer The unique identifier of the payment type.
lines.remittanceInformation.paymentType.self string uri A unique link reference to the paymentType item.
lines.remittanceInformation.self string uri A unique link reference to the remittanceInformation item.
lines.supplier object The supplier is the vendor from whom you buy your goods.
lines.supplier.self string uri A unique self reference of the supplier.
lines.supplier.supplierNumber integer The supplier number is a unique numerical identifier.
lines.supplierInvoiceNumber string The unique identifier of the supplier invoice gotten from the supplier.
lines.text string 250 The text on the voucher line.
lines.vatAccount object The account for VAT.
lines.vatAccount.self string uri A unique link reference to the vatAccount item.
lines.vatAccount.vatCode string 5 The unique identifier of the vat account.
lines.vatAmount number The amount of VAT on the voucher. Used if the line has a VAT account.
lines.vatAmountInBaseCurrency number The amount of VAT on the voucher in base currency.
numberSeries object The number series corresponding to the voucher type.
numberSeries.numberSeriesNumber integer The unique identifier of the number series.
numberSeries.self string uri A unique link reference to the number series item.
remainder number True Remaining amount to be paid.
remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
self string uri A unique reference to the accounting year vouchers resource.
voucherType Enum supplierInvoice The type of voucher. Must be SupplierInvoice.

App Roles

GET /app-roles

Schema name

app-roles.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

roleNumber

Sortable properties

roleNumber

Default sorting

roleNumber : ascending

Properties

Name Type Format Min value Values Description
name string SuperUser, Bookkeeping, Sales, ProjectEmployee API Role name.
requiredModules array An array containing the required modules.
requiredModules.moduleNumber integer 1 A reference number for the module.
requiredModules.self string uri A unique reference to the module resource.
roleNumber integer 1 A reference number for the app role.
self string uri The unique self reference of the draft invoice collection.

GET /app-roles/:roleNumber

Schema name

app-roles.roleNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

roleNumber

Sortable properties

roleNumber

Default sorting

roleNumber : ascending

Properties

Name Type Format Min value Values Description
name string SuperUser, Bookkeeping, Sales, ProjectEmployee API Role name.
requiredModules array An array containing the required modules.
requiredModules.moduleNumber integer 1 A reference number for the module.
requiredModules.self string uri A unique reference to the module resource.
roleNumber integer 1 A reference number for the app role.

Apps

API Apps are what the users of your product see. This resource defines what level of access an app requires as well as a descriptive name.

When you create an app, a private key is returned in the response. Save that, since you will not see that in any subsequent responses.

GET /apps

Schema name

apps.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Max length Min length Min value Values Description
appNumber integer 0 A reference number for the API App.
appPublicToken string 50 1 The appPublicToken is used for issuing grants.
appSecretToken string 50 1 The appSecretToken is used for accessing the API along side the agreementGrantToken. This is only displayed right after creating a new app.
created string full-date Date when the API App was created.
grantUrl string 500 1 Link used for issuing grants.
name string 50 1 API App name, which is displayed to people before they grant access.
requiredRoles array Roles required to issue a grant.
requiredRoles.name string SuperUser, BookKeeping, Sales, ProjectEmployee API Role name.
requiredRoles.requiredModules object Module or modules required for the role.
requiredRoles.roleNumber integer 1 A reference number for the API Role.
rootUrl string 200 1 Root URL used for issuing grants. Redirects after the grant are restricted to this Root URL.
self string uri The unique self reference of the app.

GET /apps/:appNumber

Schema name

apps.appNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Min length Min value Values Description
appNumber integer 0 A reference number for the API App.
appPublicToken string 50 1 The appPublicToken is used for issuing grants.
appSecretToken string 50 1 The appSecretToken is used for accessing the API along side the agreementGrantToken. This is only displayed right after creating a new app.
created string full-date Date when the API App was created.
grantUrl string 500 1 Link used for issuing grants.
name string 50 1 API App name, which is displayed to people before they grant access.
requiredRoles array Roles required to issue a grant.
requiredRoles.name string 100 1 SuperUser, BookKeeping, Sales, ProjectEmployee API Role name.
requiredRoles.requiredModules object Module or modules required for the role.
requiredRoles.roleNumber integer 0 A reference number for the API Role.
rootUrl string 200 1 Root URL used for issuing grants. Redirects after the grant are restricted to this Root URL.
self string uri The unique self reference of the app.

POST /apps

Schema name

apps.post.schema.json

Return type

This method returns a single object

Required property

name

Properties

Name Type Format Max length Min length Min value Values Description
name string 50 1 API App name, which is displayed to people before they grant access.
requiredRoles array Roles required to issue a grant.
requiredRoles.name string 100 1 SuperUser, BookKeeping, Sales, ProjectEmployee API Role name.
requiredRoles.roleNumber integer 0 A reference number for the API Role.
rootUrl string uri 200 1 Root URL used for issuing grants. Redirects after the grant are restricted to this Root URL.

App Settings

This endpoint allows you to save a set of custom settings specific to your app. The settings will only be exposed for your app and are not visible for anybody else. Settings can be specific to the authenticated user or to the agreement as a whole. You can only save 200 settings per user and 200 per agreement.

The settings are a key-value set where the key is a string and the setting has to be a valid json document.

GET /app-settings

Schema name

app-settings.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
agreement string uri A reference to the agreements app settings collection.
user string uri A reference to the users app settings collection.

GET /app-settings/agreement

Schema name

app-settings.agreement.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the app setting item.
settingKey string A unique key.

GET /app-settings/agreement/:settingId

Schema name

app-settings.agreement.settingId.get.schema.json

Return type

This method returns a single object

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the app setting item.
settingKey string A unique key.

PUT /app-settings/agreement/:settingId

See code example in JSFiddle

var headers = {
    'X-AppSecretToken': "w6BmUL2av69WcJn4xe4b77CT4XvUWGX8X7XCxvXR",
    'X-AgreementGrantToken': "d9_YlISOFuI7Ymz6z6kuNsEkv_Etk54N7NY-yrP7iQk1",
    accept: "application/json"
};

var setting = {
    "settingKey": "123",
    "content": {
        "v": "Alibaba"
    }
}

$(document).ready(function () {
    $('#input').text(JSON.stringify(setting, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/app-settings/agreement/123",
        dataType: "json",
        headers: headers,
        data: JSON.stringify(setting),
        contentType: 'application/json; charset=UTF-8',
        type: "PUT"
    }).always(function (data) {
        $('#output').text(JSON.stringify(data, null, 4));
    });
});

Schema name

app-settings.agreement.settingId.put.schema.json

Return type

This method returns a single object

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the setting item.
settingKey string A unique key.

DELETE /app-settings/agreement/:settingId

This endpoint deletes an app setting from the agreements app settings.

GET /app-settings/user

Schema name

app-settings.user.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the app setting item.
settingKey string A unique key.

GET /app-settings/user/:settingId

Schema name

app-settings.user.settingId.get.schema.json

Return type

This method returns a single object

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the app setting item.
settingKey string A unique key.

PUT /app-settings/user/:settingId

See code example in JSFiddle

var headers = {
    'X-AppSecretToken': "w6BmUL2av69WcJn4xe4b77CT4XvUWGX8X7XCxvXR",
    'X-AgreementGrantToken': "d9_YlISOFuI7Ymz6z6kuNsEkv_Etk54N7NY-yrP7iQk1",
    accept: "application/json"
};

var setting = {
    "settingKey": "123",
    "content": {
        "v": "Alibaba"
    }
}

$(document).ready(function () {
    $('#input').text(JSON.stringify(setting, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/app-settings/user/123",
        dataType: "json",
        headers: headers,
        data: JSON.stringify(setting),
        contentType: 'application/json; charset=UTF-8',
        type: "PUT"
    }).always(function (data) {
        $('#output').text(JSON.stringify(data, null, 4));
    });
});

Schema name

app-settings.user.settingId.put.schema.json

Return type

This method returns a single object

Required properties

content, settingKey

Properties

Name Type Format Description
content object The setting payload.
self string uri A unique link reference to the setting item.
settingKey string A unique key.

DELETE /app-settings/user/:settingId

This endpoint deletes an app setting from the users app settings.

Currencies

GET /currencies

Schema name

currencies.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Max length Description
code string 3 The ISO 4217 code of the currency.
isoNumber string 3 The ISO 4217 numeric code of the currency.
name string 50 The name of the currency.
self string uri The unique self reference of the currency resource.

GET /currencies/:code

Schema name

currencies.code.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Description
code string 3 The ISO 4217 code of the currency.
isoNumber string 3 The ISO 4217 numeric code of the currency.
name string 50 The name of the currency.
self string uri The unique self reference of the currency resource.

Customer Groups

GET /customer-groups

This endpoint allows you to fetch a collection of all customer groups.

Schema name

customer-groups.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

account.accountNumber, account.accountType, account.balance, account.blockDirectEntries, account.debitCredit, account.name, customerGroupNumber, name

Sortable properties

account.accountNumber, account.accountType, account.balance, account.blockDirectEntries, account.debitCredit, account.name, customerGroupNumber, name

Properties

Name Type Format Max length Values Description
account object The account used by the accruals.
account.accountingYears string uri A unique reference to the accounting years for this account.
account.accountNumber integer The account number.
account.accountType Enum profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
account.balance number The current balance of the account.
account.blockDirectEntries boolean Determines if the account can be manually updated with entries.
account.debitCredit Enum debit, credit Describes the default update type of the account.
account.name string 125 The name of the account.
account.self string uri A unique reference to the account resource.
customerGroupNumber integer The customer group number.
customers string uri The unique self reference of the customers belonging to this customer group.
layout object The default layout used by the customer group.
layout.deleted boolean If true this indicates that the layout is deleted and can’t be used anymore.
layout.layoutNumber integer The layout number.
layout.name string 100 The name of the layout.
layout.self string uri A unique reference to the layout resource.
name string 50 The name of the customer group.
self string uri The unique self reference of the customer group.

GET /customer-groups/:customerGroupNumber

This endpoint allows you to fetch a specific customer group.

Schema name

customer-groups.customerGroupNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

account.accountNumber, account.accountType, account.balance, account.blockDirectEntries, account.debitCredit, account.name, customerGroupNumber, name

Sortable properties

account.accountNumber, account.accountType, account.balance, account.blockDirectEntries, account.debitCredit, account.name, customerGroupNumber, name

Properties

Name Type Format Max length Values Description
account object The account used by the accruals.
account.accountingYears string uri A unique reference to the accounting years for this account.
account.accountNumber integer The account number.
account.accountType Enum profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
account.balance number The current balance of the account.
account.blockDirectEntries boolean Determines if the account can be manually updated with entries.
account.debitCredit Enum debit, credit Describes the default update type of the account.
account.name string 125 The name of the account.
account.self string uri A unique reference to the account resource.
customerGroupNumber integer The customer group number.
customers string uri The unique self reference of the customers belonging to this customer group.
layout object The default layout used by the customer group.
layout.deleted boolean If true this indicates that the layout is deleted and can’t be used anymore.
layout.layoutNumber integer The layout number.
layout.name string 100 The name of the layout.
layout.self string uri A unique reference to the layout resource.
name string 50 The name of the customer group.
self string uri The unique self reference of the customer group.

GET /customer-groups/:customerGroupNumber/customers

This endpoint allows you to fetch a collection of all customers in a specific customer group.

Schema name

customer-groups.customerGroupNumber.customers.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

currency, customerGroup, name, paymentTerms, vatZone

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 510 Address for the customer including street and number.
attention object The customer’s person of attention.
attention.customerContactNumber integer The unique identifier of the customer employee.
attention.self string uri A unique link reference to the customer employee item.
balance number True The outstanding amount for this customer.
barred boolean Boolean indication of whether the customer is barred from invoicing.
city string 50 The customer’s city.
corporateIdentificationNumber string 40 Company Identification Number. For example CVR in Denmark.
country string 50 The customer’s country.
creditLimit number A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
currency string 3 3 Default payment currency.
customerContact object Reference to main contact employee at customer.
customerContact.customerContactnumber integer The unique identifier of the customer contact.
customerContact.self string uri A unique link reference to the customer contact item.
customerGroup object In order to set up a new customer, it is necessary to specify a customer group. It is useful to group a company’s customers (e.g., ‘domestic’ and ‘foreign’ customers) and to link the group members to the same account when generating reports.
customerGroup.customerGroupNumber integer The unique identifier of the customer group.
customerGroup.self string uri A unique link reference to the customer group item.
customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
ean string 40 International Article Number (originally European Article Number). EAN is used for invoicing the Danish public sector.
email string 255 Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
layout object Layout to be applied for invoices and other documents for this customer.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
name string 255 1 The customer name.
paymentTerms object The default payment terms for the customer.
paymentTerms.paymentTermsNumber integer The unique identifier of the payment terms.
paymentTerms.self string uri A unique link reference to the payment terms item.
publicEntryNumber string 50 The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
salesPerson object Reference to the employee responsible for contact with this customer.
salesPerson.employeeNumber integer The unique identifier of the employee.
salesPerson.self string uri A unique link reference to the employee resource.
self string uri The unique self reference of the customer resource.
telephoneAndFaxNumber string 255 The customer’s telephone and/or fax number.
vatNumber string 50 The customer’s value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the ciNucorporateIdentificationNumber property.
vatZone object Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
vatZone.self string uri A unique link reference to the VAT-zone item.
vatZone.vatZoneNumber integer The unique identifier of the VAT-zone.
website string 255 Customer website, if applicable.
zip string 30 The customer’s postcode.

POST /customer-groups

This endpoint allows you to create a new customer group.

Schema name

customer-groups.post.schema.json

Return type

This method returns a single object

Required properties

account.accountNumber, customerGroupNumber

Properties

Name Type Format Max length Min value Description
account object The account used by the accruals.
account.accountNumber integer 1 The account number.
account.self string uri A unique reference to the account resource.
customerGroupNumber integer 1 The customer group number.
layout object The default layout used by the customer group.
layout.layoutNumber integer The layout number.
layout.self string uri A unique reference to the layout resource.
name string 50 The name of the customer group.

PUT /customer-groups/:customerGroupNumber

This endpoint allows you to update an existing customer group.

Schema name

customer-groups.customergroupnumber.put.schema.json

Return type

This method returns a single object

Required property

account.accountNumber

Properties

Name Type Format Read-only Max length Description
account object The account used by the accruals.
account.accountNumber integer The account number.
account.self string uri A unique reference to the account resource.
customerGroupNumber integer True The customer group number.
layout object The default layout used by the customer group.
layout.layoutNumber integer The layout number.
layout.self string uri A unique reference to the layout resource.
name string 50 The name of the customer group.

DELETE /customer-groups/:customerGroupNumber

This endpoint allows you to delete an existing customer group. It will return HttpStatusCode.NoContent (204) on success.

Customers

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /customers

This endpoint provides you with a collection of customers.

Schema name

customers.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

currency, customerGroup, name, paymentTerms, vatZone

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 510 Address for the customer including street and number.
attention object The customer’s person of attention.
attention.customerContactNumber integer The unique identifier of the customer employee.
attention.self string uri A unique link reference to the customer employee item.
balance number True The outstanding amount for this customer.
barred boolean Boolean indication of whether the customer is barred from invoicing.
city string 50 The customer’s city.
corporateIdentificationNumber string 40 Corporate Identification Number. For example CVR in Denmark.
country string 50 The customer’s country.
creditLimit number A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
currency string 3 3 Default payment currency.
customerContact object Reference to main contact employee at customer.
customerContact.customerContactnumber integer The unique identifier of the customer contact.
customerContact.self string uri A unique link reference to the customer contact item.
customerGroup object Reference to the customer group this customer is attached to.
customerGroup.customerGroupNumber integer The unique identifier of the customer group.
customerGroup.self string uri A unique link reference to the customer group item.
customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
ean string 40 International Article Number (originally European Article Number). EAN is used for invoicing the Danish public sector.
email string 255 Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
lastUpdated string full-date The date this customer was last updated. The date is formatted according to ISO-8601.
layout object Layout to be applied for invoices and other documents for this customer.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
name string 255 1 The customer name.
paymentTerms object The default payment terms for the customer.
paymentTerms.paymentTermsNumber integer The unique identifier of the payment terms.
paymentTerms.self string uri A unique link reference to the payment terms item.
publicEntryNumber string 50 The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
salesPerson object Reference to the employee responsible for contact with this customer.
salesPerson.employeeNumber integer The unique identifier of the employee.
salesPerson.self string uri A unique link reference to the employee resource.
self string uri The unique self reference of the customer resource.
telephoneAndFaxNumber string 255 The customer’s telephone and/or fax number.
vatNumber string 50 The customer’s value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the ciNumber property.
vatZone object Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
vatZone.self string uri A unique link reference to the VAT-zone item.
vatZone.vatZoneNumber integer The unique identifier of the VAT-zone.
website string 255 Customer website, if applicable.
zip string 30 The customer’s postcode.

GET /customers/:customerNumber

Returns a specific customer.

Schema name

customers.customernumber.get.schema.json

Return type

This method returns a single object

Required properties

currency, customerGroup, name, paymentTerms, vatZone

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 510 Address for the customer including street and number.
attention object The customer’s person of attention.
attention.customerContactNumber integer The unique identifier of the customer employee.
attention.self string uri A unique link reference to the customer employee item.
balance number True The outstanding amount for this customer.
barred boolean Boolean indication of whether the customer is barred from invoicing.
city string 50 The customer’s city.
corporateIdentificationNumber string 40 Corporate Identification Number. For example CVR in Denmark.
country string 50 The customer’s country.
creditLimit number A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
currency string 3 3 Default payment currency.
customerContact object Reference to main contact employee at customer.
customerContact.customerContactnumber integer The unique identifier of the customer contact.
customerContact.self string uri A unique link reference to the customer contact item.
customerGroup object Reference to the customer group this customer is attached to.
customerGroup.customerGroupNumber integer The unique identifier of the customer group.
customerGroup.self string uri A unique link reference to the customer group item.
customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
ean string 40 International Article Number (originally European Article Number). EAN is used for invoicing the Danish public sector.
email string 255 Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
lastUpdated string full-date The date this customer was last updated. The date is formatted according to ISO-8601.
layout object Layout to be applied for invoices and other documents for this customer.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
name string 255 1 The customer name.
paymentTerms object The default payment terms for the customer.
paymentTerms.paymentTermsNumber integer The unique identifier of the payment terms.
paymentTerms.self string uri A unique link reference to the payment terms item.
publicEntryNumber string 50 The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
salesPerson object Reference to the employee responsible for contact with this customer.
salesPerson.employeeNumber integer The unique identifier of the employee.
salesPerson.self string uri A unique link reference to the employee resource.
self string uri The unique self reference of the customer resource.
telephoneAndFaxNumber string 255 The customer’s telephone and/or fax number.
vatNumber string 50 The customer’s value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the ciNumber property.
vatZone object Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
vatZone.self string uri A unique link reference to the VAT-zone item.
vatZone.vatZoneNumber integer The unique identifier of the VAT-zone.
website string 255 Customer website, if applicable.
zip string 30 The customer’s postcode.

GET /customers/:customerNumber/totals

Returns a specific customer totals.

Schema name

customers.customernumber.totals.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
booked string uri A reference of the customer booked invoices totals resource.
drafts string uri A reference of the customer draft invoices totals resource.
self string uri The unique self reference of the customer totals resource.

POST /customers

This endpoint allows you to create a new customer.

Schema name

customers.post.schema.json

Return type

This method returns a single object

Required properties

currency, customerGroup, name, paymentTerms, vatZone

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 510 Address for the customer including street and number.
balance number True The outstanding amount for this customer.
barred boolean Boolean indication of whether the customer is barred from invoicing.
city string 50 The customer’s city.
corporateIdentificationNumber string 40 Corporate Identification Number. For example CVR in Denmark.
country string 50 The customer’s country.
creditLimit number A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
currency string 3 3 Default payment currency.
customerGroup object In order to set up a new customer, it is necessary to specify a customer group. It is useful to group a company’s customers (e.g., ‘domestic’ and ‘foreign’ customers) and to link the group members to the same account when generating reports.
customerGroup.customerGroupNumber integer The unique identifier of the customer group.
customerGroup.self string uri A unique link reference to the customer group item.
customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits. If no customer number is specified a number will be supplied by the system.
ean string 40 International Article Number (originally European Article Number). EAN is used for invoicing the Danish public sector.
email string 255 Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
layout object Layout to be applied for invoices and other documents for this customer.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
name string 255 1 The customer name.
paymentTerms object The default payment terms for the customer.
paymentTerms.paymentTermsNumber integer The unique identifier of the payment terms.
paymentTerms.self string uri A unique link reference to the payment terms item.
priceGroup
publicEntryNumber string 50 The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
salesPerson object Reference to the employee responsible for contact with this customer.
salesPerson.employeeNumber integer The unique identifier of the employee.
salesPerson.self string uri A unique link reference to the employee resource.
telephoneAndFaxNumber string 255 The customer’s telephone and/or fax number.
vatNumber string 50 The customer’s value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the ciNumber property.
vatZone object Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
vatZone.self string uri A unique link reference to the VAT-zone item.
vatZone.vatZoneNumber integer The unique identifier of the VAT-zone.
website string 255 Customer website, if applicable.
zip string 30 The customer’s postcode.

PUT /customers/:customerNumber

This endpoint allows you to update an existing customer.

Schema name

customers.customernumber.put.schema.json

Return type

This method returns a single object

Required properties

currency, customerGroup, name, paymentTerms, vatZone

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 510 Address for the customer including street and number.
attention object The customer’s person of attention.
attention.customerContactNumber integer The unique identifier of the customer employee.
attention.self string uri A unique link reference to the customer employee item.
balance number True The outstanding amount for this customer.
barred boolean Boolean indication of whether the customer is barred from invoicing.
city string 50 The customer’s city.
corporateIdentificationNumber string 40 Corporate Identification Number. For example CVR in Denmark.
country string 50 The customer’s country.
creditLimit number A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
currency string 3 3 Default payment currency.
customerContact object Reference to main contact employee at customer.
customerContact.customerContactnumber integer The unique identifier of the customer contact.
customerContact.self string uri A unique link reference to the customer contact item.
customerGroup object In order to update a customer, it is necessary to specify a customer group. It is useful to group a company’s customers (e.g., ‘domestic’ and ‘foreign’ customers) and to link the group members to the same account when generating reports.
customerGroup.customerGroupNumber integer The unique identifier of the customer group.
customerGroup.self string uri A unique link reference to the customer group item.
customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
ean string 40 International Article Number (originally European Article Number). EAN is used for invoicing the Danish public sector.
email string 255 Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
layout object Layout to be applied for invoices and other documents for this customer.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
name string 255 1 The customer name.
paymentTerms object The default payment terms for the customer.
paymentTerms.paymentTermsNumber integer The unique identifier of the payment terms.
paymentTerms.self string uri A unique link reference to the payment terms item.
priceGroup
publicEntryNumber string 50 The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
salesPerson object Reference to the employee responsible for contact with this customer.
salesPerson.employeeNumber integer The unique identifier of the employee.
salesPerson.self string uri A unique link reference to the employee resource.
telephoneAndFaxNumber string 255 The customer’s telephone and/or fax number.
vatNumber string 50 The customer’s value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the ciNumber property.
vatZone object Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
vatZone.self string uri A unique link reference to the VAT-zone item.
vatZone.vatZoneNumber integer The unique identifier of the VAT-zone.
website string 255 Customer website, if applicable.
zip string 30 The customer’s postcode.

DELETE /customers/:customerNumber

This endpoint allows you to delete a customer. This delete operation will return a HttpStatusCode.NoContent (204) on success.

GET /customers/:customerNumber/templates/

Returns the templates available for customers. Templates are used to simplify the creation of resources that can otherwise be complex to build. An example of this is an Invoice.

Schema name

customers.customernumber.templates.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
invoice string uri The GET link to a draft invoice template.
invoiceline string uri The GET link to a draft invoice line template.
self string uri The self reference of the customer templates.

GET /customers/:customerNumber/templates/invoice

Returns a draft invoice template based on the customer. This can be modified and posted to /invoices-experimental/drafts

Schema name

customers.customernumber.templates.invoice.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Max value Min value Description
currency string The ISO 4217 currency code of the invoice. This represents the trading currency.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type ‘duedate’.
exchangeRate number The exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency.
paymentTerms object The terms of payment for the invoice.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.

GET /customers/:customerNumber/templates/invoiceline

This returns a collection of draft invoice lines, one for each product, with the corresponding link to the full draft invoice line template.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/customers/101/templates/invoiceline",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

customers.customerNumber.templates.invoiceline.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

description

Properties

Name Type Format Max length Description
description string 2500 A description of the product or service sold.
product object The product or service offered on the invoice line.
product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
product.self string uri A unique reference to the product resource.
self string uri A unique reference to the draft invoice line template resource.

GET /customers/:customerNumber/templates/invoiceline/:productNumber

This returns the invoice line template for the specified product. This template can be used to easily create an invoice line on an existing draft invoice.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/customers/101/templates/invoiceline/101",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

customers.customerNumber.templates.invoiceline.productNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Min value Description
description string 2500 A description of the product or service sold.
discountPercentage number A line discount expressed as a percentage.
marginInBaseCurrency number The difference between the net price and the cost price on the invoice line in base currency.
marginPercentage number The margin on the invoice line expressed as a percentage.
product object The product or service offered on the invoice line.
product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
product.self string uri A unique reference to the product resource.
quantity number The number of units of goods on the invoice line.
self string uri A unique reference to the draft invoice line template resource.
unit object The unit of meassure applied to the invoice line.
unit.self string uri A unique reference to the unit resource.
unit.unitNumber integer 0 The unique identifier of the unit.
unitCostPrice number The cost price of 1 unit of the goods or services in the invoice currency.
unitNetPrice number The price of 1 unit of the goods or services on the invoice line in the invoice currency.

GET /customers/:customerNumber/contacts

This endpoint provides you with a collection of customer contacts.

Schema name

customers.customernumber.contacts.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

customer.customerNumber

Sortable properties

customer.customerNumber

Properties

Name Type Format Max length Max value Min value Values Description
customer object The customer this contact belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
customerContactNumber number Unique numerical identifier of the customer contact.
deleted boolean Flag indicating if the contact person is deleted.
eInvoiceId string 50 Electronic invoicing Id. This will appear on EAN invoices in the field cbc:ID. Note this is not available on UK agreements.
email string 255 Customer contact e-mail address. This is where copies of sales documents are sent.
emailNotifications array invoices, orders, quotations, reminders This array specifies what events the contact person should recieve email notifications on. Note that limited plans only have access to invoice notifications.
name string 255 Customer contact name.
notes string 2000 Any notes you need to keep on a contact person.
phone string 50 Customer contact phone number.
self string uri The unique self reference of the customer contact resource.
sortKey integer 1 The customer contact number displayed in the e-conomic web interface.

GET /customers/:customerNumber/contacts/:contactNumber

This endpoint provides you with a specific customer contacts.

Schema name

customers.customernumber.contacts.contactnumber.get.schema.json

Return type

This method returns a single object

Filterable properties

customer.customerNumber

Sortable properties

customer.customerNumber

Properties

Name Type Format Max length Max value Min value Values Description
customer object The customer this contact belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
customerContactNumber number Unique numerical identifier of the customer contact.
deleted boolean Flag indicating if the contact person is deleted.
eInvoiceId string 50 Electronic invoicing Id. This will appear on EAN invoices in the field cbc:ID. Note this is not available on UK agreements.
email string 255 Customer contact e-mail address. This is where copies of sales documents are sent.
emailNotifications array invoices, orders, quotations, reminders This array specifies what events the contact person should recieve email notifications on. Note that limited plans only have access to invoice notifications.
name string 255 Customer contact name.
notes string 2000 Any notes you need to keep on a contact person.
phone string 50 Customer contact phone number.
self string uri The unique self reference of the customer contact resource.
sortKey integer 1 Sort key shows a per agreement index in the UI.

POST /customers/:customerNumber/contacts

This endpoint allows you to create a new customer contact.

Schema name

customers.customernumber.contacts.post.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Max value Min value Values Description
customer object The customer this contact belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
eInvoiceId string 50 Electronic invoicing Id. This will appear on EAN invoices in the field cbc:ID. Note this is not available on UK agreements.
email string 255 Customer contact e-mail address. This is where copies of sales documents are sent.
emailNotifications array invoices, orders, quotations, reminders This array specifies what events the contact person should recieve email notifications on. Note that limited plans only have access to invoice notifications.
name string 255 Customer contact name.
notes string 2000 Any notes you need to keep on a contact person.
phone string 50 Customer contact phone number.

PUT /customers/:customerNumber/contacts/:contactNumber

This endpoint allows you to update an existing customer contact.

Schema name

customers.customernumber.contacts.contactnumber.put.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Max value Min value Values Description
customer object The customer this contact belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
eInvoiceId string 50 Electronic invoicing Id. This will appear on EAN invoices in the field cbc:ID.
email string 255 Customer contact e-mail address. This is where copies of sales documents are sent.
emailNotifications array invoices, orders, quotations, reminders This array specifies what events the contact person should recieve email notifications on. Note that limited plans only have access to invoice notifications.
name string 255 Customer contact name.
notes string 2000 Any notes you need to keep on a contact person.
phone string 50 Customer contact phone number.

DELETE /customers/:customerNumber/contacts/:contactNumber

This endpoint allows you to delete a customer contact. This delete operation will return a HttpStatusCode.NoContent (204) on success.

GET /customers/:customerNumber/delivery-locations

This endpoint provides you with a collection of delivery locations for the customer.

Schema name

customers.customerNumber.delivery-locations.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

address, city, country, customer.customerNumber, deliveryLocationNumber, postalCode, sortKey

Sortable properties

address, city, country, customer.customerNumber, deliveryLocationNumber, postalCode, sortKey

Properties

Name Type Format Max length Max value Min value Description
address string 255 Address for the delivery location including street and number.
city string 50 The delivery location city.
country string 50 The delivery location country.
customer object The customer this delivery location belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
deliveryLocationNumber integer 1 The delivery location number is a unique numerical identifier.
postalCode string 15 The delivery location postcode.
self string uri The unique self reference of the delivery location resource.
sortKey integer 1 The delivery location number displayed in the e-conomic web interface.
termsOfDelivery string 100 Special delivery terms that apply to.

GET /customers/:customerNumber/delivery-locations/:deliveryLocationNumber

This endpoint provides you with a specific delivery location for the customer.

Schema name

customers.customerNumber.delivery-locations.deliveryLocationNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

address, city, country, customer.customerNumber, deliveryLocationNumber, postalCode, sortKey

Sortable properties

address, city, country, customer.customerNumber, deliveryLocationNumber, postalCode, sortKey

Properties

Name Type Format Max length Max value Min value Description
address string 255 Address for the delivery location including street and number.
city string 50 The delivery location city.
country string 50 The delivery location country.
customer object The customer this delivery location belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
deliveryLocationNumber integer 1 The delivery location number is a unique numerical identifier.
postalCode string 15 The delivery location postcode.
self string uri The unique self reference of the delivery location resource.
sortKey integer 1 The delivery location number displayed in the e-conomic web interface.
termsOfDelivery string 100 Special delivery terms that apply to.

POST /customers/:customerNumber/delivery-locations

This endpoint allows you to create a new delivery location for the customer.

Schema name

customers.customerNumber.delivery-locations.post.schema.json

Return type

This method returns a single object

Properties

Name Type Format Read-only Max length Max value Min value Description
address string 255 Address for the delivery location including street and number.
city string 50 The delivery location city.
country string 50 The delivery location country.
customer object The customer this delivery location belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits. This value will be picked up from the url.
customer.self string uri A unique reference to the customer resource.
deliveryLocationNumber integer True 1 The delivery location number is a unique numerical identifier. This identifier will be created for you.
postalCode string 15 The delivery location postcode.
sortKey integer 1 The delivery location number displayed in the e-conomic web interface. If not supplied this key will be created for you.
termsOfDelivery string 100 Special delivery terms that apply to.

PUT /customers/:customerNumber/delivery-locations/:deliveryLocationNumber

This endpoint allows you to update an existing delivery location on the customer.

Schema name

customers.customerNumber.delivery-locations.deliveryLocationNumber.put.schema.json

Return type

This method returns a single object

Properties

Name Type Format Read-only Max length Max value Min value Description
address string 255 Address for the delivery location including street and number.
city string 50 The delivery location city.
country string 50 The delivery location country.
customer object The customer this delivery location belongs to.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits. This value will be picked up from the url.
customer.self string uri A unique reference to the customer resource.
deliveryLocationNumber integer True 1 The delivery location number is a unique numerical identifier.
postalCode string 15 The delivery location postcode.
sortKey integer 1 The delivery location number displayed in the e-conomic web interface. If not supplied this key will be created for you.
termsOfDelivery string 100 Special delivery terms that apply to.

DELETE /customers/:customerNumber/delivery-locations/:deliveryLocationNumber

This endpoint allows you to delete an existing delivery location on the customer. It will return HttpStatusCode.NoContent (204) on success.

GET /customers/:customerNumber/invoices

Links to invoices for a specific customer.

Schema name

customers.customerNumber.invoices.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
booked string uri The GET link to booked invoices for a specific customer.
drafts string uri The GET link to draft invoices for a specific customer.
self string uri The self reference of the customer invoices resource.

GET /customers/:customerNumber/invoices/drafts

This endpoint provides you with a collection of draft invoices for the customer.

Schema name

customers.customerNumber.invoices.drafts.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Default sorting

draftInvoiceNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Description
costPriceInBaseCurrency number The total cost of the items on the invoice in the base currency of the agreement.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
draftInvoiceNumber integer 1 A reference number for the draft invoice document. This is not the final invoice number. The final invoice number can’t be determined until the invoice is booked.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
exchangeRate number The exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
grossAmountInBaseCurrency number The total invoice amount in the base currency of the agreement after all taxes and discounts have been applied. For a credit note this amount will be negative.
marginInBaseCurrency number The difference between the cost price of the items on the invoice and the sales net invoice amount in base currency. For a credit note this amount will be negative.
marginPercentage number The margin expressed as a percentage. If the net invoice amount is less than the cost price this number will be negative.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this invoice.
pdf.self string uri References a pdf representation of this invoice.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customer object The customer this contact belongs to.
references.customerContact.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
references.customerContact.customer.self string uri A unique reference to the customer resource.
references.customerContact.customerContactnumber integer 1 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the specific draft invoice.
templates object True References to all templates on this draft invoice.
templates.draftInvoiceLine string uri The self reference to the draft invoice templates draftInvoiceLine resource.
templates.self string uri The self reference to the draft invoice templates resource.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

GET /customers/:customerNumber/invoices/booked

This endpoint provides you with a collection of booked invoices for the customer.

Schema name

customers.customerNumber.invoices.booked.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Description
bookedInvoiceNumber integer 1 A reference number for the booked invoice document.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
layout object Layout to be applied for this invoice.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this booked invoice.
project object A reference to any project this entry might be related to. This requires the projects module to be enabled.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customer object The customer this contact belongs to.
references.customerContact.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
references.customerContact.customer.self string uri A unique reference to the customer resource.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
remainder number True Remaining amount to be paid.
remainderInBaseCurrency number True Remaining amount to be paid in base currency.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the booked invoice.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

Departments

GET /departments

GET /departments/:departmentNumber

Echo

GET /returnHttp500

GET /echo

POST /echo

PUT /echo

PATCH /echo

DELETE /echo

Economic Modules

GET /modules

GET /modules/agreement

GET /modules/agreement/moduleId

Employees

GET /employees

Schema name

employees.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

barred, email, employeeGroup.employeeGroupNumber, employeeNumber, name, phone

Sortable properties

email, employeeGroup.employeeGroupNumber, employeeNumber, name, phone

Properties

Name Type Format Max length Min value Description
barred boolean Shows if the employee is barred from being used.
bookedInvoices string uri A link to the collection of booked invoices which has the employee as a reference.
customers string uri A link to the collection of customers which has the employee as a reference.
draftInvoices string uri A link to the collection of draft invoices which has the employee as a reference.
email string 250 The email address of the employee
employeeGroup object The group to which the employee belongs.
employeeGroup.employeeGroupNumber integer 1 The unique identifier of the employee group.
employeeGroup.self string uri A unique link reference to the employee group item.
employeeNumber integer 1 The employee number is a unique numerical identifier with a maximum of 9 digits.
name string 250 The name of the employee
phone string 250 The phone number of the employee
self string uri A unique link reference to the employee item.

GET /employees/:employeeId

Schema name

employees.employeeNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

barred, email, employeeGroup.employeeGroupNumber, employeeNumber, name, phone

Sortable properties

email, employeeGroup.employeeGroupNumber, employeeNumber, name, phone

Properties

Name Type Format Max length Min value Description
barred boolean Shows if the employee is barred from being used.
bookedInvoices string uri A link to the collection of booked invoices which has the employee as a reference.
customers string uri A link to the collection of customers which has the employee as a reference.
draftInvoices string uri A link to the collection of draft invoices which has the employee as a reference.
email string 250 The email address of the employee
employeeGroup object The group to which the employee belongs.
employeeGroup.employeeGroupNumber integer 1 The unique identifier of the employee group.
employeeGroup.self string uri A unique link reference to the employee group item.
employeeNumber integer 1 The employee number is a unique numerical identifier with a maximum of 9 digits.
name string 250 The name of the employee
phone string 250 The phone number of the employee
self string uri A unique link reference to the employee item.

GET /employees/:employeeId/customers

Entries

GET /entries

GET /entries/:entryNumber

Entry Subtypes

GET /entry-subtypes

GET /entry-subtypes/:entrySubtypeNumber

Invoices Experimental

The draft invoices endpoint is where you go to read and create invoices that haven’t been booked yet. While an invoice is still a draft invoice you can edit everything. Once you book the invoice you can no longer edit it.

For more information please look at the e-copedia linkDansk Svensk Norsk.

GET /invoices-experimental

This is the root for the invoice endpoint. From here you can navigate to draft and booked invoices, but also to a number of convenience endpoints such as ‘paid’ and 'overdue’.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
booked string uri A reference to all booked invoices.
drafts string uri A reference to all unbooked invoices.
notDue string uri A reference to all not due invoices. Not due invoices are invoices where due date still hasn’t been surpassed. This includes invoices that are due today.
overdue string uri A reference to all overdue invoices. Overdue invoices are unpaid invoices where due date has been surpassed.
paid string uri A reference to all paid invoices. Paid invoices are invoices that has no remaining unpaid amount.
self string uri A reference to the invoice resource.
totals string uri A reference to the totals of all invoices.
unpaid string uri A reference to all unpaid invoices. unpaid invoices are invoices that has a remaining unpaid amount

GET /invoices-experimental/drafts

This endpoint provides you with a collection of draft invoices. A draft invoice is an invoice that has not yet been booked. Think of it as a work-in-progress invoice that is not yet ready to be sent to a customer.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/drafts",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.drafts.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Default sorting

draftInvoiceNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Description
costPriceInBaseCurrency number The total cost of the items on the invoice in the base currency of the agreement.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
draftInvoiceNumber integer 1 A reference number for the draft invoice document. This is not the final invoice number. The final invoice number can’t be determined until the invoice is booked.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
exchangeRate number The exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
grossAmountInBaseCurrency number The total invoice amount in the base currency of the agreement after all taxes and discounts have been applied. For a credit note this amount will be negative.
marginInBaseCurrency number The difference between the cost price of the items on the invoice and the sales net invoice amount in base currency. For a credit note this amount will be negative.
marginPercentage number The margin expressed as a percentage. If the net invoice amount is less than the cost price this number will be negative.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this invoice.
pdf.self string uri References a pdf representation of this invoice.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customer object The customer this contact belongs to.
references.customerContact.customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
references.customerContact.customer.self string uri A unique reference to the customer resource.
references.customerContact.customerContactnumber integer 1 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the specific draft invoice.
templates object True References to all templates on this draft invoice.
templates.draftInvoiceLine string uri The self reference to the draft invoice templates draftInvoiceLine resource.
templates.self string uri The self reference to the draft invoice templates resource.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

GET /invoices-experimental/drafts/:draftInvoiceNumber

This endpoint provides you with the entire document for a specific draft invoice.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/drafts/2",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.drafts.draftInvoiceNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Description
costPriceInBaseCurrency number The total cost of the items on the invoice in the base currency of the agreement.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
draftInvoiceNumber integer 1 A reference number for the draft invoice document. This is not the final invoice number. The final invoice number can’t be determined until the invoice is booked.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
exchangeRate number The exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
grossAmountInBaseCurrency number The total invoice amount in the base currency of the agreement after all taxes and discounts have been applied. For a credit note this amount will be negative.
lines array An array containing the specific invoice lines.
lines.accrual object Accrual is used to allocate costs and/or revenues over several periods.
lines.accrual.endDate string full-date The end date for the accrual. Format: YYYY-MM-DD.
lines.accrual.startDate string full-date The start date for the accrual. Format: YYYY-MM-DD.
lines.description string 2500 A description of the product or service sold.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 0 The line number is a unique number within the invoice.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the invoice line in base currency.
lines.marginPercentage number The margin on the invoice line expressed as a percentage.
lines.product object The product or service offered on the invoice line.
lines.product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
lines.product.self string uri A unique reference to the product resource.
lines.quantity number The number of units of goods on the invoice line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the invoice.
lines.unit object The unit of meassure applied to the invoice line.
lines.unit.name string 100 The name of the unit (e.g. 'kg’ for weight or 'l’ for volume).
lines.unit.self string uri A unique reference to the unit resource.
lines.unit.unitNumber integer 0 The unique identifier of the unit.
lines.unitCostPrice number The cost price of 1 unit of the goods or services in the invoice currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the invoice line in the invoice currency.
marginInBaseCurrency number The difference between the cost price of the items on the invoice and the sales net invoice amount in base currency. For a credit note this amount will be negative.
marginPercentage number The margin expressed as a percentage. If the net invoice amount is less than the cost price this number will be negative.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this draft invoice.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customer object The customer this contact belongs to.
references.customerContact.customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
references.customerContact.customer.self string uri A unique reference to the customer resource.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
templates object True References to all templates on this draft invoice.
templates.draftInvoiceLine string uri The self reference to the draft invoice templates draftInvoiceLine resource.
templates.self string uri The self reference to the draft invoice templates resource.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

POST /invoices-experimental/drafts

POST'ing to …/drafts allows you to create a new draft invoice. The method doesn’t also book it, but simply creates the draft.

See code example in JSFiddle

var headers = {
    'X-AppSecretToken': "demo",
    'X-AgreementGrantToken': "demo",
    accept: "application/json"
};

var invoice = {
    "date": "2014-08-08",
    "currency": "DKK",
    "exchangeRate": 10.25,
    "netAmount": 10.00,
    "netAmountInBaseCurrency": 0.00,
    "grossAmount": 12.50,
    "marginInBaseCurrency": -46.93,
    "marginPercentage": 0.0,
    "vatAmount": 2.50,
    "roundingAmount": 0.00,
    "costPriceInBaseCurrency": 46.93,
    "paymentTerms": {
        "paymentTermsNumber": 1,
        "daysOfCredit": 14,
        "name": "Lobende maned 14 dage",
        "paymentTermsType": "invoiceMonth"
    },
    "customer": {
        "customerNumber": 1
    },
    "recipient": {
        "name": "Toj & Co Grossisten",
        "address": "Vejlevej 21",
        "zip": "7000",
        "city": "Fredericia",
        "vatZone": {
            "name": "Domestic",
            "vatZoneNumber": 1,
            "enabledForCustomer": true,
            "enabledForSupplier": true
        }
    },
    "delivery": {
        "address": "Hovedvejen 1",
        "zip": "2300",
        "city": "Kbh S",
        "country": "Denmark",
        "deliveryDate": "2014-09-14"
    },
    "references": {
        "other": "aaaa"
    },
    "layout": {
        "layoutNumber": 5
    },
    "lines": [
        {
            "lineNumber": 1,
            "sortKey": 1,
            "unit": {
                "unitNumber": 2,
                "name": "Tim"
            },
            "product": {
                "productNumber": "50"
            },
            "quantity": 1.00,
            "unitNetPrice": 10.00,
            "discountPercentage": 0.00,
            "unitCostPrice": 46.93,
            "totalNetAmount": 10.00,
            "marginInBaseCurrency": -46.93,
            "marginPercentage": 0.0
        },
        {
            "lineNumber": 1,
            "sortKey": 1,
            "unit": {
                "unitNumber": 1,
                "name": "stk."
            },
            "product": {
                "productNumber": "50"
            },
            "quantity": 1.00,
            "unitNetPrice": 10.00,
            "discountPercentage": 0.00,
            "unitCostPrice": 46.93,
            "totalNetAmount": 10.00,
            "marginInBaseCurrency": -46.93,
            "marginPercentage": 0.0
        },
        {
            "lineNumber": 1,
            "sortKey": 1,
            "unit": {
                "unitNumber": 4
            },
            "product": {
                "productNumber": "50"
            },
            "quantity": 1.00,
            "unitNetPrice": 10.00,
            "discountPercentage": 0.00,
            "unitCostPrice": 46.93,
            "totalNetAmount": 10.00,
            "marginInBaseCurrency": -46.93,
            "marginPercentage": 0.0
        }
    ]
};

$(document).ready(function () {
    $('#input').text(JSON.stringify(invoice, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/invoices-experimental/drafts",
        dataType: "json",
        headers: headers,
        data: JSON.stringify(invoice),
        contentType: 'application/json; charset=UTF-8',
        type: "POST"
    }).always(function (data) {
        $('#output').text(JSON.stringify(data, null, 4));
    });
});

Schema name

invoices-experimental.drafts.post.schema.json

Return type

This method returns a single object

Required properties

currency, customer, date, layout, paymentTerms, recipient, recipient.name, recipient.vatZone

Properties

Name Type Format Read-only Max length Max value Min value Values Description
currency string The ISO 4217 3-letter currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryLocation object A reference to the place of delivery for the goods on the invoice
delivery.deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
delivery.deliveryLocation.self string uri A unique reference to the delivery location resource.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
dueDate string full-date The date the invoice is due for payment. This property is only used if the terms of payment is of type 'duedate’, in which case it is a mandatory property. Format according to ISO-8601 (YYYY-MM-DD).
exchangeRate number 999999999999 The desired exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency. If no exchange rate is supplied, the system will get the current daily rate, unless the invoice currency is the same as the base currency, in which case it will be set to 100.
grossAmount number True The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
layout object The layout used by the invoice.
layout.layoutNumber integer 1 A unique identifier of the layout.
layout.self string uri A unique reference to the layout resource.
lines array An array containing the specific invoice lines.
lines.accrual object The accrual for the invoice.
lines.accrual.endDate string full-date The end date for the accrual. Format: YYYY-MM-DD.
lines.accrual.startDate string full-date The start date for the accrual. Format: YYYY-MM-DD.
lines.description string 2500 A description of the product or service sold.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 1 The line number is a unique number within the invoice.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the invoice line in base currency.
lines.marginPercentage number The margin on the invoice line expressed as a percentage.
lines.product object The product or service offered on the invoice line.
lines.product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
lines.product.self string uri A unique reference to the product resource.
lines.quantity number The number of units of goods on the invoice line.
lines.sortKey integer 1 A sort key used to sort the lines in ascending order within the invoice.
lines.unit object The unit of meassure applied to the invoice line.
lines.unit.self string uri A unique reference to the unit resource.
lines.unit.unitNumber integer 1 The unique identifier of the unit.
lines.unitCostPrice number The cost price of 1 unit of the goods or services in the invoice currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the invoice line in the invoice currency.
marginInBaseCurrency number True The difference between the cost price of the items on the invoice and the sales net invoice amount in base currency. For a credit note this amount will be negative.
marginPercentage number True The margin expressed as a percentage. If the net invoice amount is less than the cost price this number will be negative.
netAmount number True The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer True 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.paymentTermsType Enum True net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard, avtaleGiro The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this draft invoice.
project object The project the invoice is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customerContactnumber integer 1 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.primarySalesPerson object The primary sales person is a reference to the employee who sold the goods on the invoice.
references.primarySalesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.primarySalesPerson.self string uri A unique reference to the employee resource.
references.secondarySalesPerson object A reference to any second employee involved in the sale.
references.secondarySalesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.secondarySalesPerson.self string uri A unique reference to the employee resource.
roundingAmount number True The total rounding error, if any, on the invoice in base currency.
vatAmount number True The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

PUT /invoices-experimental/drafts/:draftInvoiceNumber

Before you update a draft invoice you need to know a few things. This update method does exactly what you ask it to do. So for instance if you only change the customerNumber, that is all that is done in the update. If you want to have all values dependent on the customer to change as well you need to do the update a bit differently. You can read about that here.

Schema name

invoices-experimental.drafts.draftInvoiceNumber.put.schema.json

Return type

This method returns a single object

Required property

recipient.vatZone

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the invoice in the base currency of the agreement.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
draftInvoiceNumber integer 1 A reference number for the draft invoice document. This is not the final invoice number. The final invoice number can’t be determined until the invoice is booked.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
exchangeRate number 999999999999 The exchange rate between the invoice currency and the base currency of the agreement. The exchange rate expresses how much it will cost in base currency to buy 100 units of the invoice currency.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
grossAmountInBaseCurrency number The total invoice amount in the base currency of the agreement after all taxes and discounts have been applied. For a credit note this amount will be negative.
lines array An array containing the specific invoice lines.
lines.accrual object The accrual for the invoice.
lines.accrual.endDate string full-date The end date for the accrual. Format: YYYY-MM-DD.
lines.accrual.startDate string full-date The start date for the accrual. Format: YYYY-MM-DD.
lines.description string 2500 A description of the product or service sold.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 0 The line number is a unique number within the invoice.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the invoice line in base currency.
lines.marginPercentage number The margin on the invoice line expressed as a percentage.
lines.product object The product or service offered on the invoice line.
lines.product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
lines.product.self string uri A unique reference to the product resource.
lines.quantity number The number of units of goods on the invoice line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the invoice.
lines.unit object The unit of meassure applied to the invoice line.
lines.unit.name string 100 The name of the unit (e.g. 'kg’ for weight or 'l’ for volume).
lines.unit.self string uri A unique reference to the unit resource.
lines.unit.unitNumber integer 0 The unique identifier of the unit.
lines.unitCostPrice number The cost price of 1 unit of the goods or services in the invoice currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the invoice line in the invoice currency.
marginInBaseCurrency number The difference between the cost price of the items on the invoice and the sales net invoice amount in base currency. For a credit note this amount will be negative.
marginPercentage number The margin expressed as a percentage. If the net invoice amount is less than the cost price this number will be negative.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer True 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string True 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.paymentTermsType Enum True net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard, avtaleGiro The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this draft invoice.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recepient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

DELETE /invoices-experimental/drafts/

Deletes all draft invoices. This endpoint supports filters.

The delete operation will return a status message that looks as follows.

{ 
  "message": "Deleted 4 invoices.",
  "deletedCount": 4,
  "deletedItems": [
    { 
      "draftInvoiceNumber": 1, 
      "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/1"
    },
    {
      "draftInvoiceNumber": 2,
      "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/2"
    },
    { 
      "draftInvoiceNumber": 3,
      "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/3"
    },
    { 
      "draftInvoiceNumber": 4, 
      "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/4"
    }
  ]
}

DELETE /invoices-experimental/drafts/:draftInvoiceNumber

Deletes a draft invoice. The delete operation will return a status message that looks as follows if successful.

{ 
  "message": "Deleted invoice.",
  "deletedCount": 1,
  "deletedItems": [
    { 
      "draftInvoiceNumber": 1, 
      "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/1"
    }
  ]
}

POST /invoices-experimental/booked/

Books a draft invoice. If the operation is successful, this returns the full booked invoice.

In order to book an invoice post a draftInvoice wrapped in an object as such:

{
    "draftInvoice": {
        "draftInvoiceNumber": 2,
        "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/2"
    }
}

See code example in JSFiddle

var headers = {
  'X-AppSecretToken': "YourAppSecretToken",
  'X-AgreementGrantToken': "YourAgreementGrantToken",
  accept: "application/json"
};

var draftInvoiceBookRequest = {
  "draftInvoice": {
    "draftInvoiceNumber": 1
  }
}

$(document).ready(function() {
  $('#input').text(JSON.stringify(setting, null, 4));
  $.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/booked",
    dataType: "json",
    headers: headers,
    data: JSON.stringify(draftInvoiceBookRequest),
    contentType: 'application/json; charset=UTF-8',
    type: "POST"
  }).always(function(data) {
    $('#output').text(JSON.stringify(data, null, 4));
  });
});

Additionally, you can specify with which number the invoice is booked, by adding a “bookWithNumber” property:

{
    "draftInvoice": {
        "draftInvoiceNumber": 2,
        "self": "https://restapi.e-conomic.com/invoices-experimental/drafts/2"
    },
    "bookWithNumber": 7
}

Schema name

invoices-experimental.booked.post.schema.json

Return type

This method returns a single object

Properties

Name Type Format Min value Description
bookWithNumber integer The number for the invoice to be booked with. Optional.
draftInvoice object The draft invoice you want to book.
draftInvoice.draftInvoiceNumber integer 1 A reference number for the draft invoice document to be booked.
draftInvoice.self string uri The unique self reference of the draft invoice to be booked.

PUT /invoices-experimental/booked/:bookWithNumber

An alternative to the POST methodology described above is to PUT. This is done the same way as for post, except you must specify the number for the invoice to be booked with in url. This number must match the number specified in the JSON body of your request, if specified.

Schema name

invoices-experimental.booked.bookWithNumber.put.schema.json

Return type

This method returns a single object

Properties

Name Type Format Min value Description
bookWithNumber integer The number for the invoice to be booked with. Optional.
draftInvoice object The draft invoice you want to book.
draftInvoice.draftInvoiceNumber integer 1 A reference number for the draft invoice document to be booked.
draftInvoice.self string uri The unique self reference of the draft invoice to be booked.

GET /invoices-experimental/booked

This returns a collection of all booked invoices.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/booked",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.booked.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Filterable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.customerContact.customer.customerNumber, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Description
bookedInvoiceNumber integer 1 A reference number for the booked invoice document.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
layout object Layout to be applied for this invoice.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this booked invoice.
project object A reference to any project this entry might be related to. This requires the projects module to be enabled.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customer object The customer this contact belongs to.
references.customerContact.customer.customerNumber integer 999999999 1 The customer id number. The customer id number can be either positive or negative, but it can’t be zero.
references.customerContact.customer.self string uri A unique reference to the customer resource.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
remainder number True Remaining amount to be paid.
remainderInBaseCurrency number True Remaining amount to be paid in base currency.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the booked invoice.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

GET /invoices-experimental/booked/:bookedInvoiceNumber

This returns the document for a specific booked invoice.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/booked/1",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.booked.bookedInvoiceNumber.get.schema.json

Return type

This method returns a single object

Filterable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, lines.deliveryDate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Sortable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, lines.deliveryDate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.zip, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Description
bookedInvoiceNumber integer 1 A reference number for the booked invoice document.
currency string The ISO 4217 currency code of the invoice.
customer object The customer being invoiced.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri A unique reference to the customer resource.
date string full-date Invoice issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the invoice. This is usually the same place as the one referenced in the deliveryLocation property, but may be edited as required.
delivery.address string 255 Street address where the goods must be delivered to the customer.
delivery.city string 50 The city of the place of delivery
delivery.country string 50 The country of the place of delivery
delivery.deliveryDate string full-date The date of delivery.
delivery.deliveryTerms string 100 Details about the terms of delivery.
delivery.zip string 30 The zip code of the place of delivery.
deliveryLocation object A reference to the place of delivery for the goods on the invoice
deliveryLocation.deliveryLocationNumber integer A unique identifier for the delivery location.
deliveryLocation.self string uri A unique reference to the delivery location resource.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD). This is only used if the terms of payment is of type 'duedate’.
grossAmount number The total invoice amount in the invoice currency after all taxes and discounts have been applied. For a credit note this amount will be negative.
layout object Layout to be applied for this invoice.
layout.layoutNumber integer The unique identifier of the layout.
layout.self string uri A unique link reference to the layout item.
lines array An array containing the specific invoice lines.
lines.deliveryDate string full-date Invoice delivery date. The date is formatted according to ISO-8601.
lines.departmentalDistribution object A departmental distribution defines which departments this invoice line is distributed between. This requires the departments module to be enabled.
lines.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
lines.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
lines.description string 2500 A description of the product or service sold.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 0 The line number is a unique number within the invoice.
lines.product object The product or service offered on the invoice line.
lines.product.productNumber string 25 The unique product number. This can be a stock keeping unit identifier (SKU).
lines.product.self string uri A unique reference to the product resource.
lines.quantity number The number of units of goods on the invoice line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the invoice.
lines.totalNetAmount number The total invoice line amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
lines.unit object The unit of measure applied to the invoice line.
lines.unit.name string 100 The name of the unit (e.g. 'kg’ for weight or 'l’ for volume).
lines.unit.self string uri A unique reference to the unit resource.
lines.unit.unitNumber integer 0 The unique identifier of the unit.
lines.unitCostPrice number The cost price of 1 unit of the goods or services in the invoice currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the invoice line in the invoice currency.
lines.vatAmount number The total amount of VAT on the invoice line in the invoice currency. This will have the same sign as total net amount
lines.vatRate number The VAT rate in % used to calculate the vat amount on this line.
netAmount number The total invoice amount in the invoice currency before all taxes and discounts have been applied. For a credit note this amount will be negative.
netAmountInBaseCurrency number The total invoice amount in the base currency of the agreement before all taxes and discounts have been applied. For a credit note this amount will be negative.
notes object Notes on the invoice.
notes.heading string 250 The invoice heading. Usually displayed at the top of the invoice.
notes.textLine1 string 1000 The first line of supplementary text on the invoice. This is usually displayed right under the heading in a smaller font.
notes.textLine2 string 1000 The second line of supplementary text in the notes on the invoice. This is usually displayed as a footer on the invoice.
paymentTerms object The terms of payment for the invoice.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the invoice. This field is only valid if terms of payment is not of type 'duedate
paymentTerms.name string 50 The name of the payment terms.
paymentTerms.paymentTermsNumber integer 0 A unique identifier of the payment term.
paymentTerms.paymentTermsType string 30 The type the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.self string uri The unique reference of the pdf representation for this booked invoice.
project object A reference to any project this entry might be related to. This requires the projects module to be enabled.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
recipient object The actual recipient of the invoice. This may be the same info found on the customer (and will probably be so in most cases) but it may also be a different recipient. For instance, the customer placing the order may be ACME Headquarters, but the recipient of the invoice may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this invoice is addressed.
recipient.attention.customerContactNumber integer Unique identifier of the customer employee.
recipient.attention.self string uri A unique reference to the customer employee.
recipient.city string 250 The city of the actual recipient.
recipient.country string 50 The country of the actual recipient.
recipient.ean string 13 The 'International Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.publicEntryNumber string 40 The public entry number of the actual recipient.
recipient.vatZone object Recipient vat zone.
recipient.vatZone.self string uri A unique reference to the vat zone.
recipient.vatZone.vatZoneNumber integer Unique identifier of the vat zone.
recipient.zip string 50 The zip code of the actual recipient.
references object Customer and company references related to this invoice.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the invoice.
references.customerContact.customerContactnumber integer 0 Unique identifier of the customer contact.
references.customerContact.self string uri A unique reference to the customer contact resource.
references.other string 250 A text field that can be used to save any custom reference on the invoice.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the invoice. This is also the person who is credited with this sale in reports.
references.salesPerson.employeeNumber integer 1 Unique identifier of the employee.
references.salesPerson.self string uri A unique reference to the employee resource.
references.vendorReference object A reference to any second employee involved in the sale.
references.vendorReference.employeeNumber integer 1 Unique identifier of the employee.
references.vendorReference.self string uri A unique reference to the employee resource.
remainder number True Remaining amount to be paid.
remainderInBaseCurrency number True Remaining amount to be paid in base currency.
roundingAmount number The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the booked invoice.
vatAmount number The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

GET /invoices-experimental/drafts/:draftInvoiceNumber/templates

This returns links to the available templates for draft invoices.

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/drafts/10263/templates",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.drafts.draftInvoiceNumber.templates.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
bookingInstructions string uri A unique reference to the book request template resource.
self string uri A unique reference to the draft invoice template resource.

GET /invoices-experimental/drafts/:draftInvoiceNumber/templates/booking-instructions

This endpoint returns a book request for a draft invoice which can then be posted to /invoices-experimental/booked

Schema name

invoices-experimental.drafts.draftInvoiceNumber.templates.booking-instructions.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Min value Description
draftInvoice object The draft invoice which is to be booked.
draftInvoice.draftInvoiceNumber integer 0 A unique identifier of the draft invoice.
draftInvoice.self string uri A unique reference to the draft invoice resource.
self string uri A unique link reference to the draft invoice book request.

GET /invoices-experimental/totals

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
booked object The totals for booked invoices.
booked.description string A short description about this object.
booked.invoiceCount integer The number of booked invoices.
booked.netAmountInBaseCurrency number The total invoice amount for all booked invoices in the base currency of the agreement before all taxes and discounts have been applied.
booked.paid object The totals for booked and paid invoices.
booked.paid.description string A short description about this object.
booked.paid.invoiceCount integer The number of booked and paid invoices.
booked.paid.netAmountInBaseCurrency number The total invoice amount for all booked and paid invoices in the base currency of the agreement before all taxes and discounts have been applied.
booked.paid.self string uri A reference to the invoices totals booked paid resource.
booked.self string uri A reference to the invoices totals booked resource.
booked.unpaid object The totals for booked and unpaid invoices.
booked.unpaid.description string A short description about this object.
booked.unpaid.grossRemainderInBaseCurrency number The gross total remaining to be paid on the booked unpaid invoices
booked.unpaid.invoiceCount integer The number of booked and unpaid invoices.
booked.unpaid.netAmountInBaseCurrency number The total invoice amount for all booked and unpaid invoices in the base currency of the agreement before all taxes and discounts have been applied.
booked.unpaid.notOverdue object Totals for unpaid booked invoices where due date still hasn’t been surpassed. This includes invoices that are due today.
booked.unpaid.notOverdue.description string A short description about this object.
booked.unpaid.notOverdue.invoiceCount integer The number of unpaid booked invoices where due date still hasn’t been surpassed. This includes invoices that are due today.
booked.unpaid.notOverdue.netAmountInBaseCurrency number The total invoice amount for unpaid booked invoices where due date still hasn’t been surpassed. in the base currency of the agreement before all taxes and discounts have been applied.
booked.unpaid.notOverdue.self string uri A reference to the invoices totals booked unpaid not overdue resource.
booked.unpaid.overdue object Totals for unpaid booked invoices where due date has been surpassed.
booked.unpaid.overdue.description string A short description about this object.
booked.unpaid.overdue.grossRemainderInBaseCurrency number The gross total remaining to be paid on the booked, unpaid and overdue invoices
booked.unpaid.overdue.invoiceCount integer The number of unpaid booked invoices where due date has been surpassed.
booked.unpaid.overdue.netAmountInBaseCurrency number The total invoice amount for unpaid booked invoices where due date has been surpassed in the base currency of the agreement before all taxes and discounts have been applied.
booked.unpaid.overdue.self string uri A reference to the invoices totals booked unpaid overdue resource.
booked.unpaid.self string uri A reference to the invoices totals booked unpaid resource.
drafts object The totals for draft invoices.
drafts.description string A short description about this object.
drafts.invoiceCount integer The number of draft invoices.
drafts.netAmountInBaseCurrency number The total invoice amount for all draft invoices in the base currency of the agreement before all taxes and discounts have been applied.
drafts.self string uri A reference to the invoices totals draft resource.
predefinedPeriodFilters object The totals for draft invoices.
predefinedPeriodFilters.lastFifteenDays object Filter the totals to only include the last fifteen days.
predefinedPeriodFilters.lastFifteenDays.description string A short description about this object.
predefinedPeriodFilters.lastFifteenDays.self string uri A reference to the invoices totals for the last 15 days resource.
predefinedPeriodFilters.lastMonth object Filter the totals to only include invoices from the last calendar month.
predefinedPeriodFilters.lastMonth.description string A short description about this object.
predefinedPeriodFilters.lastMonth.self string uri A reference to the invoices totals for the last month resource.
predefinedPeriodFilters.lastSevenDays object Filter the totals to only include the last 7 days days.
predefinedPeriodFilters.lastSevenDays.description string A short description about this object.
predefinedPeriodFilters.lastSevenDays.self string uri A reference to the invoices totals for the last 7 days resource.
predefinedPeriodFilters.lastThirtyDays object Filter the totals to only include the last 30 days days.
predefinedPeriodFilters.lastThirtyDays.description string A short description about this object.
predefinedPeriodFilters.lastThirtyDays.self string uri A reference to the invoices totals for the last 30 days resource.
predefinedPeriodFilters.lastWeek object Filter the totals to only include invoices from the previous week, starting last Monday.
predefinedPeriodFilters.lastWeek.description string A short description about this object.
predefinedPeriodFilters.lastWeek.self string uri A reference to the invoices totals for the last week resource.
predefinedPeriodFilters.lastYear object Filter the totals to only include invoices from last calendar year.
predefinedPeriodFilters.lastYear.description string A short description about this object.
predefinedPeriodFilters.lastYear.self string uri A reference to the invoices totals for the last year resource.
predefinedPeriodFilters.thisMonth object Filter the totals to only include invoices from this calendar month.
predefinedPeriodFilters.thisMonth.description string A short description about this object.
predefinedPeriodFilters.thisMonth.self string uri A reference to the invoices totals for this calendar month resource.
predefinedPeriodFilters.thisWeek object Filter the totals to only include invoices from this week, starting Monday.
predefinedPeriodFilters.thisWeek.description string A short description about this object.
predefinedPeriodFilters.thisWeek.self string uri A reference to the invoices totals for this week resource.
predefinedPeriodFilters.thisYear object Filter the totals to only include invoices from this calendar years.
predefinedPeriodFilters.thisYear.description string A short description about this object.
predefinedPeriodFilters.thisYear.self string uri A reference to the invoices totals for this calendar year resource.
self string uri A reference to the invoices totals booked resource.

GET /invoices-experimental/totals/drafts

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/drafts",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.drafts.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals draft accounting years resource.
customers string uri A reference to the invoices totals draft customer resource.
employees string uri A reference to the invoices totals draft employees resource.
invoiceCount integer The number of draft invoices.
maxDate string full-date The latest date of any draft invoice.
minDate string full-date The earliest date of any draft invoice.
netAmountInBaseCurrency number The total invoice amount for all draft invoices in the base currency of the agreement before all taxes and discounts have been applied.
periods string uri A reference to the invoices totals draft periods resource.
self string uri A reference to the invoices totals draft resource.

GET /invoices-experimental/totals/booked

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.booked.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals booked accounting years resource.
customers string uri A reference to the invoices totals booked customer resource.
employees string uri A reference to the invoices totals booked employees resource.
invoiceCount integer The number of booked invoices.
maxDate string full-date The latest date of any booked invoice.
minDate string full-date The earliest date of any booked invoice.
netAmountInBaseCurrency number The total invoice amount for all booked invoices in the base currency of the agreement before all taxes and discounts have been applied.
paid string uri A reference to the invoices totals booked paid resource.
periods string uri A reference to the invoices totals booked periods resource.
self string uri A reference to the invoices totals booked resource.
unpaid string uri A reference to the invoices totals booked unpaid resource.

GET /invoices-experimental/totals/booked/paid

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/paid",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.booked.paid.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals booked paid accounting years resource.
customers string uri A reference to the invoices totals booked paid customer resource.
employees string uri A reference to the invoices totals booked paid employees resource.
invoiceCount integer The number of paid booked invoices.
maxDate string full-date The latest date of any paid and booked invoice.
minDate string full-date The earliest date of any paid and booked invoice.
netAmountInBaseCurrency number The total invoice amount for all booked and paid invoices in the base currency of the agreement before all taxes and discounts have been applied.
periods string uri A reference to the invoices totals booked paid periods resource.
self string uri A reference to the invoices totals booked paid resource.

GET /invoices-experimental/totals/booked/unpaid

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/unpaid",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.booked.unpaid.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals booked unpaid accounting years resource.
customers string uri A reference to the invoices totals booked unpaid customer resource.
employees string uri A reference to the invoices totals booked unpaid employees resource.
grossRemainderInBaseCurrency number The gross total remaining to be paid on the booked unpaid invoices.
invoiceCount integer The number of unpaid booked invoices.
maxDate string full-date The latest date of any unpaid and booked invoice.
minDate string full-date The earliest date of any unpaid and booked invoice.
netAmountInBaseCurrency number The total invoice amount for all booked and unpaid invoices in the base currency of the agreement before all taxes and discounts have been applied.
notOverdue string uri A reference to the invoices totals booked unpaid not overdue resource.
overdue string uri A reference to the invoices totals booked unpaid overdue resource.
periods string uri A reference to the invoices totals booked unpaid periods resource.
self string uri A reference to the invoices totals booked unpaid resource.

GET /invoices-experimental/totals/booked/unpaid/overdue

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/unpaid/overdue",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.booked.unpaid.overdue.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals booked unpaid overdue accounting years resource.
customers string uri A reference to the invoices totals booked unpaid overdue customer resource.
employees string uri A reference to the invoices totals booked unpaid overdue employees resource.
grossRemainderInBaseCurrency number The gross total remaining to be paid on the booked unpaid overdue invoices
invoiceCount integer The number of booked, unpaid and overdue invoices.
maxDate string full-date The latest date of any booked, unpaid and overdue invoice.
minDate string full-date The earliest date of any booked, unpaid and overdue invoice.
netAmountInBaseCurrency number The total invoice amount for all booked, unpaid and overdue invoices in the base currency of the agreement before all taxes and discounts have been applied.
periods string uri A reference to the invoices totals booked unpaid overdue periods resource.
self string uri A reference to the invoices totals booked unpaid overdue resource.

GET /invoices-experimental/totals/booked/unpaid/not-overdue

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/unpaid/not-overdue",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

Schema name

invoices-experimental.totals.booked.unpaid.not-overdue.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
accountingYears string uri A reference to the invoices totals booked unpaid not overdue accounting years resource.
customers string uri A reference to the invoices totals booked unpaid not overdue customer resource.
employees string uri A reference to the invoices totals booked unpaid not overdue employees resource.
grossRemainderInBaseCurrency number The gross total remaining to be paid on the booked unpaid not overdue invoices.
invoiceCount integer The number of booked, unpaid and not overdue invoices.
maxDate string full-date The latest date of any booked, unpaid and not overdue invoice.
minDate string full-date The earliest date of any booked, unpaid and not overdue invoice.
netAmountInBaseCurrency number The total invoice amount for all booked, unpaid and not overdue invoices in the base currency of the agreement before all taxes and discounts have been applied.
periods string uri A reference to the invoices totals booked unpaid not overdue periods resource.
self string uri A reference to the invoices totals booked unpaid not overdue resource.

GET /invoices-experimental/totals/generic-collection

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/employees",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/drafts/accounting-years/2014/customers",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

This endpoint documentation is a generic description of many Totals GET endpoints which all follow the same structure. The way this works is that you can append any of the groupings listed below to your current totals endpoint url to group the data.

Grouping options:

  1. /customers
  2. /accounting-years
  3. /periods
  4. /employees

Examples:

  1. /invoices-experimental/totals/booked/employees
  2. /invoices-experimental/totals/booked/accounting-years/:year/periods/:periodNumber/customers
  3. /invoices-experimental/totals/drafts/periods
  4. /invoices-experimental/totals/drafts/accounting-years/:year/customers

The schema uses the following generic naming:

  1. endpoints
  2. endpoints.endpoint
  3. endpoints.endpoint.endpointIdentifier

These names will, when you run the individual endpoints be replaced by their actual names mapped as this:

Schema name

invoices-experimental.totals.generic.collection.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
endpoints array An array containing the specific endpoint lines.
endpoints.endpoint object The endpoint used to get totals on.
endpoints.endpoint.endpointIdentifier A reference number/string for the endpoint. Depending on the endpoint this could either be an integer or string.
endpoints.endpoint.self string uri A reference to the this endpoint.
endpoints.grossRemainderInBaseCurrency number The gross total remaining to be paid on the invoices used in this calculation on this endpoint line.
endpoints.invoiceCount integer The number of invoices used for calculating on this endpoint line totals.
endpoints.maxDate string full-date The latest date of any invoice used in this calculation on this endpoint line.
endpoints.minDate string full-date The earliest date of any invoice used in this calculation on this endpoint line.
endpoints.netAmountInBaseCurrency number The total invoice amount calculated on this endpoint line in the base currency of the agreement before all taxes and discounts have been applied.
endpoints.self string uri A reference to the this resource.
grossRemainderInBaseCurrency number The gross total remaining to be paid on the invoices used in this calculation. This property will only be shown on unpaid endpoints.
invoiceCount integer The number of invoices used for calculating the totals.
maxDate string full-date The latest date of any invoice used in this calculation.
minDate string full-date The earliest date of any invoice used in this calculation.
netAmountInBaseCurrency number The total invoice amount calculated in the base currency of the agreement before all taxes and discounts have been applied.
self string uri A reference to the this resource.

GET /invoices-experimental/totals/generic

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/booked/customers/101",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

See code example in JSFiddle

$.ajax({
    url: "https://restapi.e-conomic.com/invoices-experimental/totals/drafts/accounting-years/2014/periods/97",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        accept: "application/json"  
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

This endpoint documentation is a generic description of many Totals GET endpoints which all follow the same structure. The way this works is that you can add one or many of the filters listed below to your current totals endpoint url to filter the data.

Filter options:

  1. /customers/:customerNumber
  2. /accounting-years/:year
  3. /periods/:periodNumber
  4. /employees/:employeeNumber

Examples:

  1. /invoices-experimental/totals/booked/customers/:customerNumber
  2. /invoices-experimental/totals/booked/customers/:customerNumber/unpaid/not-overdue/employees/:employeesNumber
  3. /invoices-experimental/totals/drafts/accounting-years/:year/periods/:periodNumber

The schema uses the following generic naming:

  1. endpoints
  2. endpoints.endpoint
  3. endpoints.endpoint.endpointIdentifier

These names will, when you run the individual endpoints be replaced by their actual names mapped as this:

Schema name

invoices-experimental.totals.generic.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
grossRemainderInBaseCurrency number The gross total remaining to be paid on the invoices used in this calculation.
invoiceCount integer The number of invoices used for calculating the totals.
maxDate string full-date The latest date of any invoice used in this calculation.
minDate string full-date The earliest date of any invoice used in this calculation.
netAmountInBaseCurrency number The total invoice amount calculated in the base currency of the agreement before all taxes and discounts have been applied.
self string uri A reference to the this resource.

Languages

GET /languages

GET /languages/:languageNumber

Layouts

Layouts are a collection of templates defining the apperance of certain documents (invoice, credit note, etc..).

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /layouts

Schema name

layouts.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Max length Description
deleted boolean A flag indicating that the layout is deleted. Layouts with this flag set will not appear in the collection of layouts, but resources such as booked invoices might still reference this layout.
layoutNumber integer A unique identifier of the layout.
name string 250 The name of the layout.
self string uri A unique link reference to the layout item.

GET /layouts/:layoutNumber

Schema name

layouts.layoutNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Description
deleted boolean A flag indicating that the layout is deleted. Layouts with this flag set will not appear in the collection of layouts, but resources such as booked invoices might still reference this layout.
layoutNumber integer A unique identifier of the layout.
name string 250 The name of the layout.
self string uri A unique link reference to the layout item.

Number Series

GET /number-series

GET /number-series/:numberSeriesId

POST /number-series

PUT /number-series/:numberSeriesId

DELETE /number-series/:numberSeriesId

Payment Terms

Payment terms are the different ways your customers can pay you in regards to, type of payment, days of credit etc.

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /payment-terms

Schema name

payment-terms.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required property

paymentTermsType

Properties

Name Type Format Max length Values Description
contraAccountForPrepaidAmount object The contra account for prepaid amount of the payment term.
contraAccountForPrepaidAmount.accountNumber integer The account number for the contraAccountForPrepaidAmount.
contraAccountForPrepaidAmount.self string uri A unique link reference to the contra account for prepaid amount item.
contraAccountForRemainderAmount object The contra account for remainder amount of the payment term.
contraAccountForRemainderAmount.accountNumber integer The account number for the contraAccountForRemainderAmount.
contraAccountForRemainderAmount.self string uri A unique link reference to the contra account for remainder amount item.
creditCardCompany object The credit card company of the payment term.
creditCardCompany.customerNumber integer The credit card company customer number.
creditCardCompany.self string uri A unique link reference to the credit card company customer item.
daysOfCredit integer The number of days before payment must be made.
description string 1000 A description of the payment term.
name string 50 The name of the payment term.
paymentTermsNumber integer A unique identifier of the payment term.
paymentTermsType Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
percentageForPrepaidAmount number The % to be pre paid.
percentageForRemainderAmount number The % to be post paid.
self string uri A unique link reference to the payment term item.

GET /payment-terms/:paymentTermsNumber

Schema name

payment-terms.paymentTermsNumber.get.schema.json

Return type

This method returns a single object

Required property

paymentTermsType

Properties

Name Type Format Max length Values Description
contraAccountForPrepaidAmount object The contra account for prepaid amount of the payment term.
contraAccountForPrepaidAmount.accountNumber integer The account number of the contra account.
contraAccountForPrepaidAmount.self string uri A unique link reference to the contra account for prepaid amount item.
contraAccountForRemainderAmount object The contra account for remainder amount of the payment term.
contraAccountForRemainderAmount.accountNumber integer The account number of the contra account.
contraAccountForRemainderAmount.self string uri A unique link reference to the contra account for remainder amount item.
creditCardCompany object The credit card company of the payment term.
creditCardCompany.customerNumber integer The credit card company customer number.
creditCardCompany.self string uri A unique link reference to the customer item.
daysOfCredit integer The number of days before payment must be made.
description string 1000 A description of the payment term.
name string 50 The name of the payment term.
paymentTermsNumber integer A unique identifier of the payment term.
paymentTermsType Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term defines how the payment term behaves.
percentageForPrepaidAmount number The % to be pre paid.
percentageForRemainderAmount number The % to be post paid.
self string uri A unique link reference to the payment term item.

POST /payment-terms

Schema name

payment-terms.post.schema.json

Return type

This method returns a single object

Required properties

name, paymentTermsType

Properties

Name Type Format Max length Values Description
contraAccountForPrepaidAmount object The contra account for prepaid amount of the payment term.
contraAccountForPrepaidAmount.accountNumber integer The account number of the contra account.
contraAccountForPrepaidAmount.self string uri A unique link reference to the contra account for prepaid amount item.
contraAccountForRemainderAmount object The contra account for remainder amount of the payment term.
contraAccountForRemainderAmount.accountNumber integer The account number of the contra account.
contraAccountForRemainderAmount.self string uri A unique link reference to the contra account for remainder amount item.
creditCardCompany object The credit card company of the payment term.
creditCardCompany.customerNumber integer The credit card company customer number.
creditCardCompany.self string uri A unique link reference to the customer item.
daysOfCredit integer The number of days before payment must be made.
description string 1000 A description of the payment term.
name string 50 The name of the payment term.
paymentTermsType Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
percentageForPrepaidAmount number The % to be pre paid.
percentageForRemainderAmount number The % to be post paid.

PUT /payment-terms/:paymentTermsNumber

Schema name

payment-terms.paymentTermsNumber.put.schema.json

Return type

This method returns a single object

Required properties

name, paymentTermsType

Properties

Name Type Format Max length Values Description
contraAccountForPrepaidAmount object The contra account for prepaid amount of the payment term.
contraAccountForPrepaidAmount.accountNumber integer The account number of the contra account.
contraAccountForPrepaidAmount.self string uri A unique link reference to the contra account for prepaid amount item.
contraAccountForRemainderAmount object The contra account for remainder amount of the payment term.
contraAccountForRemainderAmount.accountNumber integer The account number of the contra account.
contraAccountForRemainderAmount.self string uri A unique link reference to the contra account for remainder amount item.
creditCardCompany object The credit card company of the payment term.
creditCardCompany.customerNumber integer The credit card company customer number.
creditCardCompany.self string uri A unique link reference to the customer item.
daysOfCredit integer The number of days before payment must be made.
description string 1000 A description of the payment term.
name string 50 The name of the payment term.
paymentTermsType Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
percentageForPrepaidAmount number The % to be pre paid.
percentageForRemainderAmount number The % to be pre paid.

DELETE /payment-terms/:paymentTermsNumber

Payment Types

GET /payment-types

GET /payment-types/:paymentTypeNumber

Product Groups

GET /product-groups

GET /product-groups/:productGroupNumber

GET /product-groups/:productGroupNumber/sales-accounts

GET /product-groups/:productGroupNumber/products

Products

This endpoint lists all products and their various attributes. Products can be updated and created here as well.

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /products

Schema name

products.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Required properties

name, productGroup, productNumber

Filterable properties

barCode, barred, costPrice, description, inventory.grossWeight, inventory.netWeight, inventory.packageVolume, lastUpdated, name, productNumber, recommendedPrice, salesPrice

Sortable properties

barCode, barred, costPrice, description, inventory.grossWeight, inventory.netWeight, inventory.packageVolume, lastUpdated, name, productNumber, recommendedPrice, salesPrice

Properties

Name Type Format Read-only Max length Min length Min value Description
barCode string 50 String representation of a machine readable barcode symbol that represents this product.
barred boolean If this value is true, then the product can no longer be sold, and trying to book an invoice with this product will not be possible.
costPrice number The cost of the goods. If you have the inventory module enabled, this is read-only and will just be ignored.
departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
description string 500 Free text description of product.
inventory object A collection of properties that are only applicable if the inventory module is enabled.
inventory.available number True The number of units available to sell. This is the difference between the amount in stock and the amount ordered by customers.
inventory.grossWeight number True The gross weight of the product.
inventory.inStock number True The number of units in stock including any that have been ordered by customers.
inventory.netWeight number True The gross weight of the product.
inventory.orderedByCustomers number True The number of units that have been ordered by customers, but haven’t been sold yet.
inventory.orderedFromSuppliers number True The number of units that have been ordered from your suppliers, but haven’t been delivered to you yet.
inventory.packageVolume number The volume the shipped package makes up.
lastUpdated string full-date Invoice issue date. The date is formatted according to ISO-8601.
name string 300 1 Descriptive name of the product.
productGroup object A reference to the product group this product is contained within.
productGroup.inventoryEnabled boolean States if the product group is inventory enabled or not.
productGroup.name string 50 1 Descriptive name of the product group.
productGroup.productGroupNumber integer Unique number identifying the product group.
productGroup.products string uri A reference to the products in this product group resource.
productGroup.salesAccounts string uri A reference to the sales accounts in this product group resource.
productGroup.self string uri A unique reference to the product group resource.
productNumber string 25 1 Unique alphanumeric product number.
recommendedPrice number Recommended retail price of the goods.
salesPrice number This is the unit net price that will appear on invoice lines when a product is added to an invoice line.
self string uri A unique reference to this product resource.
unit object A reference to the unit this product is counted in.
unit.name string 8 The name of the unit.
unit.self string uri A unique reference to the unit resource.
unit.unitNumber integer Unique number identifying the unit.

GET /products/:productNumber

Schema name

products.productNumber.get.schema.json

Return type

This method returns a single object

Required properties

name, productGroup, productNumber

Filterable properties

barCode, barred, costPrice, description, inventory.packageVolume, lastUpdated, name, productNumber, recommendedPrice, salesPrice

Sortable properties

barCode, barred, costPrice, description, inventory.packageVolume, lastUpdated, name, productNumber, recommendedPrice, salesPrice

Properties

Name Type Format Read-only Max length Min length Min value Description
barCode string 50 String representation of a machine readable barcode symbol that represents this product.
barred boolean If this value is true, then the product can no longer be sold, and trying to book an invoice with this product will not be possible.
costPrice number The cost of the goods. If you have the inventory module enabled, this is read-only and will just be ignored.
departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
description string 500 Free text description of product.
inventory object A collection of properties that are only applicable if the inventory module is enabled.
inventory.available number True The number of units available to sell. This is the difference between the amount in stock and the amount ordered by customers.
inventory.inStock number True The number of units in stock including any that have been ordered by customers.
inventory.orderedByCustomers number True The number of units that have been ordered by customers, but haven’t been sold yet.
inventory.orderedFromSuppliers number True The number of units that have been ordered from your suppliers, but haven’t been delivered to you yet.
inventory.packageVolume number The volume the shipped package makes up.
lastUpdated string full-date Invoice issue date. The date is formatted according to ISO-8601.
name string 300 1 Descriptive name of the product.
productGroup object A reference to the product group this product is contained within.
productGroup.inventoryEnabled boolean States if the product group is inventory enabled or not.
productGroup.name string 50 1 Descriptive name of the product group.
productGroup.productGroupNumber integer Unique number identifying the product group.
productGroup.products string uri A reference to the products in this product group resource.
productGroup.salesAccounts string uri A reference to the sales accounts in this product group resource.
productGroup.self string uri A unique reference to the product group resource.
productNumber string 25 1 Unique alphanumeric product number.
recommendedPrice number Recommended retail price of the goods.
salesPrice number This is the unit net price that will appear on invoice lines when a product is added to an invoice line.
self string uri A unique reference to this product resource.
unit object A reference to the unit this product is counted in.
unit.name string 8 The name of the unit.
unit.self string uri A unique reference to the unit resource.
unit.unitNumber integer Unique number identifying the unit.

POST /products

Schema name

products.post.schema.json

Return type

This method returns a single object

Required properties

name, productGroup, productNumber

Properties

Name Type Format Read-only Max length Min length Description
barCode string 50 String representation of a machine readable barcode symbol that represents this product.
barred boolean If this value is true, then the product can no longer be sold, and trying to book an invoice with this product will not be possible.
costPrice number The cost of the goods. If you have the inventory module enabled, this is read-only and will just be ignored.
department object A reference to the department that will receive credit for the revenue generated by sales of this product. If you have set a value on this property you cannot set a value in the property distributionKey. You need to enable the Dimension module to use this. If dimension is not enabled this will just be ignored.
department.departmentNumber integer Unique number identifying the department.
department.self string uri A unique reference to the department resource.
description string 500 Free text description of product.
inventory object A collection of properties that are only applicable if the inventory module is enabled.
inventory.available number True The number of units available to sell. This is the difference between the amount in stock and the amount ordered by customers.
inventory.inStock number True The number of units in stock including any that have been ordered by customers.
inventory.orderedByCustomers number True The number of units that have been ordered by customers, but haven’t been sold yet.
inventory.orderedFromSuppliers number True The number of units that have been ordered from your suppliers, but haven’t been delivered to you yet.
inventory.packageVolume number The volume the shipped package makes up.
name string 300 1 Descriptive name of the product.
productGroup object A reference to the product group this product is contained within.
productGroup.productGroupNumber integer Unique number identifying the product group.
productGroup.self string uri A unique reference to the product group resource.
productNumber string 25 1 Unique alphanumeric product number.
recommendedPrice number Recommended retail price of the goods.
salesPrice number This is the unit net price that will appear on invoice lines when a product is added to an invoice line.
unit object A reference to the unit this product is counted in.
unit.self string uri A unique reference to the unit resource.
unit.unitNumber integer Unique number identifying the unit.

PUT /products/:productNumber

DELETE /products/:productNumber

Roles

GET /roles

GET /roles/:roleNumber

Root

GET /

GET /documentation

GET /documentation/howto-setup-authentication-headers

GET /documentation/howto-get-authentication-tokens

Self

The self endpoint is where you go to read about your and your company’s settings.

GET /self

This endpoint provides you with information about your settings.

Schema name

self.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Description
agreementNumber integer The unique identifier of your e-conomic agreement.
agreementType object The type of agreement this is. It can either be denmark, sweden or norway
agreementType.agreementTypeNumber integer The unique identifier of your agreement type.
agreementType.name string The name of the agreement type.
signupDate string full-date The date the currently logged in user signed up. Format: YYYY-MM-DD.
user object The currently logged in user.
user.agreementNumber integer The unique identifier of the account of the currently logged user.
user.application object The company’s bank settings.
user.application.appNumber integer The unique identifier of the application.
user.application.appPublicToken string The public token of the application used for other e-conomic customers to use the application.
user.application.created string full-date The date the application was created. Format: YYYY-MM-DD.
user.application.name string The name of the application.
user.application.requiredRoles array The roles required to use this application.
user.application.requiredRoles.name string The name of the role.
user.application.requiredRoles.roleNumber integer The unique identifier of the role.
user.application.requiredRoles.self string uri A unique link reference to the role resource.
user.application.self string uri A unique link reference to the application resource.
user.bankInformation object The company’s bank settings.
user.bankInformation.bankAccountNumber string The account number in the company’s bank.
user.bankInformation.bankGiroNumber string The company’s bankgiro number. Only used in Sweden and Norway.
user.bankInformation.bankName string The name of the bank.
user.bankInformation.bankSortCode string The registration number of the bank account.
user.bankInformation.pbsCustomerGroupNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
user.bankInformation.pbsFiSupplierNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
user.company object The currently logged in users language.
user.company.addressLine1 string The company’s address.
user.company.addressLine2 string The company’s address.
user.company.attention string The company’s person of attention.
user.company.city string The company’s city.
user.company.companyIdentificationNumber string The company’s company identification number. For example CVR in Denmark.
user.company.country string The company’s country.
user.company.email string The company’s email.
user.company.name string The company’s name.
user.company.phoneNumber string The company’s phone number.
user.company.vatNumber string The company’s value added tax identification number. This field is only available to agreements in Sweden. Not to be mistaken for the danish CVR number, which is defined on the companyIdentificationNumber property.
user.company.website string The company’s web site url.
user.company.zip string The company’s postcode.
user.companyAffiliation string The affiliation of the agreement. This can be ‘E-conomic’ or 'Developer’.
user.email string The email of the user.
user.language object The currently logged in users language.
user.language.culture string The culture of the language.
user.language.languageNumber integer The unique identifier of the language.
user.language.name string The name of the language.
user.language.self string uri A unique link reference to the language resource.
user.loginId string The unique identifier of the user.
user.modules array The modules the company have active.
user.modules.moduleNumber integer The unique identifier of the module.
user.modules.name string The name of the module.
user.modules.self string uri A unique link reference to the module resource.
user.name string The name of the user.
user.self string uri A unique link reference to the self resource.
user.settings object Other settings.
user.settings.baseCurrency string 3 The ISO 4217 code of the company’s base currency.
user.settings.internationalLedger string If this value is 'true’ then the international ledger is used.
userName string The name of the the currently logged in user.

Suppliers

Suppliers are the vendors from whom you buy your goods.

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /suppliers

GET /suppliers/:supplierNo

GET /suppliers/:supplierNo/contacts

GET /supplier-groups

GET /supplier-groups/:supplierGroupId

POST /suppliers

Schema name

suppliers.post.schema.json

Return type

This method returns a single object

Required properties

currency, name, paymentTerms, supplierGroup, vatZone

Properties

Name Type Format Max length Min length Min value Description
address string 255 Address for the supplier including street and number.
attention object Optional contact person at the supplier.
bankAccount string 50 The suppliers bank account.
barred boolean Boolean indication of whether the supplier is barred.
city string 50 The supplier’s city.
corporateIdentificationNumber string 40 Company Identification Number. For example CVR in Denmark.
costAccount object Cost account to be used for the supplier.
country string 50 The supplier’s country.
currency string 3 3 Default currency used when purchasing from the supplier.
email string 100 The supplier’s e-mail address. Note: you can specify multiple email addresses in this field, separated by a space.
layout object Layout that will be used for documents generated in relation to this supplier.
name string 255 1 The supplier name.
paymentTerms object 1 The default payment terms for the supplier.
remittanceAdvice object Remittance advice for the supplier.
remittanceAdvice.creditorId integer Unique number identifying the supplier.
remittanceAdvice.paymentType object The default payment terms for the supplier.
remittanceAdvice.paymentType.name string 50 The name of the payment type.
remittanceAdvice.paymentType.paymentTypeNumber integer Unique number identifying the payment type.
remittanceAdvice.paymentType.self string uri A unique reference to the payment type resource.
salesPerson object Reference to the employee responsible for contact with this supplier.
self string A unique self reference of the supplier.
supplierContact object Reference to main contact employee at supplier.
supplierGroup object 1 In order to set up a new supplier it is necessary to specify a supplier group.
supplierNumber integer The supplier number is a unique numerical identifier.
vatZone object Indicates whether the supplier is located domestically, in Europe or elsewhere abroad
zip string 10 The suppliers zipcode.

Units

Units are the available units (‘kg’, 'cm’, etc) that you can put on a product.

For more information please look at the e-copedia link Dansk Svensk Norsk.

GET /units

Schema name

units.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Max length Description
name string 8 The name of the unit.
self string uri A unique link reference to the unit item.
unitNumber integer A unique identifier of the unit.

GET /units/:unitNumber

Schema name

units.unitNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max length Description
name string 8 The name of the unit.
products string uri A link to the products that reference this unit.
self string uri A unique link reference to the unit item.
unitNumber integer A unique identifier of the unit.

POST /units

Schema name

units.post.schema.json

Return type

This method returns a single object

Required property

name

Properties

Name Type Max length Description
name string 8 The name of the unit.

PUT /units/:unitNumber

Schema name

units.unitNumber.put.schema.json

Return type

This method returns a single object

Required property

name

Properties

Name Type Max length Description
name string 8 The new name of the unit.

DELETE /units/:unitNumber

Please be adviced that you can’t delete a unit that is in use.

GET /units/:unitNumber/products

A link to the products that reference this unit.

Users

GET /users

GET /users/:userId

Vat Accounts

GET /vat-accounts

GET /vat-accounts/:id

Vat Types

GET /vat-types

GET /vat-types/:vatTypeId

GET /vat-types/:vatTypeId/vat-report-setups

GET /vat-types/:vatTypeId/vat-report-setups/:vatReportSetupId

Vat Zones

GET /vat-zones

GET /vat-zones/:vatZoneNumber

Vouchers

Getting started

To create a simple finance voucher the following other objects are needed as a minimum.

  1. All lines need to reference an account (GET https://restapi.e-conomic.com/accounts - example)
  2. The voucher needs to reference a number series that allows finance vouchers (GET https://restapi.e-conomic.com/number-series?filter=entryType$eq:financeVoucher - example)
  3. The date of the voucher must be within a created and open accounting year: (GET https://restapi.e-conomic.com/accounting-years - example of fetching open accounting years)
  4. Currencies are not specified as objects, but as a string. None the less it needs to exist in (GET https://restapi.e-conomic.com/currencies - example)

How to reference

When referencing another object, there are three ways to do it - either by…

Specifying only the number

{
    "account": {
        "accountNumber": 1011
    }
}

Specifying a self-link

{
    "account": {
        "self": "https://restapi.e-conomic.com/accounts/1011"
    }
}

Specifying both

{
    "account": {
        "accountNumber": 1011,
        "self": "https://restapi.e-conomic.com/accounts/1011"
    }
}

If they are ambiguous the API will throw a status code 400 - Bad request

Allowed methods

POST to https://restapi.e-conomic.com/vouchers/drafts/:type will create a voucher. :type can be * finance-vouchers * customer-payments * supplier-payments * supplier-invoices

PUT to https://restapi.e-conomic.com/vouchers/drafts/:voucherId/:date will update the specified voucher of any type

DELETE to https://restapi.e-conomic.com/vouchers/drafts/:voucherId/:date will delete the specified voucher

DELETE to https://restapi.e-conomic.com/vouchers/drafts/ will delete all the vouchers

GET /vouchers

GET /vouchers/drafts

GET /vouchers/drafts/:voucherId/:date

GET /vouchers/drafts/:voucherId/:date/templates

GET /vouchers/drafts/:voucherId/:date/templates/copy

GET /vouchers/drafts/:voucherId/:date/templates/reverse

GET /vouchers/drafts/:voucherId/:date/templates/turn

GET /vouchers/drafts/supplier-invoices

GET /vouchers/drafts/supplier-payments

GET /vouchers/drafts/customer-payments

GET /vouchers/drafts/finance-vouchers

GET /vouchers/drafts/customer-invoices

POST /vouchers/drafts/customer-invoices

POST /vouchers/drafts/customer-invoices

input in array format

POST /vouchers/drafts/customer-invoices

Input in collection format

POST /vouchers/drafts/customer-payments

POST /vouchers/drafts/customer-payments

input in array format

POST /vouchers/drafts/customer-payments

Input in collection format

POST /vouchers/drafts/finance-vouchers

A POST of the following body to https://restapi.e-conomic.com will create a new finance voucher:

{
    "date": "2014-09-17",
    "lines": [
        {
            "account": {
                "accountNumber": 1110,
                "self": "https://restapi.e-conomic.com/accounts/1110"
            },
            "amount": 500.0,
            "currency": "DKK",
            "text": "My first line"
        },
        {
            "account": {
                "accountNumber": 1940,
                "self": "https://restapi.e-conomoic.com/accounts/1940"
            },
            "amount": -500.0,
            "currency": "DKK",
            "text": "My second line"
        }
    ],
    "numberSeries": {
        "numberSeriesNumber": 5,
        "self": "https://restapi.e-conomic.com/number-series/5"
    }
}

A complete example that creates a simple finance voucher with two lines can be seen here

POST /vouchers/drafts/finance-vouchers

input in array format

POST /vouchers/drafts/finance-vouchers

Input in collection format

POST /vouchers/drafts/supplier-invoice

<!_vouchers.drafts.supplier-invoices.post.schema.md!>

A supplier invoice requires more information than a finance voucher:

{
    "date": "2014-10-03",
    "duedate": "2014-10-17",
    "lines": [
        {
            "account": {
                "accountNumber": 1010,
                "self": "https://restapi.e-conomic.com/accounts/1010"
            },
            "amount": 500,
            "currency": "DKK",
            "supplier": {
                "self": "https://restapi.e-conomic.com/suppliers/1",
                "supplierNumber": 1
            },
            "text": "My first line"
        },
        {
            "account": {
                "accountNumber": 1018,
                "self": "https://restapi.e-conomic.com/accounts/1018"
            },
            "amount": -500,
            "currency": "DKK",
            "supplier": {
                "self": "https://restapi.e-conomic.com/suppliers/1",
                "supplierNumber": 1
            },
            "text": "My second line"
        }
    ],
    "numberSeries": {
        "numberSeriesNumber": 3,
        "self": "https://restapi.e-conomic.com/number-series/3"
    }
}

A. Either a creditor, contra account or cost type must be supplied - in our example we will put in a supplier

B. A different number series is needed. You can obviously create your own by POSTing to /number-series, but in this example we will use the system generated number-series for supplier invoices. Note: e-conomic has two system generated number series for supplier invoices, one for the supplier invoices in the inventory module and one for supplier invoices in the journal. For this scenarioe, we will obviously take the latter.

C. The due date is not mandatory, but very common for supplier invoices

After locating the correct number series as being #3 and resolving supplier #1 a body for successfully creating a supplier invoice voucher with two lines would be:

A complete code example can be found here

POST /vouchers/drafts/supplier-invoices

input in array format

POST /vouchers/drafts/supplier-invoices

Input in collection format

POST /vouchers/drafts/supplier-payments

POST /vouchers/drafts/supplier-payments

Input in array format

POST /vouchers/drafts/supplier-payments

Input in collection format

PUT /vouchers/drafts/:voucherId/:date

DELETE /vouchers/drafts

DELETE /vouchers/drafts/:voucherId/:date

GET /vouchers/booked

GET /vouchers/booked/:voucherId/:date

GET /vouchers/booked/:voucherId/:date/templates

GET /vouchers/booked/:voucherId/:date/templates/copy

GET /vouchers/booked/:voucherId/:date/templates/reverse

GET /vouchers/booked/:voucherId/:date/templates/turn

POST /vouchers/booked

POST /vouchers/booked

Input in array format

POST /vouchers/booked

Input in collection format

Attachments

Attachments are the necessary documentation for transactions registered in the accounting books. A supplier invoice would for instance be documented with a copy of the received invoice as an attachment to the accounting entry.

GET /vouchers/drafts/:voucherId/:date/attachment

Returns a meta data document with info on the attachment. If no attachment exists, then the itemCount is 0.

Schema name

vouchers.drafts.voucherId.date.attachment.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
itemCount integer The number of items this attachment contains.
items string uri The GET link to this attachment items.
pdf string uri The GET link to this attachment as a pdf.
self string uri The unique self reference of the attachment.

GET /vouchers/drafts/:voucherId/:date/attachment/items

Returns a collection envelope containing the items that make up the attachment. If no attachment exists, then an empty collection envelope is returned.

Schema name

vouchers.drafts.voucherId.date.attachment.items.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Description
image string uri The GET link to this attachment item as an image.
itemNumber integer An identifier of the attachment item and sorting order the item will be displayed in the attachment.
self string uri The unique self reference of the attachment item.
thumbnails array An array containing links to all thumbnails for this attachment item.
thumbnails.medium string uri The GET link to this attachment item as a medium thumbnail.

GET /vouchers/drafts/:voucherId/:date/attachment/items/:itemNumber

Returns a collection envelope containing the item with id {itemNumber} that make up part of the attachment.

Schema name

vouchers.drafts.voucherId.date.attachment.items.itemNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
image string uri The GET link to this attachment item as an image.
itemNumber integer An identifier of the attachment item and sorting order the item will be displayed in the attachment.
self string uri The unique self reference of the attachment item.
thumbnails array An array containing links to all thumbnails for this attachment item.
thumbnails.medium string uri The GET link to this attachment item as a medium thumbnail.

GET /vouchers/drafts/:voucherId/:date/attachment/pdf

Returns an aggregated PDF document with all items.

GET /vouchers/drafts/:voucherId/:date/attachment/items/:itemNumber/image

Returns an item in the attachment as a jpg.

GET /vouchers/drafts/:voucherId/:date/attachment/items/:itemNumber/thumbnails/medium

Returns a thumbnail of an item in the attachment as a jpg.

POST /vouchers/drafts/:voucherId/:date/attachment/items

Appends what is uploaded to the end of the attachment. Allowed filetypes: PDF, JPG, JPEG and PNG.

To upload files you need to set the content-type: multipart/form-data

Then add your files together with a key as form data.

PUT /vouchers/drafts/:voucherId/:date/attachment/items/:itemNumber

Replaces an item from the attachment with what is uploaded. Allowed filetypes: PDF, JPG, JPEG and PNG.

To upload files you need to set the content-type: multipart/form-data

Then add your files together with a key as form data.

DELETE /vouchers/drafts/:voucherId/:date/attachment/items

Deletes the entire attachment.

DELETE /vouchers/drafts/:voucherId/:date/attachment/items/:itemNumber

Deletes an item from the attachment

GET /vouchers/booked/:voucherId/:date/attachment

Returns a meta data document with info on the attachment. If no attachment exists, then the itemCount is 0.

Schema name

vouchers.booked.voucherId.date.attachment.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
itemCount integer The number of items this attachment contains.
items string uri The GET link to this attachment items.
pdf string uri The GET link to this attachment as a pdf.
self string uri The unique self reference of the attachment.

GET /vouchers/booked/:voucherId/:date/attachment/items

Returns a collection envelope containing the items that make up the attachment. If no attachment exists, then an empty collection envelope is returned.

Schema name

vouchers.booked.voucherId.date.attachment.items.get.schema.json

Return type

This method returns a collection of items. The containing items are described below.

Properties

Name Type Format Description
image string uri The GET link to this attachment item as an image.
itemNumber integer An identifier of the attachment item and sorting order the item will be displayed in the attachment.
self string uri The unique self reference of the attachment item.
thumbnails array An array containing links to all thumbnails for this attachment item.
thumbnails.medium string uri The GET link to this attachment item as a medium thumbnail.

GET /vouchers/booked/:voucherId/:date/attachment/items/:itemNumber

Returns a collection envelope containing the item with id {itemNumber} that make up part of the attachment.

Schema name

vouchers.booked.voucherId.date.attachment.items.itemNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Description
image string uri The GET link to this attachment item as an image.
itemNumber integer An identifier of the attachment item and sorting order the item will be displayed in the attachment.
self string uri The unique self reference of the attachment item.
thumbnails array An array containing links to all thumbnails for this attachment item.
thumbnails.medium string uri The GET link to this attachment item as a medium thumbnail.

GET /vouchers/booked/:voucherId/:date/attachment/pdf

Returns an aggregated PDF document with all items.

GET /vouchers/booked/:voucherId/:date/attachment/items/:itemNumber/image

Returns an item in the attachment as a jpg.

GET /vouchers/booked/:voucherId/:date/attachment/items/:itemNumber/thumbnails/medium

Returns a thumbnail of an item in the attachment as a jpg.

POST /vouchers/booked/:voucherId/:date/attachment/items

Appends what is uploaded to the end of the attachment. Allowed filetypes: PDF, JPG, JPEG and PNG.

To upload files you need to set the content-type: multipart/form-data

Then add your files together with a key as form data.

PUT /vouchers/booked/:voucherId/:date/attachment/items/:itemNumber

Replaces an item from the attachment with what is uploaded. Allowed filetypes: PDF, JPG, JPEG and PNG.

To upload files you need to set the content-type: multipart/form-data

Then add your files together with a key as form data.

DELETE /vouchers/booked/:voucherId/:date/attachment/items

Deletes the entire attachment.

DELETE /vouchers/booked/:voucherId/:date/attachment/items/:itemNumber

Deletes an item from the attachment