Bank accounts API
Field descriptions
| Field | Type | Description |
|---|---|---|
| id | integer | The identifier of the bank account. |
| name | string | Name of the bank account |
| full_name | string | |
| string | ||
| cvr | string | |
| cpr | string | |
| account_prefix | string | |
| account_number | string | |
| address | hash | The address for the event with parameters |
| address.address1 | string | Main address |
| address.address2 | string | Secondary address |
| address.postal_code | string | |
| address.city | string | |
| address.phone | string | |
| address.country | string | The country parameter must follow the ISO 3166-alpha-2 codes defined in: https://www.iso.org/iso-3166-country-codes.html |
List bank accounts
List all bank accounts for a specific event maker
GET /event_makers/:event_maker_id/bank_accounts
Response
Status: 200 OK
[
{
"id": 1234567,
"name": "Eventbureauets NEM konto",
"account_prefix": "1234",
"account_number": "12345678",
"cvr": "28888880",
"cpr": null,
"address": {
"address1": "Nørrelundvej 5",
"address2": "",
"postal_code": "2730",
"city": "Herlev",
"phone": "70232550",
"country": "DK"
}
}
]
Get a single bank account
GET /event_makers/:event_maker_id/bank_accounts/:bank_account_id
Response
Status: 200 OK
{
"id": 1234567,
"name": "Eventbureauets NEM konto",
"account_prefix": "1234",
"account_number": "12345678",
"cvr": "28888880",
"cpr": null,
"address": {
"address1": "Nørrelundvej 5",
"address2": "",
"postal_code": "2730",
"city": "Herlev",
"phone": "70232550",
"country": "DK"
}
}
Error codes
Status: 404 Not Found
Create a bank account
A bank account can be created as either a combination of an account prefix and an account number or just a CVR number. If a CVR number is supplied the event maker’s NEM account will be used as bank account.
POST /event_makers/:event_maker_id/bank_accounts
Input
- name
- Required string
- full_name
- Optional string
- Optional string
- cvr
- Optional string
- cpr
- Optional string
- account_prefix
- Optional string
- account_number
- Optional string
- address
-
Optional hash
- address1
- Required string
- address2
- Optional string
- postal_code
- Required string
- city
- Required string
- phone
- Required string
- country
- Required string
{
"bank_account": {
"name": "the display name for the event maker",
"full_name": "full name for the event maker",
"email": "TODO",
"cvr": "cvr code for the event maker",
"cpr": "TODO",
"account_prefix": "",
"account_number": "the official company name"
}
}
Response
Status: 201 Created
Location: https://api.place2book.com/event_makers/evm1234567/bank_accounts/bac1234567
{
"id": 1234567,
"name": "Eventbureauets NEM konto",
"account_prefix": "1234",
"account_number": "12345678",
"cvr": "28888880",
"cpr": null,
"address": {
"address1": "Nørrelundvej 5",
"address2": "",
"postal_code": "2730",
"city": "Herlev",
"phone": "70232550",
"country": "DK"
}
}
Error codes
Status: 400 Bad Request
Status: 500 Server Error
Update a bank account
PUT /event_makers/:event_maker_id/bank_accounts/:bank_account_id
Error codes
Status: 404 Not Found
Status: 500 Server Error
Input
Input is identical to the input on create.
Response
Status: 200 OK
{
"id": 1234567,
"name": "Eventbureauets NEM konto",
"account_prefix": "1234",
"account_number": "12345678",
"cvr": "28888880",
"cpr": null,
"address": {
"address1": "Nørrelundvej 5",
"address2": "",
"postal_code": "2730",
"city": "Herlev",
"phone": "70232550",
"country": "DK"
}
}
Delete a bank account
DELETE /event_makers/:event_maker_id/bank_accounts/:bank_account_id
Response
Status: 204 No Content
Error codes
Status: 404 Not Found