NAV Navbar
Logo
javascript

TL;DR

$.ajax({
    url: "https://restapi.e-conomic.com/customers",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "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.

Optional headers:

Header Value What is this?
Idempotency-Key YOUR_IDEMPOTENCY_KEY This represents your own unique idempotency key. Enables you to make use of our Idempotency Tokens feature. You can’t use this feature with GET requests.

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 in-depth information about e-conomic please have a look at the e-copedia http://wiki.e-conomic.dk.

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.

Postman

This is one our favorite REST clients. All links are clickable. Header definition is easy and everything is nicely formatted and easily readable. Responses are easy to inspect. You can save requests and setups. Whatever you want to test out in the REST API this is your new best friend. If you haven’t yet explored a hyper media REST API through Postman then good things are definitely waiting for you.

https://getpostman.com

Fiddler

When you need to debug, then Fiddler is absolutely one of the best tools out there. It will let you proxy your HTTP requests and responses so you can gain complete insight and see exactly what your code or client generated. This will save you many hours of head scratching. Head on over to Telerik and download it.

http://www.telerik.com/fiddler

JSON Formatter Chrome Extension

This extension formats all JSON in a nice and readable manner. It also makes all links clickable just like in Postman. If you want to start exploring our API directly in your browser, then just install this extension, go to https://restapi.e-conomic.com?demo=true and follow the links.

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.

Wireshark

In case a proxy like Fiddler isn’t hardcore enough for you there’s always Wireshark. Wireshark will let you inspect EVERYTHING going over the internet pipes. Literally. An added bonus is there’s even a MacOS version as well as the source code if you’re feeling adventurous.

https://www.wireshark.org/#download

REST Basics

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. For entities with complex identifiers the self link will always give you the compliant URL for the resource.

HTTP Verbs

POST Create. POST is always done at collection level.

PUT Overwrite / Create. PUT is always directed at a ressource. PUT to an existing ressource will overwrite the full object and must include the full entity. PUT to a non-existing ressource will depending on support of defining the ID create a ressource at that path.

PATCH Add / Overwrite. PATCH is always directed at a ressource. In REST terms PATCH would allow changing select properties. Please note that our API does NOT feature PATCH support on JSON documents. Please use PUT and remember this must include the full entity/document.

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.

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/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)

URL Encoding

URL parameter values should always be URL compatible. Always URL encode filter strings.

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.

The max supported length of an array using the $in: or $nin: operator is 200.

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.

JSON Schema

JSON schema is a vocabulary that allows you to annotate and validate JSON documents. The JSON document is being validated against the document containing the description that is called schema. Currently we use JSON schema version 3 in the e-conomic REST API.

Required Properties

Each endpoint that allows writing data must include a list of required properties for the action. This list will mention required objects and properties as well as required properties on optional objects when these are set. If ‘object’ is listed then that object is required. If ‘property’ is listed then that property is required. If ‘objectA.property’ is listed but ‘objectA’ is not listed as required, then this is an optional object and the property is only required when the object is set.

Example: property1, property2, object1, object1.property1, object2.property1

object2.property1 is ONLY required IF object2 is defined. But object2 is not listed and is therefore optional.

Please note that for referenced objects in the REST API you are free to reference the entity via either id or self-link. For that reason an object like ‘customer’ on POST to /invoice is required yet there are no properties listed as required as customer.customerNumber and customer.self are either/or for requirement. The rule here is that self will always point directly to the resource.

For self-links (the direct URL path to a resource) the question of non-alphanumeric characters must be solved in REST APIs by either encoding or replacement to ensure URL compatibility.

In the e-conomic REST API a subset of non-alphanumeric characters are replaced using a custom scheme for resource URLs:

Character Replacement
“<” 0
“>” 1
“*” 2
“%” 3
“:” 4
“&” 5
“/” 6
“\” 7
“_” 8
“ ” (whitespace) 9
“?” 10
“.” 11
“#” 12
“+” 13

Example: Product “My Awesome Product_Discount5%” Resource URL (self): https://restapi.e-conomic.com/products/My_9_Awesome_9_Product_8_Discount5_3_

All other non-alphanumeric characters in resource URLs are standard URL encoded. Please refer to standard URL encoding for characters not mentioned above.

Implementation specifics

Helpful details to know when implementing e-conomic REST.

Booleans

Booleans should only be expected to be represented in responses when true. A false boolean is omitted from response body. The same logic applies to write operations such as POST and PUT.

Nulling

We do not generally accept null as a value and a validation exception should be expected. To null a property you must exclude it from your JSON on the write operation.

Idempotency tokens

Idempotency tokens are unique keys that help maintain the integrity of operations on the API’s. These tokens prevent accidental duplication of requests, ensuring that the same operation is not performed multiple times, even if the same request is sent repeatedly.

When making a request, you can set Idempotency-Key header with your own unique value for that specific request. In case of a network failure, if you don’t get the response, you can retry the request with the same value for the header. Our system will prevent duplicate requests, instead you will get the original response from our cache.

Keep in mind that this is cached for only one hour window.

When we return a response from the cache, we set a response header X-ResultFromCache to true.

It’s important to note that you will be responsible for generating and keeping track of these keys.

The Idempotency Tokens feature is not available for GET requests.

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 Danish e-copedia article http://wiki2.e-conomic.dk/indstillinger/regnskab-regnskabsaar.

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.

Required property

self

Filterable properties

fromDate, toDate, year

Sortable properties

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.

POST /accounting-years

Schema name

accounting-years.post.schema.json

Return type

This method returns a single object

Required properties

fromDate, toDate

Properties

Name Type Format Description
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.
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.

GET /accounting-years/:accountingYear

Schema name

accounting-years.accountingYear.get.schema.json

Return type

This method returns a single object

Required property

self

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.

Required properties

account.self, costType.self, customer.self, departmentalDistribution.self, paymentDetails.paymentType.self, project.self, self, supplier.self, supplier.supplierGroup.self, vatAccount.self

Filterable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, project.projectNumber, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierGroup.supplierGroupNumber, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Sortable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Properties

Name Type Format Max length Max value 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.
bookedInvoice object A refernce to any booked Invoice this entry might be related to.
bookedInvoice.bookedInvoiceNumber integer 1 A unique identifier of the booked invoice.
bookedInvoice.self string uri A unique reference to the booked invoice resource.
costType object The cost type for this entity.
costType.costTypeNumber integer 999999999 1 The unique identifier of cost type.
costType.self string uri A unique link reference to the cost type.
currency string The ISO 4217 currency code of the entry.
customer object The customer for this entity.
customer.customerNumber integer 999999999 1 The unique identifier of customer.
customer.self string uri A unique link reference to the customer.
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.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
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.
invoiceNumber string Unique identifier for reminders and invoices.
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
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.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
remainder number The remainder on the entry.
remainderInBaseCurrency number The remainder in base currency on the entry.
self string uri A unique reference to the entry resource.
supplier object The supplier for this entity.
supplier.self string uri A unique link reference to the supplier.
supplier.supplierGroup object The supplier group for this supplier.
supplier.supplierGroup.self string uri A unique link reference to the supplier group.
supplier.supplierGroup.supplierGroupNumber integer 999999999 1 The supplier group number is a positive unique numerical identifier with a maximum of 9 digits.
supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
supplierInvoiceNumber string A unique identifier of the supplier invoice.
text string 255 A short description about the entry.
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
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.

Required properties

account.self, self

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.

Required properties

accountingYear.self, self

Filterable properties

fromDate, periodNumber, toDate

Sortable properties

fromDate, periodNumber, 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

Required properties

accountingYear.self, self

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.

Required properties

account.self, costType.self, customer.self, departmentalDistribution.self, paymentDetails.paymentType.self, project.self, self, supplier.self, vatAccount.self

Filterable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, project.projectNumber, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Sortable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Properties

Name Type Format Max length Max value 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.
bookedInvoice object A refernce to any booked Invoice this entry might be related to.
bookedInvoice.bookedInvoiceNumber integer 1 A unique identifier of the booked invoice.
bookedInvoice.self string uri A unique reference to the booked invoice resource.
costType object The cost type for this entity.
costType.costTypeNumber integer 999999999 1 The unique identifier of cost type.
costType.self string uri A unique link reference to the cost type.
currency string The ISO 4217 currency code of the entry.
customer object The customer for this entity.
customer.customerNumber integer The unique identifier of customer.
customer.self string uri A unique link reference to the customer.
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.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
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.
invoiceNumber string Unique identifier for reminders and invoices.
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
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.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
remainder number The remainder on the entry.
remainderInBaseCurrency number The remainder in base currency on the entry.
self string uri A unique reference to the entry resource.
supplier object The supplier for this entity.
supplier.self string uri A unique link reference to the supplier.
supplier.supplierNumber integer The unique identifier of supplier.
supplierInvoiceNumber string A unique identifier of the supplier invoice.
text string 255 A short description about the entry.
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
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.

Required properties

account.self, self

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.

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.

Required properties

accountsSummed.fromAccount.self, accountsSummed.toAccount.self, contraAccount.self, self, totalFromAccount.self, vatAccount.self

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

Required properties

accountsSummed.fromAccount.self, accountsSummed.toAccount.self, contraAccount.self, self, totalFromAccount.self, vatAccount.self

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

Required property

self

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

Required property

self

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.

Required properties

account.self, costType.self, customer.self, departmentalDistribution.self, paymentDetails.paymentType.self, project.self, self, supplier.self, vatAccount.self

Filterable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Sortable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Properties

Name Type Format Max length Max value 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.
bookedInvoice object A refernce to any booked Invoice this entry might be related to.
bookedInvoice.bookedInvoiceNumber integer 1 A unique identifier of the booked invoice.
bookedInvoice.self string uri A unique reference to the booked invoice resource.
costType object The cost type for this entity.
costType.costTypeNumber integer 999999999 1 The unique identifier of cost type.
costType.self string uri A unique link reference to the cost type.
currency string The ISO 4217 currency code of the entry.
customer object The customer for this entity.
customer.customerNumber integer The unique identifier of customer.
customer.self string uri A unique link reference to the customer.
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.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
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.
invoiceNumber string Unique identifier for reminders and invoices.
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
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.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
remainder number The remainder on the entry.
remainderInBaseCurrency number The remainder in base currency on the entry.
self string uri A unique reference to the entry resource.
supplier object The supplier for this entity.
supplier.self string uri A unique link reference to the supplier.
supplier.supplierNumber integer The unique identifier of supplier.
supplierInvoiceNumber string A unique identifier of the supplier invoice.
text string 255 A short description about the entry.
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
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

Required properties

account.self, self

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).
self string uri The unique self reference of the 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.

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.

Required properties

accountingYear.self, self

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

Required properties

accountingYear.self, self

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.

Required properties

account.self, costType.self, customer.self, departmentalDistribution.self, paymentDetails.paymentType.self, project.self, self, supplier.self, vatAccount.self

Filterable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Sortable properties

amount, amountInBaseCurrency, costType.costTypeNumber, currency, customer.customerNumber, date, dueDate, entryNumber, entryType, quantity1, quantity2, remainder, remainderInBaseCurrency, supplier.supplierNumber, supplierInvoiceNumber, text, unit1.unitNumber, unit2.unitNumber, voucherNumber

Properties

Name Type Format Max length Max value 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.
bookedInvoice object A refernce to any booked Invoice this entry might be related to.
bookedInvoice.bookedInvoiceNumber integer 1 A unique identifier of the booked invoice.
bookedInvoice.self string uri A unique reference to the booked invoice resource.
costType object The cost type for this entity.
costType.costTypeNumber integer 999999999 1 The unique identifier of cost type.
costType.self string uri A unique link reference to the cost type.
currency string The ISO 4217 currency code of the entry.
customer object The customer for this entity.
customer.customerNumber integer The unique identifier of customer.
customer.self string uri A unique link reference to the customer.
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.
dueDate string full-date The date the invoice is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
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.
invoiceNumber string Unique identifier for reminders and invoices.
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
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.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
remainder number The remainder on the entry.
remainderInBaseCurrency number The remainder in base currency on the entry.
self string uri A unique reference to the entry resource.
supplier object The supplier for this entity.
supplier.self string uri A unique link reference to the supplier.
supplier.supplierNumber integer The unique identifier of supplier.
supplierInvoiceNumber string A unique identifier of the supplier invoice.
text string 255 A short description about the entry.
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
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

Required properties

account.self, self

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).
self string uri The unique self reference of the 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.

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.

Required properties

requiredModules.self, self

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 app role collection.

GET /app-roles/:roleNumber

Schema name

app-roles.roleNumber.get.schema.json

Return type

This method returns a single object

Required property

requiredModules.self

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.

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 user’s 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, self, 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, self, 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

