Skip to main content
POST
/
2023-11
/
admin
/
treasuryAccounts
Create
curl --request POST \
  --url https://api-staging.genuka.com/2023-11/admin/treasuryAccounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accounting_account_code": "571",
  "balance": 50,
  "label": "Espèces",
  "medias": [
    {
      "link": "http://localhost:3000/assets/cash.png"
    }
  ],
  "metadata": null,
  "shop_id": "",
  "type": "cash"
}
'
{
  "accounting_account_code": "571",
  "balance": 50,
  "company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
  "created_at": "2025-10-10T15:02:24.000000Z",
  "id": "01k77aa0qxmg81kwc0bp94cc24",
  "label": "Espèces",
  "medias": [],
  "metadata": null,
  "shop": null,
  "shop_id": null,
  "type": "cash",
  "updated_at": "2025-10-10T15:02:24.000000Z"
}

Authorizations

Authorization
string
header
required

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

Headers

x-company
string
Example:

"{{companyId}}"

Body

application/json
accounting_account_code
string
Example:

"571"

balance
number
Example:

50

label
string
Example:

"Espèces"

medias
object[]
Example:
[
{
"link": "http://localhost:3000/assets/cash.png"
}
]
metadata
unknown
shop_id
string
Example:

""

type
string
Example:

"cash"

Response

201

accounting_account_code
string
Example:

"571"

balance
number
Example:

50

company_id
string
Example:

"01hqydxwtxdj3kmzp3bz7jk73g"

created_at
string
Example:

"2025-10-10T15:02:24.000000Z"

id
string
Example:

"01k77aa0qxmg81kwc0bp94cc24"

label
string
Example:

"Espèces"

medias
any[]
Example:
[]
metadata
unknown
shop
unknown
shop_id
unknown
type
string
Example:

"cash"

updated_at
string
Example:

"2025-10-10T15:02:24.000000Z"