Create a bank
Creates a new bank.
name and slug are required. The slug must be unique across all banks and may contain only letters, digits, underscores, and hyphens; a slug that is already in use is rejected.
The logo is optional and can be supplied in either of two ways: send the request as multipart/form-data with the image file in logo, or send logo_path with the storage path of an image that is already present in media storage. When both are given, the uploaded file wins. See Logo Handling in the section description for the full details.
The identifier is assigned by the server; a pk sent in the request body is ignored.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The body of a bank create or full update request sent as JSON.
The display name of the bank.
The unique reference of the bank. May contain only letters, digits, underscores, and hyphens.
^[-a-zA-Z0-9_]+$The storage path of an image that is already present in media storage, used instead of uploading a file. Omitting it on a full update keeps the current logo.
The created bank.
A bank record.
The unique identifier of the bank.
The display name of the bank.
The unique reference of the bank.
The absolute address of the bank's logo, or null when the bank has no logo.
Always null. This field only carries a value on the way in; the address the logo resolves to is reported in logo.
The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
POST /api/v1/remote/1/banks/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"name": "Example Bank",
"slug": "example-bank",
"logo_path": "banks/example-bank.png"
}{
"pk": 12,
"name": "Example Bank",
"slug": "example-bank",
"logo": "https://sandbox.akinon.com/media/banks/example-bank.png",
"logo_path": null
}Last updated
Was this helpful?