var headers = {
    'X-AppSecretToken': "demo",
    'X-AgreementGrantToken': "demo",
    'Content-Type': "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, self, 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, self, 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

var headers = {
    'X-AppSecretToken': "demo",
    'X-AgreementGrantToken': "demo",
    'Content-Type': "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.

Required property

self

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

Required property

self

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.

Required properties

account.self, layout.self, self

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

Required properties

account.self, layout.self, self

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

attention.self, currency, customerContact.self, customerGroup, customerGroup.self, layout.self, name, paymentTerms, paymentTerms.self, salesPerson.self, self, vatZone, vatZone.self

Filterable properties

address, balance, city, corporateIdentificationNumber, country, creditLimit, currency, customerNumber, ean, email, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

Sortable properties

address, balance, city, corporateIdentificationNumber, country, creditLimit, currency, customerNumber, ean, email, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

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 13 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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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 20 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

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 Danish e-copedia article http://wiki2.e-conomic.dk/salg/kunder-kunder-ny-kunde.

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

attention.self, currency, customerContact.self, customerGroup, customerGroup.self, defaultDeliveryLocation.self, invoices.self, layout.self, name, paymentTerms, paymentTerms.self, salesPerson.self, self, templates.self, totals.self, vatZone, vatZone.self

Filterable properties

address, balance, barred, city, corporateIdentificationNumber, country, creditLimit, currency, customerGroup.customerGroupNumber, customerNumber, ean, email, lastUpdated, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

Sortable properties

address, balance, city, corporateIdentificationNumber, country, creditLimit, currency, customerNumber, ean, email, lastUpdated, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

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.
contacts string uri A unique link reference to the customer contacts items.
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.
defaultDeliveryLocation object Customers default delivery location.
defaultDeliveryLocation.deliveryLocationNumber integer The unique identifier of the delivery location.
defaultDeliveryLocation.self string uri A unique link reference to the delivery location.
deliveryLocations string uri A unique link reference to the customer delivery locations items.
dueAmount number True Due amount that the customer needs to pay.
ean string 13 European Article Number. EAN is used for invoicing the Danish public sector.
eInvoicingDisabledByDefault boolean False Boolean indication of whether the default sending method should be email instead of e-invoice. This property is updatable only by using PATCH to /customers/:customerNumber
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.
invoices object
invoices.booked string uri The unique reference to the booked invoices for this customer.
invoices.drafts string uri The unique reference to the draft invoices for this customer.
invoices.self string uri A unique link reference to the invoices resource for this customer.
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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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.
templates object
templates.invoice string uri The unique reference to the invoice template.
templates.invoiceLine string uri The unique reference to the invoiceLine template.
templates.self string uri A unique link reference to the templates resource.
totals object
totals.booked string uri The unique reference to the booked invoice totals for this customer.
totals.drafts string uri The unique reference to the draft invoice totals for this customer.
totals.self string uri A unique link reference to the totals resource for this customer.
vatNumber string 20 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 corporateIdentificationNumber 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

attention.self, currency, customerContact.self, customerGroup, customerGroup.self, defaultDeliveryLocation.self, invoices.self, layout.self, name, paymentTerms, paymentTerms.self, salesPerson.self, self, templates.self, totals.self, vatZone, vatZone.self

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.
contacts string uri A unique link reference to the customer contacts items.
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.
defaultDeliveryLocation object Customer’s default delivery location.
defaultDeliveryLocation.deliveryLocationNumber integer The unique identifier of the delivery location.
defaultDeliveryLocation.self string uri A unique link reference to the delivery location.
deliveryLocations string uri A unique link reference to the customer delivery locations items.
dueAmount number True Due amount that the customer needs to pay.
ean string 13 European Article Number. EAN is used for invoicing the Danish public sector.
eInvoicingDisabledByDefault boolean False Boolean indication of whether the default sending method should be email instead of e-invoice. This property is updatable only by using PATCH to /customers/:customerNumber
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.
invoices object
invoices.booked string uri The unique reference to the booked invoices for this customer.
invoices.drafts string uri The unique reference to the draft invoices for this customer.
invoices.self string uri A unique link reference to the invoices resource for this customer.
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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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.
templates object Templates available for the given customer
templates.invoice string uri A unique link reference to the invoice template for the given customer.
templates.invoiceLine string uri A unique link reference to the invoice line template for the given customer.
templates.self string uri A unique link reference to the customer template item.
totals object Templates available for the given customer
totals.booked string uri The unique reference to the booked invoice totals for this customer.
totals.drafts string uri The unique reference to the draft invoice totals for this customer.
totals.self string uri A unique link reference to the totals resource for this customer.
vatNumber string 20 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 corporateIdentificationNumber 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

Required property

self

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 13 European Article Number. EAN is used for invoicing the Danish public sector.
eInvoicingDisabledByDefault boolean False Boolean indication of whether the default sending method should be email instead of e-invoice. This property is updatable only by using PATCH to /customers/:customerNumber
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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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 20 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 corporateIdentificationNumber 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.customerNo.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.
defaultDeliveryLocation object Customer’s default delivery location.
defaultDeliveryLocation.deliveryLocationNumber integer The unique identifier of the delivery location.
defaultDeliveryLocation.self string uri A unique link reference to the delivery location.
ean string 13 European Article Number. EAN is used for invoicing the Danish public sector.
eInvoicingDisabledByDefault boolean False Boolean indication of whether the default sending method should be email instead of e-invoice. This property is updatable only by using PATCH to /customers/:customerNumber
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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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 20 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 corporateIdentificationNumber 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.

PATCH /customers/:customerNumber

This endpoint allows you to update eInvoicingDisabledByDefault property on an existing customer.

[
    {
        "op": "replace",
        "path": "/eInvoicingDisabledByDefault",
        "value": true    
    }
]
[
    {
        "op": "replace",
        "path": "/eInvoicingDisabledByDefault",
        "value": false    
    }
]

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

Required property

self

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/drafts

Schema name

customers.customerNumber.templates.invoice.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.self, references.salesPerson.self

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

$.ajax({
    url: "https://restapi.e-conomic.com/customers/101/templates/invoiceline",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "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.

Required properties

product.self, self

Filterable properties

description, product.productNumber

Sortable properties

product.productNumber

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. Please note that this method accepts an additional parameter - ‘quantity’, in the query string, which defines the quantity on the template. This parameter can be used to ensure the correct discount level for a given customer, when using discount levels in the inventory module.

$.ajax({
    url: "https://restapi.e-conomic.com/customers/101/templates/invoiceline/101?quantity=5",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "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

Required properties

product.self, self, unit.self

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. By default value is set to 1, which can be modified using parameter query string.
self string uri A unique reference to the draft invoice line template resource.
unit object The unit of measure 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.

Required properties

customer.self, self

Filterable properties

customer.customerNumber, customerContactNumber, eInvoiceId, email, name, phone, sortKey

Sortable properties

customer.customerNumber, customerContactNumber, eInvoiceId, email, name, phone, sortKey

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

Required properties

customer.self, self

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

Required property

name

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

Required properties

customerContactNumber, name

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 integer Customer contact number.
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.
self string uri The unique self reference of the customer contact.

DELETE /customers/:customerNumber/contacts/:contactNumber

This endpoint allows you to delete a customer contact. An HttpStatusCode.NoContent (204) is returned 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.

Required properties

customer.self, self

Filterable properties

address, barred, city, country, deliveryLocationNumber, postalCode, sortKey

Sortable properties

address, city, country, 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.
barred boolean Indicates if the delivery location is barred from usage. Default is false.
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

Required properties

customer.self, self

Filterable properties

address, barred, 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.
barred boolean Indicates if the delivery location is barred from usage. Default is false.
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

Filterable properties

barred

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.
barred boolean Indicates if the delivery location is barred from usage. Default is false.
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

Filterable properties

barred

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.
barred boolean Indicates if the delivery location is barred from usage. Default is false.
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. An HttpStatusCode.NoContent (204) is returned 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

Required property

self

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.

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, pdf.download, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.bookingInstructions, templates.self

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 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 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 999999999 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of 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.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.bookingInstructions string uri The self reference to the document to POST to /invoices/booked to book the invoice draft.
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.

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, pdf.download, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

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 Values 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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

Departmental Distributions

Departmental Distributions is used to define the relevant department or distribution on applicable entities. This endpoint serves as the unified approach to distribution whether it be one department or many that the sum will be distributed to.

GET /departmental-distributions

This endpoint allows you to fetch a collection of all departmental distributions.

Schema name

departmental-distributions.get.schema.json

Return type

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

Required properties

distributions.department.self, self

Filterable properties

departmentalDistributionNumber, name

Sortable properties

departmentalDistributionNumber, name

Properties

Name Type Format Max length Max value Min value Values Description
departmentalDistributionNumber integer A unique numeric identifier for the departmental distribution.
distributions array A list of departments and their share of the distribution in percentage. The percentages always add up to 100%.
distributions.department object A reference to the department.
distributions.department.departmentNumber integer 1 A unique identifier of the department.
distributions.department.self string uri The unique self reference of the department.
distributions.percentage number 100 0 The percentage distributed to this department.
distributionType string distribution, department This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department.
name string 250 A descriptive name of the specific departmental distribution.
self string uri The unique self reference of the departmental distribution.
subCollections object Links to the sub collections that make up this collection.

GET /departmental-distributions/departments

This endpoint allows you to fetch a collection of all departmental distributions that distribute the entire sum to a single department.

Schema name

departmental-distributions.departments.get.schema.json

Return type

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

Required properties

distributions.department.self, self

Filterable properties

departmentalDistributionNumber, name

Sortable properties

departmentalDistributionNumber, name

Properties

Name Type Format Max length Max value Min value Values Description
barred boolean Property indicating whether the departmental distribution is barred from being used.
departmentalDistributionNumber integer A unique numeric identifier for the departmental distribution.
distributions array A list of departments and their share of the distribution in percentage. The percentages always add up to 100%.
distributions.department object A reference to the department.
distributions.department.departmentNumber integer 1 A unique identifier of the department.
distributions.department.self string uri The unique self reference of the department.
distributions.percentage number 100 0 The percentage distributed to this department.
distributionType string distribution, department This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department.
name string 250 A descriptive name of the departmental distribution.
self string uri The unique self reference of the departmental distribution.
subCollections object Links to the sub collections that make up this collection.

GET /departmental-distributions/departments/:departmentalDistributionNumber

This endpoint allows you to fetch a specific departmental distribution that distributes the entire sum to a single department.

Schema name

departmental-distributions.departments.departmentalDistributionNumber.get.schema.json

Return type

This method returns a single object

Required properties

distributions.department.self, self

Properties

Name Type Format Max length Max value Min value Values Description
barred boolean Property indicating whether the departmental distribution is barred from being used.
departmentalDistributionNumber integer A unique numeric identifier for the departmental distribution.
distributions array A list of departments and their share of the distribution in percentage. The percentages always add up to 100%.
distributions.department object A reference to the department.
distributions.department.departmentNumber integer 1 A unique identifier of the department.
distributions.department.self string uri The unique self reference of the department.
distributions.percentage number 100 0 The percentage distributed to this department.
distributionType string distribution, department This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department.
name string 250 A descriptive name of the departmental distribution.
self string uri The unique self reference of the departmental distribution.

GET /departmental-distributions/distributions

This endpoint allows you to fetch a collection of all departmental distributions that distribute the sum across multiple departments.

Schema name

departmental-distributions.distributions.get.schema.json

Return type

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

Required properties

distributions.department.self, self

Filterable properties

departmentalDistributionNumber, name

Sortable properties

departmentalDistributionNumber, name

Properties

Name Type Format Max length Max value Min value Values Description
barred boolean Property indicating whether the departmental distribution is barred from being used.
departmentalDistributionNumber integer A unique numeric identifier for the departmental distribution.
distributions array A list of departments and their share of the distribution in percentage. The percentages must add up to 100%.
distributions.department object A reference to the department.
distributions.department.departmentNumber integer 1 A unique identifier of the department.
distributions.department.self string uri The unique self reference of the department.
distributions.percentage number 100 0 The percentage distributed to this department.
distributionType string distribution, department This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department.
name string 250 A descriptive name of the departmental distribution.
self string uri The unique self reference of the departmental distribution.
subCollections object Links to the sub collections that make up this collection.

GET /departmental-distributions/distributions/:departmentalDistributionNumber

This endpoint allows you to fetch specific departmental distribution that distributes the sum across multiple departments.

Schema name

departmental-distributions.distributions.departmentalDistributionNumber.get.schema.json

Return type

This method returns a single object

Required properties

distributions.department.self, self

Properties

Name Type Format Max length Max value Min value Values Description
barred boolean Property indicating whether the departmental distribution is barred from being used.
departmentalDistributionNumber integer A unique numeric identifier for the departmental distribution.
distributions array A list of departments and their share of the distribution in percentage. The percentages must add up to 100%.
distributions.department object A reference to the department.
distributions.department.departmentNumber integer 1 A unique identifier of the department.
distributions.department.self string uri The unique self reference of the department.
distributions.percentage number 100 0 The percentage distributed to this department.
distributionType string distribution, department This property indicates whether the distribution is system generated from a departmentor if it is one created by a user. In order to make it easy to distribute everything to one department, the system generates a distribution for each department.
name string 250 A descriptive name of the departmental distribution.
self string uri The unique self reference of the departmental distribution.

Departments

Departments provides a list of available departments. To assign departments to applicable entities please see Departmental Distributions (/departmental-distributions).

GET /departments

Schema name

departments.get.schema.json

Return type

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

Required properties

departmentNumber, name, self

Filterable properties

barred, departmentNumber, name

Sortable properties

departmentNumber, name

Properties

Name Type Format Max length Description
barred boolean Indicates if the department is barred from usage. Default is false.
departmentNumber integer A unique identifier of the department.
name string 250 The name of the department.
self string uri A unique link reference to the department item.

GET /departments/:departmentNumber

Schema name

departments.departmentNumber.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Max length Description
barred boolean Indicates if the department is barred from usage. Default is null which also means false.
departmentNumber integer A unique identifier of the department.
name string 250 The name of the department.
self string uri A unique link reference to the department item.

Echo

Echo is an endpoint that allows you to test the HTTP verbs and status responses of the e-conomic REST API.

To test a specific status code use the parameter ‘statuscode=x’. E.g. GET ‘/echo?statuscode=404’.

GET /returnHttp500

GET /echo

POST /echo

PUT /echo

PATCH /echo

DELETE /echo

Employees

GET /employees

This endpoint provides you with a collection of employees.

Schema name

employees.get.schema.json

Return type

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

Required properties

employeeGroup.self, self

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

Returns a specific employee.

Schema name

employees.employeeNumber.get.schema.json

Return type

This method returns a single object

Required properties

employeeGroup.self, self

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

This endpoint provides you with a collection of customers for the employee.

Schema name

employees.employeeNumber.customers.get.schema.json

Return type

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

Required properties

attention.self, currency, customerContact.self, customerGroup, customerGroup.self, invoices.self, layout.self, name, paymentTerms, paymentTerms.self, salesPerson.self, self, templates.self, totals.self, vatZone, vatZone.self

Filterable properties

address, balance, city, corporateIdentificationNumber, country, creditLimit, currency, customerGroup.customerGroupNumber, customerNumber, ean, email, lastUpdated, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

Sortable properties

address, balance, city, corporateIdentificationNumber, country, creditLimit, currency, customerNumber, ean, email, lastUpdated, mobilePhone, name, publicEntryNumber, telephoneAndFaxNumber, vatNumber, website, zip

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.
contacts string uri A unique link reference to the customer contacts items.
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.
deliveryLocations string uri A unique link reference to the customer delivery locations items.
ean string 13 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.
invoices object
invoices.booked string uri The unique reference to the booked invoices for this customer.
invoices.drafts string uri The unique reference to the draft invoices for this customer.
invoices.self string uri A unique link reference to the invoices resource for this customer.
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.
mobilePhone string 50 The customer’s mobile phone number.
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.
pNumber string 10 10 Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
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.
templates object
templates.invoice string uri The unique reference to the invoice template.
templates.invoiceLine string uri The unique reference to the invoiceLine template.
templates.self string uri A unique link reference to the templates resource.
totals object
totals.booked string uri The unique reference to the booked invoice totals for this customer.
totals.drafts string uri The unique reference to the draft invoice totals for this customer.
totals.self string uri A unique link reference to the totals resource for this customer.
vatNumber string 20 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 corporateIdentificationNumber 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.

Invoices

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 Danish e-copedia article http://wiki2.e-conomic.dk/salg/fakturering-fakturaer-ny-faktura.

GET /invoices

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

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

Schema name

invoices.get.schema.json

Return type

This method returns a single object

Required property

self

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.
sent string uri A reference to all sent invoices.
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/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.

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

Schema name

invoices.drafts.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.bookingInstructions, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, lastUpdated, 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, soap.currentInvoiceHandle.id

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, soap.currentInvoiceHandle.id

Default sorting

draftInvoiceNumber : ascending

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 999999999 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. Format according to ISO-8601 (YYYY-MM-DD).
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.
lastUpdated string full-date True The last time the invoice was updated. The date is formatted according to ISO-8601.
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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of 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.download string uri References a pdf representation of this 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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.
soap object References a SOAP invoice handle.
soap.currentInvoiceHandle object The unique reference of the SOAP invoice handle.
soap.currentInvoiceHandle.id integer ID of the SOAP invoice handle.
templates object True References to all templates on this draft invoice.
templates.bookingInstructions string uri The self reference to the document to POST to /invoices/booked to book the invoice draft.
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/drafts/:draftInvoiceNumber

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

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

Schema name

invoices.drafts.draftInvoiceNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, layout.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.customerContactNumber, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.bookingInstructions, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, draftInvoiceNumber, exchangeRate, lastUpdated, 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, soap.currentInvoiceHandle.id

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, soap.currentInvoiceHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
attachment string uri A unique reference to the attachment file on the given draft invoice.
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 999999999 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. Format according to ISO-8601 (YYYY-MM-DD).
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.
lastUpdated string full-date True The last time the invoice was updated. The date is formatted according to ISO-8601.
layout object Layout to be applied for draft 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.
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.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.distributionType string Type of the 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.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.totalNetAmount number The total net amount on the draft invoice line in the draft invoice currency.
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.
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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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.
self string uri The unique self reference of the draft invoice.
soap object References a SOAP invoice handle.
soap.currentInvoiceHandle object The unique reference of the SOAP invoice handle.
soap.currentInvoiceHandle.id integer ID of the SOAP invoice handle.
templates object True References to all templates on this draft invoice.
templates.bookingInstructions string uri The self reference to the document to POST to /invoices/booked to book the invoice draft.
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/drafts/:draftInvoiceNumber/pdf

This endpoint provides you with a PDF representation for a specific draft invoice.

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

POST /invoices/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.

var headers = {
    'X-AppSecretToken': "demo",
    'X-AgreementGrantToken': "demo",
    'Content-Type': "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/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.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.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 1 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. 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.
grossAmountInBaseCurrency number True 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.
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. Must be within an existing accounting year. Format: YYYY-MM-DD.
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.distributionType string Type of the 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. Please note, that when setting existing products, description field is required. While setting non-existing product, description field can remain empty.
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 measure 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.download 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 'European Article Number’ of the actual recipient.
recipient.mobilePhone string The phone number the invoice was sent to (if applicable).
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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.salesPerson object The primary sales person is a reference to the employee who sold the goods on the invoice.
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 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/drafts/:draftInvoiceNumber

When updating a draft invoice please be aware that altering a reference does not update previously fetched associated data. E.g. pointing to another customerNumber does not update customer name, address etc. If you want to have all values dependent on the customer to change as well you need to get the full customer object first and update every property. You could also consider taking advantage of templates.

Schema name

invoices.drafts.draftInvoiceNumber.put.schema.json

Return type

This method returns a single object

Required properties

recipient, recipient.vatZone

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, 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, 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 True 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 999999999 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. Format according to ISO-8601 (YYYY-MM-DD).
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 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.
grossAmountInBaseCurrency number True 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. Must be within an existing accounting year. Format: YYYY-MM-DD.
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.distributionType string Type of the 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.marginInBaseCurrency number True The difference between the net price and the cost price on the invoice line in base currency.
lines.marginPercentage number True 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 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.
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.
netAmountInBaseCurrency number True 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.download 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 'European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 True The total rounding error, if any, on the invoice in base currency.
self string uri The unique self reference of the draft invoice.
vatAmount number True The total amount of VAT on the invoice in the invoice currency. This will have the same sign as net amount

DELETE /invoices/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/drafts/1"
    },
    {
      "draftInvoiceNumber": 2,
      "self": "https://restapi.e-conomic.com/invoices/drafts/2"
    },
    { 
      "draftInvoiceNumber": 3,
      "self": "https://restapi.e-conomic.com/invoices/drafts/3"
    },
    { 
      "draftInvoiceNumber": 4, 
      "self": "https://restapi.e-conomic.com/invoices/drafts/4"
    }
  ]
}

DELETE /invoices/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/drafts/1"
    }
  ]
}

POST /invoices/drafts/:draftInvoiceNumber/lines

This endpoint can be used to add new lines to an existing invoice. It accepts the same model as POST invoices/drafts.

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

var invoice = {
    "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
        }
    ]
};

