Branch

create branch

Create branch

POST {base url}/v1/branch

Create branch

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Body

Name
Type
Description

name

string

Name of the branch

location

string

Location of branch

Status

string

status of branch (active/ inactive)

Response

{
    "responseCode": "00",
    "message": "branch successfully created",
    "data": {
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "name": "ojodues",
        "location": "20 Marina road, Lagos",
        "status": "active",
        "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
        "created_at": "2024-04-02T07:32:13.798Z",
        "updated_at": "2024-04-02T07:32:13.798Z"
    }
}
{
    "name": "Ojodues",
    "location": "20 Marina road, Lagos",
    "status": "active"
}

get branches

Get branches

GET {base url}/v1/branch

Fetch all branches

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 on a page

Response

{
    "responseCode": "00",
    "message": "branches fetch successfully",
    "data": [
        {
            "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
            "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
            "name": "ojodues",
            "location": "20 Marina road, Lagos",
            "status": "active",
            "created_at": "2024-04-02T07:32:13.798Z",
            "updated_at": "2024-04-02T07:32:13.798Z"
        },
    ],
    "pagination": {
        "currentPage": 1,
        "perPage": 15,
        "totalCount": 18,
        "totalPages": 2,
        "previousPage": 0,
        "nextPage": 2
    }
}
{
    "responseCode": "00",
    "message": "branches fetch successfully",
    "data": [
        {
            "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
            "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
            "name": "ojodues",
            "location": "20 Marina road, Lagos",
            "status": "active",
            "created_at": "2024-04-02T07:32:13.798Z",
            "updated_at": "2024-04-02T07:32:13.798Z"
        },
    ],
    "pagination": {
        "currentPage": 1,
        "perPage": 15,
        "totalCount": 18,
        "totalPages": 2,
        "previousPage": 0,
        "nextPage": 2
    }
}

get a branch

Get a branch

GET {base url}/v1/branch/{branchId}

Fetch a single branch details

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Response

{
    "responseCode": "00",
    "message": "branch successfully fetch",
    "data": {
        "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "name": "ojodues",
        "location": "20 Marina road, Lagos",
        "status": "active",
        "created_at": "2024-04-02T07:32:13.798Z",
        "updated_at": "2024-04-02T07:32:13.798Z"
    }
}
{
    "responseCode": "00",
    "message": "branch successfully fetch",
    "data": {
        "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "name": "ojodues",
        "location": "20 Marina road, Lagos",
        "status": "active",
        "created_at": "2024-04-02T07:32:13.798Z",
        "updated_at": "2024-04-02T07:32:13.798Z"
    }
}

update branch

Update branch

PATCH {base url}/v1/branch/{branchId}

Update a single branch

Headers

Name
Type
Description

Authorization header*

String

API user secret key

Body

Name
Type
Description

name

string

Name of the branch

location

string

Location of branch

Status

string

status of branch (active/ inactive)

Response

{
    "responseCode": "00",
    "message": "branch successfully fetch",
    "data": {
        "id": "e83baea7-9a46-4c3c-a1e0-9214d2006493",
        "organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
        "name": "ojodues",
        "location": "20 Marina road, Lagos",
        "status": "active",
        "created_at": "2024-04-02T07:32:13.798Z",
        "updated_at": "2024-04-02T07:32:13.798Z"
    }
}
{
    "location": "20 Abule-Ajah, Lagos"
}

Last updated