Bezala API documentation

API base url: https://app.bezala.com
Accepted content type: application/json


Example GET request:

curl -H "Authorization: Bearer token" -H "Content-Type: application/json" -X GET https://app.bezala.com/api/accounts

Example POST request:

curl -H "Authorization: Bearer token" -H "Content-Type: application/json" -X POST -d '{"account": {"name": "Company Account", "code": "2222", "accountable_type": "AssetAccount"}}' https://app.bezala.com/api/accounts

Resources

Account rules

Resource Description
GET /api/account_rules Get a list of company-specific account rules

Accounts

Resource Description
GET /api/accounts Get accounts list
POST /api/accounts Create account
PUT /api/accounts/:id/toggle_deactivated Activate or Deactivate account

Attachments

Resource Description
PUT /api/attachments/:id Rotate image
POST /api/attachments Upload new image
DELETE /api/attachments/:id Delete image
PUT /api/attachments Sort images

Authentication

Resource Description
POST /api/auth/token Authenticate user
POST /api/auth/google/token Authenticate user via Google access token
POST /api/auth/microsoft/token Authenticate user via Microsoft access token
POST /api/auth/okta/token Authenticate user via Okta access token

Batch documents

Resource Description
GET /api/batch_documents Get batch documents list

Bill lines

Resource Description
GET /api/bill_lines Show the list of bill lines
POST /api/bills/:bill_id/lines Add new bill line
PUT /api/bills/:bill_id/lines/:id Edit existing bill line
DELETE /api/bills/:bill_id/lines/:id Delete existing bill line
PUT /api/bills/:bill_id/lines/bulk_update_no_receipt_needed Bulk edit the existing bill lines receipt_id: 0

Bills

Resource Description
GET /api/bills Show list of credit card bills
GET /api/bills/:id Show individual credit card bills
POST /api/bills/:id Update credit card bill
DELETE /api/bills Delete credit card bills
POST /api/bills/import Import credit card bills

Budgets

Resource Description
GET /api/budgets Show list of the budgets user- and company-specific
POST /api/budgets Create budget
PUT /api/budgets/:id Update budget
DELETE /api/budgets/:id Delete budget

Companies

Resource Description
GET /api/company Get information about current user's company

Cost centers

Resource Description
GET /api/cost_centers Get cost centers list
POST /api/cost_centers Create cost center
PUT /api/cost_centers/:id Update cost center
PUT /api/cost_centers/:id/toggle_deactivated Activate or Deactivate cost center

Daily allowances

Resource Description
GET /api/daily_allowances Get the list of daily allowances

Export Daily Allowances

Resource Description
GET /api/export/daily_allowances Get a list of daily allowances

Export Receipts

Resource Description
GET /api/export/receipts Get a list of receipts

Export Rewards

Resource Description
GET /api/export/rewards Get a list of rewards

Export Trips

Resource Description
GET /api/export/trips Get a list of trips

Home

Resource Description
GET /api/home Get the grouped transactions and other data
GET /api/archive Get the accounted expenses

Real time ccb

Resource Description
POST /api/:provider/bill_lines Create a bill line

Reports

Resource Description
GET /api/reports Get reports list

Reward types

Resource Description
GET /api/reward_types Get reward types list

Rewards

Resource Description
GET /api/rewards Get the list of rewards
POST /api/rewards Create reward

Subscriptions

Resource Description
GET /api/subscriptions Get a list of company-specific user-specific subscriptions
GET /api/subscriptions/:id/receipts Get a list of the last 20 receipts of the subscription

Tags

Resource Description
GET /api/tags/latest Get 100 tags for the current user sorted from newest to oldest
GET /api/current_user_tags Get 100 tags for the current user sorted from newest to oldest, each tag prefixed with @

Transaction rules

Resource Description
GET /api/transaction_rules Get a list of company-specific email rules
POST /api/transaction_rules Create email rule
PUT /api/transaction_rules/:id Update email rule
DELETE /api/transaction_rules/:id Delete email rule

Transactions

Resource Description
GET /api/transactions Get the list of receipts
POST /api/transactions Create receipt
PUT /api/transactions/:id/approve Approve Receipt
POST /api/transactions/:id/disapprove Disapprove receipt
POST /api/transactions/:id/approvers Set transaction-specific approval cycle

Trips

Resource Description
GET /api/trips Get the list of trips
POST /api/trips Create a new trip (aka mileage)
GET /api/trips/calculate_cost Get the cost of the trip

Users

Resource Description
GET /api/users Get users list
GET /api/users/extended_index Get users' details list
POST /api/users Add new user
PUT /api/users/:id Edit existing user
GET /api/users/:id Get user details by id
DELETE /api/users/:id Delete user from the current company by id
PUT /api/users/:id/change_company/:company_id Change user's current company id
PUT /api/users/:id/switch_to_another_company Change user's current company id to the 1st available one