$(document).ready(function () {
    $('#input').text(JSON.stringify(invoice, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/invoices/drafts/1",
        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.drafts.draftInvoiceNumber.lines.post.schema.json

Return type

This method returns a single object

Required property

lines

Properties

Name Type Format Max length Min value Description
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. Must be within an existing accounting year. Format: YYYY-MM-DD.
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.distributionType string Type of the 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. Please note, that when setting existing products, description field is required. While setting non-existing product, description field can remain empty.
lines.discountPercentage number A line discount expressed as a percentage.
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 measure 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.

POST /invoices/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/drafts/2"
    }
}
var headers = {
  'X-AppSecretToken': "YourAppSecretToken",
  'X-AgreementGrantToken': "YourAgreementGrantToken",
  'Content-Type': "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/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/drafts/2"
    },
    "bookWithNumber": 7
}

Lastly, you can specify if and how the invoice should be sent to the recipient, by adding a “sendBy” property. This property is an enum and can have the following values:

If this property is omitted, it will default to not sending the invoice after booking it.

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

The invoice will only be sent if the booking is successful. Once the invoice has been sent it can be found at /invoices/sent.

Send via email

Sending sales documents via email is not supported through API. To send an order or invoice via email, you must fetch the necessary data/PDF via the API and email either the file or a link to a self-hosted endpoint via own email solution.

EAN

You can send your invoices electronically via EAN (European Article Numbering) also known as NemHandel. This method of invoicing is required in order to bill public institutions in Denmark.

To send an invoice via EAN it must meet the following conditions:

Schema name

invoices.booked.post.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max value Min value Values 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 999999999 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.
sentBy string none, EAN Optional. Sets whether invoice should be sent via e-invoicing when booking.

PUT /invoices/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.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/booked

This returns a collection of all booked invoices.

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

Schema name

invoices.booked.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.vatZone.vatZoneNumber, 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, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.vatZone.vatZoneNumber, 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 Values 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. Format according to ISO-8601 (YYYY-MM-DD).
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.
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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/booked/:bookedInvoiceNumber

This returns a specific booked invoice.

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

Schema name

invoices.booked.bookedInvoiceNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, layout.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

bookedInvoiceNumber, currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lines.deliveryDate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.vatZone.vatZoneNumber, 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, exchangeRate, lines.deliveryDate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, recipient.address, recipient.city, recipient.country, recipient.ean, recipient.name, recipient.publicEntryNumber, recipient.vatZone.vatZoneNumber, recipient.zip, references.other, references.salesPerson.employeeNumber, references.vendorReference.employeeNumber

Properties

Name Type Format Read-only Max length Max value Min value Values 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. Only used if the terms of payment is of type ‘duedate’, in which case it is mandatory. Format according to ISO-8601 (YYYY-MM-DD).
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.
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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this invoice.
pdf.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/booked/:bookedInvoiceNumber/pdf

This endpoint provides you with a PDF representation for a specific booked invoice.

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

GET /invoices/drafts/:draftInvoiceNumber/templates

This returns links to the available templates for draft invoices.

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

Schema name

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

Return type

This method returns a single object

Required property

self

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/drafts/:draftInvoiceNumber/templates/booking-instructions

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

Schema name

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

Return type

This method returns a single object

Required properties

draftInvoice.self, self

Properties

Name Type Format Max value Min value Description
draftInvoice object The draft invoice which is to be booked.
draftInvoice.draftInvoiceNumber integer 999999999 1 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/totals

Invoice totals endpoints return the total amount on all invoices.

For each type of invoice (draft, booked, paid, overdue etc) there are endpoints that filter the totals by customer, employee (our ref), accounting year or accounting period. We have only documented the filtered endpoints for draft invoices, but similar endpoints for the other types of invoices exist as well. You just need to replace the “drafts” in the URL with “booked” or “paid” etc.

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

Schema name

invoices.totals.get.schema.json

Return type

This method returns a single object

Required properties

booked.paid.self, booked.self, booked.unpaid.notOverdue.self, booked.unpaid.overdue.self, booked.unpaid.self, drafts.self, predefinedPeriodFilters.lastFifteenDays.self, predefinedPeriodFilters.lastMonth.self, predefinedPeriodFilters.lastSevenDays.self, predefinedPeriodFilters.lastThirtyDays.self, predefinedPeriodFilters.lastWeek.self, predefinedPeriodFilters.lastYear.self, predefinedPeriodFilters.thisMonth.self, predefinedPeriodFilters.thisWeek.self, predefinedPeriodFilters.thisYear.self, self

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/totals/drafts

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

Schema name

invoices.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 draft invoices totals accounting years resource.
customers string uri A reference to the draft invoices totals customer resource.
employees string uri A reference to the draft invoices totals 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 draft invoices totals periods resource.
self string uri A reference to the draft invoices totals resource.

GET /invoices/totals/drafts/customers

This returns the totals for draft invoices grouped by customers.

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

Schema name

invoices.totals.drafts.customers.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max value Min value Description
customers array A reference to the draft invoices totals customer resource.
customers.customer object A reference to the customer.
customers.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customers.customer.self string uri The unique self reference of the customer resource.
customers.invoiceCount integer The number of draft invoices.
customers.maxDate string full-date The latest date of any draft invoice.
customers.minDate string full-date The earliest date of any draft invoice.
customers.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.
customers.self string uri A reference to the draft invoices totals customer 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.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/customers/:customerNumber

This returns the totals for draft invoices for a single customer.

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

Schema name

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

Return type

This method returns a single object

Properties

Name Type Format Max value Min value Description
accountingYears string uri A reference to the draft invoices totals accounting years resource.
customer object A reference to the customer.
customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
customer.self string uri The unique self reference of the customer resource.
employees string uri A reference to the draft invoices totals 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 draft invoices totals periods resource.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/customers/:customerNumber/accounting-years/:accountingYear

This returns the totals for draft invoices for a single customer and acccounting year.

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

Schema name

invoices.totals.drafts.customers.customerNumber.accounting-years.accountingYear.get.schema.json

Return type

This method returns a single object

Filterable properties

accountingYear.year

Sortable properties

accountingYear.year

Properties

Name Type Format Description
accountingYear object A specific accounting year on the agreement.
accountingYear.self string uri A unique link reference to the accounting year item.
accountingYear.year string The calendar year or years spanned by the accounting year in the format YYYY or YYYY/YYYY.
customers string uri A reference to the draft invoices totals customers resource.
invoiceCount integer The number of draft invoices.
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 draft invoices totals periods resource.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/customers/:customerNumber/periods/:accountingPeriod

This returns the totals for draft invoices for a single customer and acccounting period.

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

Schema name

invoices.totals.drafts.customers.customerNumber.periods.accountingPeriod.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Min value Description
acccountingYears string uri A reference to the draft invoices totals accounting years resource.
customers string uri A reference to the draft invoices totals customers resource.
invoiceCount integer The number of draft invoices.
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.
period object A specific period in the accounting year.
period.periodNumber integer 1 A unique identifier of the period.
period.self string uri A unique link reference to the accounting year period.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/employees

This returns the totals for draft invoices grouped by employees.

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

Schema name

invoices.totals.drafts.employees.get.schema.json

Return type

This method returns a single object

Filterable properties

employees.employee.employeeNumber

Sortable properties

employees.employee.employeeNumber

Properties

Name Type Format Min value Description
employees array A reference to the draft invoices totals employees resource.
employees.employee object A reference to the employee.
employees.employee.employeeNumber integer 1 The employee number is a unique numerical identifier with a maximum of 9 digits.
employees.employee.self string uri A unique link reference to the employee item.
employees.invoiceCount integer The number of draft invoices.
employees.maxDate string full-date The latest date of any draft invoice.
employees.minDate string full-date The earliest date of any draft invoice.
employees.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.
employees.self string uri A reference to the draft invoices totals employee 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.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/employees/:employeeNumber

This returns the totals for draft invoices for a single employee.

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

Schema name

invoices.totals.drafts.employees.employeeNumber.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Max value Min value Description
accountingYears string uri A reference to the draft invoices totals accounting years resource.
customers string uri A reference to the draft invoices totals employees resource.
employee object A reference to the employee.
employee.customerNumber integer 999999999 1 The employee number is a positive unique numerical identifier with a maximum of 9 digits.
employee.self string uri The unique self reference of the employee 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 draft invoices totals periods resource.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/employees/:employeeNumber/accounting-years/:accountingYear

This returns the totals for draft invoices for a single employee and acccounting year.

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

Schema name

invoices.totals.drafts.employees.employeeNumber.accounting-years.accountingYear.get.schema.json

Return type

This method returns a single object

Filterable properties

accountingYear.year

Sortable properties

accountingYear.year

Properties

Name Type Format Description
accountingYear object A specific accounting year on the agreement.
accountingYear.self string uri A unique link reference to the accounting year item.
accountingYear.year string The calendar year or years spanned by the accounting year in the format YYYY or YYYY/YYYY.
customers string uri A reference to the draft invoices totals customers resource.
invoiceCount integer The number of draft invoices.
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 draft invoices totals periods resource.
self string uri A reference to the current resource.

GET /invoices/totals/drafts/employees/:employeeNumber/periods/:accountingPeriod

This returns the totals for draft invoices for a single employee and acccounting period.

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

Schema name

invoices.totals.drafts.employees.employeeNumber.periods.accountingPeriod.get.schema.json

Return type

This method returns a single object

Properties

Name Type Format Min value Description
acccountingYears string uri A reference to the draft invoices totals accounting years resource.
customers string uri A reference to the draft invoices totals customers resource.
invoiceCount integer The number of draft invoices.
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.
period object A specific period in the accounting year.
period.periodNumber integer 1 A unique identifier of the period.
period.self string uri A unique link reference to the accounting year period.
self string uri A reference to the current resource.

GET /invoices/totals/booked

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

Schema name

invoices.totals.booked.get.schema.json

Return type

This method returns a single object

Required property

self

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/totals/booked/paid

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

Schema name

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

Return type

This method returns a single object

Required property

self

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/totals/booked/unpaid

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

Schema name

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

Return type

This method returns a single object

Required property

self

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/totals/booked/unpaid/overdue

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

Schema name

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

Return type

This method returns a single object

Required property

self

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/totals/booked/unpaid/not-overdue

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

Schema name

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

Return type

This method returns a single object

Required property

self

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/paid

This returns a collection of all paid invoices.

Schema name

invoices.paid.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, pdf.download, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

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.vatZone.vatZoneNumber, 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.vatZone.vatZoneNumber, 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.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/unpaid

This returns a collection of all unpaid invoices.

Schema name

invoices.unpaid.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, pdf.download, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

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.vatZone.vatZoneNumber, 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.vatZone.vatZoneNumber, 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.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/overdue

This returns a collection of all overdue invoices.

Schema name

invoices.overdue.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, pdf.download, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

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.vatZone.vatZoneNumber, 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.vatZone.vatZoneNumber, 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.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/not-due

This returns a collection of all not due invoices.

Schema name

invoices.not-due.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, layout.self, paymentTerms.self, pdf.download, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

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.vatZone.vatZoneNumber, 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.vatZone.vatZoneNumber, 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.download 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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.
sent string uri A convenience link to see if the invoice has been sent or not.
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/sent

This endpoint provides you with a collection of all the invoices sent via e-invoicing.

Schema name

invoices.sent.get.schema.json

Return type

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

Required properties

invoice.self, self

Properties

Name Type Format Values Description
createdBy string The e-conomic user that booked and sent the invoice.
creationDate string date The date that the invoice was sent.
id integer The unique identifier
invoice object A reference to the booked invoice that was sent.
invoice.bookedInvoiceNumber integer The number of the booked invoice.
invoice.self string uri The unique self reference of the booked invoice resource.
recipient object The recipient of the invoice.
recipient.ean string The EAN number the invoice was sent to (if applicable).
recipient.mobilePhone string The phone number the invoice was sent to (if applicable).
recipient.name string The name of the recipient (if applicable).
self string uri The unique self reference of the sent invoice resource.
sendBy Enum mobilePay, ean The e-invoicing channel through which this invoice was sent.
status string The status of the sent invoice.

GET /invoices/sent/:id

Schema name

invoices.sent.id.get.schema.json

Return type

This method returns a single object

Required properties

invoice.self, self

Properties

Name Type Format Values Description
createdBy string The e-conomic user that booked and sent the invoice.
creationDate string date The date that the invoice was sent.
id integer The unique identifier
invoice object A reference to the booked invoice that was sent.
invoice.bookedInvoiceNumber integer The number of the booked invoice.
invoice.self string uri The unique self reference of the booked invoice resource.
recipient object The recipient of the invoice.
recipient.ean string The EAN number the invoice was sent to (if applicable).
recipient.mobilePhone string The phone number the invoice was sent to (if applicable).
recipient.name string The name of the recipient (if applicable).
self string uri The unique self reference of the sent invoice resource.
sendBy Enum mobilePay, ean The e-invoicing channel through which this invoice was sent.
status string The status of the sent invoice.

GET /invoices/drafts/:draftInvoiceNumber/attachment

Returns the reference to the attached file on a given draft invoice.

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

GET /invoices/drafts/:draftInvoiceNumber/attachment/file

Returns the file attachment for the given draft invoice. File is always returned as .pdf.

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

POST /invoices/drafts/:draftInvoiceNumber/attachment/file

Allows attaching a document to the draft invoice. Only valid PDF files are supported. Please note that for the file upload “application/json” is not a valid content-type. Upload of binary data requires the content-type header to be “multipart/form-data”. Some clients do not automatically set boundaries on the multipart/form-data and for these you will need to define “multipart/form-data; boundary= ;” where boundary defines the file part of the multipart stream. Returns status code 201 upon successful creation. Maximum file size is 9.0 MB per request.

var form = new FormData();
form.append("", "path/to/the/file.jpg");

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/invoices/drafts/123/attachment/file",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "cache-control": "no-cache"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

DELETE /invoices/drafts/:draftInvoiceNumber/attachment/file

Removes the entire attached document that is associated with the given draft invoice. Returns status code 204 upon successful deletion. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

Journals

Journals contain your draft transactions, that can be modified until the journal is booked or the drafts are deleted. Journals are known as Kassekladder in Danish.

For more information please look at the Danish e-copedia article http://wiki2.e-conomic.dk/regnskab/kassekladder-daglig.

GET /journals

This is the root endpoint for the journals endpoint. It provides you with an overview of available journals on the agreement. It also includes convenience links to a few templates that allow you to create entries in the journal with ease.

Schema name

journals.get.schema.json

Return type

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

Required properties

self, settings.contraAccounts.customerPayments.self, settings.contraAccounts.financeVouchers.self, settings.contraAccounts.supplierPayments.self, templates.self

Filterable properties

journalNumber, name

Sortable properties

journalNumber, name

Properties

Name Type Format Max value Min value Values Description
entries string uri A link to the collection of entries in the given journal, regardless of their type.
journalNumber integer Unique journal number
metaData object Information about possible actions, endpoints and resource paths related to the endpoint.
name string The name of the journal
pagination object Information about the pagination.
self string uri The unique self reference of the jounrnals collection.
settings object Settings of the journal.
settings.contraAccounts object Default contra account for given entry type
settings.contraAccounts.customerPayments object Default contra account for the customer payment
settings.contraAccounts.customerPayments.accountNumber integer Account number used for registering customer payment entry type
settings.contraAccounts.customerPayments.self string uri The unique self reference of the account resource.
settings.contraAccounts.financeVouchers object Default contra account for the finance voucher
settings.contraAccounts.financeVouchers.accountNumber integer Account number used for registering finance voucher entry type
settings.contraAccounts.financeVouchers.self string uri The unique self reference of the account resource.
settings.contraAccounts.supplierPayments object Default contra account for the supplier payment
settings.contraAccounts.supplierPayments.accountNumber integer Account number used for registering supplier payment entry type
settings.contraAccounts.supplierPayments.self string uri The unique self reference of the account resource.
settings.entryTypeRestrictedTo Enum financeVoucher, supplierInvoice, supplierPayment, customerPayment, manualCustomerInvoice Allowed entry type on given journal.
settings.voucherNumbers object Settings connected with voucher numbering.
settings.voucherNumbers.maximumVoucherNumber integer 999999999 Maximum voucher number defined in settings.
settings.voucherNumbers.minimumVoucherNumber integer 0 Minimum voucher number defined in settings.
templates object Templates allowing easy entry creation.
templates.financeVoucher string uri The unique reference to the finance voucher template
templates.manualCustomerInvoice string uri The unique reference to the manual customer invoice template
templates.self string uri A unique link reference to the templates resource.
vouchers string uri A link to the collection of vouchers on the given journal, categorized according to the type.

GET /journals/:journalNumber

This endpoint provides you the information regarding a specific journal and the settings associated with it. From here you can navigate to the entries endpoint - which will return the entire collection of entries across all types in the journal, or to the vouchers endpoint which will return entries grouped by the voucher number set on the entry. The journal also includes convenience links to relevant templates that allow you to create entries in the journal with ease.

Schema name

journals.journalNumber.get.schema.json

Return type

This method returns a single object

Required properties

self, settings.contraAccounts.customerPayments.self, settings.contraAccounts.financeVouchers.self, settings.contraAccounts.supplierPayments.self, templates.self

Filterable properties

journalNumber, name

Sortable properties

journalNumber, name

Properties

Name Type Format Min value Values Description
entries string uri A link to the collection of entries on the given journal, regardless of their type.
journalNumber integer Unique journal number
name string The name of the journal
self string uri The unique self reference of the jounrnals collection.
settings object Settings of the journal.
settings.contraAccounts object Default contra account for given entry type
settings.contraAccounts.customerPayments Default contra account for the customer payment
settings.contraAccounts.customerPayments.accountNumber integer Account number used for registering customer payment entry type
settings.contraAccounts.customerPayments.self string uri The unique self reference of the account resource.
settings.contraAccounts.financeVouchers Default contra account for the finance voucher
settings.contraAccounts.financeVouchers.accountNumber integer Account number used for registering finance voucher entry type
settings.contraAccounts.financeVouchers.self string uri The unique self reference of the account resource.
settings.contraAccounts.supplierPayments Default contra account for the supplier payment
settings.contraAccounts.supplierPayments.accountNumber integer Account number used for registering supplier payment entry type
settings.contraAccounts.supplierPayments.self string uri The unique self reference of the account resource.
settings.entryTypeRestrictedTo Enum financeVoucher, supplierInvoice, supplierPayment, customerPayment, manualCustomerInvoice Allowed entry type on given journal.
settings.voucherNumbers object Settings connected with voucher numbering.
settings.voucherNumbers.maximumVoucherNumber integer 999999999 Maximum voucher number defined in settings.
settings.voucherNumbers.minimumVoucherNumber integer 0 Minimum voucher number defined in settings.
templates object Templates allowing easy entry creation.
templates.financeVoucher string uri The unique reference to the finance voucher template
templates.manualCustomerInvoice string uri The unique reference to the manual customer invoice template
templates.self string uri A unique link reference to the templates resource.
vouchers string uri A link to the collection of vouchers on the given journal, categorized according to the type.

GET /journals/:journalNumber/vouchers

This endpoint returns a collection of vouchers containing entries as assigned by the voucher number.

Schema name

journals.journalNumber.vouchers.get.schema.json

Return type

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

Required properties

accountingYear.self, entries.customerPayments.contraAccount.self, entries.customerPayments.contraVatAccount.self, entries.customerPayments.currency.self, entries.customerPayments.customer.self, entries.customerPayments.employee.self, entries.customerPayments.journal.self, entries.customerPayments.voucher.self, entries.financeVouchers.account.self, entries.financeVouchers.contraAccount.self, entries.financeVouchers.contraVatAccount.self, entries.financeVouchers.currency.self, entries.financeVouchers.employee.self, entries.financeVouchers.journal.self, entries.financeVouchers.project.self, entries.financeVouchers.vatAccount.self, entries.financeVouchers.voucher.self, entries.manualCustomerInvoices.contraAccount.self, entries.manualCustomerInvoices.contraVatAccount.self, entries.manualCustomerInvoices.currency.self, entries.manualCustomerInvoices.customer.self, entries.manualCustomerInvoices.employee.self, entries.manualCustomerInvoices.journal.self, entries.manualCustomerInvoices.voucher.self, entries.supplierInvoices.contraAccount.self, entries.supplierInvoices.contraVatAccount.self, entries.supplierInvoices.currency.self, entries.supplierInvoices.employee.self, entries.supplierInvoices.journal.self, entries.supplierInvoices.paymentDetails.paymentType.self, entries.supplierInvoices.project.self, entries.supplierInvoices.supplier.self, entries.supplierInvoices.voucher.self, entries.supplierPayments.contraAccount.self, entries.supplierPayments.contraVatAccount.self, entries.supplierPayments.currency.self, entries.supplierPayments.employee.self, entries.supplierPayments.journal.self, entries.supplierPayments.supplier.self, entries.supplierPayments.voucher.self, journal.self, self

Properties

Name Type Format Read-only Max length Max value Min value Values Description
accountingYear object The accounting year the voucher belongs to. Together with the voucherNumber it is a unique identifier for the voucher.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string A unique identifier of the accounting year.
entries object Entries, separated by type, for the journal.
entries.customerPayments array An array containing customer payments.
entries.customerPayments.amount number
entries.customerPayments.amountBaseCurrency number The amount in base currency.
entries.customerPayments.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.contraAccount.accountNumber integer 1 The account number.
entries.customerPayments.contraAccount.self string uri A unique reference to the account resource.
entries.customerPayments.contraVatAccount object The account for VAT.
entries.customerPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.customerPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.customerPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.customerPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.customerPayments.currency object The currency for the entry.
entries.customerPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.customerPayments.currency.self string uri A unique link reference to the currency item.
entries.customerPayments.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.customer.self string uri A unique reference to the customer resource.
entries.customerPayments.customerInvoice integer 1 Customer invoice number.
entries.customerPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.customerPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.customerPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.customerPayments.departmentalDistribution.distributionType string Type of the distribution
entries.customerPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.customerPayments.employee object Employee that this entry is related to. Requires Project module
entries.customerPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.employee.self string uri A unique link reference to the employee item.
entries.customerPayments.entryType Enum customerPayment Type of the journal entry. This is automatically set to customerPayment.
entries.customerPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.customerPayments.journal object The journal the voucher belongs to.
entries.customerPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.customerPayments.journal.self string uri A unique reference to the journal resource.
entries.customerPayments.remainder number True Remaining amount to be paid.
entries.customerPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.customerPayments.text string 250 Entry description.
entries.customerPayments.voucher object Voucher that the entry belongs to.
entries.customerPayments.voucher.self string uri A unique link reference to the voucher item.
entries.customerPayments.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.financeVouchers array An array containing finance vouchers.
entries.financeVouchers.account object The account used by the entry.
entries.financeVouchers.account.accountNumber integer 1 The account number.
entries.financeVouchers.account.self string uri A unique reference to the account resource.
entries.financeVouchers.amount number
entries.financeVouchers.amountBaseCurrency number The amount in base currency.
entries.financeVouchers.contraAccount object The account used for the funds.
entries.financeVouchers.contraAccount.accountNumber integer 1 The account number.
entries.financeVouchers.contraAccount.self string uri A unique reference to the account resource.
entries.financeVouchers.contraVatAccount object The account for VAT.
entries.financeVouchers.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.financeVouchers.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.financeVouchers.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.financeVouchers.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.financeVouchers.costType object The cost type for this entity.
entries.financeVouchers.costType.costTypeNumber integer The unique identifier of the cost type.
entries.financeVouchers.costType.self string uri A unique link reference to the cost type.
entries.financeVouchers.currency object The currency for the entry.
entries.financeVouchers.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.financeVouchers.currency.self string uri A unique link reference to the currency item.
entries.financeVouchers.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.financeVouchers.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.financeVouchers.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.financeVouchers.departmentalDistribution.distributionType string Type of the distribution
entries.financeVouchers.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.financeVouchers.employee object Employee that this entry is related to. Requires Project module
entries.financeVouchers.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.financeVouchers.employee.self string uri A unique link reference to the employee item.
entries.financeVouchers.entryType Enum financeVoucher Type of the journal entry. This is automatically set to financeVoucher.
entries.financeVouchers.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.financeVouchers.journal object The journal the voucher belongs to.
entries.financeVouchers.journal.journalNumber number 1 Journal number that must be at least 1.
entries.financeVouchers.journal.self string uri A unique reference to the journal resource.
entries.financeVouchers.project object The project the entry is connected to.
entries.financeVouchers.project.projectNumber integer 1 A unique identifier of the project.
entries.financeVouchers.project.self string uri A unique reference to the project resource.
entries.financeVouchers.quantity1 number Requires dimension module.
entries.financeVouchers.quantity2 number Requires dimension module.
entries.financeVouchers.remainder number True Remaining amount to be paid.
entries.financeVouchers.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.financeVouchers.text string 250 Entry description.
entries.financeVouchers.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit1.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit2.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.vatAccount object The account for VAT.
entries.financeVouchers.vatAccount.self string uri A unique link reference to the vatAccount item.
entries.financeVouchers.vatAccount.vatCode string 5 The unique identifier of the vat account.
entries.financeVouchers.vatAmount number The amount of VAT on the entry. Used if the entry has a VAT account.
entries.financeVouchers.vatAmountBaseCurrency number The amount of VAT on the voucher in base currency.
entries.financeVouchers.voucher object Voucher that the entry belongs to.
entries.financeVouchers.voucher.self string uri A unique link reference to the voucher item.
entries.financeVouchers.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.manualCustomerInvoices array An array containing finance vouchers.
entries.manualCustomerInvoices.amount number
entries.manualCustomerInvoices.amountBaseCurrency number The amount in base currency.
entries.manualCustomerInvoices.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.contraAccount.accountNumber integer 1 The account number.
entries.manualCustomerInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.manualCustomerInvoices.contraVatAccount object The account for VAT.
entries.manualCustomerInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.manualCustomerInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.manualCustomerInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.manualCustomerInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.manualCustomerInvoices.currency object The currency for the entry.
entries.manualCustomerInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.manualCustomerInvoices.currency.self string uri A unique link reference to the currency item.
entries.manualCustomerInvoices.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.customer.self string uri A unique reference to the customer resource.
entries.manualCustomerInvoices.customerInvoice integer 1 Customer invoice number.
entries.manualCustomerInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.manualCustomerInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.manualCustomerInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.manualCustomerInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.manualCustomerInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.employee object Employee that this entry is related to. Requires Project module
entries.manualCustomerInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.employee.self string uri A unique link reference to the employee item.
entries.manualCustomerInvoices.entryType Enum manualCustomerInvoice Type of the journal entry. This is automatically set to manualCustomerInvoice.
entries.manualCustomerInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.manualCustomerInvoices.journal object The journal the voucher belongs to.
entries.manualCustomerInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.manualCustomerInvoices.journal.self string uri A unique reference to the journal resource.
entries.manualCustomerInvoices.remainder number True Remaining amount to be paid.
entries.manualCustomerInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.manualCustomerInvoices.text string 250 Entry description.
entries.manualCustomerInvoices.voucher object Voucher that the entry belongs to.
entries.manualCustomerInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.manualCustomerInvoices.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.supplierInvoices array An array containing finance vouchers.
entries.supplierInvoices.amount number
entries.supplierInvoices.amountBaseCurrency number The amount in base currency.
entries.supplierInvoices.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.contraAccount.accountNumber integer 1 The account number.
entries.supplierInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.supplierInvoices.contraVatAccount object The account for VAT.
entries.supplierInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierInvoices.costType object The cost type for this entity.
entries.supplierInvoices.costType.costTypeNumber integer The unique identifier of the cost type.
entries.supplierInvoices.costType.self string uri A unique link reference to the cost type.
entries.supplierInvoices.currency object The currency for the entry.
entries.supplierInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierInvoices.currency.self string uri A unique link reference to the currency item.
entries.supplierInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.supplierInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.employee object Employee that this entry is related to. Requires Project module
entries.supplierInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.employee.self string uri A unique link reference to the employee item.
entries.supplierInvoices.entryType Enum supplierInvoice Type of the journal entry. This is automatically set to supplierInvoice.
entries.supplierInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierInvoices.journal object The journal the voucher belongs to.
entries.supplierInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierInvoices.journal.self string uri A unique reference to the journal resource.
entries.supplierInvoices.paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
entries.supplierInvoices.paymentDetails.paymentType object A specific payment type on the entry.
entries.supplierInvoices.paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
entries.supplierInvoices.paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
entries.supplierInvoices.project object The project the entry is connected to.
entries.supplierInvoices.project.projectNumber integer 1 A unique identifier of the project.
entries.supplierInvoices.project.self string uri A unique reference to the project resource.
entries.supplierInvoices.quantity1 number Requires dimension module.
entries.supplierInvoices.quantity2 number Requires dimension module.
entries.supplierInvoices.remainder number True Remaining amount to be paid.
entries.supplierInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierInvoices.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.supplier.self string uri A unique self reference of the supplier.
entries.supplierInvoices.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierInvoices.text string 250 Entry description.
entries.supplierInvoices.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit1.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit2.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.voucher object Voucher that the entry belongs to.
entries.supplierInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.supplierInvoices.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.supplierPayments array An array containing finance vouchers.
entries.supplierPayments.amount number
entries.supplierPayments.amountBaseCurrency number The amount in base currency.
entries.supplierPayments.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.contraAccount.accountNumber integer 1 The account number.
entries.supplierPayments.contraAccount.self string uri A unique reference to the account resource.
entries.supplierPayments.contraVatAccount object The account for VAT.
entries.supplierPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierPayments.currency object The currency for the entry.
entries.supplierPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierPayments.currency.self string uri A unique link reference to the currency item.
entries.supplierPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierPayments.departmentalDistribution.distributionType string Type of the distribution
entries.supplierPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierPayments.employee object Employee that this entry is related to. Requires Project module
entries.supplierPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.employee.self string uri A unique link reference to the employee item.
entries.supplierPayments.entryType Enum supplierPayment Type of the journal entry. This is automatically set to supplierPayment.
entries.supplierPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierPayments.journal object The journal the voucher belongs to.
entries.supplierPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierPayments.journal.self string uri A unique reference to the journal resource.
entries.supplierPayments.remainder number True Remaining amount to be paid.
entries.supplierPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierPayments.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.supplier.self string uri A unique self reference of the supplier.
entries.supplierPayments.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierPayments.text string 250 Entry description.
entries.supplierPayments.voucher object Voucher that the entry belongs to.
entries.supplierPayments.voucher.self string uri A unique link reference to the voucher item.
entries.supplierPayments.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
journal object The journal the voucher belongs to.
journal.journalNumber number 1 Journal number that must be at least 1.
journal.self string uri A unique reference to the journal resource.
self string uri The unique self reference of the voucher collection.
voucherNumber number 1 Journal voucher number that must be at least 1. Together with the accountingYear it is a unique identifier for the voucher.

POST /journals/:journalNumber/vouchers

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/journals/1/vouchers",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "content-type": "application/json",
  },
  "data": {
        'accountingYear': {
            'year': '2017'
        },
        'journal': {
            'journalNumber': 1,
            'self': 'https://restapi.e-conomic.com/journals/1'
        },
        'entries': {
            'supplierInvoices': [{
                'supplier': {
                    'supplierNumber': 3,
                    'self': 'https://restapi.e-conomic.com/suppliers/3'
                },
                'amount': 100,
                'account': {
                    'accountNumber': 1010,
                    'self': 'https://restapi.e-conomic.com/accounts/1010'
                },
                'contraAccount': {
                    'accountNumber': 5820,
                    'self': 'https://restapi.e-conomic.com/accounts/5820'
                },
                'currency': {
                    'code': 'DKK',
                    'self': 'https://restapi.e-conomic.com/currencies/DKK'
                },
                'date': '2017-05-03',
                'type': 'supplierInvoice',
                'self': 'https://restapi.e-conomic.com/journals/1/entries/373'
            }],
            'supplierPayments': [{
                'supplier': {
                    'supplierNumber': 3,
                    'self': 'https://restapi.e-conomic.com/suppliers/3'
                },
                'supplierInvoiceNumber': '123',
                'text': 'TEST',
                'amount': 100,
                'account': {
                    'accountNumber': 1010,
                    'self': 'https://restapi.e-conomic.com/accounts/1010'
                },
                'contraAccount': {
                    'accountNumber': 5820,
                    'self': 'https://restapi.e-conomic.com/accounts/5820'
                },
                'currency': {
                    'code': 'DKK',
                    'self': 'https://restapi.e-conomic.com/currencies/DKK'
                },
                'date': '2017-05-03',
                'type': 'supplierPayment',
                'self': 'https://restapi.e-conomic.com/journals/1/entries/373'
            }],
            'customerPayments': [{
                'customer': {
                    'customerNumber': 2,
                    'self': 'https://restapi.e-conomic.com/customers/2'
                },
                'text': 'Test this invoice',
                'amount': 100,
                'account': {
                    'accountNumber': 1010,
                    'self': 'https://restapi.e-conomic.com/accounts/1010'
                },
                'contraAccount': {
                    'accountNumber': 5820,
                    'self': 'https://restapi.e-conomic.com/accounts/5820'
                },
                'currency': {
                    'code': 'DKK',
                    'self': 'https://restapi.e-conomic.com/currencies/DKK'
                },
                'date': '2017-05-03',
                'type': 'customerPayment',
                'self': 'https://restapi.e-conomic.com/journals/1/entries/373'
            }],
            'manualCustomerInvoices': [{
                'customer': {
                    'customerNumber': 2,
                    'self': 'https://restapi.e-conomic.com/customers/2'
                },
                'customerInvoiceNumber': '123',
                'text': 'Test this invoice',
                'amount': 100,
                'account': {
                    'accountNumber': 1010,
                    'self': 'https://restapi.e-conomic.com/accounts/1010'
                },
                'contraAccount': {
                    'accountNumber': 5820,
                    'self': 'https://restapi.e-conomic.com/accounts/5820'
                },
                'currency': {
                    'code': 'DKK',
                    'self': 'https://restapi.e-conomic.com/currencies/DKK'
                },
                'date': '2017-05-03',
                'type': 'customerPayment',
                'self': 'https://restapi.e-conomic.com/journals/1/entries/373'
            }]
        }
    }
  }

