API Documentation

API Endpoint

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:

Bank account diagram

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
Requestsreturns bank accounts

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
Responses200
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 accounts
GET/api/v2/bank_accounts


GET /api/v2/bank_accounts/1
Requestsreturns a bank account

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
Responses200
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 account
GET/api/v2/bank_accounts/{id}

URI Parameters
HideShow
id
number (required) Example: 1

bank account id


POST /api/v2/bank_accounts
Requestscreates bank accountreturns error

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"
        }
      }
    }
  }
}
Responses201
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"
        }
      }
    }
  }
}
Responses422
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 account
POST/api/v2/bank_accounts

URI Parameters
HideShow
subsidiary_id
number (required) Example: 1

subsidiary id

name
string (required) Example: BankAccountName

bank account name

number
string (required) Example: NB1234567890

bank account number

currency
string (required) Example: EUR

currency of the bank account

bank_name
string (optional) Example: BankName

name of the bank

bank_address
string (optional) Example: BankAddress

address of the bank

swift_code
string (optional) Example: PBZGHR2XCUS

BIC/SWIFT code of the bank


PATCH /api/v2/bank_accounts/
Requestsupdates currencyreturns error

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"
    }
  }
}
Responses200
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": ""
    }
  }
}
Responses422
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 account
PATCH/api/v2/bank_accounts/

URI Parameters
HideShow
subsidiary_id
number (required) Example: 1

subsidiary id

name
string (required) Example: BankAccountName

bank account name

number
string (required) Example: NB1234567890

bank account number

currency
string (required) Example: EUR

currency of the bank account

bank_name
string (optional) Example: BankName

name of the bank

bank_address
string (optional) Example: BankAddress

address of the bank

swift_code
string (optional) Example: PBZGHR2XCUS

BIC/SWIFT code of the bank


PATCH /api/v2/bank_accounts/1/archive
Requestsarchives bank account

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
Responses200
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 account
PATCH/api/v2/bank_accounts/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

bank account id


PATCH /api/v2/bank_accounts/1/restore
Requestsrestores bank account

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
Responses200
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 account
PATCH/api/v2/bank_accounts/{id}/restore

URI Parameters
HideShow
id
number (required) Example: 1

bank account id


Generated by aglio on 02 Aug 2025