Channels

Creat channel

Create channel

POST {base url}/v1/accounting/channel

create a new channel

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Body

Name
Type
Description

name *

string

name of channel

glAccountId *

string

id of the ledger attached to this channel

channelUserType *

array

channel user type (loans, deposits)

branch *

array

id or the branch or all_branches

status

string

status of the channel (active/inactive)

Response

{
    "message": "channel successfully created",
    "data": {
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "name": "name of the channel",
        "glAccountId": "08f743a6-757f-4e06-a729-dc3989001e30",
        "channelUserType": [
            "loans"
        ],
        "branch": [
            "all_branches"
        ],
        "status": "active",
        "id": "d8da13a4-3eed-4383-8f1e-2dd945881bc9",
        "created_at": "2024-04-02T08:25:41.884Z",
        "updated_at": "2024-04-02T08:25:41.884Z"
    }
}
{
    "name": "name of the channel",
    "glAccountId": "08f743a6-757f-4e06-a729-dc3989001e30",
    "channelUserType":[ "loans"],
    "branch": ["all_branches"],
    "status": "active"
}

get channels

Get channels

GET {base url}/v1/accounting/channel

get channels

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Query parameters

Name
Type
Description

page

number

page to fetch

perPage

number

number of items per page

Response

{
    "data": [
        {
            "id": "6de54c04-12e7-4b5e-afc2-9c528a087d15",
            "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
            "glAccountId": "08f743a6-757f-4e06-a729-dc3989001e30",
            "name": "new channel",
            "channelUserType": [
                "deposits",
                "loans"
            ],
            "branch": [
                "all_branches"
            ],
            "status": "active",
            "created_at": "2024-02-06T06:25:21.684Z",
            "updated_at": "2024-02-06T06:25:21.684Z"
        }
    ],
    "pagination": {
        "currentPage": 1,
        "perPage": 15,
        "totalCount": 1,
        "totalPages": 1,
        "previousPage": 0,
        "nextPage": 1
    }
}

get channel by id

Get channel by id

GET {base url}/v1/accounting/channel/{channelId}

get a single channel by id

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Response

{
    "data": {
        "id": "6de54c04-12e7-4b5e-afc2-9c528a087d15",
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "glAccountId": "08f743a6-757f-4e06-a729-dc3989001e30",
        "name": "new channel",
        "channelUserType": [
            "deposits",
            "loans"
        ],
        "branch": [
            "all_branches"
        ],
        "status": "active",
        "created_at": "2024-02-06T06:25:21.684Z",
        "updated_at": "2024-02-06T06:25:21.684Z"
    }
}
{
    "data": {
        "id": "6de54c04-12e7-4b5e-afc2-9c528a087d15",
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "glAccountId": "08f743a6-757f-4e06-a729-dc3989001e30",
        "name": "new channel",
        "channelUserType": [
            "deposits",
            "loans"
        ],
        "branch": [
            "all_branches"
        ],
        "status": "active",
        "created_at": "2024-02-06T06:25:21.684Z",
        "updated_at": "2024-02-06T06:25:21.684Z"
    }
}

update channel

Update channel

PATCH {base url}/v1/accounting/channel/{channelId}

Update channel

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Body

Name
Type
Description

channelUserType

array

channel user type (loans, deposits)

branch

array

id or the branch or all_branches

status

string

status of branch

Response

{
    "message": "channel successfully updated"
}
{
    "channelUserType": ["loans"],
    "branch": ["all_branches"],
    "status": "inactive"
}

Last updated