Skip to content

Payment type ​

INFO

Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.

POST /payment-type/create ​

This method allows adding payment-type into the account.

Request body

FieldTypeRequiredDescription
namestringYes
parent_idstringNo
transaction_typestringNoOne of: income, expense, transfer, exchange, nothing, exchange_method. Default: "income"
user_typestringNoOne of: supplier, employee, customer, person, other. Default: "supplier"
can_be_canceledbooleanNoDefault: false
json
{
  "name": "string",
  "parent_id": "67b486d242ed76693cd2cc59",
  "transaction_type": "income",
  "user_type": "supplier",
  "can_be_canceled": false
}

Response

FieldTypeDescription
_idstring
namestring
short_cutstring
typestringOne of: cash, card, debt, gift, transfer, terminal, by_balance, by_cashback
is_enabledbooleanDefault: true
is_defaultbooleanDefault: false
is_visiblebooleanDefault: false
created_atstring (date-time)
updated_atstring (date-time)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "short_cut": "string",
    "type": "cash",
    "is_enabled": true,
    "is_default": false,
    "is_visible": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /payment-type/update ​

This method allows updating payment-type in the account.

Request body

FieldTypeRequiredDescription
_idstringYes
namestringYes
parent_idstringNo
transaction_typestringNoOne of: income, expense, transfer, exchange, nothing, exchange_method. Default: "income"
user_typestringNoOne of: supplier, employee, customer, person, other. Default: "supplier"
can_be_canceledbooleanNoDefault: false
json
{
  "_id": "67b486d242ed76693cd2cc59",
  "name": "string",
  "parent_id": "67b486d242ed76693cd2cc59",
  "transaction_type": "income",
  "user_type": "supplier",
  "can_be_canceled": false
}

Response

Same response shape as POST /payment-type/create.

DELETE /payment-type/delete/{id} ​

Delete a payment-type

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

POST /payment-type/get-all ​

Get all payment-types

Request body

FieldTypeRequiredDescription
transaction_typestringNoOne of: income, expense, transfer, exchange, nothing, exchange_method
user_typestringNoOne of: supplier, employee, customer, person, other
is_visiblebooleanNoDefault: false
is_activebooleanNoDefault: true
searchstringNo
json
{
  "transaction_type": "income",
  "user_type": "supplier",
  "is_visible": false,
  "is_active": true,
  "search": "string"
}

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "name": "string",
      "short_cut": "string",
      "type": "cash",
      "is_enabled": true,
      "is_default": false,
      "is_visible": false,
      "created_at": "2025-05-01T12:00:00Z",
      "updated_at": "2025-05-01T12:00:00Z"
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

GET /payment-type/get-by-id/{id} ​

Get payment-type using its _id

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /payment-type/create.

GET /payment-type/get-deleted ​

Get deleted payment-type ids

Query parameters

ParameterTypeRequiredDescription
deleted_atstringYes

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    "string"
  ],
  "time": "2025-05-01T12:00:00Z"
}

PUT /payment-type/set-state ​

This method allows setActive payment-type in the account.

Request body

FieldTypeRequiredDescription
is_activebooleanYesDefault: true
_idstringYes
json
{
  "is_active": true,
  "_id": "67b486d242ed76693cd2cc59"
}

Response

Same response shape as POST /payment-type/create.


This page is generated from the OpenAPI spec.

Bito 2.0 Integration API