$.ajax(settings).done(function (response) {
  console.log(response);
});

This endpoint enables creation of vouchers and thereby entries on the journal, regardless of the type. Bulk creation is supported. Endpoint returns a single object or an array of objects based on input parameter.

Schema name

journals.journalNumber.vouchers.post.schema.json

Return type

This method returns a single object

Required properties

accountingYear, entries.customerPayments.amount, entries.customerPayments.date, entries.financeVouchers.amount, entries.financeVouchers.date, entries.manualCustomerInvoices.amount, entries.manualCustomerInvoices.date, entries.supplierInvoices.amount, entries.supplierInvoices.date, entries.supplierPayments.amount, entries.supplierPayments.date

Properties

Name Type Format Read-only Max length Max value Min value Values Description
accountingYear object The accounting year the voucher belongs to. Together with the voucherNumber it is a unique identifier for the voucher.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string A unique identifier of the accounting year.
entries object Entries, separated by type, for the journal.
entries.customerPayments array An array containing customer payments.
entries.customerPayments.amount number Defining whether it is a debit or credit can be done by prefixing the amount with the ‘-’ (minus) sign.
entries.customerPayments.amountBaseCurrency number The amount in base currency.
entries.customerPayments.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.contraAccount.accountNumber integer 1 The account number.
entries.customerPayments.contraAccount.self string uri A unique reference to the account resource.
entries.customerPayments.contraVatAccount object The account for VAT.
entries.customerPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.customerPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.customerPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.customerPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.customerPayments.currency object The currency for the entry.
entries.customerPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.customerPayments.currency.self string uri A unique link reference to the currency item.
entries.customerPayments.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.customer.self string uri A unique reference to the customer resource.
entries.customerPayments.customerInvoice integer 1 Customer invoice number.
entries.customerPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.customerPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.customerPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.customerPayments.departmentalDistribution.distributionType string Type of the distribution
entries.customerPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.customerPayments.employee object Employee that this entry is related to. Requires Project module
entries.customerPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.employee.self string uri A unique link reference to the employee item.
entries.customerPayments.entryType Enum customerPayment Type of the journal entry. This is automatically set to customerPayment.
entries.customerPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.customerPayments.journal object The journal the voucher belongs to.
entries.customerPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.customerPayments.journal.self string uri A unique reference to the journal resource.
entries.customerPayments.remainder number True Remaining amount to be paid.
entries.customerPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.customerPayments.text string 250 Entry description.
entries.customerPayments.voucher object Voucher that the entry belongs to.
entries.customerPayments.voucher.self string uri A unique link reference to the voucher item.
entries.customerPayments.voucher.voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999.
entries.financeVouchers array An array containing finance vouchers.
entries.financeVouchers.account object The account used by the entry.
entries.financeVouchers.account.accountNumber integer 1 The account number.
entries.financeVouchers.account.self string uri A unique reference to the account resource.
entries.financeVouchers.amount number
entries.financeVouchers.amountBaseCurrency number The amount in base currency.
entries.financeVouchers.contraAccount object The account used for the funds.
entries.financeVouchers.contraAccount.accountNumber integer 1 The account number.
entries.financeVouchers.contraAccount.self string uri A unique reference to the account resource.
entries.financeVouchers.contraVatAccount object The account for VAT.
entries.financeVouchers.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.financeVouchers.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.financeVouchers.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.financeVouchers.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.financeVouchers.costType object The cost type for this entity.
entries.financeVouchers.costType.costTypeNumber integer The unique identifier of the cost type.
entries.financeVouchers.costType.self string uri A unique link reference to the cost type.
entries.financeVouchers.currency object The currency for the entry.
entries.financeVouchers.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.financeVouchers.currency.self string uri A unique link reference to the currency item.
entries.financeVouchers.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.financeVouchers.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.financeVouchers.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.financeVouchers.departmentalDistribution.distributionType string Type of the distribution
entries.financeVouchers.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.financeVouchers.employee object Employee that this entry is related to. Requires Project module
entries.financeVouchers.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.financeVouchers.employee.self string uri A unique link reference to the employee item.
entries.financeVouchers.entryType Enum financeVoucher Type of the journal entry. This is automatically set to financeVoucher.
entries.financeVouchers.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.financeVouchers.journal object The journal the voucher belongs to.
entries.financeVouchers.journal.journalNumber number 1 Journal number that must be at least 1.
entries.financeVouchers.journal.self string uri A unique reference to the journal resource.
entries.financeVouchers.project object The project the entry is connected to.
entries.financeVouchers.project.projectNumber integer 1 A unique identifier of the project.
entries.financeVouchers.project.self string uri A unique reference to the project resource.
entries.financeVouchers.quantity1 number Requires dimension module.
entries.financeVouchers.quantity2 number Requires dimension module.
entries.financeVouchers.remainder number True Remaining amount to be paid.
entries.financeVouchers.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.financeVouchers.text string 250 Entry description.
entries.financeVouchers.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit1.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit2.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.vatAccount object The account for VAT.
entries.financeVouchers.vatAccount.self string uri A unique link reference to the vatAccount item.
entries.financeVouchers.vatAccount.vatCode string 5 The unique identifier of the vat account.
entries.financeVouchers.vatAmount number The amount of VAT on the entry. Used if the entry has a VAT account.
entries.financeVouchers.vatAmountBaseCurrency number The amount of VAT on the voucher in base currency.
entries.financeVouchers.voucher object Voucher that the entry belongs to.
entries.financeVouchers.voucher.self string uri A unique link reference to the voucher item.
entries.financeVouchers.voucher.voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999.
entries.manualCustomerInvoices array An array containing finance vouchers.
entries.manualCustomerInvoices.amount number
entries.manualCustomerInvoices.amountBaseCurrency number The amount in base currency.
entries.manualCustomerInvoices.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.contraAccount.accountNumber integer 1 The account number.
entries.manualCustomerInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.manualCustomerInvoices.contraVatAccount object The account for VAT.
entries.manualCustomerInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.manualCustomerInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.manualCustomerInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.manualCustomerInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.manualCustomerInvoices.currency object The currency for the entry.
entries.manualCustomerInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.manualCustomerInvoices.currency.self string uri A unique link reference to the currency item.
entries.manualCustomerInvoices.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.customer.self string uri A unique reference to the customer resource.
entries.manualCustomerInvoices.customerInvoice integer 1 Customer invoice number.
entries.manualCustomerInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.manualCustomerInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.manualCustomerInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.manualCustomerInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.manualCustomerInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.employee object Employee that this entry is related to. Requires Project module
entries.manualCustomerInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.employee.self string uri A unique link reference to the employee item.
entries.manualCustomerInvoices.entryType Enum manualCustomerInvoice Type of the journal entry. This is automatically set to manualCustomerInvoice.
entries.manualCustomerInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.manualCustomerInvoices.journal object The journal the voucher belongs to.
entries.manualCustomerInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.manualCustomerInvoices.journal.self string uri A unique reference to the journal resource.
entries.manualCustomerInvoices.remainder number True Remaining amount to be paid.
entries.manualCustomerInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.manualCustomerInvoices.text string 250 Entry description.
entries.manualCustomerInvoices.voucher object Voucher that the entry belongs to.
entries.manualCustomerInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.manualCustomerInvoices.voucher.voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999.
entries.supplierInvoices array An array containing finance vouchers.
entries.supplierInvoices.amount number
entries.supplierInvoices.amountBaseCurrency number The amount in base currency.
entries.supplierInvoices.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.contraAccount.accountNumber integer 1 The account number.
entries.supplierInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.supplierInvoices.contraVatAccount object The account for VAT.
entries.supplierInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierInvoices.costType object The cost type for this entity.
entries.supplierInvoices.costType.costTypeNumber integer The unique identifier of the cost type.
entries.supplierInvoices.costType.self string uri A unique link reference to the cost type.
entries.supplierInvoices.currency object The currency for the entry.
entries.supplierInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierInvoices.currency.self string uri A unique link reference to the currency item.
entries.supplierInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.supplierInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.employee object Employee that this entry is related to. Requires Project module
entries.supplierInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.employee.self string uri A unique link reference to the employee item.
entries.supplierInvoices.entryType Enum supplierInvoice Type of the journal entry. This is automatically set to supplierInvoice.
entries.supplierInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierInvoices.journal object The journal the voucher belongs to.
entries.supplierInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierInvoices.journal.self string uri A unique reference to the journal resource.
entries.supplierInvoices.paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
entries.supplierInvoices.paymentDetails.paymentType object A specific payment type on the entry.
entries.supplierInvoices.paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
entries.supplierInvoices.paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
entries.supplierInvoices.project object The project the entry is connected to.
entries.supplierInvoices.project.projectNumber integer 1 A unique identifier of the project.
entries.supplierInvoices.project.self string uri A unique reference to the project resource.
entries.supplierInvoices.quantity1 number Requires dimension module.
entries.supplierInvoices.quantity2 number Requires dimension module.
entries.supplierInvoices.remainder number True Remaining amount to be paid.
entries.supplierInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierInvoices.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.supplier.self string uri A unique self reference of the supplier.
entries.supplierInvoices.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierInvoices.text string 250 Entry description.
entries.supplierInvoices.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit1.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit2.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.voucher object Voucher that the entry belongs to.
entries.supplierInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.supplierInvoices.voucher.voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999.
entries.supplierPayments array An array containing finance vouchers.
entries.supplierPayments.amount number
entries.supplierPayments.amountBaseCurrency number The amount in base currency.
entries.supplierPayments.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.contraAccount.accountNumber integer 1 The account number.
entries.supplierPayments.contraAccount.self string uri A unique reference to the account resource.
entries.supplierPayments.contraVatAccount object The account for VAT.
entries.supplierPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierPayments.currency object The currency for the entry.
entries.supplierPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierPayments.currency.self string uri A unique link reference to the currency item.
entries.supplierPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierPayments.departmentalDistribution.distributionType string Type of the distribution
entries.supplierPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierPayments.employee object Employee that this entry is related to. Requires Project module
entries.supplierPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.employee.self string uri A unique link reference to the employee item.
entries.supplierPayments.entryType Enum supplierPayment Type of the journal entry. This is automatically set to supplierPayment.
entries.supplierPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierPayments.journal object The journal the voucher belongs to.
entries.supplierPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierPayments.journal.self string uri A unique reference to the journal resource.
entries.supplierPayments.remainder number True Remaining amount to be paid.
entries.supplierPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierPayments.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.supplier.self string uri A unique self reference of the supplier.
entries.supplierPayments.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierPayments.text string 250 Entry description.
entries.supplierPayments.voucher object Voucher that the entry belongs to.
entries.supplierPayments.voucher.self string uri A unique link reference to the voucher item.
entries.supplierPayments.voucher.voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999.
journal object The journal the voucher belongs to.
journal.journalNumber number 1 Journal number that must be at least 1.
journal.self string uri A unique reference to the journal resource.
voucherNumber number 999999999 1 Journal voucher number must be between 1-999999999. Together with the accountingYear it is a unique identifier for the voucher.

GET /journals/:journalNumber/vouchers/:accountingYear-voucherNumber

Provides detailed information regarding a specific entry that is located on the given voucher.

Schema name

journals.journalNumber.vouchers.accountingYear-voucherNumber.get.schema.json

Return type

This method returns a single object

Required properties

accountingYear.self, entries.customerPayments.contraAccount.self, entries.customerPayments.contraVatAccount.self, entries.customerPayments.currency.self, entries.customerPayments.customer.self, entries.customerPayments.employee.self, entries.customerPayments.journal.self, entries.customerPayments.voucher.self, entries.financeVouchers.account.self, entries.financeVouchers.contraAccount.self, entries.financeVouchers.contraVatAccount.self, entries.financeVouchers.currency.self, entries.financeVouchers.employee.self, entries.financeVouchers.journal.self, entries.financeVouchers.project.self, entries.financeVouchers.vatAccount.self, entries.financeVouchers.voucher.self, entries.manualCustomerInvoices.contraAccount.self, entries.manualCustomerInvoices.contraVatAccount.self, entries.manualCustomerInvoices.currency.self, entries.manualCustomerInvoices.customer.self, entries.manualCustomerInvoices.employee.self, entries.manualCustomerInvoices.journal.self, entries.manualCustomerInvoices.voucher.self, entries.supplierInvoices.contraAccount.self, entries.supplierInvoices.contraVatAccount.self, entries.supplierInvoices.currency.self, entries.supplierInvoices.employee.self, entries.supplierInvoices.journal.self, entries.supplierInvoices.paymentDetails.paymentType.self, entries.supplierInvoices.project.self, entries.supplierInvoices.supplier.self, entries.supplierInvoices.voucher.self, entries.supplierPayments.contraAccount.self, entries.supplierPayments.contraVatAccount.self, entries.supplierPayments.currency.self, entries.supplierPayments.employee.self, entries.supplierPayments.journal.self, entries.supplierPayments.supplier.self, entries.supplierPayments.voucher.self, journal.self, self

Properties

Name Type Format Read-only Max length Max value Min value Values Description
accountingYear object The accounting year the voucher belongs to. Together with the voucherNumber it is a unique identifier for the voucher.
accountingYear.self string uri A unique reference to the accounting year resource.
accountingYear.year string A unique identifier of the accounting year.
attachment string uri A unique reference to the attachment file on the given voucher.
entries object Entries, separated by type, for the journal.
entries.customerPayments array An array containing customer payments.
entries.customerPayments.amount number
entries.customerPayments.amountBaseCurrency number The amount in base currency.
entries.customerPayments.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.contraAccount.accountNumber integer 1 The account number.
entries.customerPayments.contraAccount.self string uri A unique reference to the account resource.
entries.customerPayments.contraVatAccount object The account for VAT.
entries.customerPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.customerPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.customerPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.customerPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.customerPayments.currency object The currency for the entry.
entries.customerPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.customerPayments.currency.self string uri A unique link reference to the currency item.
entries.customerPayments.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.customerPayments.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.customer.self string uri A unique reference to the customer resource.
entries.customerPayments.customerInvoice integer 1 Customer invoice number.
entries.customerPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.customerPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.customerPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.customerPayments.departmentalDistribution.distributionType string Type of the distribution
entries.customerPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.customerPayments.employee object Employee that this entry is related to. Requires Project module
entries.customerPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.customerPayments.employee.self string uri A unique link reference to the employee item.
entries.customerPayments.entryType Enum customerPayment Type of the journal entry. This is automatically set to customerPayment.
entries.customerPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.customerPayments.journal object The journal the voucher belongs to.
entries.customerPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.customerPayments.journal.self string uri A unique reference to the journal resource.
entries.customerPayments.remainder number True Remaining amount to be paid.
entries.customerPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.customerPayments.text string 250 Entry description.
entries.customerPayments.voucher object Voucher that the entry belongs to.
entries.customerPayments.voucher.self string uri A unique link reference to the voucher item.
entries.customerPayments.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.financeVouchers array An array containing finance vouchers.
entries.financeVouchers.account object The account used by the entry.
entries.financeVouchers.account.accountNumber integer 1 The account number.
entries.financeVouchers.account.self string uri A unique reference to the account resource.
entries.financeVouchers.amount number
entries.financeVouchers.amountBaseCurrency number The amount in base currency.
entries.financeVouchers.contraAccount object The account used for the funds.
entries.financeVouchers.contraAccount.accountNumber integer 1 The account number.
entries.financeVouchers.contraAccount.self string uri A unique reference to the account resource.
entries.financeVouchers.contraVatAccount object The account for VAT.
entries.financeVouchers.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.financeVouchers.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.financeVouchers.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.financeVouchers.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.financeVouchers.costType object The cost type for this entity.
entries.financeVouchers.costType.costTypeNumber integer The unique identifier of the cost type.
entries.financeVouchers.costType.self string uri A unique link reference to the cost type.
entries.financeVouchers.currency object The currency for the entry.
entries.financeVouchers.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.financeVouchers.currency.self string uri A unique link reference to the currency item.
entries.financeVouchers.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.financeVouchers.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.financeVouchers.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.financeVouchers.departmentalDistribution.distributionType string Type of the distribution
entries.financeVouchers.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.financeVouchers.employee object Employee that this entry is related to. Requires Project module
entries.financeVouchers.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.financeVouchers.employee.self string uri A unique link reference to the employee item.
entries.financeVouchers.entryType Enum financeVoucher Type of the journal entry. This is automatically set to financeVoucher.
entries.financeVouchers.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.financeVouchers.journal object The journal the voucher belongs to.
entries.financeVouchers.journal.journalNumber number 1 Journal number that must be at least 1.
entries.financeVouchers.journal.self string uri A unique reference to the journal resource.
entries.financeVouchers.project object The project the entry is connected to.
entries.financeVouchers.project.projectNumber integer 1 A unique identifier of the project.
entries.financeVouchers.project.self string uri A unique reference to the project resource.
entries.financeVouchers.quantity1 number Requires dimension module.
entries.financeVouchers.quantity2 number Requires dimension module.
entries.financeVouchers.remainder number True Remaining amount to be paid.
entries.financeVouchers.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.financeVouchers.text string 250 Entry description.
entries.financeVouchers.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit1.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.financeVouchers.unit2.self string uri A unique reference to the unit resource.
entries.financeVouchers.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.financeVouchers.vatAccount object The account for VAT.
entries.financeVouchers.vatAccount.self string uri A unique link reference to the vatAccount item.
entries.financeVouchers.vatAccount.vatCode string 5 The unique identifier of the vat account.
entries.financeVouchers.vatAmount number The amount of VAT on the entry. Used if the entry has a VAT account.
entries.financeVouchers.vatAmountBaseCurrency number The amount of VAT on the voucher in base currency.
entries.financeVouchers.voucher object Voucher that the entry belongs to.
entries.financeVouchers.voucher.self string uri A unique link reference to the voucher item.
entries.financeVouchers.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.manualCustomerInvoices array An array containing finance vouchers.
entries.manualCustomerInvoices.amount number
entries.manualCustomerInvoices.amountBaseCurrency number The amount in base currency.
entries.manualCustomerInvoices.contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.contraAccount.accountNumber integer 1 The account number.
entries.manualCustomerInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.manualCustomerInvoices.contraVatAccount object The account for VAT.
entries.manualCustomerInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.manualCustomerInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.manualCustomerInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.manualCustomerInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.manualCustomerInvoices.currency object The currency for the entry.
entries.manualCustomerInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.manualCustomerInvoices.currency.self string uri A unique link reference to the currency item.
entries.manualCustomerInvoices.customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
entries.manualCustomerInvoices.customer.customerNumber integer 999999999 1 The customer number is a positive unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.customer.self string uri A unique reference to the customer resource.
entries.manualCustomerInvoices.customerInvoice integer 1 Customer invoice number.
entries.manualCustomerInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.manualCustomerInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.manualCustomerInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.manualCustomerInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.manualCustomerInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.manualCustomerInvoices.employee object Employee that this entry is related to. Requires Project module
entries.manualCustomerInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.manualCustomerInvoices.employee.self string uri A unique link reference to the employee item.
entries.manualCustomerInvoices.entryType Enum manualCustomerInvoice Type of the journal entry. This is automatically set to manualCustomerInvoice.
entries.manualCustomerInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.manualCustomerInvoices.journal object The journal the voucher belongs to.
entries.manualCustomerInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.manualCustomerInvoices.journal.self string uri A unique reference to the journal resource.
entries.manualCustomerInvoices.remainder number True Remaining amount to be paid.
entries.manualCustomerInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.manualCustomerInvoices.text string 250 Entry description.
entries.manualCustomerInvoices.voucher object Voucher that the entry belongs to.
entries.manualCustomerInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.manualCustomerInvoices.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.supplierInvoices array An array containing finance vouchers.
entries.supplierInvoices.amount number
entries.supplierInvoices.amountBaseCurrency number The amount in base currency.
entries.supplierInvoices.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.contraAccount.accountNumber integer 1 The account number.
entries.supplierInvoices.contraAccount.self string uri A unique reference to the account resource.
entries.supplierInvoices.contraVatAccount object The account for VAT.
entries.supplierInvoices.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierInvoices.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierInvoices.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierInvoices.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierInvoices.costType object The cost type for this entity.
entries.supplierInvoices.costType.costTypeNumber integer The unique identifier of the cost type.
entries.supplierInvoices.costType.self string uri A unique link reference to the cost type.
entries.supplierInvoices.currency object The currency for the entry.
entries.supplierInvoices.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierInvoices.currency.self string uri A unique link reference to the currency item.
entries.supplierInvoices.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierInvoices.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierInvoices.departmentalDistribution.distributionType string Type of the distribution
entries.supplierInvoices.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierInvoices.dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierInvoices.employee object Employee that this entry is related to. Requires Project module
entries.supplierInvoices.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.employee.self string uri A unique link reference to the employee item.
entries.supplierInvoices.entryType Enum supplierInvoice Type of the journal entry. This is automatically set to supplierInvoice.
entries.supplierInvoices.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierInvoices.journal object The journal the voucher belongs to.
entries.supplierInvoices.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierInvoices.journal.self string uri A unique reference to the journal resource.
entries.supplierInvoices.paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
entries.supplierInvoices.paymentDetails.paymentType object A specific payment type on the entry.
entries.supplierInvoices.paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
entries.supplierInvoices.paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
entries.supplierInvoices.project object The project the entry is connected to.
entries.supplierInvoices.project.projectNumber integer 1 A unique identifier of the project.
entries.supplierInvoices.project.self string uri A unique reference to the project resource.
entries.supplierInvoices.quantity1 number Requires dimension module.
entries.supplierInvoices.quantity2 number Requires dimension module.
entries.supplierInvoices.remainder number True Remaining amount to be paid.
entries.supplierInvoices.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierInvoices.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierInvoices.supplier.self string uri A unique self reference of the supplier.
entries.supplierInvoices.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierInvoices.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierInvoices.text string 250 Entry description.
entries.supplierInvoices.unit1 object The first unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit1.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit1.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.unit2 object The second unit of measure applied to the entry. Requires dimension module.
entries.supplierInvoices.unit2.self string uri A unique reference to the unit resource.
entries.supplierInvoices.unit2.unitNumber integer 0 The unique identifier of the unit.
entries.supplierInvoices.voucher object Voucher that the entry belongs to.
entries.supplierInvoices.voucher.self string uri A unique link reference to the voucher item.
entries.supplierInvoices.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
entries.supplierPayments array An array containing finance vouchers.
entries.supplierPayments.amount number
entries.supplierPayments.amountBaseCurrency number The amount in base currency.
entries.supplierPayments.contraAccount object The account used for the funds. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.contraAccount.accountNumber integer 1 The account number.
entries.supplierPayments.contraAccount.self string uri A unique reference to the account resource.
entries.supplierPayments.contraVatAccount object The account for VAT.
entries.supplierPayments.contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
entries.supplierPayments.contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
entries.supplierPayments.contraVatAmount number The amount of VAT on the entry on the contra account.
entries.supplierPayments.contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
entries.supplierPayments.currency object The currency for the entry.
entries.supplierPayments.currency.code string The ISO 4217 3-letter currency code of the entry.
entries.supplierPayments.currency.self string uri A unique link reference to the currency item.
entries.supplierPayments.date string full-date Entry date. Format according to ISO-8601 (YYYY-MM-DD).
entries.supplierPayments.departmentalDistribution object A departmental distribution defines which departments this entry is distributed between. This requires the departments module to be enabled.
entries.supplierPayments.departmentalDistribution.departmentalDistributionNumber integer 1 A unique identifier of the departmental distribution.
entries.supplierPayments.departmentalDistribution.distributionType string Type of the distribution
entries.supplierPayments.departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
entries.supplierPayments.employee object Employee that this entry is related to. Requires Project module
entries.supplierPayments.employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.employee.self string uri A unique link reference to the employee item.
entries.supplierPayments.entryType Enum supplierPayment Type of the journal entry. This is automatically set to supplierPayment.
entries.supplierPayments.exchangeRate number The exchange rate between the base currency and the invoice currency.
entries.supplierPayments.journal object The journal the voucher belongs to.
entries.supplierPayments.journal.journalNumber number 1 Journal number that must be at least 1.
entries.supplierPayments.journal.self string uri A unique reference to the journal resource.
entries.supplierPayments.remainder number True Remaining amount to be paid.
entries.supplierPayments.remainderInDefaultCurrency number True Remaining amount to be paid in default currency.
entries.supplierPayments.supplier object The supplier is the vendor from whom you buy your goods. Either ‘supplier’ or ‘contraAccount’ is required.
entries.supplierPayments.supplier.self string uri A unique self reference of the supplier.
entries.supplierPayments.supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
entries.supplierPayments.supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
entries.supplierPayments.text string 250 Entry description.
entries.supplierPayments.voucher object Voucher that the entry belongs to.
entries.supplierPayments.voucher.self string uri A unique link reference to the voucher item.
entries.supplierPayments.voucher.voucherNumber number 1 Journal voucher number that must be at least 1.
journal object The journal the voucher belongs to.
journal.journalNumber number 1 Journal number that must be at least 1.
journal.self string uri A unique reference to the journal resource.
self string uri A unique reference to the specific voucher.
voucherNumber number 1 Voucher number

