API Documentation
BankAccounts ¶
BankAccounts ¶
The bank account object represents banking information used on a subsidiary in the company details.
You can find out more about banking information in our Help documentation: E-Invoicing.
Following diagram shows bank accounts in our data hierarchy:
Supported filter params
-
id
-
bank_name
-
name
-
subsidiary_id
-
status (1: active, 2: archived)
Supported sort params
-
id
-
name
Filter operations are supported on this endpoint.
GET /api/v2/bank_accounts
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "5",
"type": "bank_accounts",
"attributes": {
"bank_name": null,
"bank_address": null,
"name": "BankAccountName5",
"number": "BankAccountNumber",
"currency": "EUR",
"swift_code": null,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2218"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/bank_accounts?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/bank_accounts?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get bank accountsGET/api/v2/bank_accounts
GET /api/v2/bank_accounts/6
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "6",
"type": "bank_accounts",
"attributes": {
"bank_name": null,
"bank_address": null,
"name": "BankAccountName6",
"number": "BankAccountNumber",
"currency": "EUR",
"swift_code": null,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2220"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Gets a bank accountGET/api/v2/bank_accounts/{id}
- id
number
(required) Example: 1bank account id
POST /api/v2/bank_accounts
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "bank_accounts",
"attributes": {
"name": "Another Test Account",
"number": "12345678",
"bank_name": "Test Bank",
"bank_address": "123 Test St",
"currency": "USD",
"swift_code": "PBZGHR2XCUS"
},
"relationships": {
"subsidiary": {
"data": {
"type": "subsidiaries",
"id": "2601"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "8",
"type": "bank_accounts",
"attributes": {
"bank_name": "Test Bank",
"bank_address": "123 Test St",
"name": "Another Test Account",
"number": "12345678",
"currency": "USD",
"swift_code": "PBZGHR2XCUS",
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2222"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/bank_accounts
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "bank_accounts",
"attributes": {
"name": "",
"number": "",
"bank_name": "",
"bank_address": "",
"currency": "",
"swift_code": ""
},
"relationships": {
"subsidiary": {
"data": {
"type": "subsidiaries",
"id": "2602"
}
}
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/number"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/currency"
}
}
]
}
Create a bank accountPOST/api/v2/bank_accounts
- subsidiary_id
number
(required) Example: 1subsidiary id
- name
string
(required) Example: BankAccountNamebank account name
- number
string
(required) Example: NB1234567890bank account number
- currency
string
(required) Example: EURcurrency of the bank account
- bank_name
string
(optional) Example: BankNamename of the bank
- bank_address
string
(optional) Example: BankAddressaddress of the bank
- swift_code
string
(optional) Example: PBZGHR2XCUSBIC/SWIFT code of the bank
PATCH /api/v2/bank_accounts/10
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "bank_accounts",
"attributes": {
"currency": "USD"
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "10",
"type": "bank_accounts",
"attributes": {
"bank_name": null,
"bank_address": null,
"name": "BankAccountName9",
"number": "BankAccountNumber",
"currency": "USD",
"swift_code": null,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2226"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/bank_accounts/11
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "bank_accounts",
"attributes": {
"number": ""
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/number"
}
}
]
}
Update a bank accountPATCH/api/v2/bank_accounts/
- subsidiary_id
number
(required) Example: 1subsidiary id
- name
string
(required) Example: BankAccountNamebank account name
- number
string
(required) Example: NB1234567890bank account number
- currency
string
(required) Example: EURcurrency of the bank account
- bank_name
string
(optional) Example: BankNamename of the bank
- bank_address
string
(optional) Example: BankAddressaddress of the bank
- swift_code
string
(optional) Example: PBZGHR2XCUSBIC/SWIFT code of the bank
PATCH /api/v2/bank_accounts/12/archive
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "12",
"type": "bank_accounts",
"attributes": {
"bank_name": null,
"bank_address": null,
"name": "BankAccountName11",
"number": "BankAccountNumber",
"currency": "EUR",
"swift_code": null,
"archived_at": "2025-08-02T02:25:39.000+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2230"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Archives a bank accountPATCH/api/v2/bank_accounts/{id}/archive
- id
number
(required) Example: 1bank account id
PATCH /api/v2/bank_accounts/14/restore
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "14",
"type": "bank_accounts",
"attributes": {
"bank_name": null,
"bank_address": null,
"name": "BankAccountName13",
"number": "BankAccountNumber",
"currency": "EUR",
"swift_code": null,
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2232"
}
},
"subsidiary": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Restores an archived bank accountPATCH/api/v2/bank_accounts/{id}/restore
- id
number
(required) Example: 1bank account id
Generated by aglio on 02 Aug 2025