Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Get invoices

MaurICT edited this page Apr 9, 2020 · 3 revisions

List invoices

GET /api/invoices

Parameters

Query string hidePayed (optional): Indicates to hide invoices that are payed. Default false

Example request(s):

GET https://stoverstag.nl/api/invoices
GET https://stoverstag.nl/api/invoices?hidePayed=true

Example response:

{
    "status": "success",
    "count": 2,
    "invoices": [
        {
            "amount": 2,
            "timestamp": "2019-11-09T16:03:24",
            "activityIds": [
                3,
                7
            ],
            "additionsCost": 0,
            "invoiceID": "wMSB91LnqtrSY3hXtn17Xvi1RM0kaZTbRUgSKqQXkgs=",
            "invoiceURL": "https://stoverstag.nl/Pay/Invoice/wMSB91LnqtrSY3hXtn17Xvi1RM0kaZTbRUgSKqQXkgs%3D",
            "payed": true,
            "payment": {
                "id": 1,
                "paymentID": "0341336588",
                "status": 6,
                "placedAt": "2019-11-09T16:04:41",
                "payedAt": "2019-11-09T16:53:21",
                "user": null,
                "invoiceId": 4
            }
        },
        {
            "amount": 5,
            "timestamp": "2019-12-11T19:21:41",
            "activityIds": [
                10,
                11
            ],
            "additionsCost": 1,
            "invoiceID": "M3QiHENZ0qH2o0gFwa6uJpUiCRBYucM9+DhzU49enYE=",
            "invoiceURL": "https://stoverstag.nl/Pay/Invoice/M3QiHENZ0qH2o0gFwa6uJpUiCRBYucM9%2BDhzU49enYE%3D",
            "payed": false,
            "payment": null
        }
    ]
}

Get invoice by its ID

GET /api/invoices/{invoiceId}

Parameters

URL parameter invoiceId (required): The invoice's invoiceID. Take care: Must be url-encoded!

Example request: GET https://stoverstag.nl/api/invoices/

Example response:

{
    "status": "success",
    "invoice": {
        "amount": 5,
        "timestamp": "2019-12-11T19:21:41",
        "activityIds": [
            10,
            11
        ],
        "additionsCost": 1,
        "invoiceID": "M3QiHENZ0qH2o0gFwa6uJpUiCRBYucM9+DhzU49enYE=",
        "invoiceURL": "https://localhost:5001/Pay/Invoice/M3QiHENZ0qH2o0gFwa6uJpUiCRBYucM9%2BDhzU49enYE%3D",
        "payed": false,
        "payment": null
    }
}
Clone this wiki locally