GET /journals/:journalNumber/vouchers/:accountingYear-voucherNumber/attachment

Provides file attachment metadata. E.g. number of pages available on the document.

Schema name

journals.journalNumber.vouchers.accountingYear-voucherNumber.attachment.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
createdAt string full-date Date when file has been assigned with the voucher.
description string Note on the attachment.
file string uri A unique link reference to the file attachment.
pages integer Amount of pages associated as attachment with the given voucher.
self string uri A unique link reference to the attachment meta data.

GET /journals/:journalNumber/vouchers/:accountingYear-voucherNumber/attachment/file

Returns the file attachment for the given voucher. File is always returned as .pdf.

POST /journals/:journalNumber/vouchers/:accountingYear-voucherNumber/attachment/file

var form = new FormData();
form.append("", "/path/to/the/file.png");

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/journals/1/vouchers/2017-1/attachment/file",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "cache-control": "no-cache"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Allows attaching a document to the voucher. Supported formats are: .jpg, .jpeg, .pdf, .gif and .png. Please note that for the file upload “application/json” is not a valid content-type. Upload of binary data requires the content-type header to be “multipart/form-data”. Some clients do not automatically set boundaries on the multipart/form-data and for these you will need to define “multipart/form-data; boundary= ;” where boundary defines the file part of the multipart stream. Maximum file size is 9.0 MB per request.

PATCH /journals/:journalNumber/vouchers/:accountingYear-voucherNumber/attachment/file

Allows you to add more pages to the file, that is associated with the voucher. In case a file is not already present, it will be created (as with the POST operation). Please refer to POST documentation for the implementation details. Maximum file size is 9.0 MB per request.

DELETE /journals/:journalNumber/vouchers/:accountingYear-voucherNumber/attachment/file

Removes the entire file that is associated with the given voucher.

GET /journals/:journalNumber/entries

Returns a collection of all entries in the journal, sorted by entry type.

Schema name

journals.journalNumber.entries.get.schema.json

Return type

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

Required properties

account.self, contraAccount.self, contraVatAccount.self, currency.self, customer.self, employee.self, journal.self, paymentDetails.paymentType.self, self, supplier.self, voucher.accountingYear.self, voucher.self

Filterable properties

account.accountNumber, amount, amountDefaultCurrency, contraAccount.accountNumber, contraVatAccount.vatCode, contraVatAmount, currency.code, customer.customerNumber, date, employee.employeeNumber, entryType, exchangeRate, journalEntryNumber, supplier.supplierNumber, text, voucher.voucherNumber

Sortable properties

account.accountNumber, amount, amountDefaultCurrency, contraAccount.accountNumber, contraVatAccount.vatCode, contraVatAmount, currency.code, customer.customerNumber, date, employee.employeeNumber, entryType, exchangeRate, journalEntryNumber, supplier.supplierNumber, text, voucher.voucherNumber

Properties

Name Type Format Read-only Max length Max value Min value Values Description
account object The account used by the entry.
account.accountNumber integer 1 The account number.
account.self string uri A unique reference to the account resource.
amount number
amountDefaultCurrency number The amount of VAT on the entry on the contra account in base currency.
contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
contraAccount.accountNumber integer 1 The account number.
contraAccount.self string uri A unique reference to the account resource.
contraVatAccount object The account for VAT.
contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
contraVatAmount number The amount of VAT on the entry on the contra account.
contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
costType object The cost type for this entity.
costType.costTypeNumber integer The unique identifier of the cost type.
costType.self string uri A unique link reference to the cost type.
currency object The currency for the entry.
currency.code string The ISO 4217 3-letter currency code of the entry.
currency.self string uri A unique link reference to the currency item.
customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
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.
customerInvoice integer 1 Customer invoice number.
date string full-date Entry date. Format 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.distributionType string Type of the distribution
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
employee object Employee that this entry is related to. Requires Project module
employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
employee.self string uri A unique link reference to the employee item.
entryType Enum financeVoucher, supplierInvoice, supplierPayment, customerPayment, manualCustomerInvoice Entry type of the entry.
exchangeRate number The exchange rate between the base currency and the invoice currency.
journal object The journal the entry belongs to.
journal.journalNumber number 1 Journal number that must be at least 1.
journal.self string uri A unique reference to the journal resource.
journalEntryNumber integer Unique journal number
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
project object The project the entry is connected to.
project.projectNumber integer A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
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 entry.
supplier object The supplier this entry is based on.
supplier.self string uri A unique reference to the supplier resource.
supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
templates object Templates allowing easy entry creation, its existance depends on the type of the entry.
templates.account string uri The unique reference to the finance voucher template using account
templates.accountAndContraAccount string uri The unique reference to the finance voucher template using account and contra account
templates.contraAccount string uri The unique reference to the finance voucher template using contra account
templates.customerPayment string uri The unique reference to the finance voucher template
text string Text on the entry
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
voucher object Voucher that the entry belongs to.
voucher.accountingYear object The accounting year the voucher belongs to. Together with the voucherNumber it is a unique identifier for the voucher.
voucher.accountingYear.self string uri A unique reference to the accounting year resource.
voucher.accountingYear.year string A unique identifier of the accounting year.
voucher.self string uri A unique link reference to the voucher item.
voucher.voucherNumber number 999999999 1 Journal voucher number that must be at least 1.

GET /journals/:journalNumber/entries/:entryNumber

Returns an entry on the given journal.

Schema name

journals.journalNumber.entries.entryNumber.get.schema.json

Return type

This method returns a single object

Required properties

account.self, contraAccount.self, contraVatAccount.self, currency.self, customer.self, employee.self, journal.self, paymentDetails.paymentType.self, self, supplier.self, voucher.accountingYear.self, voucher.self

Filterable properties

account.accountNumber, amount, amountDefaultCurrency, contraAccount.accountNumber, contraVatAccount.vatCode, contraVatAmount, currency.code, customer.customerNumber, date, employee.employeeNumber, entryType, exchangeRate, journalEntryNumber, supplier.supplierNumber, text, voucher.voucherNumber

Sortable properties

account.accountNumber, amount, amountDefaultCurrency, contraAccount.accountNumber, contraVatAccount.vatCode, contraVatAmount, currency.code, customer.customerNumber, date, employee.employeeNumber, entryType, exchangeRate, journalEntryNumber, supplier.supplierNumber, text, voucher.voucherNumber

Properties

Name Type Format Read-only Max length Max value Min value Values Description
account object The account used by the entry.
account.accountNumber integer 1 The account number.
account.self string uri A unique reference to the account resource.
amount number
amountDefaultCurrency number The amount of VAT on the entry on the contra account in base currency.
contraAccount object The account used for the funds. Either ‘customer’ or ‘contraAccount’ is required.
contraAccount.accountNumber integer 1 The account number.
contraAccount.self string uri A unique reference to the account resource.
contraVatAccount object The account for VAT.
contraVatAccount.self string uri A unique link reference to the contraVatAccount item.
contraVatAccount.vatCode string 5 The unique identifier of the contra vat account.
contraVatAmount number The amount of VAT on the entry on the contra account.
contraVatAmountInBaseCurrency number The amount of VAT on the entry on the contra account in base currency.
costType object The cost type for this entity.
costType.costTypeNumber integer The unique identifier of the cost type.
costType.self string uri A unique link reference to the cost type.
currency object The currency for the entry.
currency.code string The ISO 4217 3-letter currency code of the entry.
currency.self string uri A unique link reference to the currency item.
customer object The customer this entry is based on. Either ‘customer’ or ‘contraAccount’ is required.
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.
customerInvoice integer 1 Customer invoice number.
date string full-date Entry date. Format 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.distributionType string Type of the distribution
departmentalDistribution.self string uri A unique reference to the departmental distribution resource.
dueDate string full-date The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
employee object Employee that this entry is related to. Requires Project module
employee.employeeNumber integer 1 A unique numerical identifier with a maximum of 9 digits.
employee.self string uri A unique link reference to the employee item.
entryType Enum financeVoucher, supplierInvoice, supplierPayment, customerPayment, manualCustomerInvoice Entry type of the entry.
exchangeRate number The exchange rate between the base currency and the invoice currency.
journal object The journal the entry belongs to.
journal.journalNumber number 1 Journal number that must be at least 1.
journal.self string uri A unique reference to the journal resource.
journalEntryNumber integer Unique journal number
paymentDetails object Payment details associated with the supplier invoice. Each payment detail contains two keys that are required. For the +71 type, fiSupplierNo and ocrLine is expected. For the +73 type, fiSupplierNo and message is expected. For the +04 type, giroAccount and ocrLine is expected. For the bank transfer type, accountNo and message is expected. For the IBAN type, ibanSwift and message is expected. For the +75 type, fiSupplierNo and ocrLineMessage is expected. Please refer to the schema for validation rules details.
paymentDetails.paymentType object A specific payment type on the entry.
paymentDetails.paymentType.paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
paymentDetails.paymentType.self string uri A unique link reference to the payment type item.
project object The project the entry is connected to.
project.projectNumber integer A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quantity1 number Requires dimension module.
quantity2 number Requires dimension module.
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 entry.
supplier object The supplier this entry is based on.
supplier.self string uri A unique reference to the supplier resource.
supplier.supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
supplierInvoiceNumber string 30 The unique identifier of the supplier invoice gotten from the supplier.
templates object Templates allowing easy entry creation, its existance depends on the type of the entry.
templates.account string uri The unique reference to the finance voucher template using account
templates.accountAndContraAccount string uri The unique reference to the finance voucher template using account and contra account
templates.contraAccount string uri The unique reference to the finance voucher template using contra account
templates.customerPayment string uri The unique reference to the finance voucher template
text string Text on the entry
unit1 object The first unit of measure applied to the entry. Requires dimension module.
unit1.self string uri A unique reference to the unit resource.
unit1.unitNumber integer 0 The unique identifier of the unit.
unit2 object The second unit of measure applied to the entry. Requires dimension module.
unit2.self string uri A unique reference to the unit resource.
unit2.unitNumber integer 0 The unique identifier of the unit.
voucher object Voucher that the entry belongs to.
voucher.accountingYear object The accounting year the voucher belongs to. Together with the voucherNumber it is a unique identifier for the voucher.
voucher.accountingYear.self string uri A unique reference to the accounting year resource.
voucher.accountingYear.year string A unique identifier of the accounting year.
voucher.self string uri A unique link reference to the voucher item.
voucher.voucherNumber number 999999999 1 Journal voucher number that must be at least 1.

DELETE /journals/:journalNumber/entries/:entryNumber

Removes an entry from the given journal.

GET /journals/:journalNumber/templates

Returns the templates available for journal entries. Templates are used to simplifiy the resource creation that can be quite complex to build. Please note that templates return entry objects that must be wrapped in a voucher object and POSTed to /vouchers.

Schema name

journals.journalNumber.templates.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
financeVoucher string uri The unique reference to the finance voucher template
manualCustomerInvoice string uri The unique reference to the manual customer invoice template
self string uri The unique self reference of the templates resource.

GET /journals/:journalNumber/templates/financeVoucher

{
   "accountingYear": {
     "year": "2017"
   },
   "journal": {
     "journalNumber": 1
   },
   "entries": {
     "financeVouchers": [
        Template data goes here
     ]
   }
}

Returns a template that sets the boilerplate for a finance voucher entry. It can take account and contra account into consideration. Please note that in order to be able to POST it, the template data must be wrapped in a voucher object.

Schema name

journals.journalNumber.templates.financeVoucher.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
account string uri The unique reference to the finance voucher template using account
contraAccount string uri The unique reference to the finance voucher template using contra account
self string uri The unique self reference of the finance voucher template collection.

GET /journals/:journalNumber/templates/manualCustomerInvoice

{
   "accountingYear": {
     "year": "2017"
   },
   "journal": {
     "journalNumber": 1
   },
   "entries": {
     "manualCustomerInvoices": [
        Template data goes here
     ]
   }
}

Returns a template that sets the boilerplate for a manual customer invoice. It can take account and contra account into consideration. Please note that in order to be able to POST it, the template data must be wrapped in a voucher object.

Schema name

journals.journalNumber.templates.manualCustomerInvoice.get.schema.json

Return type

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

Required properties

customer.self, self

Properties

Name Type Format Max value Min value Description
customer object Specific customer
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 manual customer invoice with the specific customer resource.
metaData object Information about possible actions, endpoints and resource paths related to the endpoint.
pagination object Information about the pagination.
self string uri The unique self reference of the manual customer invoice template collection.

Layouts

Layouts are a collection of templates and used for assigning a layout to a sales document (invoice, order, quotation). Template modification is done via e-conomic web application.

For more information please look at the Danish e-copedia article https://www.e-conomic.dk/support/artikler/om-design-og-layout.

GET /layouts

Schema name

layouts.get.schema.json

Return type

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

Required property

self

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

Required property

self

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.

Orders

The orders endpoint is where you go to read and create orders.

We provide several collections indicating various states of the order e.g. “sent”, “archived” and “draft”.

The endpoint is exposed in similar fashion to /invoices, which makes it easy to adopt if you are using /invoices today.

Current implementation suports various operations including marking order an as sent as well as transitioning from order to invoice.

The inventory module is not supported in the current version of /orders. This means that data creation and modification on resources in /orders will not be available on agreements that have inventory module enabled. There is currently no exposure of orders that are in the inventory delivery flow (“transfer to delivery/invoicing”).

For more information about orders please look at the Danish e-copedia article http://wiki2.e-conomic.dk/salg/fakturering-ordrer.

GET /orders

This is the root for the orders endpoint. From here you can navigate to draft, sent and archived orders.

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

Schema name

orders.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
archived string uri A reference to all archived orders.
drafts string uri A reference to all draft orders.
self string uri A reference to the orders resource.
sent string uri A reference to all sent orders.

GET /orders/drafts

This returns a collection of all draft orders.

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

Schema name

orders.drafts.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Default sorting

orderNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer being orderd.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the order was updated. The date is formatted according to ISO-8601.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, orderWeekStartingSunday, orderWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this order.
pdf.download string uri References a pdf representation of this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the specific draft order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
templates object True References to all templates on this draft invoice.
templates.self string uri The self reference to the order templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the order to an invoice draft.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

POST /orders/drafts/

POST'ing to it allows you to create a new order draft.

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

var order = {
    "date": "2018-03-01",
    "currency": "DKK",
    "exchangeRate": 100,
    "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": [
        {
            "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
        },
        {
            "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
        },
        {
            "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(order, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/orders/drafts",
        dataType: "json",
        headers: headers,
        data: JSON.stringify(order),
        contentType: 'application/json; charset=UTF-8',
        type: "POST"
    }).always(function (data) {
        $('#output').text(JSON.stringify(data, null, 4));
    });
});

Schema name

orders.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 order.
customer object The customer of the order.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
deliveryLocation.deliveryLocationNumber integer 1 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 order 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 order 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 order currency. If no exchange rate is supplied, the system will get the current daily rate, unless the order currency is the same as the base currency, in which case it will be set to 100.
grossAmount number True The total order amount in the order currency after all taxes and discounts have been applied.
layout object The layout used by the order.
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 order lines.
lines.accrual object The accrual for the order.
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.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.distributionType string Type of the 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. Please note, that when setting existing products, description field is required. While setting non-existing product, description field can remain empty.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 1 The line number is a unique number within the order.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the order line in base currency.
lines.marginPercentage number The margin on the order line expressed as a percentage.
lines.product object The product or service offered on the order 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 order line.
lines.sortKey integer 1 A sort key used to sort the lines in ascending order within the order.
lines.unit object The unit of measure applied to the order 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 order currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the order line in the order currency.
marginInBaseCurrency number True The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number True The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number True The total order amount in the order currency before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer True 0 The number of days of credit on the order. 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 order.
pdf.download string uri The unique reference of the pdf representation for this draft order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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 'European Article Number’ of the actual recipient.
recipient.mobilePhone string The phone number the order was sent to (if applicable).
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The primary sales person is a reference to the employee who sold the goods on the order.
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 True The total rounding error, if any, on the order in base currency.
vatAmount number True The total amount of VAT on the order in the order currency. This will have the same sign as net amount

