Skip to main content
POST
/
v1
/
chart-of-accounts
/
batch
Create multiple accounts in a single request
curl --request POST \
  --url https://external.pleo.io/v1/chart-of-accounts/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "items": [
    {
      "archived": true,
      "externalId": "<string>",
      "name": "<string>",
      "code": "<string>",
      "metadata": {},
      "taxCodeExternalId": "<string>"
    }
  ]
}
'
{
  "data": {
    "created": [
      {
        "archived": false,
        "code": "2001",
        "companyId": "123e4567-e89b-12d3-a456-426614174006",
        "externalId": "ext-001",
        "id": "123e4567-e89b-12d3-a456-426614174005",
        "name": "Bank Charges",
        "taxCodeExternalId": "IVA 20"
      },
      {
        "archived": false,
        "code": "2002",
        "companyId": "123e4567-e89b-12d3-a456-426614174006",
        "externalId": "ext-002",
        "id": "123e4567-e89b-12d3-a456-426614174007",
        "name": "Office Supplies",
        "taxCodeExternalId": "IVA 20"
      }
    ],
    "failed": [
      {
        "reasons": [
          "EXTERNAL_ID_ALREADY_EXISTS",
          "NAME_EMPTY"
        ],
        "request": {
          "archived": false,
          "code": "2003",
          "externalId": "ext-duplicate",
          "name": "",
          "taxCodeExternalId": "IVA 20"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json;charset=UTF-8
companyId
string<uuid>
required

Pleo's internal identifier for the company the accounts are associated with.

items
object[]
required

List of bookkeeping accounts to be created. The number of accounts in the batch must be between 1 and 1000.

Required array length: 1 - 1000 elements

Response

Batch creation completed. Check the response for created and failed items.

data
object
required

Response for batch account creation operation.