/api/applications/ID/invoices
GDPR information
Due to GDPR regulations, it is possible to delete applicants from the system, for example with the “Right to be forgotten” tool, batch purge (by academic term) or with an individual applicant record deletion.
However, in order to not destroy accounting records, invoices are the only data that is preserved after an applicant record is destroyed. To achieve this, invoices are detached from the applicant records, losing this association. This is why in the admin UI they are distinctive with a gray “anonymous” icon and also why in the API response the applicant
and application
field is set to NULL
.
HEAD, GET
Get a list of invoices that have been issued for the application in question.
Syntax
GET /api/application/123/invoices Host: apply.example.edu Authorization: DREAM apikey="..."
Response headers
Content-Type: application/json Content-Length: 1234
Response example
{ "1": { "id": 1, "type": "Invoice", "nr": "1", "serie": { "id": 100, "name": "Default invoice series" }, "applicant": "/api/applicants/2", "application": "/api/applications/2", "course": null, "deadline": "2023-08-15", "issued": "2023-04-27T16:00:00+00:00", "delivered": "2023-04-27T16:00:00+00:00", "reminder": true, "reminded": null, "collected": null, "currency": "EUR", "items": [ { "item": "Tuition fee", "price": "1000.00", "qty": "1.00", "unit": null, "inventory_item_ID": null } ], "collections": {}, "instructions": "Bank account details:\r\n\r\nDREAMAPPLY BANK\r\n\r\nSwift Code : DREAMBNK\r\n\r\nIBAN : EE12 1234 1234 1234 1234", "smallprint": "Please make sure that you include the invoice number in the payment transaction. Otherwise the payment may not get properly processed.\r\n\r\nThis invoice has been issued electronically and is valid without a signature. The invoice is issued in accordance to the region that you specified during your registration. If the region (and the currency) is not correct, please contact us for re-issuance.", "payer": { "name": "Damo of Atarneus", "email": "damo.of.atarneus@example.com" } }, "2": { "id": 2, "type": "Invoice", "nr": "1", "serie": { "id": 123, "name": "Shopping invoice series" }, "applicant": "/api/applicants/2", "application": "/api/applications/2", "course": "/api/courses/5", "deadline": "2023-08-15", "issued": "2023-04-28T08:00:00+00:00", "delivered": "2023-04-27T16:00:00+00:00", "reminder": true, "reminded": null, "collected": null, "currency": "EUR", "items": [ { "item": "Housing: shared room (first semester) ", "price": "2000.00", "qty": "1.00", "unit": null, "inventory_item_ID": 1 } ], "collections": {}, "instructions": "Bank account details:\r\n\r\nDREAMAPPLY BANK\r\n\r\nSwift Code : DREAMBNK\r\n\r\nIBAN : EE12 1234 1234 1234 1234", "smallprint": "Please make sure that you include the invoice number in the payment transaction. Otherwise the payment may not get properly processed.\r\n\r\nThis invoice has been issued electronically and is valid without a signature. The invoice is issued in accordance to the region that you specified during your registration. If the region (and the currency) is not correct, please contact us for re-issuance.", "payer": { "name": "Damo of Atarneus", "email": "damo.of.atarneus@example.com" } } }
POST
Create a new invoice attached to the application in question. The URI for the invoice created is returned in the Location
header.
Syntax
POST /api/application/123/invoices Host: apply.example.edu Authorization: DREAM apikey="..."
Parameters
Name | Description | |
---|---|---|
currency | Required | Invoice currency. |
items | Required | Invoice items/rows. |
invoice_class_ID | Optional | ID of the invoice class resource, whose attributes/settings will be used as a template for the new invoice. |
Raw request body
The parameters above should be sent as a proper JSON object.
{ "invoice_class_ID": 1, "currency": "EUR", "items": [ { "item": "Application fee", "price": "100.00", "qty": "1", "unit": null }, { "item": "City excursion fee", "price": "25.00", "qty": "1", "unit": null } ] }
Response headers
Content-Type: application/json Content-Length: 0 Location: /api/applicants/trackers/TEST
Response codes
201 Created | New invoice was created |