GET /orders/drafts/:orderNumber

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

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

Schema name

orders.drafts.orderNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, layout.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
attachment string uri A unique reference to the attachment file on the given draft order.
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer of the order.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order, 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the order was updated. The date is formatted according to ISO-8601.
layout object Layout to be applied for draft orders 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.
lines array An array containing the specific order 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.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.distributionType string Type of the 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 order.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the order line in base currency.
lines.marginPercentage number The margin on the order line expressed as a percentage.
lines.product object The product or service offered on the order 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 999999999999999999 0.01 The number of units of goods on the order line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the order.
lines.totalNetAmount number The total net amount on the order line in the order currency.
lines.unit object The unit of measure applied to the order 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 order currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the order line in the order currency.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this order.
pdf.download string uri The unique reference of the pdf representation for this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the draft order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
templates object True References to all templates on this order.
templates.self string uri The self reference to the order templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the order to an invoice draft.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

PUT /orders/drafts/:orderNumber

This endpoint allows for replacing already existing order

Schema name

orders.drafts.orderNumber.put.schema.json

Return type

This method returns a single object

Required properties

lines.unit.name, recipient

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer of the order.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order, 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lines array An array containing the specific order 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.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.distributionType string Type of the 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 order.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the order line in base currency.
lines.marginPercentage number The margin on the order line expressed as a percentage.
lines.product object The product or service offered on the order 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 order line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the order.
lines.unit object The unit of measure applied to the order 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 order currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the order line in the order currency.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this order.
pdf.download string uri The unique reference of the pdf representation for this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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 ‘European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the draft order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
templates object True References to all templates on this order.
templates.self string uri The self reference to the order templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the order to an invoice draft.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

DELETE /orders/drafts/:orderNumber

Deletes a draft order. The delete operation will return a 204 status code. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /orders/drafts/:orderNumber/attachment

Returns the reference to the attached file on a given order.

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

GET /orders/drafts/:orderNumber/attachment/file

Returns the file attachment for the given order. File is always returned as .pdf.

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

POST /orders/drafts/:orderNumber/attachment/file

Allows attaching a document to the order. Only valid PDF files are supported. Please note that for the file upload “application/json” is not a valid content-type. Upload of binary data requires the content-type header to be “multipart/form-data”. Some clients do not automatically set boundaries on the multipart/form-data and for these you will need to define “multipart/form-data; boundary= ;” where boundary defines the file part of the multipart stream. Returns status code 201 upon successful creation. Maximum file size is 9.0 MB per request.

var form = new FormData();
form.append("", "path/to/the/file.jpg");

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/orders/drafts/123/attachment/file",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "cache-control": "no-cache"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

DELETE /orders/drafts/:orderNumber/attachment/file

Removes the entire attached document that is associated with the given order. Returns status code 204 upon successful deletion. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /orders/drafts/:orderNumber/templates

Returns the templates available for the order. Templates are used to simplifiy the resource creation that can be quite complex to build.

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

Schema name

orders.drafts.orderNumber.templates.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
self string uri The unique self reference of the templates resource.
upgradeInstructions string uri The unique reference to the upgrade instructions template

GET /orders/drafts/:orderNumber/templates/upgrade-instructions/draftInvoice

Upgrade to invoice draft

Returns a draftInvoice entity that can be POSTed to /invoices/drafts to upgrade the order to an invoice draft. An order residing in /orders/sent, will be archived in /orders/archived upon upgrading it to invoice draft. Inventory module: Please note that draft invoices do not result in inventory reservation.

$.ajax({
    url: "https://restapi.e-conomic.com/orders/drafts/1/templates/upgrade-instructions/draftInvoice",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

GET /orders/sent

This returns a collection of all sent orders.

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

Schema name

orders.sent.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Default sorting

orderNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer being orderd.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the order was updated. The date is formatted according to ISO-8601.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, orderWeekStartingSunday, orderWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this order.
pdf.download string uri References a pdf representation of this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the specific sent order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
templates object True References to all templates on this sent order.
templates.self string uri The self reference to the order templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the order to an invoice draft.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

POST /orders/sent

Register order as sent

POST the full order document to /orders/sent to register the order as sent. All data on a sent order must remain unchanged (cannot be modified).

Cancel order sent status:

POST the full order document to orders/drafts/ to cancel the sent status.

Send via email

Sending sales documents via email is not supported through API. To send an order or invoice via email, you must fetch the necessary data/PDF via the API and email either the file or a link to a self-hosted endpoint via own email solution.

GET /orders/sent/:orderNumber

This endpoint provides you with the entire document for a specific sent order.

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

Schema name

orders.sent.orderNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer of the order.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order, 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the order was updated. The date is formatted according to ISO-8601.
lines array An array containing the specific order 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.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.distributionType string Type of the 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 order.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the order line in base currency.
lines.marginPercentage number The margin on the order line expressed as a percentage.
lines.product object The product or service offered on the order 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 999999999999999999 0.01 The number of units of goods on the order line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the order.
lines.unit object The unit of measure applied to the order 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 order currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the order line in the order currency.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this order.
pdf.download string uri The unique reference of the pdf representation for this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European 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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the sent order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
templates object True References to all templates on this sent order.
templates.self string uri The self reference to the order templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the order to an invoice draft.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

DELETE /orders/sent/:orderNumber

Deletes a sent order. The delete operation will return a 204 status code. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /orders/archived

This returns a collection of all archived orders.
An archived order is an order that was first registered as sent and then upgraded to invoice draft.

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

Schema name

orders.archived.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Default sorting

orderNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer being orderd.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, orderWeekStartingSunday, orderWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this order.
pdf.download string uri References a pdf representation of this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the specific draft order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

GET /orders/archived/:orderNumber

This endpoint provides you with the entire document for a specific archived order.
An archived order is an order that was first registered as sent and then upgraded to invoice draft.

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

Schema name

orders.archived.orderNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, orderNumber, 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, soap.orderHandle.id

Properties

Name Type Format Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the order in the base currency of the agreement.
currency string The ISO 4217 currency code of the order.
customer object The customer of the order.
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 Order issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the order. 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 order
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 order, 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 order 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 order currency.
grossAmount number The total order amount in the order currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total order amount in the base currency of the agreement after all taxes and discounts have been applied.
lines array An array containing the specific order 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.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.distributionType string Type of the 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 order.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the order line in base currency.
lines.marginPercentage number The margin on the order line expressed as a percentage.
lines.product object The product or service offered on the order 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 999999999999999999 0.01 The number of units of goods on the order line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending order within the order.
lines.unit object The unit of measure applied to the order 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 order currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the order line in the order currency.
marginInBaseCurrency number The difference between the cost price of the items on the order and the sales net order amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net order amount is less than the cost price this number will be negative.
netAmount number The total order amount in the order currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total order amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the order.
notes.heading string 250 The order heading. Usually displayed at the top of the order.
notes.textLine1 string 1000 The first line of supplementary text on the order. 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 order. This is usually displayed as a footer on the order.
orderNumber integer 999999999 1 A reference number for the order document.
paymentTerms object The terms of payment for the order.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the order. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this order.
pdf.download string uri The unique reference of the pdf representation for this order.
project object The project the order 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 order. 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 order may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this order 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European 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 order.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the order.
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 order.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the order. 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 order in base currency.
self string uri The unique self reference of the archived order.
soap object References a SOAP order handle.
soap.orderHandle object The unique reference of the SOAP order handle.
soap.orderHandle.id integer ID of the SOAP order handle.
vatAmount number The total amount of VAT on the order in the order currency. This will have the same sign as net amount

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 Danish e-copedia article http://wiki2.e-conomic.dk/indstillinger/kategorier-og-enheder-betalingsbetingelser.

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 properties

contraAccountForPrepaidAmount.self, contraAccountForRemainderAmount.self, creditCardCompany.self, paymentTermsType, self

Properties

Name Type Format Max length Max value Min value 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 999999999 1 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 properties

contraAccountForPrepaidAmount.self, contraAccountForRemainderAmount.self, creditCardCompany.self, paymentTermsType, self

Properties

Name Type Format Max length Max value Min value 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 999999999 1 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 Max value Min value 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 999999999 1 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 Max value Min value 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 999999999 1 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

Payment Types define which type of payment and details are supplied when defining an entry on a voucher in the journals.

Each type of payment lets you define payment details specific to that type. As this unfortunately requires a JSON schema version that we do not support yet you may consult this table:

Type Name paymentDetail1 (String, max 50 chars) paymentDetail2 (see for reqs)
1  +71  fiSupplierNo  ocrLine (Int, 15 chars)
2  +73  fiSupplierNo message (String, 5-100 chars)
5  +04  giroAccount  ocrLine (Int, 16 chars)
7  Bank Transfer accountNo  message (String, 5-100 chars)
10  IBAN  ibanSwift  message (String, 5-100 chars)
14  Entry only - -
17  +75  fiSupplierNo ocrLineMessage (see below)

ocrLineMessage: OCR/optional message must be either a number (2-16 digits) or else use the format ‘number/text’. When using number/text format: ocrLine (Int, 2-16 chars) Message (max 140 chars).

GET /payment-types

This endpoint provides you with a collection of payment types.

Schema name

payment-types.get.schema.json

Return type

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

Required properties

name, self

Properties

Name Type Format Max length Min length Min value Description
name string 50 1 The payment type name.
paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
self string uri A unique link reference to the payment type item.

GET /payment-types/:paymentTypeNumber

Returns a specific payment type.

Schema name

payment-types.paymentTypeNumber.get.schema.json

Return type

This method returns a single object

Required properties

name, self

Properties

Name Type Format Max length Min length Min value Description
name string 50 1 The payment type name.
paymentTypeNumber integer 1 The payment type number is a positive unique numerical identifier.
self string uri A unique link reference to the payment type item.

Product Groups

GET /product-groups

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

Schema name

product-groups.get.schema.json

Return type

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

Required properties

accrual.accountsSummed.fromAccount.self, accrual.accountsSummed.toAccount.self, accrual.contraAccount.self, accrual.totalFromAccount.self, accrual.vatAccount.self, self

Properties

Name Type Format Read-only Max length Min length Values Description
accrual object True A reference to the accrual account this product group is connected to.
accrual.accountingYears string uri True A link to a list of accounting years for which the account is usable.
accrual.accountNumber integer True Unique number identifying the accruals account.
accrual.accountsSummed array True An array of the account intervals used for calculating the total for this account.
accrual.accountsSummed.fromAccount object True The first account in the interval.
accrual.accountsSummed.fromAccount.accountNumber integer True Account number of the first account in the interval.
accrual.accountsSummed.fromAccount.self string uri True The unique self link of the first account in the interval.
accrual.accountsSummed.toAccount object True The last account in the interval.
accrual.accountsSummed.toAccount.accountNumber integer True Account number of the last account in the interval.
accrual.accountsSummed.toAccount.self string uri True The unique self link of the last account in the interval.
accrual.accountType Enum True profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
accrual.balance number True The current balance of the accruals account.
accrual.barred boolean True Shows if the account is barred from being used.
accrual.blockDirectEntries boolean True Determines if the account can be manually updated with entries.
accrual.contraAccount object True The default contra account of the account.
accrual.contraAccount.accountNumber integer True Account number of the contra account.
accrual.contraAccount.self string uri True The unique self link of the contra account.
accrual.debitCredit Enum True debit, credit Describes the default update type of the account.
accrual.draftBalance number True The current balance of the account including draft (not yet booked) entries.
accrual.name string True 125 The name of the account.
accrual.totalFromAccount object True The account from which the sum total for this account is calculated.
accrual.totalFromAccount.accountNumber integer True Account number of the first account.
accrual.totalFromAccount.self string uri True The unique self link of the first account.
accrual.vatAccount object True
accrual.vatAccount.self string uri True The unique self link of the VAT code.
accrual.vatAccount.vatCode string True 5 The VAT code of the VAT account for this account.
inventoryEnabled boolean True States if the product group is inventory enabled or not.
name string 50 1 Descriptive name of the product group.
productGroupNumber integer Unique number identifying the product group.
products string uri True A reference to the products in this product group resource.
salesAccounts string uri True A reference to the sales accounts in this product group resource.
self string uri A unique reference to this product group resource.

GET /product-groups/:productGroupNumber

This endpoint allows you to fetch a specific product group.

Schema name

product-groups.productGroupNumber.get.schema.json

Return type

This method returns a single object

Required properties

accrual.accountsSummed.fromAccount.self, accrual.accountsSummed.toAccount.self, accrual.contraAccount.self, accrual.totalFromAccount.self, accrual.vatAccount.self, self

Properties

Name Type Format Read-only Max length Min length Values Description
accrual object True A reference to the accrual account this product group is connected to.
accrual.accountingYears string uri True A link to a list of accounting years for which the account is usable.
accrual.accountNumber integer True Unique number identifying the accruals account.
accrual.accountsSummed array True An array of the account intervals used for calculating the total for this account.
accrual.accountsSummed.fromAccount object True The first account in the interval.
accrual.accountsSummed.fromAccount.accountNumber integer True Account number of the first account in the interval.
accrual.accountsSummed.fromAccount.self string uri True The unique self link of the first account in the interval.
accrual.accountsSummed.toAccount object True The last account in the interval.
accrual.accountsSummed.toAccount.accountNumber integer True Account number of the last account in the interval.
accrual.accountsSummed.toAccount.self string uri True The unique self link of the last account in the interval.
accrual.accountType Enum True profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
accrual.balance number True The current balance of the accruals account.
accrual.barred boolean True Shows if the account is barred from being used.
accrual.blockDirectEntries boolean True Determines if the account can be manually updated with entries.
accrual.contraAccount object True The default contra account of the account.
accrual.contraAccount.accountNumber integer True Account number of the contra account.
accrual.contraAccount.self string uri True The unique self link of the contra account.
accrual.debitCredit Enum True debit, credit Describes the default update type of the account.
accrual.draftBalance number True The current balance of the account including draft (not yet booked) entries.
accrual.name string True 125 The name of the account.
accrual.totalFromAccount object True The account from which the sum total for this account is calculated.
accrual.totalFromAccount.accountNumber integer True Account number of the first account.
accrual.totalFromAccount.self string uri True The unique self link of the first account.
accrual.vatAccount object True
accrual.vatAccount.self string uri True The unique self link of the VAT code.
accrual.vatAccount.vatCode string True 5 The VAT code of the VAT account for this account.
inventoryEnabled boolean True States if the product group is inventory enabled or not.
name string 50 1 Descriptive name of the product group.
productGroupNumber integer Unique number identifying the product group.
products string uri True A reference to the products in this product group resource.
salesAccounts string uri True A reference to the sales accounts in this product group resource.
self string uri A unique reference to this product group resource.

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

This endpoint allows you to fetch a list of sales accounts that belongs to this product group.

Schema name

product-groups.productGroupNumber.sales-accounts.get.schema.json

Return type

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

Required properties

salesAccount.accountsSummed.fromAccount.self, salesAccount.accountsSummed.toAccount.self, salesAccount.contraAccount.self, salesAccount.totalFromAccount.self, salesAccount.vatAccount.self, self, vatZone.self

Filterable properties

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

Sortable properties

salesAccount.accountNumber, salesAccount.accountType, salesAccount.balance, salesAccount.blockDirectEntries, salesAccount.debitCredit, salesAccount.name

Default sorting

salesAccount.accountNumber : ascending

Properties

Name Type Format Max length Values Description
salesAccount object A schema for information about an account.
salesAccount.accountingYears string uri A link to a list of accounting years for which the account is usable.
salesAccount.accountNumber integer The account’s number.
salesAccount.accountsSummed array An array of the account intervals used for calculating the total for this account.
salesAccount.accountsSummed.fromAccount object The first account in the interval.
salesAccount.accountsSummed.fromAccount.accountNumber integer Account number of the first account in the interval.
salesAccount.accountsSummed.fromAccount.self string uri The unique self link of the first account in the interval.
salesAccount.accountsSummed.toAccount object The last account in the interval.
salesAccount.accountsSummed.toAccount.accountNumber integer Account number of the last account in the interval.
salesAccount.accountsSummed.toAccount.self string uri The unique self link of the last account in the interval.
salesAccount.accountType Enum profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
salesAccount.balance number The current balance of the account.
salesAccount.barred boolean Shows if the account is barred from being used.
salesAccount.blockDirectEntries boolean Determines if the account can be manually updated with entries.
salesAccount.contraAccount object The default contra account of the account.
salesAccount.contraAccount.accountNumber integer Account number of the contra account.
salesAccount.contraAccount.self string uri The unique self link of the contra account.
salesAccount.debitCredit Enum debit, credit Describes the default update type of the account.
salesAccount.draftBalance number The current balance of the account including draft (not yet booked) entries.
salesAccount.name string 125 The name of the account.
salesAccount.self string uri A unique reference to the account resource.
salesAccount.totalFromAccount object The account from which the sum total for this account is calculated.
salesAccount.totalFromAccount.accountNumber integer Account number of the first account.
salesAccount.totalFromAccount.self string uri The unique self link of the first account.
salesAccount.vatAccount object
salesAccount.vatAccount.self string uri The unique self link of the VAT code.
salesAccount.vatAccount.vatCode string 5 The VAT code of the VAT account for this account.
self string uri The unique self reference of the product groups accounts collection.
vatZone object A specific vat zone.
vatZone.enabledForCustomer boolean If this value is true, then the vat zone can be used for a customer.
vatZone.enabledForSupplier boolean If this value is true, then the vat zone can be used for a supplier.
vatZone.name string 50 The name of the vat zone.
vatZone.self string uri A unique link reference to the vat zone item.
vatZone.vatZoneNumber integer A unique identifier of the vat zone.

GET /product-groups/:productGroupNumber/products

This endpoint allows you to fetch a list of products that belongs to this product group.

Schema name

product-groups.productGroupNumber.products.get.schema.json

Return type

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

Required properties

departmentalDistribution.self, name, productGroup, productGroup.accrual.accountsSummed.fromAccount.self, productGroup.accrual.accountsSummed.toAccount.self, productGroup.accrual.contraAccount.self, productGroup.accrual.totalFromAccount.self, productGroup.accrual.vatAccount.self, productGroup.self, productNumber, self, unit.self

Filterable properties

barCode, barred, costPrice, departmentalDistribution.departmentalDistributionNumber, description, inventory.grossWeight, inventory.netWeight, inventory.packageVolume, inventory.recommendedCostPrice, lastUpdated, name, productNumber, recommendedPrice, salesPrice, unit.unitNumber

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 Values 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.distributionType string Type of the 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.inventoryLastUpdated string full-date True The last time this product was updated with regards to inventory.
inventory.netWeight number True The net 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.
inventory.recommendedCostPrice number The recommendedCostPrice of the product.
invoices object A collection of convenience links to invoices that contains this product.
invoices.booked string uri A unique reference to the booked invoices containing this product.
invoices.drafts string uri A unique reference to the draft invoices containing this product.
lastUpdated string full-date True 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.accrual object True A reference to the accrual account this product group is connected to.
productGroup.accrual.accountingYears string uri True A link to a list of accounting years for which the account is usable.
productGroup.accrual.accountNumber integer True Unique number identifying the accruals account.
productGroup.accrual.accountsSummed array True An array of the account intervals used for calculating the total for this account.
productGroup.accrual.accountsSummed.fromAccount object True The first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.accountNumber integer True Account number of the first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.self string uri True The unique self link of the first account in the interval.
productGroup.accrual.accountsSummed.toAccount object True The last account in the interval.
productGroup.accrual.accountsSummed.toAccount.accountNumber integer True Account number of the last account in the interval.
productGroup.accrual.accountsSummed.toAccount.self string uri True The unique self link of the last account in the interval.
productGroup.accrual.accountType Enum True profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
productGroup.accrual.balance number True The current balance of the accruals account.
productGroup.accrual.barred boolean True Shows if the account is barred from being used.
productGroup.accrual.blockDirectEntries boolean True Determines if the account can be manually updated with entries.
productGroup.accrual.contraAccount object True The default contra account of the account.
productGroup.accrual.contraAccount.accountNumber integer True Account number of the contra account.
productGroup.accrual.contraAccount.self string uri True The unique self link of the contra account.
productGroup.accrual.debitCredit Enum True debit, credit Describes the default update type of the account.
productGroup.accrual.draftBalance number True The current balance of the account including draft (not yet booked) entries.
productGroup.accrual.name string True 125 The name of the account.
productGroup.accrual.totalFromAccount object True The account from which the sum total for this account is calculated.
productGroup.accrual.totalFromAccount.accountNumber integer True Account number of the first account.
productGroup.accrual.totalFromAccount.self string uri True The unique self link of the first account.
productGroup.accrual.vatAccount object True
productGroup.accrual.vatAccount.self string uri True The unique self link of the VAT code.
productGroup.accrual.vatAccount.vatCode string True 5 The VAT code of the VAT account for this account.
productGroup.inventoryEnabled boolean True 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 True A reference to the products in this product group resource.
productGroup.salesAccounts string uri True 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.

Products

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

For more information please look at the Danish e-copedia article http://wiki2.e-conomic.dk/salg/opret-en-vare-ydelse.

GET /products

This endpoint allows you to fetch a collection of all products.

Schema name

products.get.schema.json

Return type

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

Required properties

departmentalDistribution.self, name, productGroup, productGroup.accrual.accountsSummed.fromAccount.self, productGroup.accrual.accountsSummed.toAccount.self, productGroup.accrual.contraAccount.self, productGroup.accrual.totalFromAccount.self, productGroup.accrual.vatAccount.self, productGroup.self, productNumber, self, unit.self

Filterable properties

barCode, barred, costPrice, departmentalDistribution.departmentalDistributionNumber, description, inventory.grossWeight, inventory.netWeight, inventory.packageVolume, inventory.recommendedCostPrice, lastUpdated, name, productGroup.productGroupNumber, productNumber, recommendedPrice, salesPrice, unit.unitNumber

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 Values 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.distributionType string Type of the 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.inventoryLastUpdated string full-date True The last time this product was updated with regards to inventory.
inventory.netWeight number True The net 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.
inventory.recommendedCostPrice number The recommendedCostPrice of the product.
invoices object A collection of convenience links to invoices that contains this product.
invoices.booked string uri A unique reference to the booked invoices containing this product.
invoices.drafts string uri A unique reference to the draft invoices containing this product.
lastUpdated string full-date True The last time the product was updated, either directly or through inventory changed. 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.accrual object True A reference to the accrual account this product group is connected to.
productGroup.accrual.accountingYears string uri True A link to a list of accounting years for which the account is usable.
productGroup.accrual.accountNumber integer True Unique number identifying the accruals account.
productGroup.accrual.accountsSummed array True An array of the account intervals used for calculating the total for this account.
productGroup.accrual.accountsSummed.fromAccount object True The first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.accountNumber integer True Account number of the first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.self string uri True The unique self link of the first account in the interval.
productGroup.accrual.accountsSummed.toAccount object True The last account in the interval.
productGroup.accrual.accountsSummed.toAccount.accountNumber integer True Account number of the last account in the interval.
productGroup.accrual.accountsSummed.toAccount.self string uri True The unique self link of the last account in the interval.
productGroup.accrual.accountType Enum True profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
productGroup.accrual.balance number True The current balance of the accruals account.
productGroup.accrual.barred boolean True Shows if the account is barred from being used.
productGroup.accrual.blockDirectEntries boolean True Determines if the account can be manually updated with entries.
productGroup.accrual.contraAccount object True The default contra account of the account.
productGroup.accrual.contraAccount.accountNumber integer True Account number of the contra account.
productGroup.accrual.contraAccount.self string uri True The unique self link of the contra account.
productGroup.accrual.debitCredit Enum True debit, credit Describes the default update type of the account.
productGroup.accrual.draftBalance number True The current balance of the account including draft (not yet booked) entries.
productGroup.accrual.name string True 125 The name of the account.
productGroup.accrual.totalFromAccount object True The account from which the sum total for this account is calculated.
productGroup.accrual.totalFromAccount.accountNumber integer True Account number of the first account.
productGroup.accrual.totalFromAccount.self string uri True The unique self link of the first account.
productGroup.accrual.vatAccount object True
productGroup.accrual.vatAccount.self string uri True The unique self link of the VAT code.
productGroup.accrual.vatAccount.vatCode string True 5 The VAT code of the VAT account for this account.
productGroup.inventoryEnabled boolean True 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 True A reference to the products in this product group resource.
productGroup.salesAccounts string uri True 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

This endpoint allows you to fetch a specific product.

Schema name

products.productNumber.get.schema.json

Return type

This method returns a single object

Required properties

departmentalDistribution.self, name, productGroup, productGroup.accrual.accountsSummed.fromAccount.self, productGroup.accrual.accountsSummed.toAccount.self, productGroup.accrual.contraAccount.self, productGroup.accrual.totalFromAccount.self, productGroup.accrual.vatAccount.self, productGroup.self, productNumber, self, unit.self

Filterable properties

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

Sortable properties

barCode, 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 Values 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.distributionType string Type of the 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 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 The net 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.
inventory.recommendedCostPrice number The recommendedCostPrice of the product. The field is required if the Inventory module is enabled, but the validation cannot throw errors since it would cause issues for people already using the Inventory module. If no value is provided it is set to 0.0.
invoices object A collection of convenience links to invoices that contains this product.
invoices.booked string uri A unique reference to the booked invoices containing this product.
invoices.drafts string uri A unique reference to the draft invoices containing this product.
lastUpdated string full-date True The last time the product was updated, either directly or through inventory changed. 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.accrual object True A reference to the accrual account this product group is connected to.
productGroup.accrual.accountingYears string uri True A link to a list of accounting years for which the account is usable.
productGroup.accrual.accountNumber integer True Unique number identifying the accruals account.
productGroup.accrual.accountsSummed array True An array of the account intervals used for calculating the total for this account.
productGroup.accrual.accountsSummed.fromAccount object True The first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.accountNumber integer True Account number of the first account in the interval.
productGroup.accrual.accountsSummed.fromAccount.self string uri True The unique self link of the first account in the interval.
productGroup.accrual.accountsSummed.toAccount object True The last account in the interval.
productGroup.accrual.accountsSummed.toAccount.accountNumber integer True Account number of the last account in the interval.
productGroup.accrual.accountsSummed.toAccount.self string uri True The unique self link of the last account in the interval.
productGroup.accrual.accountType Enum True profitAndLoss, status, totalFrom, heading, headingStart, sumInterval, sumAlpha The type of account in the chart of accounts.
productGroup.accrual.balance number True The current balance of the accruals account.
productGroup.accrual.barred boolean True Shows if the account is barred from being used.
productGroup.accrual.blockDirectEntries boolean True Determines if the account can be manually updated with entries.
productGroup.accrual.contraAccount object True The default contra account of the account.
productGroup.accrual.contraAccount.accountNumber integer True Account number of the contra account.
productGroup.accrual.contraAccount.self string uri True The unique self link of the contra account.
productGroup.accrual.debitCredit Enum True debit, credit Describes the default update type of the account.
productGroup.accrual.draftBalance number True The current balance of the account including draft (not yet booked) entries.
productGroup.accrual.name string True 125 The name of the account.
productGroup.accrual.totalFromAccount object True The account from which the sum total for this account is calculated.
productGroup.accrual.totalFromAccount.accountNumber integer True Account number of the first account.
productGroup.accrual.totalFromAccount.self string uri True The unique self link of the first account.
productGroup.accrual.vatAccount object True
productGroup.accrual.vatAccount.self string uri True The unique self link of the VAT code.
productGroup.accrual.vatAccount.vatCode string True 5 The VAT code of the VAT account for this account.
productGroup.inventoryEnabled boolean True 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 True A reference to the products in this product group resource.
productGroup.salesAccounts string uri True 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

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/products",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "content-type": "application/json",
  },
  "data": {
        'productNumber': '500',
        'name': 'My test product',
        'costPrice': 50,
        'salesPrice': 100,
        'productGroup': {
            'productGroupNumber': 1
        }
    }
  }

