Browse Documentation
GET Get purchase

List All Purchases

GET /purchases

Get a list of all purchases

Request

    
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer token" \
-XGET \
https://dev.accounteer.com/api/v0.1/purchases/
    

Response

[{
    "id": "dfe1d79322e6b8b40e5025b7cda2b30aa4547328",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "document_number": "BL-00001",
    "supplier_id": "865d8838db6079caa0d3a30ad8edfb812a87f39e",
    "total_amount": 242,
    "total_base_amount": 200,
    "total_tax_amount": 42,
    "amount_due": 242,
    "currency": "EUR",
    "date_issued": "2017-07-14",
    "date_due": "2017-08-14",
    "date_created": "2017-07-14",
    "date_updated": "2017-07-17",
    "status": "approved",
    "reference": null,
    "items": [{
        "id": "7283518d47a05a09d33779a17adf1707",
        "title": "item",
        "description": null,
        "quantity": "1.00",
        "item_base_amount": "200.00",
        "tax_id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "tax_name": "VAT 21%",
        "tax_percentage": 21,
        "line_base_amount": 200,
        "line_tax_amount": 42,
        "line_total_amount": 242,
        "tax_included": false,
        "gl_account": {
            "id": "aefb526889e1059a61ecce700a3363c388a93335",
            "code": "611000",
            "title": "General and adminsitrative expenses",
            "description": null
        }
    }]
}, {
    "id": "b053cd774fc136b425633c7f769aa60b78e208a4",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "document_number": "BL-00002",
    "supplier_id": "865d8838db6079caa0d3a30ad8edfb812a87f39e",
    "total_amount": 1205,
    "total_base_amount": 995.87,
    "total_tax_amount": 209.13,
    "amount_due": 1205,
    "currency": "EUR",
    "date_issued": "2017-07-24",
    "date_due": "2017-08-24",
    "date_created": "2017-07-24",
    "date_updated": "2017-07-24",
    "status": "approved",
    "reference": null,
    "items": [{
        "id": "f346fdde33f0687a99877e1e97bc9586a53f3bbb",
        "title": "item 01",
        "description": null,
        "quantity": "3.00",
        "item_base_amount": "165.29",
        "tax_id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "tax_name": "VAT 21%",
        "tax_percentage": 21,
        "line_base_amount": 495.87,
        "line_tax_amount": 104.13,
        "line_total_amount": 600,
        "tax_included": true,
        "gl_account": {
            "id": "aefb526889e1059a61ecce700a3363c388a93335",
            "code": "611000",
            "title": "General and adminsitrative expenses",
            "description": null
        }
    }, {
        "id": "730d8c6734fce78b887e62ed7db3d6e01a6e961e",
        "title": "item 02",
        "description": null,
        "quantity": "1.00",
        "item_base_amount": "500.00",
        "tax_id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "tax_name": "VAT 21%",
        "tax_percentage": 21,
        "line_base_amount": 500,
        "line_tax_amount": 105,
        "line_total_amount": 605,
        "tax_included": false,
        "gl_account": {
            "id": "aefb526889e1059a61ecce700a3363c388a93335",
            "code": "611000",
            "title": "General and adminsitrative expenses",
            "description": null
        }
    }]
}]


Get Purchase

GET /purchases/:id

Get a specific purchase

Request

    
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer token" \
-XGET \
https://dev.accounteer.com/api/v0.1/purchases/dfe1d79322e6b8b40e5025b7cda2b30aa4547328
    

Response

{
    "id": "dfe1d79322e6b8b40e5025b7cda2b30aa4547328",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "document_number": "BL-00001",
    "supplier_id": "865d8838db6079caa0d3a30ad8edfb812a87f39e",
    "total_amount": 242,
    "total_base_amount": 200,
    "total_tax_amount": 42,
    "amount_due": 242,
    "currency": "EUR",
    "date_issued": "2017-07-14",
    "date_due": "2017-08-14",
    "date_created": "2017-07-14",
    "date_updated": "2017-07-17",
    "status": "approved",
    "reference": null,
    "items": [{
        "id": "7283518d47a05a09d33779a17adf1707",
        "title": "item",
        "description": null,
        "quantity": "1.00",
        "item_base_amount": "200.00",
        "tax_id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "tax_name": "VAT 21%",
        "tax_percentage": 21,
        "line_base_amount": 200,
        "line_tax_amount": 42,
        "line_total_amount": 242,
        "tax_included": false,
        "gl_account": {
            "id": "aefb526889e1059a61ecce700a3363c388a93335",
            "code": "611000",
            "title": "General and adminsitrative expenses",
            "description": null
        }
    }]
}