SendRegning

Overview

Verison: 1.0 (read more)

Overview

Overview

1
GET /overview/invoices?year={year}

Where year could be null for “last invoice year”, number for the “requested year” and all for “all years”.

Response

HTTP/1.1 200 OK

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
    "years": [2010, 2011, 2015],
    "groups": [{
            "name": "Grunnlag for nye regninger",
            "items": [{
                "description": "Åpne tilbud",
                "count": 1,
                "total": 10,
                "_links": {
                    "self": {
                        "uri": "/offer/open"
                    }
                }
            }, {
                "description": "Bekreftede ordre",
                "count": 2,
                "total": 20,
                "_links": {
                    "self": {
                        "uri": "/order-confirmation/sent"
                    }
                }
            }],
            "summary": {
                "total": 30
            }
        }, {
            "name": "Regninger du arbeider med",
            "items": [{
                "description": "Halvferdige kreditnotaer",
                "count": 8,
                "total": 200,
                "_links": {
                    "self": {
                        "uri": "/overview/invoices/documents?states=draft&types=credit&year=all"
                    }
                }
            }, {
                "description": "Halvferdige regninger",
                "count": 55,
                "total": 300,
                "_links": {
                    "self": {
                        "uri": "/overview/invoices/documents?state=draft&type=ordinary&year=all"
                    }
                }
            }],
            "summary": {
                "total": 500
            }
        }
    ]
}

Overview invoice list

Request

1
GET /overview/invoices/documents

example /overview/invoices/documents?state=draft&type=credit&year=2015

Response

HTTP/1.1 200 OK

Drafts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[{
    "number": 1,
    "description": "Faktura",
    "date": "2015-01-01",
    "customerNumber": 7,
    "recipientName": "Marius",
    "orderNumber": 10,
    "tax": 11.12,
    "total": 22.23,
    "currency": "NOK",
    "currencyTax": 1.1,
    "currencyTotal": 5.2,
    "international": false,
    "dueDate": "2015-01-15",
    "_links": {
        "self": {
            "uri": "/invoices/drafts/1"
        },
        "recipient": {
            "uri": "/recipients/5"
        }
    }
}]

Invoices

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[{
    "number": 2,
    "description": "Faktura",
    "date": "2015-01-01",
    "customerNumber": 7,
    "recipientName": "Marius",
    "orderNumber": null,
    "tax": 11.12,
    "total": 22.23,
    "currency": "EUR",
    "currencyTax": 1.1,
    "currencyTotal": 5.2,
    "international": false,
    "dueDate": "2015-01-15",
    "_links": {
        "self": {
            "uri": "/invoices/2"
        },
        "recipient": {
            "uri": "/recipients/5"
        }
    }
}]

Info for sales ledger graph

1
GET /overview/sales-ledger/graph/revenue?from=yyyy-mm-dd&to=yyyy-mm-dd

All query params can be omitted.

Default values
from: now - six months
to: today

Response

HTTP/1.1 200 OK

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
    "labels": [
        "januar",
        "februar",
        "mars",
        "april",
        "mai",
        "juni"
    ],
    "revenueWithoutVat": [
        120.20,
        100.00,
        20.00,
        500.00,
        80.00,
        60.00
    ],
    "paid": [
        185.00,
        0.00,
        0.00,
        0.00,
        0.00,
        0.00
    ],
    "lost": [
        0.00,
        0.00,
        0.00,
        0.00,
        0.00,
        0.00
    ]
}

Invoice summary

1
GET /overview/invoices/summary?from=yyy-mm-dd&to=yyyy-mm-dd

All query params can be omitted. Supports pagination (For more details, go to pagination documentation).

Default values
from: now - six months
to: today

Response

HTTP/1.1 200 OK

1
2
3
4
5
6
{
    "notDue": 10,
    "due": 8,
    "paid": 4,
    "creditNotes": 4
}

Balance

1
GET /overview/sales-ledger/balance

Response

HTTP/1.1 200 OK

1
2
3
{
    "balance": 945.20
}