$.ajax(settings).done(function (response) {
  console.log(response);
});

This endpoint allows you to create a new product.

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 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.distributionType string Type of the 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 net 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.
inventory.recommendedCostPrice number The recommendedCostPrice of the product. The field is required if the Inventory module is enabled.
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

This endpoint allows you to update an existing product.

Schema name

products.productNumber.put.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 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.distributionType string Type of the 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 net 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.
inventory.recommendedCostPrice number The recommendedCostPrice of the product. The field is required if the Inventory module is enabled.
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.

DELETE /products/:productNumber

This endpoint allows you to delete an existing product. Please note that you can’t delete a product that is in use. It will return HttpStatusCode.NoContent (204) on success.

Currency specific product prices are excluding base currency price. The base currency price is available as sales price on the product.

GET /products/:productNumber/pricing/currency-specific-sales-prices

This endpoint allows you to fetch a collection of all currency specific product prices belonging to a specific product. This does not include base currency price. Base currency price is available as sales price on the product

Schema name

products.productNumber.pricing.currency-specific-sales-prices.get.schema.json

Return type

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

Required properties

currency.code, currency.self, price, product.productNumber, product.self, self

Filterable properties

currency.code, price, product.productNumber

Sortable properties

currency.code, price, product.productNumber

Properties

Name Type Format Max length Min length Description
currency object A reference to the currency this product price is in.
currency.code string The ISO 4217 currency code of the invoice.
currency.self string uri A unique reference to the currency resource.
price number The price of the product.
product object A reference to the product this product price belongs to.
product.productNumber string 25 1 Unique alphanumeric product number.
product.self string uri A unique reference to the product resource.
self string uri A unique reference to this product-prices resource.

GET /products/:productNumber/pricing/currency-specific-sales-prices/:currencyCode

This endpoint allows you to fetch a single currency specific product price belonging to a specific product.

Schema name

products.productNumber.pricing.currency-specific-sales-prices.currencyCode.get.schema.json

Return type

This method returns a single object

Required properties

currency.code, currency.self, price, product.productNumber, product.self, self

Filterable properties

currency.code, price, product.productNumber

Sortable properties

currency.code, price, product.productNumber

Properties

Name Type Format Max length Min length Description
currency object A reference to the currency this product price is in.
currency.code string The ISO 4217 currency code of the invoice.
currency.self string uri A unique reference to the currency resource.
price number The price of the product.
product object A reference to the product this product price belongs to.
product.productNumber string 25 1 Unique alphanumeric product number.
product.self string uri A unique reference to the product resource.
self string uri A unique reference to this product-prices resource.

POST /products/:productNumber/pricing/currency-specific-sales-prices

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/products/1/pricing/currency-specific-sales-prices",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "content-type": "application/json",
  },
  "data": {
        'price': 88,
        'currency': {
            'code': 'SEK'
        },
        'product': {
            'productNumber": '1'
        }
    }
  }

$.ajax(settings).done(function (response) {
  console.log(response);
});

This endpoint allows you to create a new currency specific product price on a product.

Schema name

products.productNumber.pricing.currency-specific-sales-prices.post.schema.json

Return type

This method returns a single object

Required properties

currency.code, price

Filterable properties

currency.code, price, product.productNumber

Sortable properties

currency.code, price, product.productNumber

Properties

Name Type Format Max length Min length Description
currency object A reference to the currency this product price is in.
currency.code string The ISO 4217 currency code of the invoice.
currency.self string uri A unique reference to the currency resource.
price number The price of the product.
product object A reference to the product this product price belongs to.
product.productNumber string 25 1 Unique alphanumeric product number.
product.self string uri A unique reference to the product resource.

PUT /products/:productNumber/pricing/currency-specific-sales-prices/:currencyCode

This endpoint allows you to update a currency specific product price belonging to a specific product.

Schema name

products.productNumber.pricing.currency-specific-sales-prices.currencyCode.put.schema.json

Return type

This method returns a single object

Required properties

currency.code, price

Filterable properties

currency.code, price, product.productNumber

Sortable properties

currency.code, price, product.productNumber

Properties

Name Type Format Max length Min length Description
currency object A reference to the currency this product price is in.
currency.code string The ISO 4217 currency code of the invoice.
currency.self string uri A unique reference to the currency resource.
price number The price of the product.
product object A reference to the product this product price belongs to.
product.productNumber string 25 1 Unique alphanumeric product number.
product.self string uri A unique reference to the product resource.
self string uri A unique reference to this product-prices resource.

DELETE /products/:productNumber/pricing/currency-specific-sales-prices/:currencyCode

This endpoint allows you to delete an existing currency specific product price. It will return HttpStatusCode.NoContent (204) on success.

Quotes

The quotes endpoint is where you go to read and create quotes.

We provide several collections indicating various states of the quote e.g. “sent”, “archived” and “draft”.

The endpoint is exposed in similar fashion to /orders, which makes it easy to adopt if you are using /orders today.

Current implementation supports various operations including marking quote an as sent as well as transitioning from quote to order or invoice.

The inventory module is not supported in the current version of /quotes. This means that data creation and modification on resources in /quotes will not be available on agreements that have inventory module enabled.

For more information about quotes please look at the Danish e-copedia article https://www.e-conomic.dk/support/artikler/knapper-og-felter-i-salg#tilbud.

GET /quotes

This is the root for the quotes endpoint. From here you can navigate to draft, sent and archived quotes.

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

Schema name

quotes.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
archived string uri A reference to all archived quotes.
drafts string uri A reference to all draft quotes.
self string uri A reference to the quotes resource.
sent string uri A reference to all sent quotes.

GET /quotes/drafts

This returns a collection of all draft quotes.

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

Schema name

quotes.drafts.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Default sorting

quoteNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer being quoted.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the quote was updated. The date is formatted according to ISO-8601.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, quoteWeekStartingSunday, quoteWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this quote.
pdf.download string uri References a pdf representation of this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the specific draft quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
templates object True References to all templates on this draft invoice.
templates.self string uri The self reference to the quote templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the quote to an invoice draft.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

POST /quotes/drafts/

POST'ing to it allows you to create a new quote draft.

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

