This is an old revision of the document!
/api/invoices/ID/transactions
HEAD, GET
Get a list of transactions for given invoice.
Syntax
GET /api/invoices/123 Host: apply.example.edu Authorization: DREAM apikey="..."
Response headers
Content-Type: application/json Content-Length: 1234 X-Count: 15
Response example
{ "1": { "id": 1, "amount": "500.00", "invoice": "/api/invoices/3", "inserted": "2021-10-26T16:24:39+00:00", "collected": "2021-10-26", "administrator": "/api/administrators/1", "payment": null }, "2": { "id": 2, "amount": "500.00", "invoice": "/api/invoices/3", "inserted": "2021-10-26T16:25:08+00:00", "collected": "2021-10-26", "administrator": null, "payment": null } }
POST
Create a new transaction for the invoice.
The URI for the new transaction that was created is returned in the Location
header.
Syntax
POST /api/invoices/123 Host: apply.example.edu Authorization: DREAM apikey="..."
Parameters
Name | Description | |
---|---|---|
amount | Required | A valid decimal amount of the transaction. |
currency | Required | Currency code, must be the same as the currency of the invoice |
Response headers
Content-Type: application/json Content-Length: 0 Location: /api/invoices/123/transactions/12345
Response codes
201 Created | New course was created |
422 Unprocessable Entity | There were some validation errors (see the returned text) |