Invoices

Represents a list of invoices for the application.

URI
/api/v9/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.

GET List invoices

Get a list of invoices that have been issued for the application in question.

Syntax
GET /api/v9/applications/123/invoices
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X GET \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/applications/123/invoices"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length1234Size of the response body in bytes
X-Count2Number of invoices for this application

Response codes

Response codeDescription
200 OKThe list of invoices was successfully returned

Example response

Response
{
  "200": {
    "id": 200,
    "type": "Invoice",
    "nr": "AF-101031225",
    "serie": {
      "id": 2,
      "name": "Application fee"
    },
    "applicant": "/api/v9/applicants/123",
    "application": "/api/v9/applications/321",
    "course": "/api/v9/courses/33",
    "deadline": "2025-12-17",
    "issued": "2025-12-03T13:15:31+00:00",
    "delivered": "2025-12-03T13:15:31+00:00",
    "reminder": true,
    "reminded": null,
    "collected": "2025-12-04T07:06:40+00:00",
    "currency": "EUR",
    "items": [
      {
        "item": "Application fee (one-time)",
        "price": "20.00",
        "qty": "1.00",
        "unit": null,
        "inventory_item_ID": null
      },
      {
        "item": "Discount \"FALL2025\"",
        "price": "-3.00",
        "qty": "1.00",
        "unit": null,
        "inventory_item_ID": null
      }
    ],
    "collections": {
      "41": {
        "id": 41,
        "amount": "17.00",
        "invoice": "/api/v9/invoices/200",
        "inserted": "2025-12-04T07:06:40+00:00",
        "collected": "2025-12-04",
        "administrator": null,
        "payment": {
          "payment": "01KBM2X9KYE7WBY25DFNMXNS4R",
          "external_id": "pi_3SaWcb3BsCbItDpn02T9muKv",
          "status": "captured",
          "message": null,
          "inserted": "2025-12-04T07:06:02+00:00",
          "updated": "2025-12-04T07:06:40+00:00",
          "gateway": {
            "id": 39,
            "name": "Stripe",
            "adapter": "Stripe"
          }
        }
      }
    },
    "instructions": "Account Name: Institute of Technology BE\r\nKBC Bank:\r\nIBAN: BE75 ABCD 1234 5678 90XY\r\nBIC/SWIFT Code: KREDBEBB",
    "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": "John Smith",
      "email": "john.smith@email.com"
    }
  },
  "201": {
    "id": 201,
    "type": "Receipt",
    "nr": "2025-6",
    "serie": {
      "id": 127,
      "name": "Test series"
    },
    "applicant": "/api/v9/applicants/123",
    "application": "/api/v9/applications/321",
    "course": null,
    "deadline": "2025-12-25",
    "issued": "2025-12-11T12:11:09+00:00",
    "delivered": "2025-12-11T12:11:09+00:00",
    "reminder": true,
    "reminded": null,
    "collected": null,
    "currency": "EUR",
    "items": [
      {
        "item": "Airport pickup",
        "price": "15.00",
        "qty": "1.00",
        "unit": null,
        "inventory_item_ID": null
      }
    ],
    "collections": {},
    "instructions": "Account Name: Institute of Technology BE\r\nKBC Bank:\r\nIBAN: BE75 ABCD 1234 5678 90XY\r\nBIC/SWIFT Code: KREDBEBB",
    "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": "John Smith",
      "email": "john.smith@email.com"
    }
  }
}

POST Create an invoice

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/v9/applications/123/invoices
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

NameRequired/OptionalDescription
currencyRequiredCurrency used for the invoice.
itemsRequiredArray of invoice items, formatted as: [item, price, qty, unit].
invoice_class_IDOptionalID of the invoice template to issue the invoice.
typeOptionalType of financial document. If not specified, the Invoice type is used.
issuer_institution_IDOptionalID of the institution issuing the invoice.
serie_IDOptionalID of the invoice series. If not specified, the default invoice series is used.
course_IDOptionalID of the course added to the application for which the invoice is issued.
deadlineOptionalInvoice deadline in the ISO 8601 datetime format.
reminderOptionalEnables reminders if the invoice is unpaid: On or Off. If not specified, reminders are enabled.
instructionsOptionalPayment instructions for the invoice.
smallprintOptionalSmallprint information.
issuer_administrator_IDOptionalID of the administrator issuing the invoice.
payerOptionalName and email of the payer, formatted as: [name, email]. If not specified, the applicant’s contact details are used.
copyOptionalEmail address to which a blind copy (BCC) of the invoice is sent.
notifyOptionalEmail address to which a notification is sent when the invoice is collected.

Raw request body

The parameters above should be sent as a proper JSON object.

Request body
{
  "invoice_class_ID": 1,
  "currency": "EUR",
  "items": [
    {
      "item": "Airport pickup fee",
      "price": "25.00",
      "qty": "1",
      "unit": null
    },
    {
      "item": "City excursion fee",
      "price": "25.00",
      "qty": "1",
      "unit": null
    }
  ],
  "deadline": "2026-09-01",
  "smallprint": "This invoice has been issued electronically and is valid without a signature",
  "issuer_institution_ID": 1,
  "course_ID": 20,
  "reminder": "Off",
  "payer": {
    "name": "John Smith",
    "email": "john.smith@email.com"
  }
}

Example request

Request
curl
curl \
  -X POST \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_class_ID": 1,
    "currency": "EUR",
    "items": [
      {
        "item": "Airport pickup fee",
        "price": "25.00",
        "qty": "1",
        "unit": null
      },
      {
        "item": "City excursion fee",
        "price": "25.00",
        "qty": "1",
        "unit": null
      }
    ],
    "deadline": "2026-09-01",
    "smallprint": "This invoice has been issued electronically and is valid without a signature",
    "issuer_institution_ID": 1,
    "course_ID": 20,
    "reminder": "Off",
    "payer": {
      "name": "John Smith",
      "email": "john.smith@email.com"
    }
  }' \
  "https://apply.example.edu/api/v9/applications/123/invoices"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length0Size of the response body in bytes
Location/api/applications/123/invoices/321URI of the created invoice

Response codes

Response codeDescription
201 CreatedA new invoice was successfully created