var quote = {
    "date": "2018-03-01",
    "currency": "DKK",
    "exchangeRate": 100,
    "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": [
        {
            "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
        },
        {
            "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
        },
        {
            "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(quote, null, 4));
    $.ajax({
        url: "https://restapi.e-conomic.com/quotes/drafts",
        dataType: "json",
        headers: headers,
        data: JSON.stringify(quote),
        contentType: 'application/json; charset=UTF-8',
        type: "POST"
    }).always(function (data) {
        $('#output').text(JSON.stringify(data, null, 4));
    });
});

Schema name

quotes.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 quote.
customer object The customer of the quote.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
deliveryLocation.deliveryLocationNumber integer 1 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 quote 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 quote 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 quote currency. If no exchange rate is supplied, the system will get the current daily rate, unless the quote currency is the same as the base currency, in which case it will be set to 100.
grossAmount number True The total quote amount in the quote currency after all taxes and discounts have been applied.
layout object The layout used by the quote.
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 quote lines.
lines.accrual object The accrual for the quote.
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.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.distributionType string Type of the 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. Please note, that when setting existing products, description field is required. While setting non-existing product, description field can remain empty.
lines.discountPercentage number A line discount expressed as a percentage.
lines.lineNumber integer 1 The line number is a unique number within the quote.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the quote line in base currency.
lines.marginPercentage number The margin on the quote line expressed as a percentage.
lines.product object The product or service offered on the quote 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 quote line.
lines.sortKey integer 1 A sort key used to sort the lines in ascending quote within the quote.
lines.unit object The unit of measure applied to the quote 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 quote currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the quote line in the quote currency.
marginInBaseCurrency number True The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number True The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number True The total quote amount in the quote currency before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer True 0 The number of days of credit on the quote. 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 quote.
pdf.download string uri The unique reference of the pdf representation for this draft quote.
project object The project the quote 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 quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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 'European Article Number’ of the actual recipient.
recipient.mobilePhone string The phone number the quote was sent to (if applicable).
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The primary sales person is a reference to the employee who sold the goods on the quote.
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 True The total rounding error, if any, on the quote in base currency.
vatAmount number True The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

GET /quotes/drafts/:quoteNumber

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

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

Schema name

quotes.drafts.quoteNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, layout.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
attachment string uri A unique reference to the attachment file on the given draft quote.
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer of the quote.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote, 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the quote was updated. The date is formatted according to ISO-8601.
layout object Layout to be applied for draft quotes 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.
lines array An array containing the specific quote 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.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.distributionType string Type of the 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 quote.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the quote line in base currency.
lines.marginPercentage number The margin on the quote line expressed as a percentage.
lines.product object The product or service offered on the quote 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 999999999999999999 0.01 The number of units of goods on the quote line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending quote within the quote.
lines.totalNetAmount number The total net amount on the quote line in the quote currency.
lines.unit object The unit of measure applied to the quote 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 quote currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the quote line in the quote currency.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this quote.
pdf.download string uri The unique reference of the pdf representation for this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the draft quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
templates object True References to all templates on this quote.
templates.self string uri The self reference to the quote templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the quote to an invoice draft.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

PUT /quotes/drafts/:quoteNumber

This endpoint allows for replacing already existing quote

Schema name

quotes.drafts.quoteNumber.put.schema.json

Return type

This method returns a single object

Required properties

lines.unit.name, recipient

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer of the quote.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote, 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lines array An array containing the specific quote 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.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.distributionType string Type of the 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 quote.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the quote line in base currency.
lines.marginPercentage number The margin on the quote line expressed as a percentage.
lines.product object The product or service offered on the quote 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 quote line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending quote within the quote.
lines.unit object The unit of measure applied to the quote 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 quote currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the quote line in the quote currency.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this quote.
pdf.download string uri The unique reference of the pdf representation for this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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 ‘European Article Number’ of the actual recipient.
recipient.name string 250 The name of the actual recipient.
recipient.nemHandelType Enum ean, corporateIdentificationNumber, pNumber, peppol Chosen NemHandel type used for e-invoicing.
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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the draft quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
templates object True References to all templates on this quote.
templates.self string uri The self reference to the quote templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the quote to an invoice draft.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

DELETE /quotes/drafts/:quoteNumber

Deletes a draft quote. The delete operation will return a 204 status code. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /quotes/drafts/:quoteNumber/attachment

Returns the reference to the attached file on a given quote.

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

GET /quotes/drafts/:quoteNumber/attachment/file

Returns the file attachment for the given quote. File is always returned as .pdf.

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

POST /quotes/drafts/:quoteNumber/attachment/file

Allows attaching a document to the quote. Only valid PDF files are supported. Please note that for the file upload “application/json” is not a valid content-type. Upload of binary data requires the content-type header to be “multipart/form-data”. Some clients do not automatically set boundaries on the multipart/form-data and for these you will need to define “multipart/form-data; boundary= ;” where boundary defines the file part of the multipart stream. Returns status code 201 upon successful creation. Maximum file size is 9.0 MB per request.

var form = new FormData();
form.append("", "path/to/the/file.jpg");

var settings = {
  "crossDomain": true,
  "url": "https://restapi.e-conomic.com/quotes/drafts/123/attachment/file",
  "method": "POST",
  "headers": {
    "x-appsecrettoken": "demo",
    "x-agreementgranttoken": "demo",
    "cache-control": "no-cache"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

DELETE /quotes/drafts/:quoteNumber/attachment/file

Removes the entire attached document that is associated with the given quote. Returns status code 204 upon successful deletion. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /quotes/drafts/:quoteNumber/templates

Returns the templates available for the quote. Templates are used to simplifiy the resource creation that can be quite complex to build.

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

Schema name

quotes.drafts.quoteNumber.templates.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Description
self string uri The unique self reference of the templates resource.
upgradeInstructions string uri The unique reference to the upgrade instructions template

GET /quotes/drafts/:quoteNumber/templates/upgrade-instructions/order

Upgrade to order draft

Returns an order entity that can be POSTed to /orders/drafts to upgrade the quote to an order draft. A quote residing in /quotes/sent, will be archived in /quotes/archived upon upgrading it to order draft.

$.ajax({
    url: "https://restapi.e-conomic.com/quotes/drafts/1/templates/upgrade-instructions/order",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

GET /quotes/drafts/:quoteNumber/templates/upgrade-instructions/draftInvoice

Upgrade to invoice draft

Returns a draftInvoice entity that can be POSTed to /invoices/drafts to upgrade the quote to an invoice draft. A quote residing in /quotes/sent, will be archived in /quotes/archived upon upgrading it to invoice draft. Inventory module: Please note that draft invoices do not result in inventory reservation.

$.ajax({
    url: "https://restapi.e-conomic.com/quotes/drafts/1/templates/upgrade-instructions/draftInvoice",
    dataType: "json",
    headers: {
        'X-AppSecretToken': "demo",
        'X-AgreementGrantToken': "demo",
        'Content-Type': "application/json"
    },
    type: "GET"
})
    .always(function (data) {
    $("#output").text(JSON.stringify(data, null, 4));
});

GET /quotes/sent

This returns a collection of all sent quotes.

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

Schema name

quotes.sent.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Default sorting

quoteNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer being quoted.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the quote was updated. The date is formatted according to ISO-8601.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, quoteWeekStartingSunday, quoteWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this quote.
pdf.download string uri References a pdf representation of this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the specific sent quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
templates object True References to all templates on this sent quote.
templates.self string uri The self reference to the quote templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the quote to an invoice draft.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

POST /quotes/sent

Register quote as sent

POST the full quote document to /quotes/sent to register the quote as sent. All data on a sent quote must remain unchanged (cannot be modified).

Cancel quote sent status:

POST the full quote document to quotes/drafts/ to cancel the sent status.

Send via email

Sending sales documents via email is not supported through API. To send a quote or invoice via email, you must fetch the necessary data/PDF via the API and email either the file or a link to a self-hosted endpoint via own email solution.

GET /quotes/sent/:quoteNumber

This endpoint provides you with the entire document for a specific sent quote.

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

Schema name

quotes.sent.quoteNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self, templates.self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, lastUpdated, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer of the quote.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote, 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lastUpdated string full-date True The last time the quote was updated. The date is formatted according to ISO-8601.
lines array An array containing the specific quote 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.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.distributionType string Type of the 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 quote.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the quote line in base currency.
lines.marginPercentage number The margin on the quote line expressed as a percentage.
lines.product object The product or service offered on the quote 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 999999999999999999 0.01 The number of units of goods on the quote line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending quote within the quote.
lines.unit object The unit of measure applied to the quote 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 quote currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the quote line in the quote currency.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this quote.
pdf.download string uri The unique reference of the pdf representation for this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European 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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the sent quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
templates object True References to all templates on this sent quote.
templates.self string uri The self reference to the quote templates resource.
templates.upgradeInstructions string uri The self reference to the document to POST to /invoices/drafts to upgrade the quote to an invoice draft.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

DELETE /quotes/sent/:quoteNumber

Deletes a sent quote. The delete operation will return a 204 status code. Operation is not idempotent, which means that on the consecutive calls it will be returning status code 404.

GET /quotes/archived

This returns a collection of all archived quotes.
An archived quote is a quote that was first registered as sent and then upgraded to invoice draft.

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

Schema name

quotes.archived.get.schema.json

Return type

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

Required properties

customer.self, deliveryLocation.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Default sorting

quoteNumber : ascending

Properties

Name Type Format Read-only Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer being quoted.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, quoteWeekStartingSunday, quoteWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object True References to a pdf representation of this quote.
pdf.download string uri References a pdf representation of this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The 'European 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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the specific draft quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

GET /quotes/archived/:quoteNumber

This endpoint provides you with the entire document for a specific archived quote.
An archived quote is a quote that was first registered as sent and then upgraded to invoice draft.

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

Schema name

quotes.archived.quoteNumber.get.schema.json

Return type

This method returns a single object

Required properties

customer.self, deliveryLocation.self, lines.departmentalDistribution.self, lines.product.self, lines.unit.name, lines.unit.self, paymentTerms.self, project.self, recipient.attention.self, recipient.vatZone.self, references.customerContact.customer.self, references.customerContact.self, references.salesPerson.self, references.vendorReference.self, self

Filterable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Sortable properties

currency, customer.customerNumber, date, delivery.address, delivery.city, delivery.country, delivery.deliveryDate, delivery.deliveryTerms, delivery.zip, deliveryLocation.deliveryLocationNumber, exchangeRate, notes.heading, notes.textLine1, notes.textLine2, paymentTerms.paymentTermsNumber, quoteNumber, 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, soap.quoteHandle.id

Properties

Name Type Format Max length Max value Min value Values Description
costPriceInBaseCurrency number The total cost of the items on the quote in the base currency of the agreement.
currency string The ISO 4217 currency code of the quote.
customer object The customer of the quote.
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 quote issue date. Format according to ISO-8601 (YYYY-MM-DD).
delivery object The actual place of delivery for the goods on the quote. 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 quote
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 quote, 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 quote 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 quote currency.
grossAmount number The total quote amount in the quote currency after all taxes and discounts have been applied.
grossAmountInBaseCurrency number The total quote amount in the base currency of the agreement after all taxes and discounts have been applied.
lines array An array containing the specific quote 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.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.distributionType string Type of the 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 quote.
lines.marginInBaseCurrency number The difference between the net price and the cost price on the quote line in base currency.
lines.marginPercentage number The margin on the quote line expressed as a percentage.
lines.product object The product or service offered on the quote 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 999999999999999999 0.01 The number of units of goods on the quote line.
lines.sortKey integer 0 A sort key used to sort the lines in ascending quote within the quote.
lines.unit object The unit of measure applied to the quote 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 quote currency.
lines.unitNetPrice number The price of 1 unit of the goods or services on the quote line in the quote currency.
marginInBaseCurrency number The difference between the cost price of the items on the quote and the sales net quote amount in base currency.
marginPercentage number The margin expressed as a percentage. If the net quote amount is less than the cost price this number will be negative.
netAmount number The total quote amount in the quote currency before all taxes and discounts have been applied.
netAmountInBaseCurrency number The total quote amount in the base currency of the agreement before all taxes and discounts have been applied.
notes object Notes on the quote.
notes.heading string 250 The quote heading. Usually displayed at the top of the quote.
notes.textLine1 string 1000 The first line of supplementary text on the quote. 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 quote. This is usually displayed as a footer on the quote.
paymentTerms object The terms of payment for the quote.
paymentTerms.daysOfCredit integer 0 The number of days of credit on the quote. 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 Enum net, invoiceMonth, paidInCash, prepaid, dueDate, factoring, invoiceWeekStartingSunday, invoiceWeekStartingMonday, creditcard The type of payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
pdf object References a pdf representation of this quote.
pdf.download string uri The unique reference of the pdf representation for this quote.
project object The project the quote is connected to.
project.projectNumber integer 1 A unique identifier of the project.
project.self string uri A unique reference to the project resource.
quoteNumber integer 999999999 1 A reference number for the quote document.
recipient object The actual recipient of the quote. 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 quote may be ACME Headquarters, but the recipient of the quote may be ACME IT.
recipient.address string 250 The street address of the actual recipient.
recipient.attention object The person to whom this quote 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.cvr string 40 The Corporate Identification Number of the recipient for example CVR in Denmark.
recipient.ean string 13 The ‘European 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 quote.
references.customerContact object The customer contact is a reference to the employee at the customer to contact regarding the quote.
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 quote.
references.salesPerson object The sales person is a reference to the employee who sold the goods on the quote. 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 quote in base currency.
self string uri The unique self reference of the archived quote.
soap object References a SOAP quote handle.
soap.quoteHandle object The unique reference of the SOAP quote handle.
soap.quoteHandle.id integer ID of the SOAP quote handle.
vatAmount number The total amount of VAT on the quote in the quote currency. This will have the same sign as net amount

Root

The root endpoint contains a list of resources (endpoints) that are available via our REST API, as well as convenience links to the getting started guides.

GET /

This endpoint lists all available endpoints among which the convenience links to our getting started guides.

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

Required properties

application.requiredRoles.self, application.self, modules.self, self, user.language.self

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.
application object The company’s bank settings.
application.appNumber integer The unique identifier of the application.
application.appPublicToken string The public token of the application used for other e-conomic customers to use the application.
application.created string full-date The date the application was created. Format: YYYY-MM-DD.
application.name string The name of the application.
application.requiredRoles array The roles required to use this application.
application.requiredRoles.name string The name of the role.
application.requiredRoles.roleNumber integer The unique identifier of the role.
application.requiredRoles.self string uri A unique link reference to the role resource.
application.self string uri A unique link reference to the application resource.
bankInformation object The company’s bank settings.
bankInformation.bankAccountNumber string The account number in the company’s bank.
bankInformation.bankGiroNumber string The company’s bankgiro number. Only used in Sweden and Norway.
bankInformation.bankName string The name of the bank.
bankInformation.bankSortCode string The registration number of the bank account.
bankInformation.pbsCustomerGroupNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
bankInformation.pbsFiSupplierNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
canSendElectronicInvoice boolean A boolean indicating if the company is setup to send electronic invoices. See http://wiki2.e-conomic.dk/salg/ean-faktura (Danish) for more information.
company object The currently logged in user’s company.
company.addressLine1 string The company’s address.
company.addressLine2 string The company’s address.
company.attention string The company’s primary contact person.
company.city string The company’s city.
company.companyIdentificationNumber string The company’s company identification number. For example CVR in Denmark.
company.country string The company’s country.
company.email string The company’s email.
company.name string The company’s name.
company.phoneNumber string The company’s phone number.
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.
company.website string The company’s web site url.
company.zip string The company’s postcode.
companyAffiliation string The affiliation of the agreement. This can be ‘E-conomic’ or ‘Developer’.
modules array The modules the company have active.
modules.moduleNumber integer The unique identifier of the module.
modules.name string The name of the module.
modules.self string uri A unique link reference to the module resource.
self string uri A unique link reference to the self resource.
settings object Other settings.
settings.baseCurrency string 3 The ISO 4217 code of the company’s base currency.
settings.defaultPaymentTerm string The default payment term for the customers of the company.
settings.internationalLedger string If this value is ‘true’ then the international ledger is used.
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.email string The email of the user.
user.language object The currently logged in user’s language.
user.language.culture string The IETF language tag.
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.name string The name of the user.
userName string The name of the the currently logged in user.

PUT /self/user

This endpoint allows you to update your user information.

Schema name

self.user.put.schema.json

Return type

This method returns a single object

Required properties

agreementNumber, email, language, language.culture, language.languageNumber, language.name, loginId, name

Properties

Name Type Format Description
agreementNumber integer The unique identifier of the account of the currently logged user.
email string The email of the user.
language object The currently logged in user’s language.
language.culture string The IETF language tag.
language.languageNumber integer The unique identifier of the language.
language.name string The name of the language.
language.self string uri A unique link reference to the language resource.
loginId string The unique identifier of the user.
name string The name of the user.

PUT /self/company

This endpoint allows you to update your company information.

Schema name

self.company.put.schema.json

Return type

This method returns a single object

Required properties

addressLine1, attention, city, email, name, phoneNumber, zip

Properties

Name Type Description
addressLine1 string The company’s address.
addressLine2 string The company’s address.
attention string The company’s primary contact person.
city string The company’s city.
companyIdentificationNumber string The company’s identification number. For example CVR in Denmark.
country string The company’s country.
email string The company’s email.
name string The company’s name.
phoneNumber string The company’s phone number.
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.
website string The company’s web site url.
zip string The company’s postcode.

PUT /self/company/bankinformation

This endpoint allows you to update your company bank information.

Schema name

self.company.bankinformation.put.schema.json

Return type

This method returns a single object

Required property

pbsCustomerGroupNumber

Properties

Name Type Max length Min length Description
bankAccountNumber string The account number in the company’s bank.
bankGiroNumber string The company’s bankgiro number. Only used in Sweden and Norway.
bankgirotCustomerNumber string The company’s bank Giro number. Only used in Sweden.
bankName string The name of the bank.
bankSortCode string The registration number of the bank account.
eanLocationNumber string 13 13 The company’s EAN number.
giro string 20 The company’s Giro number. Only used in Denmark.
ibanNumber string 50 The company’s IBAN number.
pbsCustomerGroupNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
pbsFiSupplierNumber string Number used when registering an invoice to betalingsservice. Only used in Denmark.
pbsNumber string 8 The company’s PBS number.
plusGiroNumber string The company’s Giro plus number.
swiftCode string 20 The company’s SWIFT code.

Suppliers

Suppliers are the vendors from whom you buy your goods.

For more information please look at the Danish e-copedia article http://wiki2.e-conomic.dk/regnskab/soegning-og-lister-leverandoerer-ny-leverandoer.

GET /suppliers

This endpoint provides you with a collection of suppliers.

Schema name

suppliers.get.schema.json

Return type

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

Required properties

currency, layout, layout.self, paymentTerms, paymentTerms.self, supplierGroup.self, vatZone, vatZone.self

Filterable properties

address, bankAccount, barred, city, corporateIdentificationNumber, country, currency, defaultInvoiceText, email, name, supplierGroup.supplierGroupNumber, supplierNumber, zip

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 255 Address for the supplier including street and number.
attention object Optional contact person at the supplier.
attention.self string uri A unique reference to the supplier contact resource.
attention.supplierContactNumber integer Unique number identifying the supplier contact.
bankAccount string 50 The supplier’s bank account.
barred boolean Boolean indication of whether the supplier is barred.
city string 50 The supplier’s city.
contacts string uri A unique reference to the supplier contacts collection.
corporateIdentificationNumber string 40 Company Identification Number. For example CVR in Denmark.
costAccount object Cost account for the supplier.
costAccount.accountNumber integer True Unique number identifying the cost account.
costAccount.self string uri A unique reference to the account resource.
country string 50 The supplier’s country.
currency string 3 3 Default currency used when purchasing from the supplier.
defaultInvoiceText string 100 The default invoice text for 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 to be applied for invoices and other documents for this supplier.
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 supplier name.
paymentTerms object 1 The default payment terms for the supplier.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
phone string 20 The supplier’s phone number.
remittanceAdvice object Remittance advice for the supplier.
remittanceAdvice.creditorId string 50 Supplier payment details.
remittanceAdvice.paymentType object The default payment type for the supplier.
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.
salesPerson.employeeNumber integer 1 Unique identifier of the employee.
salesPerson.self string uri A unique reference to the employee resource.
self string A unique self reference of the supplier.
supplierContact object Reference to main contact employee at supplier.
supplierContact.self string uri A unique reference to the supplier contact resource.
supplierContact.supplierContactNumber integer Unique number identifying the supplier contact.
supplierGroup object 1 The supplier group of the supplier.
supplierGroup.self string uri A unique reference to the supplier group resource.
supplierGroup.supplierGroupNumber integer Unique number identifying the supplier group.
supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
vatZone object Indicates whether the supplier is located domestically, in Europe or elsewhere abroad
vatZone.self string uri A unique reference to the vat zone.
vatZone.vatZoneNumber integer Unique identifier of the vat zone.
zip string 10 The suppliers zipcode.

GET /suppliers/:supplierNumber

Returns a specific supplier.

Schema name

suppliers.supplierNumber.get.schema.json

Return type

This method returns a single object

Required properties

currency, layout, layout.self, paymentTerms, paymentTerms.self, supplierGroup.self, supplierNumber, vatZone, vatZone.self

Properties

Name Type Format Read-only Max length Min length Max value Min value Description
address string 255 Address for the supplier including street and number.
attention object Optional contact person at the supplier.
attention.number integer Unique number identifying the supplier contact.
attention.self string uri A unique reference to the supplier contact resource.
bankAccount string 50 The supplier’s bank account.
barred boolean Boolean indication of whether the supplier is barred.
city string 50 The supplier’s city.
contacts string uri A unique reference to the supplier contacts collection.
corporateIdentificationNumber string 40 Company Identification Number. For example CVR in Denmark.
costAccount object Cost account for the supplier.
costAccount.accountNumber integer True Unique number identifying the cost account.
costAccount.self string uri A unique reference to the account resource.
country string 50 The supplier’s country.
currency string 3 3 Default currency used when purchasing from the supplier.
defaultInvoiceText string 100 The default invoice text for 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 to be applied for invoices and other documents for this supplier.
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 supplier name.
paymentTerms object 1 The default payment terms for the supplier.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
phone string 20 The supplier’s phone number.
remittanceAdvice object Remittance advice for the supplier.
remittanceAdvice.creditorId string 50 Supplier payment details.
remittanceAdvice.paymentType object The default payment type for the supplier.
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.
salesPerson.employeeNumber integer 1 Unique identifier of the employee.
salesPerson.self string uri A unique reference to the employee resource.
self string A unique self reference of the supplier.
supplierContact object Reference to main contact employee at supplier.
supplierContact.number integer Unique number identifying the supplier contact.
supplierContact.self string uri A unique reference to the supplier contact resource.
supplierGroup object 1 The supplier group of the supplier.
supplierGroup.self string uri A unique reference to the supplier group resource.
supplierGroup.supplierGroupNumber integer Unique number identifying the supplier group.
supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
vatZone object Indicates whether the supplier is located domestically, in Europe or elsewhere abroad
vatZone.self string uri A unique reference to the vat zone.
vatZone.vatZoneNumber integer Unique identifier of the vat zone.
zip string 10 The suppliers zipcode.

GET /suppliers/:supplierNumber/contacts

GET /supplier-groups

GET /supplier-groups/:supplierGroupId

PUT /suppliers/:supplierNumber

This endpoint allows you to update an existing supplier.

Schema name

suppliers.supplierNumber.put.schema.json

Return type

This method returns a single object

Required properties

currency, name, paymentTerms, supplierNumber, vatZone

Properties

Name Type Format Max length Min length Max value Min value Description
address string 255 Address for the supplier including street and number.
attention object Optional contact person at the supplier.
attention.self string uri A unique reference to the supplier contact resource.
attention.supplierContactNumber integer Unique number identifying the supplier contact.
bankAccount string 50 The supplier’s 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 for the supplier.
costAccount.accountNumber integer Unique number identifying the cost account.
costAccount.self string uri A unique reference to the account resource.
country string 50 The supplier’s country.
currency string 3 3 Default currency used when purchasing from the supplier.
defaultInvoiceText string 100 The default invoice text for 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 to be applied for invoices and other documents for this supplier.
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 supplier name.
paymentTerms object 1 The default payment terms for the supplier.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
phone string 20 The supplier’s phone number.
remittanceAdvice object Remittance advice for the supplier.
remittanceAdvice.creditorId string 50 Supplier payment details.
remittanceAdvice.paymentType object The default payment type for the supplier.
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.
salesPerson.employeeNumber integer 1 Unique identifier of the employee.
salesPerson.self string uri A unique reference to the employee resource.
self string A unique self reference of the supplier.
supplierContact object Reference to main contact employee at supplier.
supplierContact.self string uri A unique reference to the supplier contact resource.
supplierContact.supplierContactNumber integer Unique number identifying the supplier contact.
supplierGroup object 1 The supplier group of the supplier.
supplierGroup.self string uri A unique reference to the supplier group resource.
supplierGroup.supplierGroupNumber integer Unique number identifying the supplier group.
supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
vatZone object Indicates whether the supplier is located domestically, in Europe or elsewhere abroad
vatZone.self string uri A unique reference to the vat zone.
vatZone.vatZoneNumber integer Unique identifier of the vat zone.
zip string 10 The suppliers zipcode.

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 Max value Min value Description
address string 255 Address for the supplier including street and number.
attention object Optional contact person at the supplier.
attention.self string uri A unique reference to the supplier contact resource.
attention.supplierContactNumber integer Unique number identifying the supplier contact.
bankAccount string 50 The supplier’s 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 for the supplier.
costAccount.accountNumber integer Unique number identifying the cost account.
costAccount.self string uri A unique reference to the account resource.
country string 50 The supplier’s country.
currency string 3 3 Default currency used when purchasing from the supplier.
defaultInvoiceText string 100 The default invoice text for 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 to be applied for invoices and other documents for this supplier.
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 supplier name.
paymentTerms object The default payment terms for the supplier.
paymentTerms.paymentTermsNumber integer 1 A unique identifier of the payment term.
paymentTerms.self string uri A unique reference to the payment term resource.
phone string 20 The supplier’s phone number.
remittanceAdvice object Remittance advice for the supplier.
remittanceAdvice.creditorId string 50 Supplier payment details.
remittanceAdvice.paymentType object The default payment type for the supplier.
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.
salesPerson.employeeNumber integer 1 Unique identifier of the employee.
salesPerson.self string uri A unique reference to the employee resource.
self string A unique self reference of the supplier.
supplierContact object Reference to main contact employee at supplier.
supplierContact.self string uri A unique reference to the supplier contact resource.
supplierContact.supplierContactNumber integer Unique number identifying the supplier contact.
supplierGroup object The supplier group of the supplier.
supplierGroup.self string uri A unique reference to the supplier group resource.
supplierGroup.supplierGroupNumber integer 1 Unique number identifying the supplier group.
supplierNumber integer 999999999 1 The supplier number is a positive unique numerical identifier with a maximum of 9 digits.
vatZone object Indicates whether the supplier is located domestically, in Europe or elsewhere abroad
vatZone.self string uri A unique reference to the vat zone.
vatZone.vatZoneNumber integer Unique identifier of the vat zone.
zip string 10 The suppliers zipcode.

DELETE /suppliers/:supplierNumber

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

Units

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

For more information please look at the Danish e-copedia article http://wiki2.e-conomic.dk/indstillinger/kategorier-og-enheder-enheder.

GET /units

Schema name

units.get.schema.json

Return type

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

Required property

self

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

Required property

self

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.

Vat Accounts

GET /vat-accounts

This endpoint allows you to fetch a collection of all vat accounts.

Schema name

vat-accounts.get.schema.json

Return type

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

Required properties

account.self, contraAccount.self, self, vatType.name, vatType.self, vatType.vatTypeNumber

Properties

Name Type Format Max length Description
account object The account for this vat account.
account.accountNumber integer A unique identifier of the account.
account.self string uri A unique link reference to the account item.
barred boolean If true this vat account has been barred from further use.
contraAccount object The contra account for this vat account.
contraAccount.accountNumber integer A unique identifier of the contra account.
contraAccount.self string uri A unique link reference to the contra account item.
name string 40 The name of the vat account.
ratePercentage number The tax rate for this vat account.
self string uri A unique link reference to the vat account item.
vatCode string 5 The alphanumerical code for the vat account.
vatType object The vat type for this vat account.
vatType.name string Name of the vat type.
vatType.self string uri A unique link reference to the vat type item.
vatType.vatTypeNumber integer A unique identifier of the vat type.

GET /vat-accounts/:id

This endpoint allows you to fetch a specific vat account.

Schema name

vat-accounts.id.get.schema.json

Return type

This method returns a single object

Required properties

account.self, contraAccount.self, self, vatType.name, vatType.self, vatType.vatTypeNumber

Properties

Name Type Format Max length Description
account object The account for this vat account.
account.accountNumber integer A unique identifier of the account.
account.self string uri A unique link reference to the account item.
barred boolean If true this vat account has been barred from further use.
contraAccount object The contra account for this vat account.
contraAccount.accountNumber integer A unique identifier of the contra account.
contraAccount.self string uri A unique link reference to the contra account item.
name string 40 The name of the vat account.
ratePercentage number The tax rate for this vat account.
self string uri A unique link reference to the vat account item.
vatCode string 5 The alphanumerical code for the vat account.
vatType object The vat type for this vat account.
vatType.name string Name of the vat type.
vatType.self string uri A unique link reference to the vat type item.
vatType.vatTypeNumber integer A unique identifier of the vat type.

Vat Types

GET /vat-types

This endpoint allows you to fetch a collection of all vat types.

Schema name

vat-types.get.schema.json

Return type

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

Required properties

name, self, vatTypeNumber

Properties

Name Type Format Description
name string Name of the vat type.
self string uri A unique link reference to the vat type item.
vatTypeNumber integer A unique identifier of the vat type.

GET /vat-types/:vatTypeId

This endpoint allows you to fetch a specific vat type.

Schema name

vat-types.id.get.schema.json

Return type

This method returns a single object

Required properties

name, self, vatTypeNumber

Properties

Name Type Format Description
name string Name of the vat type.
self string uri A unique link reference to the vat type item.
vatTypeNumber integer A unique identifier of the vat type.

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

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

Vat Zones

GET /vat-zones

This endpoint allows you to fetch a collection of all vat zones.

Schema name

vat-zones.get.schema.json

Return type

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

Required property

self

Properties

Name Type Format Max length Description
enabledForCustomer boolean If this value is true, then the vat zone can be used for a customer.
enabledForSupplier boolean If this value is true, then the vat zone can be used for a supplier.
name string 50 The name of the vat zone.
self string uri A unique link reference to the vat zone item.
vatZoneNumber integer A unique identifier of the vat zone.

GET /vat-zones/:vatZoneNumber

This endpoint allows you to fetch a specific vat zone.

Schema name

vat-zones.vatZoneNumber.get.schema.json

Return type

This method returns a single object

Required property

self

Properties

Name Type Format Max length Description
enabledForCustomer boolean If this value is true, then the vat zone can be used for a customer.
enabledForSupplier boolean If this value is true, then the vat zone can be used for a supplier.
name string 50 The name of the vat zone.
self string uri A unique link reference to the vat zone item.
vatZoneNumber integer A unique identifier of the vat zone.