MENU navbar-image

Introduction

This documentation provides all the information you will need to work with CUPID v2 API. The application is built with Laravel 9 PHP framework & is systematically versioned (SEMVER) to replace CUPID API v1.

This documentation aims to provide all the information you need to work with our API.

Base URL

https://cupidapiv2.smartflowtech.org/

Authenticating requests

Authenticate requests to this API's endpoints by sending a Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your access_token by logging in using the Login a user endpoint

ACL Endpoints

Display a listing of the roles or filter by query

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/acl/roles?term=quibusdam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/roles"
);

const params = {
    "term": "quibusdam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=FOBDFGpXzffhyRURP8cYqZfuH61gMaI0HSQhKIh5; expires=Wed, 11 Dec 2024 10:37:27 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/acl/roles could not be found."
}
 

Request      

GET api/acl/roles

Query Parameters

term  string optional  

Search query parameter

Add a new role

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/roles" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"permissions\": [
        7
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/roles"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "permissions": [
        7
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "super admin",
        "guard_name": "api",
        "created_at": null,
        "updated_at": null,
        "permissions": [
            {
                "id": 1,
                "name": "view",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 1
                }
            },
            {
                "id": 2,
                "name": "create",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 2
                }
            },
            {
                "id": 3,
                "name": "update",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 3
                }
            },
            {
                "id": 4,
                "name": "delete",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 4
                }
            },
            {
                "id": 5,
                "name": "view acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 5
                }
            },
            {
                "id": 6,
                "name": "create acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 6
                }
            },
            {
                "id": 7,
                "name": "update acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 7
                }
            },
            {
                "id": 8,
                "name": "delete acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 8
                }
            },
            {
                "id": 9,
                "name": "view company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 9
                }
            },
            {
                "id": 10,
                "name": "create company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 10
                }
            },
            {
                "id": 11,
                "name": "update company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 11
                }
            },
            {
                "id": 12,
                "name": "delete company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 12
                }
            },
            {
                "id": 13,
                "name": "view company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 13
                }
            },
            {
                "id": 14,
                "name": "create company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 14
                }
            },
            {
                "id": 15,
                "name": "update company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 15
                }
            },
            {
                "id": 16,
                "name": "delete company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 16
                }
            },
            {
                "id": 17,
                "name": "view cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 17
                }
            },
            {
                "id": 18,
                "name": "create cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 18
                }
            },
            {
                "id": 19,
                "name": "update cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 19
                }
            },
            {
                "id": 20,
                "name": "delete cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 20
                }
            },
            {
                "id": 21,
                "name": "view fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 21
                }
            },
            {
                "id": 22,
                "name": "create fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 22
                }
            },
            {
                "id": 23,
                "name": "update fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 23
                }
            },
            {
                "id": 24,
                "name": "delete fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 24
                }
            },
            {
                "id": 25,
                "name": "view user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 25
                }
            },
            {
                "id": 26,
                "name": "create user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 26
                }
            },
            {
                "id": 27,
                "name": "update user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 27
                }
            },
            {
                "id": 28,
                "name": "delete user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 28
                }
            },
            {
                "id": 29,
                "name": "view payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 29
                }
            },
            {
                "id": 30,
                "name": "create payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 30
                }
            },
            {
                "id": 31,
                "name": "update payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 31
                }
            },
            {
                "id": 32,
                "name": "delete payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 32
                }
            },
            {
                "id": 33,
                "name": "view pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 33
                }
            },
            {
                "id": 34,
                "name": "create pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 34
                }
            },
            {
                "id": 35,
                "name": "update pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 35
                }
            },
            {
                "id": 36,
                "name": "delete pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 36
                }
            },
            {
                "id": 37,
                "name": "onboard customer",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 37
                }
            },
            {
                "id": 38,
                "name": "debit customer wallet",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 38
                }
            },
            {
                "id": 39,
                "name": "view user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 39
                }
            },
            {
                "id": 40,
                "name": "create user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 40
                }
            },
            {
                "id": 41,
                "name": "update user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 41
                }
            },
            {
                "id": 42,
                "name": "delete user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 42
                }
            },
            {
                "id": 43,
                "name": "fund user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 43
                }
            },
            {
                "id": 44,
                "name": "view wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 44
                }
            },
            {
                "id": 45,
                "name": "delete wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 45
                }
            },
            {
                "id": 46,
                "name": "create sub-wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 46
                }
            },
            {
                "id": 47,
                "name": "view vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 47
                }
            },
            {
                "id": 48,
                "name": "create vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 48
                }
            },
            {
                "id": 49,
                "name": "update vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 49
                }
            },
            {
                "id": 50,
                "name": "delete vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 50
                }
            },
            {
                "id": 51,
                "name": "view vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 51
                }
            },
            {
                "id": 52,
                "name": "create vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 52
                }
            },
            {
                "id": 53,
                "name": "update vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 53
                }
            },
            {
                "id": 54,
                "name": "delete vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 54
                }
            },
            {
                "id": 55,
                "name": "view vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 55
                }
            },
            {
                "id": 56,
                "name": "create vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 56
                }
            },
            {
                "id": 57,
                "name": "update vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 57
                }
            },
            {
                "id": 58,
                "name": "delete vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 58
                }
            },
            {
                "id": 59,
                "name": "restore user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 59
                }
            },
            {
                "id": 60,
                "name": "request view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 60
                }
            },
            {
                "id": 61,
                "name": "request create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 61
                }
            },
            {
                "id": 62,
                "name": "request update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 62
                }
            },
            {
                "id": 63,
                "name": "request delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 63
                }
            },
            {
                "id": 64,
                "name": "category view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 64
                }
            },
            {
                "id": 65,
                "name": "category update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 65
                }
            },
            {
                "id": 66,
                "name": "category create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 66
                }
            },
            {
                "id": 67,
                "name": "category delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 67
                }
            },
            {
                "id": 68,
                "name": "destination view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 68
                }
            },
            {
                "id": 69,
                "name": "destination create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 69
                }
            },
            {
                "id": 70,
                "name": "destination update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 70
                }
            },
            {
                "id": 71,
                "name": "destination delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 71
                }
            },
            {
                "id": 72,
                "name": "destination_allocation view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 72
                }
            },
            {
                "id": 73,
                "name": "destination_allocation create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 73
                }
            },
            {
                "id": 74,
                "name": "destination_allocation update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 74
                }
            },
            {
                "id": 75,
                "name": "destination_allocation delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 75
                }
            }
        ]
    }
}
 

Request      

POST api/acl/roles

Body Parameters

name  string  

permissions  integer[]  

Update a specific role

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/acl/roles/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"voluptatem\",
    \"permissions\": [
        14
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/roles/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "voluptatem",
    "permissions": [
        14
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "super admin",
        "guard_name": "api",
        "created_at": null,
        "updated_at": null,
        "permissions": [
            {
                "id": 1,
                "name": "view",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 1
                }
            },
            {
                "id": 2,
                "name": "create",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 2
                }
            },
            {
                "id": 3,
                "name": "update",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 3
                }
            },
            {
                "id": 4,
                "name": "delete",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 4
                }
            },
            {
                "id": 5,
                "name": "view acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 5
                }
            },
            {
                "id": 6,
                "name": "create acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 6
                }
            },
            {
                "id": 7,
                "name": "update acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 7
                }
            },
            {
                "id": 8,
                "name": "delete acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 8
                }
            },
            {
                "id": 9,
                "name": "view company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 9
                }
            },
            {
                "id": 10,
                "name": "create company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 10
                }
            },
            {
                "id": 11,
                "name": "update company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 11
                }
            },
            {
                "id": 12,
                "name": "delete company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 12
                }
            },
            {
                "id": 13,
                "name": "view company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 13
                }
            },
            {
                "id": 14,
                "name": "create company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 14
                }
            },
            {
                "id": 15,
                "name": "update company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 15
                }
            },
            {
                "id": 16,
                "name": "delete company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 16
                }
            },
            {
                "id": 17,
                "name": "view cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 17
                }
            },
            {
                "id": 18,
                "name": "create cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 18
                }
            },
            {
                "id": 19,
                "name": "update cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 19
                }
            },
            {
                "id": 20,
                "name": "delete cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 20
                }
            },
            {
                "id": 21,
                "name": "view fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 21
                }
            },
            {
                "id": 22,
                "name": "create fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 22
                }
            },
            {
                "id": 23,
                "name": "update fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 23
                }
            },
            {
                "id": 24,
                "name": "delete fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 24
                }
            },
            {
                "id": 25,
                "name": "view user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 25
                }
            },
            {
                "id": 26,
                "name": "create user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 26
                }
            },
            {
                "id": 27,
                "name": "update user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 27
                }
            },
            {
                "id": 28,
                "name": "delete user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 28
                }
            },
            {
                "id": 29,
                "name": "view payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 29
                }
            },
            {
                "id": 30,
                "name": "create payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 30
                }
            },
            {
                "id": 31,
                "name": "update payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 31
                }
            },
            {
                "id": 32,
                "name": "delete payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 32
                }
            },
            {
                "id": 33,
                "name": "view pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 33
                }
            },
            {
                "id": 34,
                "name": "create pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 34
                }
            },
            {
                "id": 35,
                "name": "update pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 35
                }
            },
            {
                "id": 36,
                "name": "delete pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 36
                }
            },
            {
                "id": 37,
                "name": "onboard customer",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 37
                }
            },
            {
                "id": 38,
                "name": "debit customer wallet",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 38
                }
            },
            {
                "id": 39,
                "name": "view user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 39
                }
            },
            {
                "id": 40,
                "name": "create user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 40
                }
            },
            {
                "id": 41,
                "name": "update user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 41
                }
            },
            {
                "id": 42,
                "name": "delete user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 42
                }
            },
            {
                "id": 43,
                "name": "fund user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 43
                }
            },
            {
                "id": 44,
                "name": "view wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 44
                }
            },
            {
                "id": 45,
                "name": "delete wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 45
                }
            },
            {
                "id": 46,
                "name": "create sub-wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 46
                }
            },
            {
                "id": 47,
                "name": "view vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 47
                }
            },
            {
                "id": 48,
                "name": "create vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 48
                }
            },
            {
                "id": 49,
                "name": "update vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 49
                }
            },
            {
                "id": 50,
                "name": "delete vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 50
                }
            },
            {
                "id": 51,
                "name": "view vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 51
                }
            },
            {
                "id": 52,
                "name": "create vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 52
                }
            },
            {
                "id": 53,
                "name": "update vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 53
                }
            },
            {
                "id": 54,
                "name": "delete vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 54
                }
            },
            {
                "id": 55,
                "name": "view vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 55
                }
            },
            {
                "id": 56,
                "name": "create vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 56
                }
            },
            {
                "id": 57,
                "name": "update vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 57
                }
            },
            {
                "id": 58,
                "name": "delete vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 58
                }
            },
            {
                "id": 59,
                "name": "restore user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 59
                }
            },
            {
                "id": 60,
                "name": "request view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 60
                }
            },
            {
                "id": 61,
                "name": "request create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 61
                }
            },
            {
                "id": 62,
                "name": "request update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 62
                }
            },
            {
                "id": 63,
                "name": "request delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 63
                }
            },
            {
                "id": 64,
                "name": "category view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 64
                }
            },
            {
                "id": 65,
                "name": "category update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 65
                }
            },
            {
                "id": 66,
                "name": "category create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 66
                }
            },
            {
                "id": 67,
                "name": "category delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 67
                }
            },
            {
                "id": 68,
                "name": "destination view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 68
                }
            },
            {
                "id": 69,
                "name": "destination create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 69
                }
            },
            {
                "id": 70,
                "name": "destination update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 70
                }
            },
            {
                "id": 71,
                "name": "destination delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 71
                }
            },
            {
                "id": 72,
                "name": "destination_allocation view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 72
                }
            },
            {
                "id": 73,
                "name": "destination_allocation create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 73
                }
            },
            {
                "id": 74,
                "name": "destination_allocation update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 74
                }
            },
            {
                "id": 75,
                "name": "destination_allocation delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 75
                }
            }
        ]
    }
}
 

Request      

PUT api/acl/roles/{id}

PATCH api/acl/roles/{id}

URL Parameters

id  integer  

The ID of the role

Body Parameters

name  string  

permissions  integer[]  

Delete a specific role

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/acl/roles/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/roles/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "super admin",
        "guard_name": "api",
        "created_at": null,
        "updated_at": null,
        "permissions": [
            {
                "id": 1,
                "name": "view",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 1
                }
            },
            {
                "id": 2,
                "name": "create",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 2
                }
            },
            {
                "id": 3,
                "name": "update",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 3
                }
            },
            {
                "id": 4,
                "name": "delete",
                "module": "General",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 4
                }
            },
            {
                "id": 5,
                "name": "view acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 5
                }
            },
            {
                "id": 6,
                "name": "create acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 6
                }
            },
            {
                "id": 7,
                "name": "update acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 7
                }
            },
            {
                "id": 8,
                "name": "delete acl",
                "module": "Roles",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 8
                }
            },
            {
                "id": 9,
                "name": "view company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 9
                }
            },
            {
                "id": 10,
                "name": "create company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 10
                }
            },
            {
                "id": 11,
                "name": "update company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 11
                }
            },
            {
                "id": 12,
                "name": "delete company",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 12
                }
            },
            {
                "id": 13,
                "name": "view company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 13
                }
            },
            {
                "id": 14,
                "name": "create company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 14
                }
            },
            {
                "id": 15,
                "name": "update company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 15
                }
            },
            {
                "id": 16,
                "name": "delete company group",
                "module": "Company",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 16
                }
            },
            {
                "id": 17,
                "name": "view cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 17
                }
            },
            {
                "id": 18,
                "name": "create cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 18
                }
            },
            {
                "id": 19,
                "name": "update cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 19
                }
            },
            {
                "id": 20,
                "name": "delete cost center",
                "module": "CostCenter",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 20
                }
            },
            {
                "id": 21,
                "name": "view fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 21
                }
            },
            {
                "id": 22,
                "name": "create fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 22
                }
            },
            {
                "id": 23,
                "name": "update fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 23
                }
            },
            {
                "id": 24,
                "name": "delete fleet",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 24
                }
            },
            {
                "id": 25,
                "name": "view user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 25
                }
            },
            {
                "id": 26,
                "name": "create user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 26
                }
            },
            {
                "id": 27,
                "name": "update user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 27
                }
            },
            {
                "id": 28,
                "name": "delete user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 28
                }
            },
            {
                "id": 29,
                "name": "view payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 29
                }
            },
            {
                "id": 30,
                "name": "create payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 30
                }
            },
            {
                "id": 31,
                "name": "update payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 31
                }
            },
            {
                "id": 32,
                "name": "delete payment",
                "module": "Payment",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 32
                }
            },
            {
                "id": 33,
                "name": "view pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 33
                }
            },
            {
                "id": 34,
                "name": "create pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 34
                }
            },
            {
                "id": 35,
                "name": "update pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 35
                }
            },
            {
                "id": 36,
                "name": "delete pos",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 36
                }
            },
            {
                "id": 37,
                "name": "onboard customer",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 37
                }
            },
            {
                "id": 38,
                "name": "debit customer wallet",
                "module": "POS",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 38
                }
            },
            {
                "id": 39,
                "name": "view user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 39
                }
            },
            {
                "id": 40,
                "name": "create user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 40
                }
            },
            {
                "id": 41,
                "name": "update user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 41
                }
            },
            {
                "id": 42,
                "name": "delete user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 42
                }
            },
            {
                "id": 43,
                "name": "fund user wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 43
                }
            },
            {
                "id": 44,
                "name": "view wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 44
                }
            },
            {
                "id": 45,
                "name": "delete wallet history",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 45
                }
            },
            {
                "id": 46,
                "name": "create sub-wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 46
                }
            },
            {
                "id": 47,
                "name": "view vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 47
                }
            },
            {
                "id": 48,
                "name": "create vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 48
                }
            },
            {
                "id": 49,
                "name": "update vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 49
                }
            },
            {
                "id": 50,
                "name": "delete vendor wallet",
                "module": "UserWallet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 50
                }
            },
            {
                "id": 51,
                "name": "view vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 51
                }
            },
            {
                "id": 52,
                "name": "create vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 52
                }
            },
            {
                "id": 53,
                "name": "update vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 53
                }
            },
            {
                "id": 54,
                "name": "delete vendor",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 54
                }
            },
            {
                "id": 55,
                "name": "view vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 55
                }
            },
            {
                "id": 56,
                "name": "create vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 56
                }
            },
            {
                "id": 57,
                "name": "update vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 57
                }
            },
            {
                "id": 58,
                "name": "delete vendor group",
                "module": "Vendor",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 58
                }
            },
            {
                "id": 59,
                "name": "restore user",
                "module": "OAuth",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 59
                }
            },
            {
                "id": 60,
                "name": "request view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 60
                }
            },
            {
                "id": 61,
                "name": "request create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 61
                }
            },
            {
                "id": 62,
                "name": "request update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 62
                }
            },
            {
                "id": 63,
                "name": "request delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 63
                }
            },
            {
                "id": 64,
                "name": "category view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 64
                }
            },
            {
                "id": 65,
                "name": "category update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 65
                }
            },
            {
                "id": 66,
                "name": "category create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 66
                }
            },
            {
                "id": 67,
                "name": "category delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 67
                }
            },
            {
                "id": 68,
                "name": "destination view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 68
                }
            },
            {
                "id": 69,
                "name": "destination create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 69
                }
            },
            {
                "id": 70,
                "name": "destination update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 70
                }
            },
            {
                "id": 71,
                "name": "destination delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 71
                }
            },
            {
                "id": 72,
                "name": "destination_allocation view",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 72
                }
            },
            {
                "id": 73,
                "name": "destination_allocation create",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 73
                }
            },
            {
                "id": 74,
                "name": "destination_allocation update",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 74
                }
            },
            {
                "id": 75,
                "name": "destination_allocation delete",
                "module": "Fleet",
                "guard_name": "api",
                "created_at": null,
                "updated_at": null,
                "pivot": {
                    "role_id": 1,
                    "permission_id": 75
                }
            }
        ]
    }
}
 

Request      

DELETE api/acl/roles/{id}

URL Parameters

id  integer  

The ID of the role

Display a listing of the permission or filter by query

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/acl/permissions?term=impedit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions"
);

const params = {
    "term": "impedit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=QOZzwF56kq707X69PPhVV4IhWMJe9OT6WVBew3FB; expires=Wed, 11 Dec 2024 10:37:31 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/acl/permissions could not be found."
}
 

Request      

GET api/acl/permissions

Query Parameters

term  string optional  

Search query parameter

Add a new permission

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"inventore\",
    \"module\": \"Company\",
    \"guard_name\": \"web\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "inventore",
    "module": "Company",
    "guard_name": "web"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "view",
        "module": "General",
        "guard_name": "api",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/acl/permissions

Body Parameters

name  string  

module  string  

Must be one of Company, OAuth, Vendor, CostCenter, Fleet, POS, Payment, General, UserWallet, or Roles.

guard_name  string  

Must be one of api or web.

Update a specific permission

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"delectus\",
    \"module\": \"OAuth\",
    \"guard_name\": \"api\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "delectus",
    "module": "OAuth",
    "guard_name": "api"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "view",
        "module": "General",
        "guard_name": "api",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/acl/permissions/{id}

PATCH api/acl/permissions/{id}

URL Parameters

id  integer  

The ID of the role

Body Parameters

name  string  

module  string  

Must be one of Company, OAuth, Vendor, CostCenter, Fleet, POS, Payment, General, UserWallet, or Roles.

guard_name  string  

Must be one of api or web.

Delete a specific permission

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/permissions/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/acl/permissions/{id}

URL Parameters

id  integer  

The ID of the role

Assign permissions to a user

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/user_assign_permissions?permission_names[]=fugit&email=voluptatem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permission_names\": [
        \"quibusdam\"
    ],
    \"email\": \"april94@example.org\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/user_assign_permissions"
);

const params = {
    "permission_names[]": "fugit",
    "email": "voluptatem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permission_names": [
        "quibusdam"
    ],
    "email": "april94@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/user_assign_permissions

Query Parameters

permission_names  string[]  

The name of the permissions you wish to assign to the user

email  string  

The email address of the user

Body Parameters

permission_names  string[]  

email  string  

Must be a valid email address.

Assign roles to a user

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/user_assign_roles?role_names[]=deserunt&email=accusantium" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role_names\": [
        \"aut\"
    ],
    \"email\": \"howe.sadie@example.org\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/user_assign_roles"
);

const params = {
    "role_names[]": "deserunt",
    "email": "accusantium",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role_names": [
        "aut"
    ],
    "email": "howe.sadie@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/user_assign_roles

Query Parameters

role_names  string[]  

The name of the role you wish to assign to the user

email  string  

The email address of the user

Body Parameters

role_names  string[]  

email  string  

Must be a valid email address.

Revoke user roles

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_role?role_names[]=quidem&email=molestiae" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role_names\": [
        \"aliquam\"
    ],
    \"email\": \"tiffany.mohr@example.com\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_role"
);

const params = {
    "role_names[]": "quidem",
    "email": "molestiae",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role_names": [
        "aliquam"
    ],
    "email": "tiffany.mohr@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/revoke_user_role

Query Parameters

role_names  string[]  

The name of the role you wish to retain for the user

email  string  

The email address of the user

Body Parameters

role_names  string[]  

email  string  

Must be a valid email address.

Revoke user permissions

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_permission?permission_names[]=rem&email=nobis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permission_names\": [
        \"fugit\"
    ],
    \"email\": \"bergnaum.dawn@example.com\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_permission"
);

const params = {
    "permission_names[]": "rem",
    "email": "nobis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permission_names": [
        "fugit"
    ],
    "email": "bergnaum.dawn@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/revoke_user_permission

Query Parameters

permission_names  string[]  

The name of the permission you wish to retain for the user

email  string  

The email address of the user

Body Parameters

permission_names  string[]  

email  string  

Must be a valid email address.

Assign permissions to role

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/assign_permissions_to_role?permission_names[]=dolor&role=dolorem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role\": \"est\",
    \"permission_names\": [
        \"unde\"
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/assign_permissions_to_role"
);

const params = {
    "permission_names[]": "dolor",
    "role": "dolorem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role": "est",
    "permission_names": [
        "unde"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/assign_permissions_to_role

Query Parameters

permission_names  string[]  

The name of the role you wish to retain for the user

role  string  

The email address of the user

Body Parameters

role  string  

permission_names  string[] optional  

Revoke permissions to role

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/acl/detach_permissions_from_role?permission_names[]=molestiae&role=aut" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role\": \"esse\",
    \"permission_names\": [
        \"eum\"
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/acl/detach_permissions_from_role"
);

const params = {
    "permission_names[]": "molestiae",
    "role": "aut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role": "esse",
    "permission_names": [
        "eum"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/acl/detach_permissions_from_role

Query Parameters

permission_names  string[]  

The name of the role you wish to retain for the user

role  string  

The email address of the user

Body Parameters

role  string  

permission_names  string[] optional  

Authentication Endpoints

Login a user

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/oauth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "client_id: The application client ID provided by the SSO application" \
    --header "client_secret: The application client secret key provided by the SSO application" \
    --data "{
    \"email\": \"voluptas\",
    \"password\": \"non\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/oauth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "client_id": "The application client ID provided by the SSO application",
    "client_secret": "The application client secret key provided by the SSO application",
};

let body = {
    "email": "voluptas",
    "password": "non"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Login was successful",
    "data": {
        "access_token": "eyJ0eXAiOiJKV1QiLCJh...",
        "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "useremail@example.org",
            "other_user_info": "other user information"
        },
        "vendor": {
            "id": 14,
            "name": "Company Name Ltd"
        }
    }
}
 

Request      

POST api/oauth/login

Body Parameters

email  string  

The email of the user

password  string  

The password of the user

Reset user password

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/reset_password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"fugit\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/reset_password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "fugit"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/reset_password

Body Parameters

email  string  

The user email

Register a user for self on-boarding

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"possimus\",
    \"name\": \"eos\",
    \"email\": \"dicta\",
    \"username\": \"id\",
    \"phone\": \"qui\",
    \"gender\": \"id\",
    \"suspended\": \"qui\",
    \"active\": \"iure\",
    \"is_admin\": \"amet\",
    \"is_vendor\": \"neque\",
    \"create_company\": false,
    \"create_company_wallet\": true,
    \"vendor_id\": 3,
    \"vehicles\": [
        {
            \"cost_center_id\": 12,
            \"driver_id\": 19,
            \"group_id\": 6,
            \"registration_number\": \"uvvoiihkofkjihqyvedldrzcgycinlj\",
            \"tank_capacity\": 567945357.911967,
            \"auth_type\": \"klmkxtunqqlgstlgabkyxckecpjjzkgmkkzqkpkytjxpcasvnjqolbhnvzmfljzeysrvwgjcowaogutuhwidomejclghmblzxypsrumxygfo\",
            \"nfc_tag_id\": 16,
            \"tracker_id\": 3,
            \"model\": \"hihxhbuyprvamcsmptmotzgfoebgdygvxmkwslqjerzdqlrpkegqekdwapdjcbqxkljdtqzotiskjhpbfdjjsglolvtobxexsofxzorhjfujcthfclmikrcstwdmgccawdcltmtvytjsqqrktyrrwepynuqwkrfkozgzgvrgivkjrnwtxmdhmvjb\",
            \"engine_capacity\": 6592.109,
            \"fuel_type\": \"fomdqiekbrwwjjal\",
            \"color\": \"phobityhvuxvntzpdqsowajknsopazkvncmmikdyyndvgzvrzldyvuayjukzkhslfd\",
            \"brand\": \"xsaucbmlimgxctmhndqntfrowuqdunevnsenrguocdykdsliqognmahkeqicylfgeahxcwvnbdmqhojxegs\",
            \"reward_type\": \"vpcjgcurbfxkklsjpdberfjhelkyvrtubbcmtnwzkbzjbdcfopxfrpgiaawzzaxrioslyuivklrvaptwpyowthlczsnexemuaioamgowhjzpemounhsxmhjktgzjgyrijvzjclirlhfwwbutaacmztelncypf\",
            \"active\": false
        }
    ],
    \"company_id\": 2
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "possimus",
    "name": "eos",
    "email": "dicta",
    "username": "id",
    "phone": "qui",
    "gender": "id",
    "suspended": "qui",
    "active": "iure",
    "is_admin": "amet",
    "is_vendor": "neque",
    "create_company": false,
    "create_company_wallet": true,
    "vendor_id": 3,
    "vehicles": [
        {
            "cost_center_id": 12,
            "driver_id": 19,
            "group_id": 6,
            "registration_number": "uvvoiihkofkjihqyvedldrzcgycinlj",
            "tank_capacity": 567945357.911967,
            "auth_type": "klmkxtunqqlgstlgabkyxckecpjjzkgmkkzqkpkytjxpcasvnjqolbhnvzmfljzeysrvwgjcowaogutuhwidomejclghmblzxypsrumxygfo",
            "nfc_tag_id": 16,
            "tracker_id": 3,
            "model": "hihxhbuyprvamcsmptmotzgfoebgdygvxmkwslqjerzdqlrpkegqekdwapdjcbqxkljdtqzotiskjhpbfdjjsglolvtobxexsofxzorhjfujcthfclmikrcstwdmgccawdcltmtvytjsqqrktyrrwepynuqwkrfkozgzgvrgivkjrnwtxmdhmvjb",
            "engine_capacity": 6592.109,
            "fuel_type": "fomdqiekbrwwjjal",
            "color": "phobityhvuxvntzpdqsowajknsopazkvncmmikdyyndvgzvrzldyvuayjukzkhslfd",
            "brand": "xsaucbmlimgxctmhndqntfrowuqdunevnsenrguocdykdsliqognmahkeqicylfgeahxcwvnbdmqhojxegs",
            "reward_type": "vpcjgcurbfxkklsjpdberfjhelkyvrtubbcmtnwzkbzjbdcfopxfrpgiaawzzaxrioslyuivklrvaptwpyowthlczsnexemuaioamgowhjzpemounhsxmhjktgzjgyrijvzjclirlhfwwbutaacmztelncypf",
            "active": false
        }
    ],
    "company_id": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/register

Body Parameters

title  string  

The user title

name  string  

The user name

email  email  

The user email

username  string  

The user username

phone  string  

The user phone

gender  string  

The user gender

suspended  string  

The user suspended

active  string  

The user active

is_admin  string  

The user is_admin

is_vendor  string  

The user is_vendor

create_company  boolean optional  

create_company_wallet  boolean optional  

vendor_id  integer  

The Vendor's ID from the app_config

vehicles  object[] optional  

vehicles[].cost_center_id  integer optional  

vehicles[].driver_id  integer optional  

vehicles[].group_id  integer optional  

vehicles[].registration_number  string optional  

Must not be greater than 255 characters.

vehicles[].tank_capacity  number optional  

vehicles[].auth_type  string optional  

Must not be greater than 255 characters.

vehicles[].nfc_tag_id  integer optional  

vehicles[].tracker_id  integer optional  

vehicles[].model  string optional  

Must not be greater than 255 characters.

vehicles[].engine_capacity  number optional  

vehicles[].fuel_type  string optional  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK Must not be greater than 255 characters.

vehicles[].color  string optional  

Must not be greater than 255 characters.

vehicles[].brand  string optional  

Must not be greater than 255 characters.

vehicles[].reward_type  string optional  

Must not be greater than 255 characters.

vehicles[].active  boolean optional  

company_id  integer  

Get Vendor OnBoarding details by hostname

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_vendor_on_boarding_details" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_vendor_on_boarding_details"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=OG0h1LyoIPhz7jX7TNsxlwFHK8vDDyVvegi1n0k7; expires=Wed, 11 Dec 2024 10:37:37 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/get_vendor_on_boarding_details could not be found."
}
 

Request      

GET api/get_vendor_on_boarding_details

Get logged in user profile

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "title": "Mr.",
            "name": "Julia Lehner",
            "email": "hbogan@example.org",
            "phone": "+12836343220",
            "avatar": "https://via.placeholder.com/200x200.png/0022dd?text=avatar+recusandae",
            "username": "jarred16",
            "gender": "Female",
            "newsletter": true,
            "active": true,
            "card_brand": "MasterCard",
            "card_last_four": "4986",
            "is_vendor": false,
            "is_admin": false,
            "updated_at": "2024-12-11T08:37:42.000000Z",
            "created_at": "2024-12-11T08:37:42.000000Z",
            "id": 488,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 50,
                    "name": "delete vendor wallet"
                },
                {
                    "id": 56,
                    "name": "create vendor group"
                },
                {
                    "id": 60,
                    "name": "request view"
                },
                {
                    "id": 65,
                    "name": "category update"
                },
                {
                    "id": 72,
                    "name": "destination_allocation view"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        },
        {
            "title": "Mr.",
            "name": "Kamron McGlynn",
            "email": "scorwin@example.com",
            "phone": "1-520-613-5809",
            "avatar": "https://via.placeholder.com/200x200.png/007799?text=avatar+eveniet",
            "username": "doug51",
            "gender": "Female",
            "newsletter": true,
            "active": true,
            "card_brand": "JCB",
            "card_last_four": "5209",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:37:43.000000Z",
            "created_at": "2024-12-11T08:37:43.000000Z",
            "id": 489,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 3,
                    "name": "update"
                },
                {
                    "id": 7,
                    "name": "update acl"
                },
                {
                    "id": 17,
                    "name": "view cost center"
                },
                {
                    "id": 25,
                    "name": "view user"
                },
                {
                    "id": 53,
                    "name": "update vendor"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        }
    ]
}
 

Request      

GET api/user

Set the user active vendor

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/set_user_active_vendor/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/set_user_active_vendor/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=omeERR0ivu8VMxC2Y7JEpIIcjha0OEwJQ3rJlEXk; expires=Wed, 11 Dec 2024 10:37:49 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/set_user_active_vendor/2 could not be found."
}
 

Request      

GET api/set_user_active_vendor/{vendor_id}

URL Parameters

vendor_id  integer  

The ID of the vendor

Send OTP to a user

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/issue_otp" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/issue_otp"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=MQjR0yzncaEfzjtzyQrcE1byciiWe4haaZyA6sN6; expires=Wed, 11 Dec 2024 10:38:19 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/issue_otp could not be found."
}
 

Request      

GET api/issue_otp

Get a users active vendors.This will return the vendors of the authenticated user, if email is empty

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_user_active_vendor?email=dolores" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_user_active_vendor"
);

const params = {
    "email": "dolores",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Rohan Group",
            "email": "anika06@hartmann.com",
            "phone_number": "504-458-4453",
            "country": "Vanuatu",
            "state": "Minnesota",
            "city": "Rowefurt",
            "postcode": "31785-6693",
            "address": "5670 Karina Drive Apt. 398",
            "registration_number": "RC-369198",
            "contact_person": "Nico Hill",
            "sm_company_id": 3,
            "products_sold": "LPG",
            "payment_type": "ut",
            "status": false,
            "has_active_paga_account": false,
            "updated_at": "2024-12-11T08:38:19.000000Z",
            "created_at": "2024-12-11T08:38:19.000000Z",
            "id": 318,
            "vendor_additional_details": null,
            "bank_accounts": null,
            "wallet_details": null,
            "app_config": null,
            "paga_details": null,
            "groups": []
        },
        {
            "name": "Yundt-Bauch",
            "email": "triston24@oberbrunner.com",
            "phone_number": "+1-669-918-6720",
            "country": "Brazil",
            "state": "Missouri",
            "city": "Ondrickaville",
            "postcode": "18576-0511",
            "address": "834 Tressa Rest",
            "registration_number": "RC-487906",
            "contact_person": "Winifred Fritsch",
            "sm_company_id": 6,
            "products_sold": "LPFO",
            "payment_type": "dolorem",
            "status": true,
            "has_active_paga_account": false,
            "updated_at": "2024-12-11T08:39:21.000000Z",
            "created_at": "2024-12-11T08:39:21.000000Z",
            "id": 319,
            "vendor_additional_details": null,
            "bank_accounts": null,
            "wallet_details": null,
            "app_config": null,
            "paga_details": null,
            "groups": []
        }
    ]
}
 

Request      

GET api/get_user_active_vendor

Query Parameters

email  string optional  

Search query parameter

Update user profile & password

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/profile/update_profile/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cupid_id\": 3,
    \"name\": \"tenetur\",
    \"email\": \"ubecker@example.net\",
    \"username\": \"dolor\",
    \"gender\": \"Female\",
    \"phone\": \"eum\",
    \"current_password\": \"dolores\",
    \"password\": \"rerum\",
    \"user_agent\": \"customer_app\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/profile/update_profile/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "cupid_id": 3,
    "name": "tenetur",
    "email": "ubecker@example.net",
    "username": "dolor",
    "gender": "Female",
    "phone": "eum",
    "current_password": "dolores",
    "password": "rerum",
    "user_agent": "customer_app"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/profile/update_profile/{sso_user_id}

URL Parameters

sso_user_id  integer  

The ID of the user

Body Parameters

cupid_id  integer optional  

name  string optional  

email  string optional  

Must be a valid email address.

username  string optional  

gender  string optional  

Must be one of Male or Female.

phone  string optional  

current_password  string optional  

password  string optional  

password_confirmation  string optional  

The value and password must match. This field is required when password is present.

user_agent  string optional  

Must be one of customer_app or cupid_fleet.

Register user on SSO for Super Admin

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/super_admin_register" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sit\",
    \"title\": \"reiciendis\",
    \"phone\": \"quidem\",
    \"email\": \"nulla\",
    \"username\": \"molestiae\",
    \"gender\": \"natus\",
    \"newsletter\": false,
    \"active\": \"autem\",
    \"is_admin\": \"est\",
    \"is_vendor\": \"ut\",
    \"suspended\": \"et\",
    \"vendors\": [
        7
    ],
    \"companies\": [
        13
    ],
    \"cost_centers\": [
        17
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/super_admin_register"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sit",
    "title": "reiciendis",
    "phone": "quidem",
    "email": "nulla",
    "username": "molestiae",
    "gender": "natus",
    "newsletter": false,
    "active": "autem",
    "is_admin": "est",
    "is_vendor": "ut",
    "suspended": "et",
    "vendors": [
        7
    ],
    "companies": [
        13
    ],
    "cost_centers": [
        17
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/super_admin_register

Body Parameters

name  string  

The user name

title  string  

The user title

phone  string  

The user phone

email  email  

The user email

username  string  

The user username

gender  string  

The user gender

newsletter  boolean optional  

active  string  

The user active

is_admin  string  

The user is_admin

is_vendor  string  

The user is_vendor

suspended  string  

The user suspended

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

POST api/test

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/test" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/test"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/test

Company Endpoints

Display a listing of the companies or search by name, phone number, email, address, city, state, country.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/companies?term=occaecati&per_page=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies"
);

const params = {
    "term": "occaecati",
    "per_page": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 193,
            "name": "Rempel, Thiel and Turner",
            "email": "juana.lockman@lueilwitz.com",
            "phone_number": "1-907-556-9584",
            "registration_number": "RC-119957630",
            "country": "Thailand",
            "state": "Colorado",
            "city": "Klingmouth",
            "postcode": "02192",
            "address": "31317 Pfannerstill Curve Suite 540",
            "sector": "ut",
            "tin": "346659",
            "website": "ankunding.com",
            "logo": "https://via.placeholder.com/200x200.png/001188?text=logo+ratione",
            "active": true,
            "on_loyalty_program": true,
            "contact_person_first_name": "Lillian",
            "contact_person_lastname": "Zulauf",
            "app_uid": "67595001f0528",
            "created_at": "2024-12-11T08:40:33.000000Z",
            "updated_at": "2024-12-11T08:40:33.000000Z",
            "permissions": []
        },
        {
            "id": 194,
            "name": "Mosciski Inc",
            "email": "marina.reilly@murazik.net",
            "phone_number": "412-259-5233",
            "registration_number": "RC-439478526",
            "country": "Congo",
            "state": "Idaho",
            "city": "East Amanda",
            "postcode": "72995-0301",
            "address": "9314 Conroy Ridges",
            "sector": "minima",
            "tin": "742756",
            "website": "armstrong.com",
            "logo": "https://via.placeholder.com/200x200.png/00ddcc?text=logo+enim",
            "active": true,
            "on_loyalty_program": false,
            "contact_person_first_name": "Veda",
            "contact_person_lastname": "Bogan",
            "app_uid": "6759500319288",
            "created_at": "2024-12-11T08:40:35.000000Z",
            "updated_at": "2024-12-11T08:40:35.000000Z",
            "permissions": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/companies

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new company

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/companies" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=repudiandae" \
    --form "phone_number=et" \
    --form "tin=819.35291" \
    --form "email=camille.wolf@example.net" \
    --form "registration_number=maiores" \
    --form "country=doloribus" \
    --form "state=quis" \
    --form "city=accusamus" \
    --form "postcode=38440.00542" \
    --form "address=fugiat" \
    --form "sector=odit" \
    --form "website=http://block.org/perspiciatis-eum-aliquam-rem-earum-qui-eum-maiores-ad" \
    --form "active=1" \
    --form "on_loyalty_program=1" \
    --form "loyalty_points_by_group=" \
    --form "loyalty_reward_percentage=5.8968" \
    --form "loyalty_reward_points=150178" \
    --form "loyalty_min_purchase_amount=45768.3659" \
    --form "loyalty_min_point=17.18981773" \
    --form "contact_person_first_name=recusandae" \
    --form "contact_person_lastname=aliquid" \
    --form "permission_ids[]=delectus" \
    --form "logo=@/tmp/phpHo3FHp" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'repudiandae');
body.append('phone_number', 'et');
body.append('tin', '819.35291');
body.append('email', 'camille.wolf@example.net');
body.append('registration_number', 'maiores');
body.append('country', 'doloribus');
body.append('state', 'quis');
body.append('city', 'accusamus');
body.append('postcode', '38440.00542');
body.append('address', 'fugiat');
body.append('sector', 'odit');
body.append('website', 'http://block.org/perspiciatis-eum-aliquam-rem-earum-qui-eum-maiores-ad');
body.append('active', '1');
body.append('on_loyalty_program', '1');
body.append('loyalty_points_by_group', '');
body.append('loyalty_reward_percentage', '5.8968');
body.append('loyalty_reward_points', '150178');
body.append('loyalty_min_purchase_amount', '45768.3659');
body.append('loyalty_min_point', '17.18981773');
body.append('contact_person_first_name', 'recusandae');
body.append('contact_person_lastname', 'aliquid');
body.append('permission_ids[]', 'delectus');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 195,
        "name": "Paucek Group",
        "email": "wava.champlin@cole.com",
        "phone_number": "1-361-394-4653",
        "registration_number": "RC-302950335",
        "country": "Cape Verde",
        "state": "California",
        "city": "South Lilliana",
        "postcode": "43832-6498",
        "address": "786 Tillman Cove",
        "sector": "maxime",
        "tin": "139572",
        "website": "flatley.com",
        "logo": "https://via.placeholder.com/200x200.png/0044aa?text=logo+voluptatem",
        "active": true,
        "on_loyalty_program": true,
        "contact_person_first_name": "Brionna",
        "contact_person_lastname": "Feeney",
        "app_uid": "675950059d9bc",
        "created_at": "2024-12-11T08:40:37.000000Z",
        "updated_at": "2024-12-11T08:40:37.000000Z",
        "permissions": []
    }
}
 

Request      

POST api/companies

Body Parameters

name  string  

phone_number  string  

tin  number  

email  string  

Must be a valid email address.

registration_number  string  

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

sector  string optional  

website  string optional  

Must be a valid URL.

logo  file optional  

Must be an image.

active  boolean optional  

on_loyalty_program  boolean optional  

loyalty_points_by_group  boolean optional  

loyalty_reward_percentage  number optional  

loyalty_reward_points  number optional  

loyalty_min_purchase_amount  number optional  

loyalty_min_point  number optional  

contact_person_first_name  string optional  

contact_person_lastname  string optional  

permission_ids  string[]  

Show a specified company.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/companies/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 196,
        "name": "Bartell-Gibson",
        "email": "maryse.renner@roberts.com",
        "phone_number": "1-774-202-2146",
        "registration_number": "RC-587492153",
        "country": "Namibia",
        "state": "Utah",
        "city": "Gerholdview",
        "postcode": "73750",
        "address": "840 Marcos Highway",
        "sector": "dolores",
        "tin": "347175",
        "website": "schultz.com",
        "logo": "https://via.placeholder.com/200x200.png/0000ff?text=logo+quia",
        "active": true,
        "on_loyalty_program": false,
        "contact_person_first_name": "Allie",
        "contact_person_lastname": "Schroeder",
        "app_uid": "675950081a32b",
        "created_at": "2024-12-11T08:40:40.000000Z",
        "updated_at": "2024-12-11T08:40:40.000000Z",
        "permissions": []
    }
}
 

Request      

GET api/companies/{id}

URL Parameters

id  integer  

The ID of the company

Update the specified company

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/companies/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=dolor" \
    --form "phone_number=et" \
    --form "tin=1297.6532447" \
    --form "email=bartell.kale@example.com" \
    --form "registration_number=soluta" \
    --form "country=amet" \
    --form "state=voluptas" \
    --form "city=assumenda" \
    --form "postcode=32742342.4327" \
    --form "address=consectetur" \
    --form "sector=perspiciatis" \
    --form "website=http://www.walter.biz/alias-dolore-non-facere" \
    --form "active=" \
    --form "on_loyalty_program=1" \
    --form "loyalty_points_by_group=1" \
    --form "loyalty_reward_percentage=55168.66016251" \
    --form "loyalty_reward_points=35673.130251" \
    --form "loyalty_min_purchase_amount=295966136.7" \
    --form "loyalty_min_point=608.46" \
    --form "contact_person_first_name=qui" \
    --form "contact_person_lastname=quaerat" \
    --form "permission_ids[]=ut" \
    --form "logo=@/tmp/phpzZWsIB" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'dolor');
body.append('phone_number', 'et');
body.append('tin', '1297.6532447');
body.append('email', 'bartell.kale@example.com');
body.append('registration_number', 'soluta');
body.append('country', 'amet');
body.append('state', 'voluptas');
body.append('city', 'assumenda');
body.append('postcode', '32742342.4327');
body.append('address', 'consectetur');
body.append('sector', 'perspiciatis');
body.append('website', 'http://www.walter.biz/alias-dolore-non-facere');
body.append('active', '');
body.append('on_loyalty_program', '1');
body.append('loyalty_points_by_group', '1');
body.append('loyalty_reward_percentage', '55168.66016251');
body.append('loyalty_reward_points', '35673.130251');
body.append('loyalty_min_purchase_amount', '295966136.7');
body.append('loyalty_min_point', '608.46');
body.append('contact_person_first_name', 'qui');
body.append('contact_person_lastname', 'quaerat');
body.append('permission_ids[]', 'ut');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 197,
        "name": "Ankunding, Mohr and Cartwright",
        "email": "marietta.hoeger@waters.com",
        "phone_number": "+1-650-202-4544",
        "registration_number": "RC-866522731",
        "country": "Zambia",
        "state": "Michigan",
        "city": "South Dortha",
        "postcode": "60541-1631",
        "address": "3964 Ward Drive Apt. 877",
        "sector": "fugiat",
        "tin": "326814",
        "website": "lubowitz.com",
        "logo": "https://via.placeholder.com/200x200.png/008899?text=logo+aut",
        "active": true,
        "on_loyalty_program": true,
        "contact_person_first_name": "Riley",
        "contact_person_lastname": "Erdman",
        "app_uid": "6759500a3e28c",
        "created_at": "2024-12-11T08:40:42.000000Z",
        "updated_at": "2024-12-11T08:40:42.000000Z",
        "permissions": []
    }
}
 

Request      

PUT api/companies/{id}

PATCH api/companies/{id}

URL Parameters

id  integer  

The ID of the company

Body Parameters

name  string  

phone_number  string  

tin  number  

email  string  

Must be a valid email address.

registration_number  string  

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

sector  string optional  

website  string optional  

Must be a valid URL.

logo  file optional  

Must be an image.

active  boolean optional  

on_loyalty_program  boolean optional  

loyalty_points_by_group  boolean optional  

loyalty_reward_percentage  number optional  

loyalty_reward_points  number optional  

loyalty_min_purchase_amount  number optional  

loyalty_min_point  number optional  

contact_person_first_name  string optional  

contact_person_lastname  string optional  

permission_ids  string[]  

Delete a company

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/companies/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/companies/{id}

URL Parameters

id  integer  

The ID of the company

Display a listing of the company user or search by name, phone number, email, card last four digits, company name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_users?company_id=12&per_page=20&term=dicta" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_users"
);

const params = {
    "company_id": "12",
    "per_page": "20",
    "term": "dicta",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "title": "Dr.",
            "name": "Laila Fadel",
            "email": "kunde.claire@example.org",
            "phone": "1-732-209-4201",
            "avatar": "https://via.placeholder.com/200x200.png/007744?text=avatar+voluptates",
            "username": "vrippin",
            "gender": "Female",
            "newsletter": true,
            "active": true,
            "card_brand": "MasterCard",
            "card_last_four": "2274",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:40:45.000000Z",
            "created_at": "2024-12-11T08:40:45.000000Z",
            "id": 498,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 11,
                    "name": "update company"
                },
                {
                    "id": 12,
                    "name": "delete company"
                },
                {
                    "id": 20,
                    "name": "delete cost center"
                },
                {
                    "id": 38,
                    "name": "debit customer wallet"
                },
                {
                    "id": 76,
                    "name": "truck contract view"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        },
        {
            "title": "Miss",
            "name": "Jarret Crooks",
            "email": "shuels@example.com",
            "phone": "567-840-2222",
            "avatar": "https://via.placeholder.com/200x200.png/0044bb?text=avatar+ut",
            "username": "virgil94",
            "gender": "Male",
            "newsletter": false,
            "active": true,
            "card_brand": "Visa",
            "card_last_four": "4696",
            "is_vendor": false,
            "is_admin": false,
            "updated_at": "2024-12-11T08:40:46.000000Z",
            "created_at": "2024-12-11T08:40:46.000000Z",
            "id": 499,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 12,
                    "name": "delete company"
                },
                {
                    "id": 13,
                    "name": "view company group"
                },
                {
                    "id": 29,
                    "name": "view payment"
                },
                {
                    "id": 80,
                    "name": "trip allocation view"
                },
                {
                    "id": 83,
                    "name": "trip allocation delete"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/company_users

Query Parameters

company_id  integer  

The ID of the company

per_page  integer optional  

Items per page

term  string optional  

Search query parameter

Create a new company user

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/company_users?company_id=16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"in\",
    \"phone\": 1066499.2275866228,
    \"email\": \"rcremin@example.com\",
    \"username\": \"rem\",
    \"gender\": \"in\",
    \"newsletter\": true,
    \"active\": false,
    \"is_admin\": false,
    \"is_vendor\": true,
    \"suspended\": true,
    \"vendors\": [
        20
    ],
    \"companies\": [
        19
    ],
    \"cost_centers\": [
        20
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_users"
);

const params = {
    "company_id": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "in",
    "phone": 1066499.2275866228,
    "email": "rcremin@example.com",
    "username": "rem",
    "gender": "in",
    "newsletter": true,
    "active": false,
    "is_admin": false,
    "is_vendor": true,
    "suspended": true,
    "vendors": [
        20
    ],
    "companies": [
        19
    ],
    "cost_centers": [
        20
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Dr.",
        "name": "Ms. Audrey Crooks",
        "email": "schuyler97@example.com",
        "phone": "1-352-797-9342",
        "avatar": "https://via.placeholder.com/200x200.png/005522?text=avatar+est",
        "username": "kuphal.elbert",
        "gender": "Female",
        "newsletter": false,
        "active": true,
        "card_brand": "Discover Card",
        "card_last_four": "2334",
        "is_vendor": true,
        "is_admin": true,
        "updated_at": "2024-12-11T08:40:52.000000Z",
        "created_at": "2024-12-11T08:40:52.000000Z",
        "id": 500,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 15,
                "name": "update company group"
            },
            {
                "id": 30,
                "name": "create payment"
            },
            {
                "id": 50,
                "name": "delete vendor wallet"
            },
            {
                "id": 71,
                "name": "destination delete"
            },
            {
                "id": 77,
                "name": "truck contract create"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

POST api/company_users

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Show a specified company user.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_users/3?company_id=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_users/3"
);

const params = {
    "company_id": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Ms.",
        "name": "Cierra Powlowski",
        "email": "magali.veum@example.org",
        "phone": "1-951-668-5235",
        "avatar": "https://via.placeholder.com/200x200.png/004422?text=avatar+qui",
        "username": "mcclure.hubert",
        "gender": "Female",
        "newsletter": false,
        "active": false,
        "card_brand": "Visa Retired",
        "card_last_four": "7907",
        "is_vendor": true,
        "is_admin": false,
        "updated_at": "2024-12-11T08:40:55.000000Z",
        "created_at": "2024-12-11T08:40:55.000000Z",
        "id": 501,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 9,
                "name": "view company"
            },
            {
                "id": 25,
                "name": "view user"
            },
            {
                "id": 27,
                "name": "update user"
            },
            {
                "id": 46,
                "name": "create sub-wallet"
            },
            {
                "id": 52,
                "name": "create vendor"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

GET api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Update the specified company user without detaching the user from other companies

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/company_users/18?company_id=4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"dolor\",
    \"phone\": 39363660.45676871,
    \"email\": \"adams.jakob@example.com\",
    \"username\": \"eos\",
    \"gender\": \"sunt\",
    \"newsletter\": false,
    \"active\": false,
    \"is_admin\": false,
    \"is_vendor\": false,
    \"suspended\": false,
    \"vendors\": [
        5
    ],
    \"companies\": [
        8
    ],
    \"cost_centers\": [
        1
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_users/18"
);

const params = {
    "company_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "dolor",
    "phone": 39363660.45676871,
    "email": "adams.jakob@example.com",
    "username": "eos",
    "gender": "sunt",
    "newsletter": false,
    "active": false,
    "is_admin": false,
    "is_vendor": false,
    "suspended": false,
    "vendors": [
        5
    ],
    "companies": [
        8
    ],
    "cost_centers": [
        1
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 198,
        "name": "Gaylord LLC",
        "email": "patsy.howe@langosh.net",
        "phone_number": "(281) 608-2173",
        "registration_number": "RC-005239880",
        "country": "Senegal",
        "state": "Alabama",
        "city": "Amberstad",
        "postcode": "06766",
        "address": "42439 Doug Row",
        "sector": "ducimus",
        "tin": "111222",
        "website": "torp.com",
        "logo": "https://via.placeholder.com/200x200.png/00dd44?text=logo+adipisci",
        "active": false,
        "on_loyalty_program": true,
        "contact_person_first_name": "Christine",
        "contact_person_lastname": "Stark",
        "app_uid": "6759501c12266",
        "created_at": "2024-12-11T08:41:00.000000Z",
        "updated_at": "2024-12-11T08:41:00.000000Z",
        "permissions": []
    }
}
 

Request      

PUT api/company_users/{user_id}

PATCH api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Detach a user from a company

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/company_users/1?company_id=4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_users/1"
);

const params = {
    "company_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Display a listing of the company permission or search by permission name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_permissions?company_id=13&per_page=14&term=voluptatibus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_permissions"
);

const params = {
    "company_id": "13",
    "per_page": "14",
    "term": "voluptatibus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "view",
            "module": "General",
            "guard_name": "api",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 1,
            "name": "view",
            "module": "General",
            "guard_name": "api",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/company_permissions

Query Parameters

company_id  integer  

The ID of the company

per_page  integer optional  

Items per page

term  string optional  

Search query parameter

Synchronise company permissions

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/company_permissions?company_id=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permission_ids\": [
        \"rerum\"
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_permissions"
);

const params = {
    "company_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "permission_ids": [
        "rerum"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/company_permissions

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

permission_ids  string[]  

Array of permission IDs

GET api/company_permissions/{permission_id}

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_permissions/nihil" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_permissions/nihil"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=Mog6sAtS2IlDidz6OyJFvZNho6lVOeY5UuCEy1Tx; expires=Wed, 11 Dec 2024 10:41:03 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/company_permissions/nihil could not be found."
}
 

Request      

GET api/company_permissions/{permission_id}

URL Parameters

permission_id  string  

The ID of the permission.

Detach a permission from a company

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/company_permissions/4?company_id=3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_permissions/4"
);

const params = {
    "company_id": "3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/company_permissions/{permission_id}

URL Parameters

permission_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Company Station Endpoints

Display a listing of the stations or search by name, email, address, state, country.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/stations?term=rerum&per_page=9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/stations"
);

const params = {
    "term": "rerum",
    "per_page": "9",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Breitenberg, Bergnaum and Heathcote",
            "email": "altenwerth.dario@greenholt.biz",
            "phone_number": "724.964.5065",
            "country": "Burundi",
            "state": "Indiana",
            "city": "New Kendallborough",
            "postcode": "39629",
            "address": "839 Gabe Vista"
        },
        {
            "name": "Wintheiser-Hessel",
            "email": "cydney47@lesch.biz",
            "phone_number": "1-669-700-0912",
            "country": "Pitcairn Islands",
            "state": "New York",
            "city": "Glovermouth",
            "postcode": "15097",
            "address": "872 Robert Throughway Apt. 258"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/stations

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new station

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/stations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sed\",
    \"phone_number\": 2.81,
    \"email\": \"cwisozk@example.org\",
    \"country\": \"quae\",
    \"state\": \"eos\",
    \"city\": \"ullam\",
    \"postcode\": 15084.6,
    \"address\": \"ratione\",
    \"vendor_id\": 2
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/stations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sed",
    "phone_number": 2.81,
    "email": "cwisozk@example.org",
    "country": "quae",
    "state": "eos",
    "city": "ullam",
    "postcode": 15084.6,
    "address": "ratione",
    "vendor_id": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Hettinger and Sons",
        "email": "odessa43@monahan.com",
        "phone_number": "(347) 972-5722",
        "country": "Nepal",
        "state": "Montana",
        "city": "Zboncakmouth",
        "postcode": "15930-4482",
        "address": "493 Barrows Manors Suite 168"
    }
}
 

Request      

POST api/stations

Body Parameters

name  string  

phone_number  number  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

vendor_id  integer optional  

Show a specified station.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/stations/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/stations/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Denesik, Oberbrunner and Nitzsche",
        "email": "zgerhold@mohr.net",
        "phone_number": "+1-351-813-0553",
        "country": "Switzerland",
        "state": "Vermont",
        "city": "Mattieberg",
        "postcode": "14562",
        "address": "2372 Goyette Isle"
    }
}
 

Request      

GET api/stations/{id}

URL Parameters

id  integer  

The ID of the station

Update the specified station

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/stations/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"aut\",
    \"phone_number\": 1482.80668,
    \"email\": \"olaf32@example.net\",
    \"country\": \"laudantium\",
    \"state\": \"impedit\",
    \"city\": \"hic\",
    \"postcode\": 2813.133,
    \"address\": \"et\",
    \"vendor_id\": 3
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/stations/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "aut",
    "phone_number": 1482.80668,
    "email": "olaf32@example.net",
    "country": "laudantium",
    "state": "impedit",
    "city": "hic",
    "postcode": 2813.133,
    "address": "et",
    "vendor_id": 3
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Reynolds-Dicki",
        "email": "dominic62@gibson.com",
        "phone_number": "+1-934-262-7805",
        "country": "Cambodia",
        "state": "Missouri",
        "city": "West Amely",
        "postcode": "12523",
        "address": "1399 Wilton Lodge Suite 353"
    }
}
 

Request      

PUT api/stations/{id}

PATCH api/stations/{id}

URL Parameters

id  integer  

The ID of the station

Body Parameters

name  string  

phone_number  number  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

vendor_id  integer optional  

Delete a station

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/stations/4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/stations/4"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Daugherty LLC",
        "email": "rhirthe@stiedemann.com",
        "phone_number": "440-312-9826",
        "country": "Macao",
        "state": "South Dakota",
        "city": "Gulgowskitown",
        "postcode": "84919",
        "address": "803 Art Summit"
    }
}
 

Request      

DELETE api/stations/{id}

URL Parameters

id  integer  

The ID of the station

Display a list of stations by vendor

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_stations/16?per_page=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_stations/16"
);

const params = {
    "per_page": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Nikolaus, Schimmel and Nikolaus",
            "email": "kessler.jamison@pouros.biz",
            "phone_number": "804.520.2666",
            "country": "Greece",
            "state": "Colorado",
            "city": "Lake Ashtyn",
            "postcode": "34333-7868",
            "address": "27911 Margarita Lodge Suite 653"
        },
        {
            "name": "Zemlak, Streich and Kub",
            "email": "xprohaska@schumm.com",
            "phone_number": "1-469-399-1541",
            "country": "China",
            "state": "New Hampshire",
            "city": "Port Lexibury",
            "postcode": "20578-6988",
            "address": "3528 Brekke Village Apt. 874"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_stations/{vendor_id}

URL Parameters

vendor_id  integer optional  

The ID of the vendor

Query Parameters

per_page  integer optional  

items per page

Cost Center Endpoints

Display a listing of the cost centers or search by name, phone number, email, address, city, state, country.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/cost_centers?term=sunt&per_page=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cost_centers"
);

const params = {
    "term": "sunt",
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Walsh LLC",
            "email": "brett.lowe@yundt.com",
            "phone_number": "+1-513-842-5756",
            "company_id": 146,
            "daily_purchase_budget": 73.65,
            "weekly_purchase_budget": 207.31,
            "monthly_purchase_budget": 1982889.94,
            "license_type": "839cea",
            "active": true,
            "company": {
                "id": 146,
                "name": "QUANTAM PACKAGING",
                "email": "mViebIS@tolaram.com",
                "phone_number": "870-200-8909",
                "registration_number": "hJ28s",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 3789412,
                "website": "https://www.tolaram.com",
                "logo": null,
                "active": true,
                "on_loyalty_program": false,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "p4zsyHbnYyUQIJZ",
                "created_at": "2023-08-24T11:45:12.000000Z",
                "updated_at": "2023-08-24T11:45:12.000000Z",
                "permissions": []
            },
            "users": []
        },
        {
            "name": "Goodwin, Grant and McGlynn",
            "email": "mlittel@gibson.com",
            "phone_number": "832.673.6175",
            "company_id": 55,
            "daily_purchase_budget": 9363270.7,
            "weekly_purchase_budget": 113399028.72,
            "monthly_purchase_budget": 218.51,
            "license_type": "932szl",
            "active": true,
            "company": {
                "id": 55,
                "name": "MULTIPRO CHOBA 2",
                "email": "emilylopez55@example.com",
                "phone_number": "177",
                "registration_number": "177",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 128547,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": true,
                "on_loyalty_program": false,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c153",
                "created_at": "2023-04-12T13:44:17.000000Z",
                "updated_at": "2023-04-12T13:44:17.000000Z",
                "permissions": []
            },
            "users": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cost_centers

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new cost center

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/cost_centers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"exercitationem\",
    \"phone_number\": 58951,
    \"email\": \"magni\",
    \"company_id\": 20,
    \"daily_purchase_budget\": 121.93545,
    \"weekly_purchase_budget\": 7052.5,
    \"monthly_purchase_budget\": 153987858.01216277,
    \"license_type\": \"sint\",
    \"active\": false,
    \"user_ids\": [
        \"saepe\"
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cost_centers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "exercitationem",
    "phone_number": 58951,
    "email": "magni",
    "company_id": 20,
    "daily_purchase_budget": 121.93545,
    "weekly_purchase_budget": 7052.5,
    "monthly_purchase_budget": 153987858.01216277,
    "license_type": "sint",
    "active": false,
    "user_ids": [
        "saepe"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Parker-Waters",
        "email": "conor74@olson.biz",
        "phone_number": "609.549.5938",
        "company_id": 44,
        "daily_purchase_budget": 68761.83,
        "weekly_purchase_budget": 169.97,
        "monthly_purchase_budget": 0.84,
        "license_type": "796ymg",
        "active": true,
        "company": {
            "id": 44,
            "name": "LAFARGE AFRICA PLC",
            "email": "alexandersanchez44@example.com",
            "phone_number": "166",
            "registration_number": "166",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 321789,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": true,
            "on_loyalty_program": false,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c142",
            "created_at": "2023-04-01T13:44:17.000000Z",
            "updated_at": "2023-04-01T13:44:17.000000Z",
            "permissions": []
        },
        "users": []
    }
}
 

Request      

POST api/cost_centers

Body Parameters

name  string  

phone_number  number optional  

email  string optional  

Must be a valid email address.

company_id  integer optional  

daily_purchase_budget  number  

weekly_purchase_budget  number  

monthly_purchase_budget  number  

license_type  string optional  

active  boolean optional  

user_ids  string[] optional  

Show a specified cost center.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/cost_centers/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cost_centers/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Purdy, Kreiger and Howell",
        "email": "ekuhn@barrows.com",
        "phone_number": "712-981-8035",
        "company_id": 130,
        "daily_purchase_budget": 3.19,
        "weekly_purchase_budget": 322940396.08,
        "monthly_purchase_budget": 230.29,
        "license_type": "796swm",
        "active": true,
        "company": {
            "id": 130,
            "name": "Unde do facilis sed",
            "email": "maxtaylor100@example.com",
            "phone_number": "222",
            "registration_number": "222",
            "country": "Nigeria",
            "state": "Abia",
            "city": "Aba",
            "postcode": "",
            "address": "Accusantium aut beat",
            "sector": "At rem aut qui dolor",
            "tin": 304875,
            "website": "https://www.zyzibakikibam.in",
            "logo": "",
            "active": true,
            "on_loyalty_program": false,
            "contact_person_first_name": "",
            "contact_person_lastname": "",
            "app_uid": "648a01f20c08f",
            "created_at": "2023-06-14T18:07:46.000000Z",
            "updated_at": "2023-06-14T18:07:46.000000Z",
            "permissions": []
        },
        "users": []
    }
}
 

Request      

GET api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

Update the specified cost center

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/cost_centers/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"nemo\",
    \"phone_number\": 0.1228654,
    \"email\": \"hic\",
    \"company_id\": 12,
    \"daily_purchase_budget\": 0,
    \"weekly_purchase_budget\": 6574801,
    \"monthly_purchase_budget\": 7855755.56,
    \"license_type\": \"voluptatem\",
    \"active\": false,
    \"user_ids\": [
        \"dignissimos\"
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cost_centers/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "nemo",
    "phone_number": 0.1228654,
    "email": "hic",
    "company_id": 12,
    "daily_purchase_budget": 0,
    "weekly_purchase_budget": 6574801,
    "monthly_purchase_budget": 7855755.56,
    "license_type": "voluptatem",
    "active": false,
    "user_ids": [
        "dignissimos"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Cruickshank PLC",
        "email": "hnader@price.com",
        "phone_number": "+19402130380",
        "company_id": 76,
        "daily_purchase_budget": 1.9,
        "weekly_purchase_budget": 31450423.76,
        "monthly_purchase_budget": 23458.74,
        "license_type": "921pik",
        "active": true,
        "company": {
            "id": 76,
            "name": "PURE FLOUR MILL - PASTA DIVISION",
            "email": "landoncruz76@example.com",
            "phone_number": "198",
            "registration_number": "198",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 374501,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": true,
            "on_loyalty_program": false,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c174",
            "created_at": "2023-05-03T13:44:17.000000Z",
            "updated_at": "2023-05-03T13:44:17.000000Z",
            "permissions": []
        },
        "users": []
    }
}
 

Request      

PUT api/cost_centers/{id}

PATCH api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

Body Parameters

name  string  

phone_number  number optional  

email  string optional  

Must be a valid email address.

company_id  integer optional  

daily_purchase_budget  number  

weekly_purchase_budget  number  

monthly_purchase_budget  number  

license_type  string optional  

active  boolean optional  

user_ids  string[] optional  

Delete a cost center

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/cost_centers/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cost_centers/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

Endpoints

Get the latest transactions. Return 10 items if per_page is not provided

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/latest_transactions?per_page=6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/latest_transactions"
);

const params = {
    "per_page": "6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "ref": "cupid-pay-1254142521",
            "company_id": 84,
            "company_wallet_id": 200,
            "vendor_id": 302,
            "company_temps_id": 84,
            "initiator_id": 444,
            "payment_mode_id": 213,
            "status": "successful",
            "total_charged_amount": 3720855.03,
            "original_amount": 459703442.97,
            "gateway_charged": 24356932.98,
            "wallet_amount": 1.12,
            "amount_paid": 20660351.14,
            "fee_paid": 43776818.07,
            "webhook_confirmed": null,
            "date_webhook_confirmed": {
                "date": "2008-04-03 02:41:24.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "date_transaction_verified": {
                "date": "2019-05-05 18:02:11.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "verification_means": "sheduled_job",
            "payment_cause": "cupid_recharge",
            "initiating_users_name": "Moji Coker",
            "paystack_subaccount_code": 98766272,
            "updated_at": "2024-12-11T08:36:42.000000Z",
            "created_at": "2024-12-11T08:36:42.000000Z",
            "id": 512
        },
        {
            "ref": "cupid-pay-539043993",
            "company_id": 67,
            "company_wallet_id": 200,
            "vendor_id": 302,
            "company_temps_id": 67,
            "initiator_id": 271,
            "payment_mode_id": 213,
            "status": "successful",
            "total_charged_amount": 23884.68,
            "original_amount": 254374.4,
            "gateway_charged": 878278.36,
            "wallet_amount": 2.48,
            "amount_paid": 212471223.05,
            "fee_paid": 1212168.47,
            "webhook_confirmed": null,
            "date_webhook_confirmed": {
                "date": "1985-12-28 13:18:58.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "date_transaction_verified": {
                "date": "1997-01-02 19:44:04.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "verification_means": "web_callback",
            "payment_cause": "cupid_recharge",
            "initiating_users_name": "Adeleye Damilola Grace",
            "paystack_subaccount_code": 329554922,
            "updated_at": "2024-12-11T08:36:44.000000Z",
            "created_at": "2024-12-11T08:36:44.000000Z",
            "id": 513
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/kpi/latest_transactions

Query Parameters

per_page  integer optional  

Items per page

Get the latest fuel purchases. Return 10 items if per_page is not provided

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/latest_fuel_purchases?per_page=14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/latest_fuel_purchases"
);

const params = {
    "per_page": "14",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 12,
            "vendor_id": 302,
            "user_id": 272,
            "cost_center_id": 303,
            "nfctag_id": 2074,
            "driver_id": 1256,
            "way_bill_number": "WB-3093",
            "vendor_station_name": "Haley, Beatty and Thompson",
            "vehicle_plate_number": "yx-160-bw",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 19882.98,
            "volume": 3162.47,
            "odometer_reading": 0,
            "product": "LPFO",
            "pump": 5,
            "selling_price": 39.47,
            "current_credit_limit": 2775.96,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 69.04,
            "last_amount_paid": 350.59,
            "transaction_seq_no": 19993,
            "is_balanced": true,
            "oem_station_id": 7,
            "sm_station_id": 6,
            "balance_refunded": 78054.1,
            "tapnet_amount": 192640344.85,
            "tapnet_volume": 10814466.09,
            "tapnet_transaction_time": {
                "date": "2011-09-16 01:14:32.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "NO FCC MODE",
            "mac_address": "8A:BC:D0:E3:00:8D",
            "release_token": "96",
            "is_fdc_value_fill": true,
            "fdc_volume": 6689.82,
            "fdc_amount": 2972.46,
            "last_tsn_source": null,
            "verified_volume": 248886093.98,
            "verified_amount": 8251430.52,
            "reconciliation_source": "MANUAL",
            "one_time_auth_id": 62,
            "recon_balance_refunded": true,
            "updated_at": "2024-12-11T08:36:48.000000Z",
            "created_at": "2024-12-11T08:36:48.000000Z",
            "id": 31867,
            "driver": {
                "id": 1256,
                "company_id": 37,
                "fullname": "UWANOGHO SAMSON",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "509-721-6037",
                "email": "iElbHLb@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T18:01:42.000000Z",
                "updated_at": "2023-09-01T21:42:34.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 12,
                "name": "CHINCHIN-MULTIPRO",
                "email": "oliviaallen12@example.com",
                "phone_number": "134",
                "registration_number": "134",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 410957,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c110",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-02-28T13:44:17.000000Z",
                "updated_at": "2023-02-28T13:44:17.000000Z",
                "deleted_at": null
            },
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "costCenter": {
                "id": 303,
                "company_id": 12,
                "name": "CHINCHIN-MULTIPRO",
                "email": "YgZgIjs@tolaram.com",
                "phone_number": "875-330-5303",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:33:43.000000Z",
                "updated_at": "2023-08-29T16:33:43.000000Z",
                "deleted_at": null
            },
            "nfcTag": {
                "id": 2074,
                "company_id": 12,
                "vendor_id": 215,
                "user_id": 114,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-99991",
                "nfctag_oem_id": "OUT63DG",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": null,
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2024-09-07T09:34:02.000000Z",
                "updated_at": "2024-09-07T09:34:02.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "userWallet": null,
            "remark": null
        },
        {
            "company_id": 60,
            "vendor_id": 311,
            "user_id": 340,
            "cost_center_id": 354,
            "nfctag_id": 1622,
            "driver_id": 1716,
            "way_bill_number": "WB-4336",
            "vendor_station_name": "Maggio Ltd",
            "vehicle_plate_number": "xy-952-do",
            "auth_type": "Card",
            "barcode_id": null,
            "amount_paid": 2823278.93,
            "volume": 1.23,
            "odometer_reading": 7,
            "product": "LPFO",
            "pump": 2,
            "selling_price": 15.24,
            "current_credit_limit": 618468,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 36689406.67,
            "last_amount_paid": 3351880.85,
            "transaction_seq_no": 161,
            "is_balanced": true,
            "oem_station_id": 9,
            "sm_station_id": 4,
            "balance_refunded": 7185762.12,
            "tapnet_amount": 3330535.47,
            "tapnet_volume": 1788421.96,
            "tapnet_transaction_time": {
                "date": "2016-06-06 17:32:21.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "NO FCC MODE",
            "mac_address": "3E:6D:FF:33:6C:4D",
            "release_token": "67",
            "is_fdc_value_fill": false,
            "fdc_volume": 932.29,
            "fdc_amount": 3109127.69,
            "last_tsn_source": null,
            "verified_volume": 2.84,
            "verified_amount": 126.67,
            "reconciliation_source": "TAPNET",
            "one_time_auth_id": 444,
            "recon_balance_refunded": true,
            "updated_at": "2024-12-11T08:36:51.000000Z",
            "created_at": "2024-12-11T08:36:51.000000Z",
            "id": 31868,
            "driver": {
                "id": 1716,
                "company_id": 44,
                "fullname": "DANTALA INUWA",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "410-331-8857",
                "email": "ZjdCbVi@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T18:20:21.000000Z",
                "updated_at": "2023-09-01T21:50:00.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 60,
                "name": "NIGERIA BREWERIES PLC",
                "email": "sebastiandiaz60@example.com",
                "phone_number": "182",
                "registration_number": "182",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 948137,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c158",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-17T13:44:17.000000Z",
                "updated_at": "2023-04-17T13:44:17.000000Z",
                "deleted_at": null
            },
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "costCenter": {
                "id": 354,
                "company_id": 60,
                "name": "NIGERIA BREWERIES PLC",
                "email": "mDIJnhD@tolaram.com",
                "phone_number": "440-031-2345",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:38:07.000000Z",
                "updated_at": "2023-08-29T16:38:07.000000Z",
                "deleted_at": null
            },
            "nfcTag": {
                "id": 1622,
                "company_id": 141,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-10126",
                "nfctag_oem_id": "0AD63EBE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "67360428",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-08-30T21:52:38.000000Z",
                "updated_at": "2023-09-01T18:31:49.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "userWallet": null,
            "remark": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/kpi/latest_fuel_purchases

Query Parameters

per_page  integer optional  

Items per page

Get the top purchasing customer vehicles

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/top_purchasing_vehicles" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/top_purchasing_vehicles"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=78mBggbTYzOgCqXiKn2YAJYhcbJU95aS4EsFZYsc; expires=Wed, 11 Dec 2024 10:36:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/top_purchasing_vehicles could not be found."
}
 

Request      

GET api/kpi/top_purchasing_vehicles

Get the top purchasing customer

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/top_purchasing_customers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/top_purchasing_customers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=MQwoBj3WEeDXMhCVwdvnYM6f8PCGVZb7vJdYJzed; expires=Wed, 11 Dec 2024 10:36:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/top_purchasing_customers could not be found."
}
 

Request      

GET api/kpi/top_purchasing_customers

Get vendor last purchases

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/vendor_last_purchases" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/vendor_last_purchases"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=Bm4VmaTiSlwVmTvlkd1KMvNx8Tx7cM9n4sHGccKe; expires=Wed, 11 Dec 2024 10:36:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/vendor_last_purchases could not be found."
}
 

Request      

GET api/kpi/vendor_last_purchases

Get KPI summary for dashboard

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/summary" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/summary"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=kcS9GibI4PlaDMAOQ9UC6WbXP8MHocEIK6HzUONI; expires=Wed, 11 Dec 2024 10:36:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/summary could not be found."
}
 

Request      

GET api/kpi/summary

Get Vendor KPI summary for dashboard

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/vendor_summary" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/vendor_summary"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=0BVVGGaPVURgfKq9GpMmD7zanrpyLPeDWWsI26cu; expires=Wed, 11 Dec 2024 10:36:59 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/vendor_summary could not be found."
}
 

Request      

GET api/kpi/vendor_summary

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/trends_of_purchase" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/trends_of_purchase"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=ilxEvq8yDJ0SizTu5PjzZjGHOE2l7EJjnd0EvvXA; expires=Wed, 11 Dec 2024 10:37:00 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/trends_of_purchase could not be found."
}
 

Get trends of fuel sale

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/kpi/latest_fuel_sales" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/kpi/latest_fuel_sales"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=yNRxUabqGpJpADalwDF2akrbcDZfgQem9SnQhTsK; expires=Wed, 11 Dec 2024 10:37:00 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/kpi/latest_fuel_sales could not be found."
}
 

Request      

GET api/kpi/latest_fuel_sales

Display a listing of the FuelPay Transaction or search by mac address, ip address.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization?term=et&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization"
);

const params = {
    "term": "et",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        [],
        []
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pam_user_authorization

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new FuelPay Transaction

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization?sm_station_id=ex" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"oem_station_id\": \"aliquid\",
    \"sm_station_id\": \"labore\",
    \"station_name\": \"tenetur\",
    \"amount\": \"facere\",
    \"volume\": \"amet\",
    \"selling_price\": \"error\",
    \"sm_company_id\": \"exercitationem\",
    \"mac_address\": \"itaque\",
    \"pump_number\": \"maxime\",
    \"fuelpay_code\": \"est\",
    \"app_mode\": \"itaque\",
    \"product\": \"perferendis\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization"
);

const params = {
    "sm_station_id": "ex",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "oem_station_id": "aliquid",
    "sm_station_id": "labore",
    "station_name": "tenetur",
    "amount": "facere",
    "volume": "amet",
    "selling_price": "error",
    "sm_company_id": "exercitationem",
    "mac_address": "itaque",
    "pump_number": "maxime",
    "fuelpay_code": "est",
    "app_mode": "itaque",
    "product": "perferendis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

POST api/pam_user_authorization

Query Parameters

sm_station_id  string optional  

The SM Station ID of the PAM device

Body Parameters

oem_station_id  string  

sm_station_id  string  

station_name  string  

amount  string  

volume  string  

selling_price  string  

sm_company_id  string  

mac_address  string  

pump_number  string  

fuelpay_code  string  

app_mode  string  

product  string  

Show a specified FuelPay Transaction.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/3?mac_address=sit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/3"
);

const params = {
    "mac_address": "sit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

GET api/pam_user_authorization/{id}

URL Parameters

id  integer  

The ID of the FuelPay Transaction

Query Parameters

mac_address  string optional  

The MAC address of the FuelPay Transaction

Update the specified FuelPay Transaction

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"oem_station_id\": \"nesciunt\",
    \"sm_station_id\": \"sapiente\",
    \"station_name\": \"nam\",
    \"amount\": \"delectus\",
    \"volume\": \"perferendis\",
    \"selling_price\": \"cum\",
    \"sm_company_id\": \"qui\",
    \"mac_address\": \"labore\",
    \"pump_number\": \"et\",
    \"fuelpay_code\": \"nulla\",
    \"app_mode\": \"facilis\",
    \"product\": \"itaque\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "oem_station_id": "nesciunt",
    "sm_station_id": "sapiente",
    "station_name": "nam",
    "amount": "delectus",
    "volume": "perferendis",
    "selling_price": "cum",
    "sm_company_id": "qui",
    "mac_address": "labore",
    "pump_number": "et",
    "fuelpay_code": "nulla",
    "app_mode": "facilis",
    "product": "itaque"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

PUT api/pam_user_authorization/{id}

PATCH api/pam_user_authorization/{id}

URL Parameters

id  integer  

The ID of the FuelPay Transaction

Body Parameters

oem_station_id  string  

sm_station_id  string  

station_name  string  

amount  string  

volume  string  

selling_price  string  

sm_company_id  string  

mac_address  string  

pump_number  string  

fuelpay_code  string  

app_mode  string  

product  string  

Delete a FuelPay Transaction

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_user_authorization/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/pam_user_authorization/{id}

URL Parameters

id  integer  

The ID of the FuelPay Transaction

This endpoint would be used to get the allocated diesel quantity for a given trip.

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/diesel_trip_allocation" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"way_bill_number\": \"qui\",
    \"vehicle_id\": 16,
    \"company_id\": 12,
    \"source_id\": 7,
    \"destination_id\": 4,
    \"tonnage\": \"et\",
    \"contract_type\": \"qui\",
    \"trailer_type\": \"inventore\",
    \"weight\": \"HEAVY\",
    \"age\": \"voluptas\",
    \"model\": \"tenetur\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/diesel_trip_allocation"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "way_bill_number": "qui",
    "vehicle_id": 16,
    "company_id": 12,
    "source_id": 7,
    "destination_id": 4,
    "tonnage": "et",
    "contract_type": "qui",
    "trailer_type": "inventore",
    "weight": "HEAVY",
    "age": "voluptas",
    "model": "tenetur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/diesel_trip_allocation

Body Parameters

way_bill_number  string  

vehicle_id  integer  

company_id  integer  

source_id  integer  

The value and stoppage_id must be different.

destination_id  integer  

The value and source_id must be different.

tonnage  string  

contract_type  string  

trailer_type  string  

weight  string  

Must be one of heavy, light, HEAVY, or LIGHT.

age  string  

model  string  

Display a listing of Trip Allocation.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/trip_allocations?term=alias&contract_type=ipsum&company_id=18&source_id=13&active=1&per_page=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations"
);

const params = {
    "term": "alias",
    "contract_type": "ipsum",
    "company_id": "18",
    "source_id": "13",
    "active": "1",
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "company_id": 141,
            "source_id": 180,
            "destination_id": 4,
            "tonnage": "30",
            "trailer_type": "CHECKERED BODY",
            "contract_type": "FIXED",
            "make": "HOWO",
            "weight": "LIGHT",
            "age": "NEW",
            "diesel_quantity": 441,
            "active": true,
            "deleted_at": null,
            "created_at": "2023-08-23T16:30:34.000000Z",
            "updated_at": "2023-09-28T14:00:42.000000Z",
            "company_name": "MCPL",
            "source_name": "LEKKI",
            "destination_name": "ABA"
        },
        {
            "id": 1,
            "company_id": 141,
            "source_id": 180,
            "destination_id": 4,
            "tonnage": "30",
            "trailer_type": "CHECKERED BODY",
            "contract_type": "FIXED",
            "make": "HOWO",
            "weight": "LIGHT",
            "age": "NEW",
            "diesel_quantity": 441,
            "active": true,
            "deleted_at": null,
            "created_at": "2023-08-23T16:30:34.000000Z",
            "updated_at": "2023-09-28T14:00:42.000000Z",
            "company_name": "MCPL",
            "source_name": "LEKKI",
            "destination_name": "ABA"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/trip_allocations

Query Parameters

term  string optional  

Search query parameter

contract_type  string optional  

Search contract type

company_id  integer optional  

Filter for companies

source_id  integer optional  

Filter for sources

active  boolean optional  

Search for active and inactive Trip Allocations

per_page  integer optional  

Items per page

Store a new trip allocation

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 6,
    \"source_id\": 11,
    \"destination_id\": 9,
    \"tonnage\": \"dolorum\",
    \"trailer_type\": \"architecto\",
    \"weight\": \"aut\",
    \"contract_type\": \"floating\",
    \"make\": \"voluptatem\",
    \"age\": \"modi\",
    \"diesel_quantity\": 11,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 6,
    "source_id": 11,
    "destination_id": 9,
    "tonnage": "dolorum",
    "trailer_type": "architecto",
    "weight": "aut",
    "contract_type": "floating",
    "make": "voluptatem",
    "age": "modi",
    "diesel_quantity": 11,
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "company_id": 141,
        "source_id": 180,
        "destination_id": 4,
        "tonnage": "30",
        "trailer_type": "CHECKERED BODY",
        "contract_type": "FIXED",
        "make": "HOWO",
        "weight": "LIGHT",
        "age": "NEW",
        "diesel_quantity": 441,
        "active": true,
        "deleted_at": null,
        "created_at": "2023-08-23T16:30:34.000000Z",
        "updated_at": "2023-09-28T14:00:42.000000Z",
        "company_name": "MCPL",
        "source_name": "LEKKI",
        "destination_name": "ABA"
    }
}
 

Request      

POST api/trip_allocations

Body Parameters

company_id  integer  

source_id  integer  

The value and destination_id must be different.

destination_id  integer  

The value and source_id must be different.

tonnage  string optional  

trailer_type  string  

weight  string optional  

contract_type  string  

Must be one of fixed, floating, FIXED, or FLOATING.

make  string optional  

age  string  

diesel_quantity  integer  

active  boolean optional  

Show a specified Trip Request.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/trip_allocations/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "company_id": 141,
        "source_id": 180,
        "destination_id": 4,
        "tonnage": "30",
        "trailer_type": "CHECKERED BODY",
        "contract_type": "FIXED",
        "make": "HOWO",
        "weight": "LIGHT",
        "age": "NEW",
        "diesel_quantity": 441,
        "active": true,
        "deleted_at": null,
        "created_at": "2023-08-23T16:30:34.000000Z",
        "updated_at": "2023-09-28T14:00:42.000000Z",
        "company_name": "MCPL",
        "source_name": "LEKKI",
        "destination_name": "ABA"
    }
}
 

Request      

GET api/trip_allocations/{id}

URL Parameters

id  integer  

The ID of the Trip Allocation

Update the specific trip allocation

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations/commodi" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 3,
    \"source_id\": 15,
    \"destination_id\": 3,
    \"tonnage\": \"et\",
    \"trailer_type\": \"soluta\",
    \"weight\": \"esse\",
    \"contract_type\": \"FIXED\",
    \"make\": \"ipsam\",
    \"age\": \"et\",
    \"diesel_quantity\": 12,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations/commodi"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 3,
    "source_id": 15,
    "destination_id": 3,
    "tonnage": "et",
    "trailer_type": "soluta",
    "weight": "esse",
    "contract_type": "FIXED",
    "make": "ipsam",
    "age": "et",
    "diesel_quantity": 12,
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "company_id": 141,
        "source_id": 180,
        "destination_id": 4,
        "tonnage": "30",
        "trailer_type": "CHECKERED BODY",
        "contract_type": "FIXED",
        "make": "HOWO",
        "weight": "LIGHT",
        "age": "NEW",
        "diesel_quantity": 441,
        "active": true,
        "deleted_at": null,
        "created_at": "2023-08-23T16:30:34.000000Z",
        "updated_at": "2023-09-28T14:00:42.000000Z",
        "company_name": "MCPL",
        "source_name": "LEKKI",
        "destination_name": "ABA"
    }
}
 

Request      

PUT api/trip_allocations/{id}

PATCH api/trip_allocations/{id}

URL Parameters

id  string  

The ID of the trip allocation.

Body Parameters

company_id  integer optional  

source_id  integer optional  

The value and destination_id must be different.

destination_id  integer optional  

The value and source_id must be different.

tonnage  string optional  

trailer_type  string optional  

weight  string optional  

contract_type  string optional  

Must be one of fixed, floating, FIXED, or FLOATING.

make  string optional  

age  string optional  

diesel_quantity  integer optional  

active  boolean optional  

Delete the specified Trip allocation.

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/trip_allocations/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/trip_allocations/{id}

URL Parameters

id  integer  

The ID of the Trip allocation

Get pumps from station manager

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/sm_pumps?station_id=4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/sm_pumps"
);

const params = {
    "station_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=0sV48OeNNd2Ioz5AN6smWBqgjBYEUX3VtgF0sYPr; expires=Wed, 11 Dec 2024 10:51:37 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/sm_pumps could not be found."
}
 

Request      

GET api/sm_pumps

Query Parameters

station_id  integer optional  

The ID of the station

GET api/get_smarteye_companies

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_smarteye_companies" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_smarteye_companies"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=PzJFzGzq58IFsAdNOmC5dzzHhEXFOdxRqOu098uX; expires=Wed, 11 Dec 2024 10:51:20 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/get_smarteye_companies could not be found."
}
 

Request      

GET api/get_smarteye_companies

GET api/get_smarteye_stations/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_smarteye_stations/voluptatem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_smarteye_stations/voluptatem"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=uQwM8HSmwyLvy8cSrMC9ZkTV2fg3x8u5yoms5Zj3; expires=Wed, 11 Dec 2024 10:51:21 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/get_smarteye_stations/voluptatem could not be found."
}
 

Request      

GET api/get_smarteye_stations/{id}

URL Parameters

id  string  

The ID of the get smarteye station.

GET api/get_smarteye_pumps/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_smarteye_pumps/magnam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_smarteye_pumps/magnam"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=ywHdPaSOjzlZThAMPWOZEuoysbsEb5M0DJNOaCpX; expires=Wed, 11 Dec 2024 10:51:21 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/get_smarteye_pumps/magnam could not be found."
}
 

Request      

GET api/get_smarteye_pumps/{id}

URL Parameters

id  string  

The ID of the get smarteye pump.

Fleet Management Endpoints

NFC tag bulk upload

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags_bulk_upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"nfc_tags\": [
        {
            \"nfctag_type\": \"odio\",
            \"nfctag_code\": \"nihil\",
            \"nfctag_oem_id\": \"ut\",
            \"upload_id\": 8
        }
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags_bulk_upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "nfc_tags": [
        {
            "nfctag_type": "odio",
            "nfctag_code": "nihil",
            "nfctag_oem_id": "ut",
            "upload_id": 8
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 71,
        "vendor_id": 311,
        "user_id": 446,
        "station_id": 603,
        "pin": 9274,
        "nfctag_type": "Key Tag",
        "nfctag_code": "VLX-995",
        "nfctag_oem_id": 79452407,
        "nfctag_url_slug": null,
        "created_by": 264,
        "card_number": 407340276,
        "card_on_thankucash": null,
        "card_state": "Generic",
        "station_name": "SFT EXHIBITION",
        "updated_at": "2024-12-11T08:43:26.000000Z",
        "created_at": "2024-12-11T08:43:26.000000Z",
        "id": 3085,
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 603,
            "sm_station_id": 360,
            "vendor_id": 215,
            "name": "SFT EXHIBITION",
            "address": "19 Royal Avenue lagos",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:31:08.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 264,
            "title": "Mr",
            "name": "Awe Akinniyi",
            "email": "olufunsoakinniyiawe@gmail.com",
            "phone": "904-567-2964",
            "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=awe.akinniyi_Dx3",
            "username": "awe.akinniyi_Dx3",
            "gender": "Male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": "5927429",
            "created_at": "2023-09-11T21:50:34.000000Z",
            "updated_at": "2023-09-11T21:50:34.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 71,
            "name": "PASTA-MULTIPRO",
            "email": "elliegray71@example.com",
            "phone_number": "193",
            "registration_number": "193",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 810935,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c169",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-28T13:44:17.000000Z",
            "updated_at": "2023-04-28T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 446,
            "title": null,
            "name": "Chika",
            "email": "chigbuchika@tolaram.com",
            "phone": "2348057597205",
            "avatar": null,
            "username": "chigbuchika@tolaram.com",
            "gender": "Female",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-10-04T13:07:32.000000Z",
            "updated_at": "2024-10-04T13:07:32.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/nfc_tags_bulk_upload

Body Parameters

nfc_tags  object[] optional  

nfc_tags[].nfctag_type  string  

nfc_tags[].nfctag_code  string  

nfc_tags[].nfctag_oem_id  string  

nfc_tags[].upload_id  integer optional  

Display a listing of the spend limit groups or search by name, code.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups?term=voluptatem&per_page=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups"
);

const params = {
    "term": "voluptatem",
    "per_page": "19",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Karina Pacocha III",
            "company_id": 48,
            "cost_center_id": 356,
            "description": "Aperiam est ut omnis optio voluptas quasi eaque modi.",
            "daily_volume_limit": 8,
            "weekly_volume_limit": 4,
            "monthly_volume_limit": 8,
            "status": "Inactive",
            "code": 8,
            "active": true,
            "updated_at": "2024-12-11T08:43:30.000000Z",
            "created_at": "2024-12-11T08:43:30.000000Z",
            "id": 440
        },
        {
            "name": "Vernice Kovacek",
            "company_id": 11,
            "cost_center_id": 310,
            "description": "Libero dolorum inventore et nulla id repellendus numquam.",
            "daily_volume_limit": 3,
            "weekly_volume_limit": 9,
            "monthly_volume_limit": 5,
            "status": null,
            "code": 2,
            "active": true,
            "updated_at": "2024-12-11T08:43:32.000000Z",
            "created_at": "2024-12-11T08:43:32.000000Z",
            "id": 441
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/spend_limit_groups

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new spend limit group

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"at\",
    \"company_id\": 6,
    \"cost_center_id\": 6,
    \"description\": \"numquam\",
    \"code\": \"tempore\",
    \"daily_volume_limit\": 1461316.1521037286,
    \"weekly_volume_limit\": 89159058.027481,
    \"monthly_volume_limit\": 12756.311315,
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "at",
    "company_id": 6,
    "cost_center_id": 6,
    "description": "numquam",
    "code": "tempore",
    "daily_volume_limit": 1461316.1521037286,
    "weekly_volume_limit": 89159058.027481,
    "monthly_volume_limit": 12756.311315,
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Dr. Spencer Blick",
        "company_id": 12,
        "cost_center_id": 294,
        "description": "Tenetur dolores dicta eos eos quisquam quae.",
        "daily_volume_limit": 3,
        "weekly_volume_limit": 3,
        "monthly_volume_limit": 9,
        "status": "Inactive",
        "code": 8,
        "active": true,
        "updated_at": "2024-12-11T08:43:34.000000Z",
        "created_at": "2024-12-11T08:43:34.000000Z",
        "id": 442
    }
}
 

Request      

POST api/spend_limit_groups

Body Parameters

name  string  

company_id  integer  

cost_center_id  integer optional  

description  string  

code  string  

daily_volume_limit  number optional  

weekly_volume_limit  number optional  

monthly_volume_limit  number optional  

active  boolean optional  

Show a specified spend limit group.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Mr. Morris Walsh",
        "company_id": 49,
        "cost_center_id": 295,
        "description": "Debitis voluptatem non pariatur.",
        "daily_volume_limit": 7,
        "weekly_volume_limit": 5,
        "monthly_volume_limit": 7,
        "status": "Inactive",
        "code": 7,
        "active": true,
        "updated_at": "2024-12-11T08:43:36.000000Z",
        "created_at": "2024-12-11T08:43:36.000000Z",
        "id": 443
    }
}
 

Request      

GET api/spend_limit_groups/{id}

URL Parameters

id  integer  

The ID of the group

Update the specified spend limit group

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_volume_limit\": 208791430.35922,
    \"weekly_volume_limit\": 50059834,
    \"monthly_volume_limit\": 559907700.0909454,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "daily_volume_limit": 208791430.35922,
    "weekly_volume_limit": 50059834,
    "monthly_volume_limit": 559907700.0909454,
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Janae Hammes",
        "company_id": 90,
        "cost_center_id": 373,
        "description": "Numquam atque sed et iusto totam.",
        "daily_volume_limit": 1,
        "weekly_volume_limit": 4,
        "monthly_volume_limit": 4,
        "status": "Inactive",
        "code": 2,
        "active": true,
        "updated_at": "2024-12-11T08:43:38.000000Z",
        "created_at": "2024-12-11T08:43:38.000000Z",
        "id": 444
    }
}
 

Request      

PUT api/spend_limit_groups/{id}

PATCH api/spend_limit_groups/{id}

URL Parameters

id  integer  

The ID of the spend limit group

Body Parameters

name  string optional  

company_id  string optional  

cost_center_id  string optional  

description  string optional  

code  string optional  

daily_volume_limit  number optional  

weekly_volume_limit  number optional  

monthly_volume_limit  number optional  

active  boolean optional  

Delete a spend group

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Zula Huels",
        "company_id": 142,
        "cost_center_id": 356,
        "description": "Vitae pariatur id nostrum in hic quia quisquam.",
        "daily_volume_limit": 2,
        "weekly_volume_limit": 7,
        "monthly_volume_limit": 9,
        "status": null,
        "code": 7,
        "active": true,
        "updated_at": "2024-12-11T08:43:40.000000Z",
        "created_at": "2024-12-11T08:43:40.000000Z",
        "id": 445
    }
}
 

Request      

DELETE api/spend_limit_groups/{id}

URL Parameters

id  integer  

The ID of the spend limit group

Display a listing of the drivers or search by fullname, address, phone number, email, driver speciality, status.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/drivers?term=quibusdam&per_page=12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/drivers"
);

const params = {
    "term": "quibusdam",
    "per_page": "12",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "fullname": "Miss Velma Wehner",
            "email": "cale.bartoletti@bruen.net",
            "phone_number": "641.543.5799",
            "address": "984 Gutmann Spring",
            "driver_speciality": null,
            "status": "Inactive",
            "company_id": 23,
            "updated_at": "2024-12-11T08:43:42.000000Z",
            "created_at": "2024-12-11T08:43:42.000000Z",
            "id": 1858,
            "company": {
                "id": 23,
                "name": "DUFIL-CASSAVA",
                "email": "benjamindavis23@example.com",
                "phone_number": "145",
                "registration_number": "145",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 519473,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c121",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-03-11T13:44:17.000000Z",
                "updated_at": "2023-03-11T13:44:17.000000Z",
                "deleted_at": null
            },
            "vehicles": []
        },
        {
            "fullname": "Chandler Streich II",
            "email": "ypollich@yahoo.com",
            "phone_number": "(351) 456-6433",
            "address": "6141 Keegan Lakes Apt. 647",
            "driver_speciality": "Motorbike",
            "status": "Active",
            "company_id": 83,
            "updated_at": "2024-12-11T08:43:43.000000Z",
            "created_at": "2024-12-11T08:43:43.000000Z",
            "id": 1859,
            "company": {
                "id": 83,
                "name": "RECKITT BENCKISER NIGERIA LIMITED",
                "email": "lucywood83@example.com",
                "phone_number": "205",
                "registration_number": "205",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 312678,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c181",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-05-10T13:44:17.000000Z",
                "updated_at": "2023-05-10T13:44:17.000000Z",
                "deleted_at": null
            },
            "vehicles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/drivers

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new driver

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/drivers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 6,
    \"fullname\": \"rerum\",
    \"address\": \"debitis\",
    \"phone_number\": 0,
    \"email\": \"gbeahan@example.net\",
    \"driver_speciality\": \"commodi\",
    \"status\": \"eum\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/drivers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 6,
    "fullname": "rerum",
    "address": "debitis",
    "phone_number": 0,
    "email": "gbeahan@example.net",
    "driver_speciality": "commodi",
    "status": "eum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "fullname": "Dr. Harmony Gutkowski III",
        "email": "kristin.reinger@casper.biz",
        "phone_number": "916-218-2044",
        "address": "20523 Paucek Rapids",
        "driver_speciality": "Saloon Car",
        "status": "Inactive",
        "company_id": 20,
        "updated_at": "2024-12-11T08:43:46.000000Z",
        "created_at": "2024-12-11T08:43:46.000000Z",
        "id": 1860,
        "company": {
            "id": 20,
            "name": "DEEKAY AND SONS (NIGERIA) LIMITED",
            "email": "hannahgreen20@example.com",
            "phone_number": "142",
            "registration_number": "142",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 428195,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c118",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-08T13:44:17.000000Z",
            "updated_at": "2023-03-08T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": []
    }
}
 

Request      

POST api/drivers

Body Parameters

company_id  integer optional  

fullname  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

driver_speciality  string optional  

status  string  

Show a specified driver.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/drivers/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/drivers/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "fullname": "Kelli Halvorson",
        "email": "will.estelle@bradtke.org",
        "phone_number": "(908) 337-8084",
        "address": "699 Johnny Spurs Suite 105",
        "driver_speciality": "Motorbike",
        "status": "Inactive",
        "company_id": 12,
        "updated_at": "2024-12-11T08:43:48.000000Z",
        "created_at": "2024-12-11T08:43:48.000000Z",
        "id": 1861,
        "company": {
            "id": 12,
            "name": "CHINCHIN-MULTIPRO",
            "email": "oliviaallen12@example.com",
            "phone_number": "134",
            "registration_number": "134",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 410957,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c110",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-28T13:44:17.000000Z",
            "updated_at": "2023-02-28T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": []
    }
}
 

Request      

GET api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

Update the specified driver

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/drivers/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 3,
    \"fullname\": \"id\",
    \"address\": \"sit\",
    \"phone_number\": 1921090.4720636832,
    \"email\": \"easton.adams@example.net\",
    \"driver_speciality\": \"eligendi\",
    \"status\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/drivers/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 3,
    "fullname": "id",
    "address": "sit",
    "phone_number": 1921090.4720636832,
    "email": "easton.adams@example.net",
    "driver_speciality": "eligendi",
    "status": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "fullname": "Alberto Legros",
        "email": "prosacco.maxime@kunze.com",
        "phone_number": "1-352-933-7855",
        "address": "6091 Daniella Track Suite 171",
        "driver_speciality": null,
        "status": "Active",
        "company_id": 162,
        "updated_at": "2024-12-11T08:43:50.000000Z",
        "created_at": "2024-12-11T08:43:50.000000Z",
        "id": 1862,
        "company": {
            "id": 162,
            "name": "NDORA TRADERS LIMITED",
            "email": "PecyyAx@tolaram.com",
            "phone_number": "933-872-9689",
            "registration_number": "cTUf2",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "address": "MCPL Nigeria",
            "sector": "Logistics",
            "tin": 2505106,
            "website": "https://www.tolaram.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "knZFEDUsZGtSo6d",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-09-27T10:24:20.000000Z",
            "updated_at": "2023-09-27T10:24:20.000000Z",
            "deleted_at": null
        },
        "vehicles": []
    }
}
 

Request      

PUT api/drivers/{id}

PATCH api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

Body Parameters

company_id  integer optional  

fullname  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

driver_speciality  string optional  

status  string  

Delete a driver

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/drivers/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/drivers/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

Display a listing of the vehicles or search by registration number, tank capacity, model, fuel type, color, brand.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicles?term=placeat&per_page=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicles"
);

const params = {
    "term": "placeat",
    "per_page": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 68,
            "cost_center_id": 362,
            "driver_id": 383,
            "nfc_tag_id": 1331,
            "group_id": 427,
            "registration_number": "vf-917-kj",
            "tank_capacity": 3,
            "auth_type": null,
            "tracker_id": "vqi209",
            "model": "Patjero",
            "engine_capacity": null,
            "fuel_type": "LPFO",
            "color": "Blue",
            "brand": "Toyota",
            "reward_type": null,
            "active": true,
            "company": {
                "id": 68,
                "name": "ORBIT AGRO EXPORTS LIMITED",
                "email": "lucahill68@example.com",
                "phone_number": "190",
                "registration_number": "190",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 284956,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c166",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-25T13:44:17.000000Z",
                "updated_at": "2023-04-25T13:44:17.000000Z",
                "deleted_at": null
            },
            "group": [],
            "driver": {
                "id": 383,
                "company_id": 44,
                "fullname": "SULAIMAN GIDADO",
                "address": "SAGAMU",
                "phone_number": "8888555648",
                "email": "emmawright321@gmail.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2023-07-30T12:03:02.000000Z",
                "updated_at": "2024-09-12T09:49:15.000000Z",
                "deleted_at": null
            },
            "costCenter": {
                "id": 362,
                "company_id": 68,
                "name": "ORBIT AGRO EXPORTS LIMITED",
                "email": "WrEjxBN@tolaram.com",
                "phone_number": "568-611-2625",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:38:12.000000Z",
                "updated_at": "2023-08-29T16:38:12.000000Z",
                "deleted_at": null
            },
            "vehicle_plate_number": "vf-917-kj",
            "nfcTag": {
                "id": 1331,
                "company_id": 7,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-9832",
                "nfctag_oem_id": "4AAA2CBE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "22356923",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-08-30T21:49:26.000000Z",
                "updated_at": "2023-09-01T18:20:06.000000Z",
                "deleted_at": null,
                "upload_id": null
            }
        },
        {
            "company_id": 143,
            "cost_center_id": 338,
            "driver_id": 710,
            "nfc_tag_id": 2841,
            "group_id": 338,
            "registration_number": "eu-055-oq",
            "tank_capacity": 48,
            "auth_type": null,
            "tracker_id": "ftm763",
            "model": "Dasun",
            "engine_capacity": null,
            "fuel_type": "AGO",
            "color": "Blue",
            "brand": "Nissan",
            "reward_type": null,
            "active": true,
            "updated_at": "2024-12-11T08:43:58.000000Z",
            "created_at": "2024-12-11T08:43:58.000000Z",
            "id": 2098,
            "company": {
                "id": 143,
                "name": "Lucky fibre",
                "email": "GuzThZQ@tolaram.com",
                "phone_number": "865-566-5498",
                "registration_number": "1gAMt",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 5260803,
                "website": "https://www.tolaram.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "JnzjV4O4pS31BaA",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-08-23T17:10:30.000000Z",
                "updated_at": "2023-08-23T17:10:30.000000Z",
                "deleted_at": null
            },
            "group": [],
            "driver": {
                "id": 710,
                "company_id": 37,
                "fullname": "RAYMOND ABBAJI EDEH",
                "address": "SAGAMU",
                "phone_number": "8888555977",
                "email": "raymondabbajiedeh@email.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2024-06-22T12:03:02.000000Z",
                "updated_at": "2023-09-01T18:40:34.000000Z",
                "deleted_at": null
            },
            "costCenter": {
                "id": 338,
                "company_id": 143,
                "name": "Lucky fibre",
                "email": "B8bDxti@tolaram.com",
                "phone_number": "366-693-2238",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:37:52.000000Z",
                "updated_at": "2023-08-29T16:37:52.000000Z",
                "deleted_at": null
            },
            "vehicle_plate_number": "eu-055-oq",
            "nfcTag": {
                "id": 2841,
                "company_id": null,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX 10800",
                "nfctag_oem_id": "3A7B3BBE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": null,
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2024-07-24T09:28:07.000000Z",
                "updated_at": "2024-07-24T09:28:07.000000Z",
                "deleted_at": null,
                "upload_id": 6
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vehicles

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new vehicle

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vehicles" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 19,
    \"vendor_id\": 19,
    \"driver_id\": 4,
    \"nfc_tag_id\": 10,
    \"group_id\": 6,
    \"registration_number\": \"molestiae\",
    \"tank_capacity\": \"deserunt\",
    \"auth_type\": \"consequatur\",
    \"tracker_id\": \"et\",
    \"model\": \"non\",
    \"engine_capacity\": \"consectetur\",
    \"fuel_type\": \"ATK\",
    \"color\": \"asperiores\",
    \"brand\": \"voluptate\",
    \"active\": true,
    \"weight\": \"at\",
    \"tonnage\": \"veritatis\",
    \"trailer_type\": \"eius\",
    \"age\": \"adipisci\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicles"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 19,
    "vendor_id": 19,
    "driver_id": 4,
    "nfc_tag_id": 10,
    "group_id": 6,
    "registration_number": "molestiae",
    "tank_capacity": "deserunt",
    "auth_type": "consequatur",
    "tracker_id": "et",
    "model": "non",
    "engine_capacity": "consectetur",
    "fuel_type": "ATK",
    "color": "asperiores",
    "brand": "voluptate",
    "active": true,
    "weight": "at",
    "tonnage": "veritatis",
    "trailer_type": "eius",
    "age": "adipisci"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 64,
        "cost_center_id": 358,
        "driver_id": 1284,
        "nfc_tag_id": 1655,
        "group_id": 406,
        "registration_number": "zg-596-fa",
        "tank_capacity": 59,
        "auth_type": null,
        "tracker_id": "nze732",
        "model": "Karen",
        "engine_capacity": null,
        "fuel_type": "AGO",
        "color": "Red",
        "brand": "KIA",
        "reward_type": null,
        "active": true,
        "company": {
            "id": 64,
            "name": "OMNIBIZ AFRICA",
            "email": "claireadams64@example.com",
            "phone_number": "186",
            "registration_number": "186",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 561084,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c162",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-21T13:44:17.000000Z",
            "updated_at": "2023-04-21T13:44:17.000000Z",
            "deleted_at": null
        },
        "group": [],
        "driver": {
            "id": 1284,
            "company_id": 151,
            "fullname": "MUHAMMED AUWAL BALA",
            "address": "BHN, Mowe Ogun State",
            "phone_number": "348-036-6363",
            "email": "ZySNzqV@tolaram.com",
            "driver_speciality": "Trucks",
            "status": "active",
            "created_at": "2023-08-28T18:02:18.000000Z",
            "updated_at": "2023-09-01T21:42:34.000000Z",
            "deleted_at": null
        },
        "costCenter": {
            "id": 358,
            "company_id": 64,
            "name": "OMNIBIZ AFRICA",
            "email": "4jBgF5p@tolaram.com",
            "phone_number": "608-277-1737",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:38:09.000000Z",
            "updated_at": "2023-08-29T16:38:09.000000Z",
            "deleted_at": null
        },
        "vehicle_plate_number": "zg-596-fa",
        "nfcTag": {
            "id": 1655,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-10159",
            "nfctag_oem_id": "3AC531BE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": "81812379",
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2023-08-30T21:52:38.000000Z",
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null,
            "upload_id": null
        }
    }
}
 

Request      

POST api/vehicles

Body Parameters

company_id  integer optional  

vendor_id  integer optional  

driver_id  integer optional  

nfc_tag_id  integer optional  

group_id  integer optional  

registration_number  string  

tank_capacity  string optional  

auth_type  string optional  

tracker_id  string optional  

model  string optional  

engine_capacity  string optional  

fuel_type  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

color  string optional  

brand  string optional  

reward_type  string optional  

active  boolean optional  

weight  string optional  

tonnage  string optional  

trailer_type  string optional  

age  string optional  

Show a specified vehicle.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicles/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicles/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 38,
        "cost_center_id": 332,
        "driver_id": 613,
        "nfc_tag_id": 2747,
        "group_id": 371,
        "registration_number": "ug-096-xl",
        "tank_capacity": 44,
        "auth_type": null,
        "tracker_id": "hjs953",
        "model": "Sonata",
        "engine_capacity": null,
        "fuel_type": "ATK",
        "color": "Silver",
        "brand": "Nissan",
        "reward_type": null,
        "active": false,
        "company": {
            "id": 38,
            "name": "INTERNATIONAL BREWRIES PLC- ONITSHA PLANT",
            "email": "liamcollins38@example.com",
            "phone_number": "160",
            "registration_number": "160",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 130786,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c136",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-26T13:44:17.000000Z",
            "updated_at": "2023-03-26T13:44:17.000000Z",
            "deleted_at": null
        },
        "group": [],
        "driver": {
            "id": 613,
            "company_id": 150,
            "fullname": "ISHOLA AFEEZ OLAYEMI",
            "address": "SAGAMU",
            "phone_number": "8888555879",
            "email": "lucasbaker123@gmail.com",
            "driver_speciality": "Truck",
            "status": "active",
            "created_at": "2024-03-16T12:03:02.000000Z",
            "updated_at": "2023-09-01T18:40:34.000000Z",
            "deleted_at": null
        },
        "costCenter": {
            "id": 332,
            "company_id": 38,
            "name": "INTERNATIONAL BREWRIES PLC- ONITSHA PLANT",
            "email": "xGajuCR@tolaram.com",
            "phone_number": "944-298-2740",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:34:14.000000Z",
            "updated_at": "2023-08-29T16:34:14.000000Z",
            "deleted_at": null
        },
        "vehicle_plate_number": "ug-096-xl",
        "nfcTag": {
            "id": 2747,
            "company_id": null,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX 10706",
            "nfctag_oem_id": "BA9D3EBE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-07-24T08:55:51.000000Z",
            "updated_at": "2024-07-24T08:55:51.000000Z",
            "deleted_at": null,
            "upload_id": 13
        }
    }
}
 

Request      

GET api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

Update the specified vehicle

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vehicles/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 2,
    \"driver_id\": 7,
    \"nfc_tag_id\": 4,
    \"group_id\": 19,
    \"registration_number\": \"vero\",
    \"tank_capacity\": \"officia\",
    \"auth_type\": \"fuga\",
    \"tracker_id\": \"est\",
    \"model\": \"eum\",
    \"engine_capacity\": \"cupiditate\",
    \"fuel_type\": \"LPG\",
    \"color\": \"accusamus\",
    \"brand\": \"facilis\",
    \"active\": false,
    \"weight\": \"adipisci\",
    \"tonnage\": \"quas\",
    \"trailer_type\": \"ad\",
    \"age\": \"fugit\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicles/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 2,
    "driver_id": 7,
    "nfc_tag_id": 4,
    "group_id": 19,
    "registration_number": "vero",
    "tank_capacity": "officia",
    "auth_type": "fuga",
    "tracker_id": "est",
    "model": "eum",
    "engine_capacity": "cupiditate",
    "fuel_type": "LPG",
    "color": "accusamus",
    "brand": "facilis",
    "active": false,
    "weight": "adipisci",
    "tonnage": "quas",
    "trailer_type": "ad",
    "age": "fugit"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 20,
        "cost_center_id": 311,
        "driver_id": 1491,
        "nfc_tag_id": 2442,
        "group_id": 321,
        "registration_number": "yy-097-ad",
        "tank_capacity": 27,
        "auth_type": null,
        "tracker_id": "iqh155",
        "model": "Corolla",
        "engine_capacity": null,
        "fuel_type": "LPG",
        "color": "White",
        "brand": "Toyota",
        "reward_type": null,
        "active": false,
        "updated_at": "2024-12-11T08:44:15.000000Z",
        "created_at": "2024-12-11T08:44:15.000000Z",
        "id": 2101,
        "company": {
            "id": 20,
            "name": "DEEKAY AND SONS (NIGERIA) LIMITED",
            "email": "hannahgreen20@example.com",
            "phone_number": "142",
            "registration_number": "142",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 428195,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c118",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-08T13:44:17.000000Z",
            "updated_at": "2023-03-08T13:44:17.000000Z",
            "deleted_at": null
        },
        "group": [],
        "driver": {
            "id": 1491,
            "company_id": 4,
            "fullname": "MUHAMMAD HAMZA",
            "address": "BHN, Mowe Ogun State",
            "phone_number": "965-852-4399",
            "email": "mWUXjel@tolaram.com",
            "driver_speciality": "Trucks",
            "status": "active",
            "created_at": "2023-08-28T18:13:15.000000Z",
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null
        },
        "costCenter": {
            "id": 311,
            "company_id": 20,
            "name": "DEEKAY AND SONS (NIGERIA) LIMITED",
            "email": "N62sOOD@tolaram.com",
            "phone_number": "151-841-3664",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:33:49.000000Z",
            "updated_at": "2023-08-29T16:33:49.000000Z",
            "deleted_at": null
        },
        "vehicle_plate_number": "yy-097-ad",
        "nfcTag": {
            "id": 2442,
            "company_id": null,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX 10572",
            "nfctag_oem_id": "7A172ABE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-07-05T09:14:24.000000Z",
            "updated_at": "2024-07-05T09:14:24.000000Z",
            "deleted_at": null,
            "upload_id": 4
        }
    }
}
 

Request      

PUT api/vehicles/{id}

PATCH api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

Body Parameters

company_id  integer optional  

driver_id  integer optional  

nfc_tag_id  integer optional  

group_id  integer optional  

registration_number  string optional  

tank_capacity  string optional  

auth_type  string optional  

tracker_id  string optional  

model  string optional  

engine_capacity  string optional  

fuel_type  string optional  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

color  string optional  

brand  string optional  

reward_type  string optional  

active  boolean optional  

weight  string optional  

tonnage  string optional  

trailer_type  string optional  

age  string optional  

Delete a vehicle

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vehicles/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicles/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

Display a listing of the NFC tags or search by NFC tag type, NFC tag code, NFC tag oem ID, card number, card state, station name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/nfc_tags?term=voluptatem&per_page=13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags"
);

const params = {
    "term": "voluptatem",
    "per_page": "13",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 148,
            "vendor_id": 311,
            "user_id": 25,
            "station_id": 603,
            "pin": 6118,
            "nfctag_type": "Card",
            "nfctag_code": "VLX-427",
            "nfctag_oem_id": 2903376,
            "nfctag_url_slug": null,
            "created_by": 291,
            "card_number": 922730046,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": "SFT EXHIBITION",
            "updated_at": "2024-12-11T08:44:19.000000Z",
            "created_at": "2024-12-11T08:44:19.000000Z",
            "id": 3086,
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 603,
                "sm_station_id": 360,
                "vendor_id": 215,
                "name": "SFT EXHIBITION",
                "address": "19 Royal Avenue lagos",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:31:08.000000Z",
                "updated_at": "2024-01-30T13:31:08.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 291,
                "title": "Mrs",
                "name": "Michael Jokah",
                "email": "michael.jokah@tolaram.com",
                "phone": "9034353194",
                "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=michael.jokah_GP0",
                "username": "michael.jokah_GP0",
                "gender": "Male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": "6335987",
                "created_at": "2023-09-11T21:50:51.000000Z",
                "updated_at": "2024-09-19T09:34:24.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 148,
                "name": "BUA FOODS",
                "email": "zQICWaU@tolaram.com",
                "phone_number": "855-464-0571",
                "registration_number": "EtakL",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 4847850,
                "website": "https://www.tolaram.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "iI3p3rUXsNKnJNC",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-08-28T17:46:58.000000Z",
                "updated_at": "2023-08-28T17:46:58.000000Z",
                "deleted_at": null
            },
            "vehicles": [],
            "user": {
                "id": 25,
                "title": "Mr",
                "name": "Ayodeji Alabi",
                "email": "ayodeji.alabi@smartflowtech.com",
                "phone": "08130097924",
                "avatar": null,
                "username": "ayodeji",
                "gender": "Male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 0,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2023-03-02T12:12:54.000000Z",
                "updated_at": "2023-11-22T08:34:13.000000Z",
                "deleted_at": null
            }
        },
        {
            "company_id": 13,
            "vendor_id": 215,
            "user_id": 323,
            "station_id": 603,
            "pin": 5285,
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-098",
            "nfctag_oem_id": 82758379,
            "nfctag_url_slug": null,
            "created_by": 348,
            "card_number": 389481982,
            "card_on_thankucash": null,
            "card_state": "OTA",
            "station_name": "SFT EXHIBITION",
            "updated_at": "2024-12-11T08:44:22.000000Z",
            "created_at": "2024-12-11T08:44:22.000000Z",
            "id": 3087,
            "vendor": {
                "id": 215,
                "sm_company_id": 42,
                "name": "BHN Logistics",
                "address": "sagamu",
                "email": "sourabh.sanganeria@tolaram.com",
                "phone_number": "08028268504",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Lagos",
                "postcode": null,
                "products_sold": "PMS, AGO",
                "payment_type": "neque",
                "contact_person": "Sourabh sanganeria",
                "registration_number": "1005",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-02-16T11:23:28.000000Z",
                "updated_at": "2023-03-14T15:26:36.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 603,
                "sm_station_id": 360,
                "vendor_id": 215,
                "name": "SFT EXHIBITION",
                "address": "19 Royal Avenue lagos",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:31:08.000000Z",
                "updated_at": "2024-01-30T13:31:08.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 348,
                "title": null,
                "name": "BLESSED OMAH",
                "email": "omah.blessed888@gmail.com",
                "phone": "9133401812",
                "avatar": null,
                "username": "omah.blessed888@gmail.com",
                "gender": "Female",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-03-20T14:47:13.000000Z",
                "updated_at": "2024-03-20T14:47:13.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 13,
                "name": "CIELO AZUL LOGISTIC LTD",
                "email": "matthewharris13@example.com",
                "phone_number": "135",
                "registration_number": "135",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 126804,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c111",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-03-01T13:44:17.000000Z",
                "updated_at": "2023-03-01T13:44:17.000000Z",
                "deleted_at": null
            },
            "vehicles": [],
            "user": {
                "id": 323,
                "title": null,
                "name": "Niyi Idowu",
                "email": "niyi.idowu@tolaram.com",
                "phone": "8057493226",
                "avatar": null,
                "username": "niyi.idowu@tolaram.com",
                "gender": "male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 215,
                "otp": null,
                "created_at": "2023-12-11T13:51:40.000000Z",
                "updated_at": "2023-12-11T13:51:40.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/nfc_tags

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new NFC tag

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 12,
    \"vendor_id\": 10,
    \"user_id\": 8,
    \"station_id\": 8,
    \"pin\": 310,
    \"card_state\": \"OTA\",
    \"nfctag_type\": \"Key Tag\",
    \"nfctag_code\": \"alias\",
    \"nfctag_oem_id\": \"voluptas\",
    \"nfctag_url_slug\": \"enim\",
    \"card_number\": \"eos\",
    \"card_on_thankucash\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 12,
    "vendor_id": 10,
    "user_id": 8,
    "station_id": 8,
    "pin": 310,
    "card_state": "OTA",
    "nfctag_type": "Key Tag",
    "nfctag_code": "alias",
    "nfctag_oem_id": "voluptas",
    "nfctag_url_slug": "enim",
    "card_number": "eos",
    "card_on_thankucash": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 180,
        "vendor_id": 302,
        "user_id": 358,
        "station_id": 603,
        "pin": 8477,
        "nfctag_type": "Key Tag",
        "nfctag_code": "VLX-942",
        "nfctag_oem_id": 48630851,
        "nfctag_url_slug": null,
        "created_by": 232,
        "card_number": 285712189,
        "card_on_thankucash": null,
        "card_state": "Generic",
        "station_name": "SFT EXHIBITION",
        "updated_at": "2024-12-11T08:44:28.000000Z",
        "created_at": "2024-12-11T08:44:28.000000Z",
        "id": 3088,
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 603,
            "sm_station_id": 360,
            "vendor_id": 215,
            "name": "SFT EXHIBITION",
            "address": "19 Royal Avenue lagos",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:31:08.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 232,
            "title": "Mrs",
            "name": "Sarthak Goyal",
            "email": "sarthak.goyal@tolaram.com",
            "phone": "2341234345",
            "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=sarthak.goyal_LlY",
            "username": "sarthak.goyal_LlY",
            "gender": "male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": "1795855",
            "created_at": "2023-09-11T21:45:47.000000Z",
            "updated_at": "2024-06-10T11:16:42.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 180,
            "name": "OANDO SMARTFLOW FUELING",
            "email": "businessintelligence@smartflowtech.com",
            "phone_number": "08000000",
            "registration_number": "22",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "address": "Ikeja, Lagos",
            "sector": "Oil",
            "tin": 22,
            "website": null,
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": "Jamiu",
            "contact_person_lastname": null,
            "app_uid": "671916ebd374c",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2024-10-23T15:31:55.000000Z",
            "updated_at": "2024-10-23T15:31:55.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 358,
            "title": null,
            "name": "Chika Kingsley nwogu",
            "email": "Chika_nwogu21@yahoo.com",
            "phone": "8157628945",
            "avatar": null,
            "username": "Chika_nwogu21@yahoo.com",
            "gender": "Male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2024-03-21T15:18:12.000000Z",
            "updated_at": "2024-11-18T03:48:53.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/nfc_tags

Body Parameters

company_id  integer optional  

vendor_id  integer  

user_id  integer optional  

station_id  integer optional  

pin  number optional  

card_state  string  

Must be one of Generic or OTA.

nfctag_type  string  

Must be one of Card or Key Tag.

nfctag_code  string  

nfctag_oem_id  string  

nfctag_url_slug  string optional  

card_number  string optional  

card_on_thankucash  string optional  

Show a specified NFC tag.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/nfc_tags/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 51,
        "vendor_id": 306,
        "user_id": 271,
        "station_id": 603,
        "pin": 7921,
        "nfctag_type": "Card",
        "nfctag_code": "VLX-786",
        "nfctag_oem_id": 33226419,
        "nfctag_url_slug": null,
        "created_by": 256,
        "card_number": 112438519,
        "card_on_thankucash": null,
        "card_state": "OTA",
        "station_name": "SFT EXHIBITION",
        "updated_at": "2024-12-11T08:44:33.000000Z",
        "created_at": "2024-12-11T08:44:33.000000Z",
        "id": 3089,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 603,
            "sm_station_id": 360,
            "vendor_id": 215,
            "name": "SFT EXHIBITION",
            "address": "19 Royal Avenue lagos",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:31:08.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 256,
            "title": "Mrs",
            "name": "Peter Samuel",
            "email": "samissamuel637@gmail.com",
            "phone": "948-406-8519",
            "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=peter.samuel_N69",
            "username": "peter.samuel_N69",
            "gender": "Male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": "3548278",
            "created_at": "2023-09-11T21:49:10.000000Z",
            "updated_at": "2023-09-11T21:49:10.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 51,
            "name": "MUKESH AS TEST CUSTOMER",
            "email": "miafisher51@example.com",
            "phone_number": "173",
            "registration_number": "173",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 587319,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c149",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-08T13:44:17.000000Z",
            "updated_at": "2023-04-08T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 271,
            "title": "Mr",
            "name": "Adeleye Damilola Grace",
            "email": "adeleyegrace1999@gmail.com",
            "phone": "437-813-3268",
            "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=adeleye.damilola.grace_yes",
            "username": "adeleye.damilola.grace_yes",
            "gender": "Female",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": "9067229",
            "created_at": "2023-09-11T21:50:38.000000Z",
            "updated_at": "2023-09-11T21:50:38.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

Update the specified NFC tag

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 4,
    \"vendor_id\": 16,
    \"user_id\": 6,
    \"station_id\": 10,
    \"pin\": 1049607,
    \"card_state\": \"Generic\",
    \"nfctag_type\": \"Key Tag\",
    \"nfctag_code\": \"impedit\",
    \"nfctag_oem_id\": \"omnis\",
    \"nfctag_url_slug\": \"nam\",
    \"card_number\": \"et\",
    \"card_on_thankucash\": \"vel\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 4,
    "vendor_id": 16,
    "user_id": 6,
    "station_id": 10,
    "pin": 1049607,
    "card_state": "Generic",
    "nfctag_type": "Key Tag",
    "nfctag_code": "impedit",
    "nfctag_oem_id": "omnis",
    "nfctag_url_slug": "nam",
    "card_number": "et",
    "card_on_thankucash": "vel"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 46,
        "vendor_id": 306,
        "user_id": 340,
        "station_id": 602,
        "pin": 1856,
        "nfctag_type": "Card",
        "nfctag_code": "VLX-666",
        "nfctag_oem_id": 30660481,
        "nfctag_url_slug": null,
        "created_by": 359,
        "card_number": 247769342,
        "card_on_thankucash": null,
        "card_state": "Generic",
        "station_name": "Mcpl Mowes",
        "updated_at": "2024-12-11T08:44:38.000000Z",
        "created_at": "2024-12-11T08:44:38.000000Z",
        "id": 3090,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 602,
            "sm_station_id": 364,
            "vendor_id": 215,
            "name": "Mcpl Mowes",
            "address": "Mowe",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:29:49.000000Z",
            "updated_at": "2024-01-30T13:29:49.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 359,
            "title": null,
            "name": "Chibuike obigwe",
            "email": "chibuikeobigwe1@gmail.com",
            "phone": "9064162365",
            "avatar": null,
            "username": "chibuikeobigwe1@gmail.com",
            "gender": "Male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-03-21T15:18:38.000000Z",
            "updated_at": "2024-03-21T15:18:38.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 46,
            "name": "MAGIK - MULTIPRO",
            "email": "jacksullivan46@example.com",
            "phone_number": "168",
            "registration_number": "168",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 194286,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c144",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-03T13:44:17.000000Z",
            "updated_at": "2023-04-03T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 340,
            "title": null,
            "name": "Keziah Alorye Gabriel",
            "email": "kezzygabriel25@gmail.com",
            "phone": "8145150123",
            "avatar": null,
            "username": "kezzygabriel25@gmail.com",
            "gender": "female",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-02-02T15:43:48.000000Z",
            "updated_at": "2024-02-02T15:43:48.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/nfc_tags/{id}

PATCH api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

Body Parameters

company_id  integer optional  

vendor_id  integer  

user_id  integer optional  

station_id  integer optional  

pin  number optional  

card_state  string  

Must be one of Generic or OTA.

nfctag_type  string  

Must be one of Card or Key Tag.

nfctag_code  string  

nfctag_oem_id  string  

nfctag_url_slug  string optional  

card_number  string optional  

card_on_thankucash  string optional  

Delete a NFC tag

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tags/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

Display a listing of the NFC Tag Trackers or search by NFC Tag Tracker Payment History Ref, NFC Tag Tracker Address.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers?term=quae&station_id=8&per_page=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers"
);

const params = {
    "term": "quae",
    "station_id": "8",
    "per_page": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=mCWp2KR1aibkfI9CH1ycBp2Zls6xoSoIgiqn5jgu; expires=Wed, 11 Dec 2024 10:44:46 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/nfc_tag_trackers could not be found."
}
 

Request      

GET api/nfc_tag_trackers

Query Parameters

term  string optional  

Search query parameter

station_id  integer optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new NFC Tag Tracker

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/nfc_tag_trackers

Show a specified NFC Tag Tracker.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=r0QynFjNkC59TLiZv6XY6PFm4metkQZDpZIAFTI3; expires=Wed, 11 Dec 2024 10:44:53 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/nfc_tag_trackers/3 could not be found."
}
 

Request      

GET api/nfc_tag_trackers/{id}

URL Parameters

id  integer  

The ID of the NFC Tag Tracker

Update the specified NFC Tag Tracker

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/nfc_tag_trackers/{id}

PATCH api/nfc_tag_trackers/{id}

URL Parameters

id  integer  

The ID of the NFC Tag Tracker

Delete a NFC Tag Tracker

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/nfc_tag_trackers/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/nfc_tag_trackers/{id}

URL Parameters

id  integer  

The ID of the NFC Tag Tracker

Generate pin for specified NFC Tag

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/generate_pin/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/generate_pin/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=sTjpMREh2mLxJuEZRoueMRHDoQd5QJLxOAWlAysb; expires=Wed, 11 Dec 2024 10:44:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/generate_pin/9 could not be found."
}
 

Request      

GET api/generate_pin/{nfc_tag_id}

URL Parameters

nfc_tag_id  integer  

The ID of the NFC Tag

Get paginated list of unassigned NFC tags

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/unassigned_nfc_tags?per_page=13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/unassigned_nfc_tags"
);

const params = {
    "per_page": "13",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 146,
            "vendor_id": 215,
            "user_id": 321,
            "station_id": 603,
            "pin": 4932,
            "nfctag_type": "Card",
            "nfctag_code": "VLX-945",
            "nfctag_oem_id": 31019889,
            "nfctag_url_slug": null,
            "created_by": 393,
            "card_number": 328162890,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": "SFT EXHIBITION",
            "updated_at": "2024-12-11T08:45:00.000000Z",
            "created_at": "2024-12-11T08:45:00.000000Z",
            "id": 3091,
            "vendor": {
                "id": 215,
                "sm_company_id": 42,
                "name": "BHN Logistics",
                "address": "sagamu",
                "email": "sourabh.sanganeria@tolaram.com",
                "phone_number": "08028268504",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Lagos",
                "postcode": null,
                "products_sold": "PMS, AGO",
                "payment_type": "neque",
                "contact_person": "Sourabh sanganeria",
                "registration_number": "1005",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-02-16T11:23:28.000000Z",
                "updated_at": "2023-03-14T15:26:36.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 603,
                "sm_station_id": 360,
                "vendor_id": 215,
                "name": "SFT EXHIBITION",
                "address": "19 Royal Avenue lagos",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:31:08.000000Z",
                "updated_at": "2024-01-30T13:31:08.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 393,
                "title": null,
                "name": "mary",
                "email": "marymalle2@gmail.com",
                "phone": "12123456743",
                "avatar": null,
                "username": "mal0le",
                "gender": "female",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-06-10T09:52:04.000000Z",
                "updated_at": "2024-06-10T09:52:04.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 146,
                "name": "QUANTAM PACKAGING",
                "email": "mViebIS@tolaram.com",
                "phone_number": "870-200-8909",
                "registration_number": "hJ28s",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 3789412,
                "website": "https://www.tolaram.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "p4zsyHbnYyUQIJZ",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-08-24T11:45:12.000000Z",
                "updated_at": "2023-08-24T11:45:12.000000Z",
                "deleted_at": null
            },
            "vehicles": [],
            "user": {
                "id": 321,
                "title": null,
                "name": "Olayemi Kehinde",
                "email": "Olayemikehinde001@gmail.com",
                "phone": "2222222222",
                "avatar": null,
                "username": "Olayemikehinde001@gmail.com",
                "gender": "male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2023-12-11T09:37:06.000000Z",
                "updated_at": "2023-12-11T09:37:06.000000Z",
                "deleted_at": null
            }
        },
        {
            "company_id": 48,
            "vendor_id": 311,
            "user_id": 365,
            "station_id": 602,
            "pin": 883,
            "nfctag_type": "Card",
            "nfctag_code": "VLX-353",
            "nfctag_oem_id": 44408795,
            "nfctag_url_slug": null,
            "created_by": 234,
            "card_number": 310103289,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": "Mcpl Mowes",
            "updated_at": "2024-12-11T08:45:02.000000Z",
            "created_at": "2024-12-11T08:45:02.000000Z",
            "id": 3092,
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 602,
                "sm_station_id": 364,
                "vendor_id": 215,
                "name": "Mcpl Mowes",
                "address": "Mowe",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:29:49.000000Z",
                "updated_at": "2024-01-30T13:29:49.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 234,
                "title": "Mrs",
                "name": "Indrajeet Kharade",
                "email": "indrajeet.kharade@tolaram.com",
                "phone": "7658765765",
                "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=indrajeet.kharade_VbJ",
                "username": "indrajeet.kharade_VbJ",
                "gender": "male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": "9302334",
                "created_at": "2023-09-11T21:45:48.000000Z",
                "updated_at": "2024-06-10T11:18:50.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 48,
                "name": "MBH POWER LIMITED",
                "email": "owenmurphy48@example.com",
                "phone_number": "170",
                "registration_number": "170",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 473825,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c146",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-05T13:44:17.000000Z",
                "updated_at": "2023-04-05T13:44:17.000000Z",
                "deleted_at": null
            },
            "vehicles": [],
            "user": {
                "id": 365,
                "title": null,
                "name": "Vishal",
                "email": "vishal.kumar@tolaram.com",
                "phone": "9169984626",
                "avatar": null,
                "username": "vishal.kumar@tolaram.com",
                "gender": "male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-04-12T15:19:50.000000Z",
                "updated_at": "2024-06-10T11:21:11.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/unassigned_nfc_tags

Query Parameters

per_page  integer optional  

Items per page

Vendor Assign NFC tag

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/vendor_assign_nfc_tag/voluptas" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vehicle_id\": 13,
    \"user_id\": 7,
    \"company_id\": 20
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assign_nfc_tag/voluptas"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vehicle_id": 13,
    "user_id": 7,
    "company_id": 20
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 5,
        "vendor_id": 311,
        "user_id": 353,
        "station_id": 602,
        "pin": 261,
        "nfctag_type": "Card",
        "nfctag_code": "VLX-380",
        "nfctag_oem_id": 32057272,
        "nfctag_url_slug": null,
        "created_by": 335,
        "card_number": 591902677,
        "card_on_thankucash": null,
        "card_state": "Generic",
        "station_name": "Mcpl Mowes",
        "updated_at": "2024-12-11T08:45:08.000000Z",
        "created_at": "2024-12-11T08:45:08.000000Z",
        "id": 3093,
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 602,
            "sm_station_id": 364,
            "vendor_id": 215,
            "name": "Mcpl Mowes",
            "address": "Mowe",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:29:49.000000Z",
            "updated_at": "2024-01-30T13:29:49.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 335,
            "title": null,
            "name": "Adewale lsrael",
            "email": "easydominion61@gmail.com",
            "phone": "8136154135",
            "avatar": null,
            "username": "easydominion61@gmail.com",
            "gender": "male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-01-12T08:21:23.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 5,
            "name": "BHN WORKSHOP",
            "email": "davidlee5@example.com",
            "phone_number": "127",
            "registration_number": "127",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 629148,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c103",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-21T13:44:17.000000Z",
            "updated_at": "2023-02-21T13:44:17.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 353,
            "title": null,
            "name": "CHINWE MADU",
            "email": "chinweconfido@yahoo.com",
            "phone": "8053200412",
            "avatar": null,
            "username": "chinweconfido@yahoo.com",
            "gender": "Female",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-03-20T14:49:42.000000Z",
            "updated_at": "2024-03-20T14:49:42.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PATCH api/vendor_assign_nfc_tag/{nfc_tag_id}

URL Parameters

nfc_tag_id  string  

The ID of the nfc tag.

id  integer  

The ID of the NFC tag

Body Parameters

vehicle_id  integer optional  

user_id  integer  

company_id  integer  

Vendor Station NFC tag

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/vendor_nfctag_stations/8?station_id=2&station_name=voluptas" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_nfctag_stations/8"
);

const params = {
    "station_id": "2",
    "station_name": "voluptas",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 150,
        "vendor_id": 306,
        "user_id": 273,
        "station_id": 603,
        "pin": 7913,
        "nfctag_type": "Card",
        "nfctag_code": "VLX-501",
        "nfctag_oem_id": 93660404,
        "nfctag_url_slug": null,
        "created_by": 18,
        "card_number": 50098876,
        "card_on_thankucash": null,
        "card_state": "Generic",
        "station_name": "SFT EXHIBITION",
        "updated_at": "2024-12-11T08:45:13.000000Z",
        "created_at": "2024-12-11T08:45:13.000000Z",
        "id": 3094,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 603,
            "sm_station_id": 360,
            "vendor_id": 215,
            "name": "SFT EXHIBITION",
            "address": "19 Royal Avenue lagos",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:31:08.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 18,
            "title": "Mr",
            "name": "Jamiu Adeyemi",
            "email": "jamiu.adeyemi@smartflowtech.com",
            "phone": "13245678901",
            "avatar": null,
            "username": "Jamiu",
            "gender": "Male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-13T09:40:11.000000Z",
            "updated_at": "2024-04-25T09:19:43.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 150,
            "name": "EXTERNAL",
            "email": "RgHaAZR@tolaram.com",
            "phone_number": "427-308-6349",
            "registration_number": "vNl3B",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 9057255,
            "website": "https://www.tolaram.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "fxDIJ2r4Eg8YAAv",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-08-28T17:58:41.000000Z",
            "updated_at": "2023-08-28T17:58:41.000000Z",
            "deleted_at": null
        },
        "vehicles": [],
        "user": {
            "id": 273,
            "title": "Mr",
            "name": "Olowookere Timileyin",
            "email": "baystar4real@gmail.com",
            "phone": "557-252-6083",
            "avatar": "https://via.placeholder.com/200x200.png/0033ee?text=olowookere.timileyin_awW",
            "username": "olowookere.timileyin_awW",
            "gender": "Male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": "5256790",
            "created_at": "2023-09-11T21:50:40.000000Z",
            "updated_at": "2023-09-11T21:50:40.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PATCH api/vendor_nfctag_stations/{nfc_tag_id}

URL Parameters

nfc_tag_id  integer  

The ID of the NFC tag

Query Parameters

station_id  integer  

The IĎ of Station

station_name  string  

Name of Station

Create a manual purchase upload

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/manual_purchase_upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sm_station_id\": \"eum\",
    \"station_name\": \"enim\",
    \"app_mode\": \"FCC MODE\",
    \"group_id\": 6,
    \"product\": \"ATK\",
    \"volume\": \"incidunt\",
    \"selling_price\": \"omnis\",
    \"pin\": \"doloremque\",
    \"pump\": \"quisquam\",
    \"way_bill_number\": \"non\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/manual_purchase_upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sm_station_id": "eum",
    "station_name": "enim",
    "app_mode": "FCC MODE",
    "group_id": 6,
    "product": "ATK",
    "volume": "incidunt",
    "selling_price": "omnis",
    "pin": "doloremque",
    "pump": "quisquam",
    "way_bill_number": "non"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/manual_purchase_upload

Body Parameters

vendor_id  string optional  

sm_station_id  string  

station_name  string  

app_mode  string optional  

Must be one of FCC MODE or NO FCC MODE.

sm_company_id  string optional  

mac_address  string optional  

group_id  integer optional  

oem_station_id  string optional  

authorization_type  string optional  

product  string optional  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

amount  string optional  

confirm_amount  string optional  

volume  string  

selling_price  string  

nfctag_oem_id  string optional  

pin  string  

pump  string  

transaction_date  string optional  

odometer_reading  string optional  

way_bill_number  string optional  

POST api/terminal_nfctag_payment

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/terminal_nfctag_payment" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sm_station_id\": \"sunt\",
    \"station_name\": \"tempore\",
    \"app_mode\": \"FCC MODE\",
    \"group_id\": 10,
    \"product\": \"DPK\",
    \"volume\": \"deleniti\",
    \"selling_price\": \"ratione\",
    \"pin\": \"voluptatum\",
    \"pump\": \"corrupti\",
    \"way_bill_number\": \"praesentium\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/terminal_nfctag_payment"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sm_station_id": "sunt",
    "station_name": "tempore",
    "app_mode": "FCC MODE",
    "group_id": 10,
    "product": "DPK",
    "volume": "deleniti",
    "selling_price": "ratione",
    "pin": "voluptatum",
    "pump": "corrupti",
    "way_bill_number": "praesentium"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/terminal_nfctag_payment

Body Parameters

vendor_id  string optional  

sm_station_id  string  

station_name  string  

app_mode  string optional  

Must be one of FCC MODE or NO FCC MODE.

sm_company_id  string optional  

mac_address  string optional  

group_id  integer optional  

oem_station_id  string optional  

authorization_type  string optional  

product  string optional  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

amount  string optional  

confirm_amount  string optional  

volume  string  

selling_price  string  

nfctag_oem_id  string optional  

pin  string  

pump  string  

transaction_date  string optional  

odometer_reading  string optional  

way_bill_number  string optional  

Display a listing of the Destination

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destination?term=dolor" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination"
);

const params = {
    "term": "dolor",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "aut",
            "code": "provident-nihil-aut-ea-sint-aspernatur-non",
            "description": "Alice said to herself, 'after such a neck as that! No, no! You're a serpent; and there's no use now,' thought Alice, and, after waiting till she had but to open them again, and Alice was so full of.",
            "updated_at": "2024-12-11T08:45:16.000000Z",
            "created_at": "2024-12-11T08:45:16.000000Z",
            "id": 721
        },
        {
            "name": "dolor",
            "code": "sit-impedit-rerum-sit-aut",
            "description": "Hatter, with an anxious look at all the first day,' said the Mock Turtle Soup is made from,' said the King; 'and don't look at it!' This speech caused a remarkable sensation among the trees as well.",
            "updated_at": "2024-12-11T08:45:17.000000Z",
            "created_at": "2024-12-11T08:45:17.000000Z",
            "id": 722
        }
    ]
}
 

Request      

GET api/bhn_destination

Query Parameters

term  string optional  

Search query parameter

Display a listing of the Vehicle

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle?vendor_id=18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle"
);

const params = {
    "vendor_id": "18",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 126,
            "cost_center_id": 392,
            "driver_id": 163,
            "nfc_tag_id": 215,
            "group_id": 362,
            "registration_number": "fc-641-mc",
            "tank_capacity": 5,
            "auth_type": null,
            "tracker_id": "kib389",
            "model": "Karen",
            "engine_capacity": null,
            "fuel_type": "HHK",
            "color": "Blue",
            "brand": "Toyota",
            "reward_type": null,
            "active": true,
            "company": {
                "id": 126,
                "name": "Victor Chinonso Ugwu",
                "email": "kaydenmorgan96@example.com",
                "phone_number": "218",
                "registration_number": "218",
                "country": "Nigeria",
                "state": "Abuja Federal Capital Territor",
                "city": "Abuja Municipal Area",
                "postcode": null,
                "address": "13 Sijuade Street",
                "sector": "fuel",
                "tin": 918256,
                "website": "https://smartflow-software-solutions.atlassian.net/",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": "Victor Chinonso Ugwu",
                "contact_person_lastname": "Victor Chinonso Ugwu",
                "app_uid": "645276045c8fc",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-05-03T15:56:04.000000Z",
                "updated_at": "2023-05-03T15:56:04.000000Z",
                "deleted_at": null
            },
            "group": [],
            "driver": {
                "id": 163,
                "company_id": 11,
                "fullname": "MUHAMMED ABBA",
                "address": "SAGAMU",
                "phone_number": "8111111175",
                "email": "Sourabh.sanganeria64@tolaram.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2023-02-17T11:50:08.000000Z",
                "updated_at": "2023-09-01T18:10:35.000000Z",
                "deleted_at": null
            },
            "costCenter": {
                "id": 392,
                "company_id": 126,
                "name": "Victor Chinonso Ugwu",
                "email": "4mT9isA@tolaram.com",
                "phone_number": "442-277-1489",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:38:35.000000Z",
                "updated_at": "2023-08-29T16:38:35.000000Z",
                "deleted_at": null
            },
            "vehicle_plate_number": "fc-641-mc",
            "nfcTag": {
                "id": 215,
                "company_id": 11,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-7715",
                "nfctag_oem_id": "D6AE4831",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "93",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-02-16T12:37:13.000000Z",
                "updated_at": "2023-09-01T18:07:51.000000Z",
                "deleted_at": null,
                "upload_id": null
            }
        },
        {
            "company_id": 1,
            "cost_center_id": 293,
            "driver_id": 105,
            "nfc_tag_id": 946,
            "group_id": 293,
            "registration_number": "lt-284-hj",
            "tank_capacity": 90,
            "auth_type": null,
            "tracker_id": "sza411",
            "model": "Kahaya",
            "engine_capacity": null,
            "fuel_type": "AGO",
            "color": "White",
            "brand": "Toyota",
            "reward_type": null,
            "active": false,
            "updated_at": "2024-12-11T08:45:25.000000Z",
            "created_at": "2024-12-11T08:45:25.000000Z",
            "id": 2103,
            "company": {
                "id": 1,
                "name": "AAVA BRANDS LIMITED",
                "email": "johndoe1@example.com",
                "phone_number": "123",
                "registration_number": "123",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 592837,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c99",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-02-17T13:44:17.000000Z",
                "updated_at": "2023-02-17T13:44:17.000000Z",
                "deleted_at": null
            },
            "group": [],
            "driver": {
                "id": 105,
                "company_id": 1,
                "fullname": "UMAR HAMISU BAWA",
                "address": "Shagamu",
                "phone_number": "8020001000",
                "email": "Sourabh.sanganeria@tolaram.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2023-02-16T14:22:24.000000Z",
                "updated_at": "2024-06-30T02:05:00.000000Z",
                "deleted_at": null
            },
            "costCenter": {
                "id": 293,
                "company_id": 1,
                "name": "AAVA BRANDS LIMITED",
                "email": "DRx2utV@tolaram.com",
                "phone_number": "555-114-4772",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:31:01.000000Z",
                "updated_at": "2023-08-29T16:31:01.000000Z",
                "deleted_at": null
            },
            "vehicle_plate_number": "lt-284-hj",
            "nfcTag": {
                "id": 946,
                "company_id": 1,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-9446",
                "nfctag_oem_id": "96A49EB9",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": null,
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": null,
                "updated_at": "2024-07-20T16:32:38.000000Z",
                "deleted_at": null,
                "upload_id": null
            }
        }
    ]
}
 

Request      

GET api/vehicle

Query Parameters

vendor_id  integer optional  

Search query parameter

Display a listing of the Destination Allocation

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocation" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocation"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "reiciendis",
            "destination_source_id": 263,
            "destination_stoppage_id": 263,
            "code": "incidunt-voluptas-fugit-est-occaecati-mollitia-itaque",
            "allocated_quantity": 1,
            "updated_at": "2024-12-11T08:45:29.000000Z",
            "created_at": "2024-12-11T08:45:29.000000Z",
            "id": 37
        },
        {
            "name": "voluptas",
            "destination_source_id": 616,
            "destination_stoppage_id": 616,
            "code": "eos-corrupti-ab-libero-laudantium-qui-quisquam",
            "allocated_quantity": 5,
            "updated_at": "2024-12-11T08:45:30.000000Z",
            "created_at": "2024-12-11T08:45:30.000000Z",
            "id": 38
        }
    ]
}
 

Request      

GET api/bhn_destination_allocation

Display a Realtime Total Quantity of Destination Allocation

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocation_total_quantity?destination_source_id=11&destination_stoppage_id=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocation_total_quantity"
);

const params = {
    "destination_source_id": "11",
    "destination_stoppage_id": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "dolore",
            "destination_source_id": 42,
            "destination_stoppage_id": 42,
            "code": "ut-veritatis-quia-recusandae-fuga-esse-in",
            "allocated_quantity": 2,
            "updated_at": "2024-12-11T08:45:32.000000Z",
            "created_at": "2024-12-11T08:45:32.000000Z",
            "id": 39
        },
        {
            "name": "quaerat",
            "destination_source_id": 476,
            "destination_stoppage_id": 476,
            "code": "praesentium-quia-maiores-quos-cum",
            "allocated_quantity": 8,
            "updated_at": "2024-12-11T08:45:33.000000Z",
            "created_at": "2024-12-11T08:45:33.000000Z",
            "id": 40
        }
    ]
}
 

Request      

GET api/bhn_destination_allocation_total_quantity

Query Parameters

destination_source_id  integer optional  

destination_stoppage_id  integer optional  

Display a listing of the Category

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_category" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_category"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "parent_id": 9,
            "name": "repudiandae",
            "code": "est",
            "updated_at": "2024-12-11T08:45:34.000000Z",
            "created_at": "2024-12-11T08:45:34.000000Z",
            "id": 69,
            "is_parent": "nass"
        },
        {
            "parent_id": 9,
            "name": "sunt",
            "code": "dolore",
            "updated_at": "2024-12-11T08:45:34.000000Z",
            "created_at": "2024-12-11T08:45:34.000000Z",
            "id": 70,
            "is_parent": "nass"
        }
    ]
}
 

Request      

GET api/bhn_category

Display a listing of the Sub Category

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_sub_category?category_id=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_sub_category"
);

const params = {
    "category_id": "19",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "parent_id": 9,
            "name": "aut",
            "code": "non",
            "updated_at": "2024-12-11T08:45:35.000000Z",
            "created_at": "2024-12-11T08:45:35.000000Z",
            "id": 71,
            "is_parent": "nass"
        },
        {
            "parent_id": 4,
            "name": "voluptatem",
            "code": "qui",
            "updated_at": "2024-12-11T08:45:36.000000Z",
            "created_at": "2024-12-11T08:45:36.000000Z",
            "id": 72,
            "is_parent": "nass"
        }
    ]
}
 

Request      

GET api/bhn_sub_category

Query Parameters

category_id  integer optional  

Search query parameter

Display a listing of the BHN Categories or search by name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_categories?term=voluptatem&per_page=3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories"
);

const params = {
    "term": "voluptatem",
    "per_page": "3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "parent_id": 7,
            "name": "et",
            "code": "molestias",
            "updated_at": "2024-12-11T08:45:37.000000Z",
            "created_at": "2024-12-11T08:45:37.000000Z",
            "id": 73,
            "is_parent": "nass"
        },
        {
            "parent_id": 9,
            "name": "eligendi",
            "code": "vel",
            "updated_at": "2024-12-11T08:45:38.000000Z",
            "created_at": "2024-12-11T08:45:38.000000Z",
            "id": 74,
            "is_parent": "nass"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bhn_categories

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new BHN Category

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"parent_id\": 19,
    \"name\": \"quam\",
    \"code\": \"sequi\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "parent_id": 19,
    "name": "quam",
    "code": "sequi"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "parent_id": 7,
        "name": "eveniet",
        "code": "eum",
        "updated_at": "2024-12-11T08:45:40.000000Z",
        "created_at": "2024-12-11T08:45:40.000000Z",
        "id": 75,
        "is_parent": "nass"
    }
}
 

Request      

POST api/bhn_categories

Body Parameters

parent_id  integer optional  

name  string  

code  string optional  

Show a specified BHN Category.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_categories/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "parent_id": 3,
        "name": "in",
        "code": "voluptas",
        "updated_at": "2024-12-11T08:45:41.000000Z",
        "created_at": "2024-12-11T08:45:41.000000Z",
        "id": 76,
        "is_parent": "nass"
    }
}
 

Request      

GET api/bhn_categories/{id}

URL Parameters

id  integer  

The ID of the BHN Category

Update the specified BHN Category

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"parent_id\": 9,
    \"name\": \"mollitia\",
    \"code\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "parent_id": 9,
    "name": "mollitia",
    "code": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "parent_id": 7,
        "name": "dolorum",
        "code": "facilis",
        "updated_at": "2024-12-11T08:45:43.000000Z",
        "created_at": "2024-12-11T08:45:43.000000Z",
        "id": 77,
        "is_parent": "nass"
    }
}
 

Request      

PUT api/bhn_categories/{id}

PATCH api/bhn_categories/{id}

URL Parameters

id  integer  

The ID of the BHN Category

Body Parameters

parent_id  integer optional  

name  string  

code  string optional  

Delete a BHN Category

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_categories/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/bhn_categories/{id}

URL Parameters

id  integer  

The ID of the BHN Category

Display a listing of the BHN Categories or search by name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_contracts?term=non&per_page=16&company_id=dolores&vehicle_id=veritatis&source_id=voluptatem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts"
);

const params = {
    "term": "non",
    "per_page": "16",
    "company_id": "dolores",
    "vehicle_id": "veritatis",
    "source_id": "voluptatem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company": null,
            "vehicle": null,
            "source": null
        },
        {
            "company": null,
            "vehicle": null,
            "source": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bhn_contracts

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

company_id  string optional  

Search query parameter

vehicle_id  string optional  

Search query parameter

source_id  string optional  

Search query parameter

Create a new BHN Contract

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": \"quis\",
    \"vehicle_id\": \"omnis\",
    \"source_id\": \"debitis\",
    \"contract_type\": \"cupiditate\",
    \"tenure_start_date\": \"2024-12-11T08:45:45\",
    \"tenure_end_date\": \"2044-05-23\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": "quis",
    "vehicle_id": "omnis",
    "source_id": "debitis",
    "contract_type": "cupiditate",
    "tenure_start_date": "2024-12-11T08:45:45",
    "tenure_end_date": "2044-05-23",
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company": null,
        "vehicle": null,
        "source": null
    }
}
 

Request      

POST api/bhn_contracts

Body Parameters

company_id  string  

vehicle_id  string  

source_id  string  

contract_type  string  

tenure_start_date  string  

Must be a valid date.

tenure_end_date  string  

Must be a valid date. Must be a date after tenure_start_date.

active  boolean  

Show a specified BHN Contract.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company": null,
        "vehicle": null,
        "source": null
    }
}
 

Request      

GET api/bhn_contracts/{id}

URL Parameters

id  integer  

The ID of the BHN Contract

Update the specified BHN Contract

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": \"magnam\",
    \"vehicle_id\": \"non\",
    \"source_id\": \"rerum\",
    \"contract_type\": \"mollitia\",
    \"tenure_start_date\": \"2024-12-11T08:45:47\",
    \"tenure_end_date\": \"2039-12-26\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": "magnam",
    "vehicle_id": "non",
    "source_id": "rerum",
    "contract_type": "mollitia",
    "tenure_start_date": "2024-12-11T08:45:47",
    "tenure_end_date": "2039-12-26",
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company": null,
        "vehicle": null,
        "source": null
    }
}
 

Request      

PUT api/bhn_contracts/{id}

PATCH api/bhn_contracts/{id}

URL Parameters

id  integer  

The ID of the BHN Contract

Body Parameters

company_id  string  

vehicle_id  string  

source_id  string  

contract_type  string  

tenure_start_date  string  

Must be a valid date.

tenure_end_date  string  

Must be a valid date. Must be a date after tenure_start_date.

active  boolean  

Delete a BHN Contract

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_contracts/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/bhn_contracts/{id}

URL Parameters

id  integer  

The ID of the BHN Contract

Display a listing of the BHN Destinations or search by name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destinations?term=nihil&per_page=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations"
);

const params = {
    "term": "nihil",
    "per_page": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "suscipit",
            "code": "commodi-vel-reiciendis-ea-eius-voluptatem-nostrum-reiciendis-at",
            "description": "The Panther took pie-crust, and gravy, and meat, While the Owl and the game was in managing her flamingo: she succeeded in curving it down into its eyes were nearly out of THIS!' (Sounds of more.",
            "updated_at": "2024-12-11T08:45:48.000000Z",
            "created_at": "2024-12-11T08:45:48.000000Z",
            "id": 723
        },
        {
            "name": "velit",
            "code": "nobis-et-dolore-suscipit-aliquid",
            "description": "Duchess, 'chop off her unfortunate guests to execution--once more the pig-baby was sneezing on the song, perhaps?' 'I've heard something splashing about in the kitchen that did not like the largest.",
            "updated_at": "2024-12-11T08:45:49.000000Z",
            "created_at": "2024-12-11T08:45:49.000000Z",
            "id": 724
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bhn_destinations

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new BHN Destination

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"et\",
    \"code\": \"iure\",
    \"description\": \"rerum\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "et",
    "code": "iure",
    "description": "rerum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "odio",
        "code": "iste-qui-laborum-libero",
        "description": "Duchess, it had been. But her sister sat still just as well. The twelve jurors were writing down 'stupid things!' on their slates, and she thought of herself, 'I don't know much,' said the Mouse.",
        "updated_at": "2024-12-11T08:45:50.000000Z",
        "created_at": "2024-12-11T08:45:50.000000Z",
        "id": 725
    }
}
 

Request      

POST api/bhn_destinations

Body Parameters

name  string  

code  string  

description  string optional  

Show a specified BHN Destination.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "aliquam",
        "code": "eius-quos-similique-sed-eum-cum-deleniti-quisquam",
        "description": "I know I do!' said Alice in a thick wood. 'The first thing I've got to?' (Alice had no pictures or conversations in it, 'and what is the reason so many different sizes in a minute or two. 'They.",
        "updated_at": "2024-12-11T08:45:51.000000Z",
        "created_at": "2024-12-11T08:45:51.000000Z",
        "id": 726
    }
}
 

Request      

GET api/bhn_destinations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Update the specified BHN Destination

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"autem\",
    \"code\": \"quisquam\",
    \"description\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "autem",
    "code": "quisquam",
    "description": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "autem",
        "code": "dolorem-quo-aliquam-id-vel-aut-vero",
        "description": "Lobster; I heard him declare, \"You have baked me too brown, I must sugar my hair.\" As a duck with its mouth and yawned once or twice, and shook itself. Then it got down off the fire, licking her.",
        "updated_at": "2024-12-11T08:45:52.000000Z",
        "created_at": "2024-12-11T08:45:52.000000Z",
        "id": 727
    }
}
 

Request      

PUT api/bhn_destinations/{id}

PATCH api/bhn_destinations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Body Parameters

name  string  

code  string  

description  string optional  

Delete a BHN Destination

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destinations/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/bhn_destinations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Display a listing of the BHN Destinations Allocations or search by name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations?term=perferendis&per_page=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations"
);

const params = {
    "term": "perferendis",
    "per_page": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "voluptas",
            "destination_source_id": 497,
            "destination_stoppage_id": 497,
            "code": "fuga-blanditiis-tempore-dolorem-odit",
            "allocated_quantity": 4,
            "updated_at": "2024-12-11T08:45:54.000000Z",
            "created_at": "2024-12-11T08:45:54.000000Z",
            "id": 41
        },
        {
            "name": "illum",
            "destination_source_id": 139,
            "destination_stoppage_id": 139,
            "code": "sint-animi-ut-consequuntur",
            "allocated_quantity": 7,
            "updated_at": "2024-12-11T08:45:55.000000Z",
            "created_at": "2024-12-11T08:45:55.000000Z",
            "id": 42
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bhn_destination_allocations

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new BHN Destination

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"assumenda\",
    \"destination_source_id\": \"ad\",
    \"destination_stoppage_id\": \"delectus\",
    \"code\": \"non\",
    \"allocated_quantity\": \"voluptatem\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "assumenda",
    "destination_source_id": "ad",
    "destination_stoppage_id": "delectus",
    "code": "non",
    "allocated_quantity": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "ipsa",
        "destination_source_id": 683,
        "destination_stoppage_id": 683,
        "code": "recusandae-nesciunt-et-pariatur-quos-quibusdam-tempora",
        "allocated_quantity": 0,
        "updated_at": "2024-12-11T08:45:57.000000Z",
        "created_at": "2024-12-11T08:45:57.000000Z",
        "id": 43
    }
}
 

Request      

POST api/bhn_destination_allocations

Body Parameters

name  string  

destination_source_id  string  

destination_stoppage_id  string  

code  string optional  

allocated_quantity  string optional  

Show a specified BHN Destination.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "architecto",
        "destination_source_id": 410,
        "destination_stoppage_id": 410,
        "code": "repellat-ut-eligendi-maiores-temporibus-voluptatem",
        "allocated_quantity": 9,
        "updated_at": "2024-12-11T08:45:58.000000Z",
        "created_at": "2024-12-11T08:45:58.000000Z",
        "id": 44
    }
}
 

Request      

GET api/bhn_destination_allocations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Update the specified BHN Destination

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sit\",
    \"destination_source_id\": \"cupiditate\",
    \"destination_stoppage_id\": \"occaecati\",
    \"code\": \"aut\",
    \"allocated_quantity\": \"ea\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sit",
    "destination_source_id": "cupiditate",
    "destination_stoppage_id": "occaecati",
    "code": "aut",
    "allocated_quantity": "ea"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "quod",
        "destination_source_id": 620,
        "destination_stoppage_id": 620,
        "code": "corrupti-et-est-in-eaque",
        "allocated_quantity": 7,
        "updated_at": "2024-12-11T08:46:00.000000Z",
        "created_at": "2024-12-11T08:46:00.000000Z",
        "id": 45
    }
}
 

Request      

PUT api/bhn_destination_allocations/{id}

PATCH api/bhn_destination_allocations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Body Parameters

name  string  

destination_source_id  string  

destination_stoppage_id  string  

code  string optional  

allocated_quantity  string optional  

Delete a BHN Destination

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/bhn_destination_allocations/{id}

URL Parameters

id  integer  

The ID of the BHN Destination

Display a listing of the BHN Requests or search by registration number and waybill number.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_requests?term=aut&status=voluptatibus&type=quia&per_page=3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests"
);

const params = {
    "term": "aut",
    "status": "voluptatibus",
    "type": "quia",
    "per_page": "3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor_id": 302,
            "company_id": 46,
            "type": "waybill_request",
            "vehicle_id": 593,
            "category_id": 25,
            "sub_category_id": 25,
            "way_bill_number": 71115,
            "data": {
                "key": "value",
                "another_key": "another_value",
                "total_quantity": 0
            },
            "remarks": "Never heard of uglifying!' it exclaimed. 'You know what a long hookah, and taking not the right way of nursing it, (which was to twist it up into the darkness as hard as it spoke. 'As wet as ever,'.",
            "rejection_reason": "Alice heard the Rabbit began. Alice gave a little now and then a great hurry. 'You did!' said the March Hare, who had meanwhile been examining the roses. 'Off with their hands and feet at the end.'.",
            "status": "Pending",
            "cleared": "Pending",
            "updated_at": "2024-12-11T08:46:04.000000Z",
            "created_at": "2024-12-11T08:46:04.000000Z",
            "id": 46489,
            "requested_total_volume": null,
            "total_dispensed_volume": 0,
            "dispensed_status": "Invalid Quantity"
        },
        {
            "vendor_id": 311,
            "company_id": 58,
            "type": "loading_request",
            "vehicle_id": 476,
            "category_id": 3,
            "sub_category_id": 3,
            "way_bill_number": 814925,
            "data": {
                "status": "active",
                "created_at": "2024-12-11T08:46:06.301271Z",
                "total_quantity": 0
            },
            "remarks": "Forty-two. ALL PERSONS MORE THAN A MILE HIGH TO LEAVE THE COURT.' Everybody looked at it again: but he would deny it too: but the Rabbit in a fight with another dig of her own mind (as well as she.",
            "rejection_reason": "EVER happen in a very short time the Queen added to one of the birds and animals that had made the whole party swam to the jury, of course--\"I GAVE HER ONE, THEY GAVE HIM TWO--\" why, that must be.",
            "status": "Approved",
            "cleared": "Pending",
            "updated_at": "2024-12-11T08:46:06.000000Z",
            "created_at": "2024-12-11T08:46:06.000000Z",
            "id": 46490,
            "requested_total_volume": null,
            "total_dispensed_volume": 0,
            "dispensed_status": "Not Yet Dispensed"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/bhn_requests

Query Parameters

term  string optional  

Search query parameter

status  string optional  

Search query parameter

type  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new BHN Request

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"loading_request\",
    \"vehicle_id\": 10,
    \"category_id\": 15,
    \"sub_category_id\": 3,
    \"way_bill_number\": \"qui\",
    \"source\": 13,
    \"stoppage\": 6,
    \"allocated_quantity\": 7,
    \"destination_allocation_ids\": [
        16
    ],
    \"remarks\": \"omnis\",
    \"load_type\": \"light\",
    \"rejection_reason\": \"et\",
    \"submitted_user_id\": 2,
    \"approved_user_id\": 14,
    \"rejected_user_id\": 16,
    \"status\": \"Approved\",
    \"tonnage\": \"ut\",
    \"age\": \"fuga\",
    \"trailer_type\": \"magnam\",
    \"make\": \"qui\",
    \"contract\": \"earum\",
    \"submitted_date\": \"2024-12-11T08:46:07\",
    \"approve_date\": \"2024-12-11T08:46:07\",
    \"reject_date\": \"2024-12-11T08:46:07\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "loading_request",
    "vehicle_id": 10,
    "category_id": 15,
    "sub_category_id": 3,
    "way_bill_number": "qui",
    "source": 13,
    "stoppage": 6,
    "allocated_quantity": 7,
    "destination_allocation_ids": [
        16
    ],
    "remarks": "omnis",
    "load_type": "light",
    "rejection_reason": "et",
    "submitted_user_id": 2,
    "approved_user_id": 14,
    "rejected_user_id": 16,
    "status": "Approved",
    "tonnage": "ut",
    "age": "fuga",
    "trailer_type": "magnam",
    "make": "qui",
    "contract": "earum",
    "submitted_date": "2024-12-11T08:46:07",
    "approve_date": "2024-12-11T08:46:07",
    "reject_date": "2024-12-11T08:46:07"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "id": 34,
    "vendor_id": 215,
    "company_id": 37,
    "type": "loading_request",
    "vehicle_id": 733,
    "source": null,
    "stoppage": null,
    "category_id": 1,
    "sub_category_id": 8,
    "way_bill_number": "GEN-rKO6pT",
    "data": {
        "added_quantity": "9",
        "total_quantity": 30,
        "new_total_quantity": 30
    },
    "remarks": "Test request",
    "rejection_reason": "Test",
    "status": "Rejected",
    "transaction_status": "Not yet dispensed",
    "cleared": "Not yet dispensed",
    "created_at": "2023-09-29T09:55:37.000000Z",
    "updated_at": "2023-11-03T13:13:49.000000Z",
    "deleted_at": null,
    "load_type": null,
    "tonnage": null,
    "age": null,
    "trailer_type": null,
    "make": null,
    "contract": null,
    "submitted_date": "2023-09-29 00:00:00",
    "approve_date": null,
    "reject_date": null,
    "station_name": null,
    "transaction_type": null,
    "requested_total_volume": 21,
    "total_dispensed_volume": 0,
    "dispensed_status": "Not Yet Dispensed"
}
 

Request      

POST api/bhn_requests

Body Parameters

type  string  

Must be one of loading_request or waybill_request.

vehicle_id  integer  

category_id  integer  

sub_category_id  integer  

way_bill_number  string optional  

This field is required when type is waybill_request.

source  integer optional  

This field is required when type is waybill_request. The value and stoppage must be different.

stoppage  integer optional  

This field is required when type is waybill_request. The value and source must be different.

total_quantity  string optional  

added_quantity  string optional  

new_total_quantity  string optional  

allocated_quantity  integer optional  

This field is required when type is waybill_request.

destination_allocation_ids  integer[] optional  

remarks  string optional  

load_type  string optional  

Must be one of heavy, light, HEAVY, or LIGHT.

rejection_reason  string optional  

This field is required when status is Rejected.

submitted_user_id  integer optional  

approved_user_id  integer optional  

rejected_user_id  integer optional  

status  string optional  

Must be one of Pending, Approved, or Rejected.

tonnage  string optional  

This field is required when type is waybill_request.

age  string optional  

This field is required when type is waybill_request.

trailer_type  string optional  

This field is required when type is waybill_request.

make  string optional  

This field is required when type is waybill_request.

contract  string optional  

This field is required when type is waybill_request.

submitted_date  string optional  

Must be a valid date.

approve_date  string optional  

Must be a valid date.

reject_date  string optional  

Must be a valid date.

Show a specified BHN Request.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bhn_requests/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "vendor_id": 311,
    "company_id": 141,
    "type": "waybill_request",
    "vehicle_id": 708,
    "category_id": 22,
    "sub_category_id": 22,
    "way_bill_number": 44415,
    "data": {
        "key": "value",
        "another_key": "another_value",
        "total_quantity": 0
    },
    "remarks": "Alice to herself, 'I don't know what \"it\" means.' 'I know what a Mock Turtle yawned and shut his eyes.--'Tell her about the crumbs,' said the Dodo, pointing to Alice with one eye; 'I seem to dry me.",
    "rejection_reason": "Gryphon, lying fast asleep in the pool a little way out of it, and burning with curiosity, she ran with all their simple joys, remembering her own mind (as well as she ran; but the Gryphon remarked.",
    "status": "Approved",
    "cleared": "Pending",
    "updated_at": "2024-12-11T08:46:14.000000Z",
    "created_at": "2024-12-11T08:46:14.000000Z",
    "id": 46491,
    "requested_total_volume": null,
    "total_dispensed_volume": 0,
    "dispensed_status": "Invalid Quantity"
}
 

Request      

GET api/bhn_requests/{id}

URL Parameters

id  integer  

The ID of the BHN Request

Update the specified BHN Request

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"loading_request\",
    \"vehicle_id\": 18,
    \"category_id\": 13,
    \"sub_category_id\": 11,
    \"way_bill_number\": \"fugiat\",
    \"source\": 3,
    \"stoppage\": 1,
    \"allocated_quantity\": 16,
    \"destination_allocation_ids\": [
        3
    ],
    \"remarks\": \"non\",
    \"load_type\": \"LIGHT\",
    \"rejection_reason\": \"doloribus\",
    \"submitted_user_id\": 12,
    \"approved_user_id\": 16,
    \"rejected_user_id\": 5,
    \"status\": \"Pending\",
    \"tonnage\": \"explicabo\",
    \"age\": \"consectetur\",
    \"trailer_type\": \"deserunt\",
    \"make\": \"quas\",
    \"contract\": \"rerum\",
    \"submitted_date\": \"2024-12-11T08:46:14\",
    \"approve_date\": \"2024-12-11T08:46:14\",
    \"reject_date\": \"2024-12-11T08:46:14\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "loading_request",
    "vehicle_id": 18,
    "category_id": 13,
    "sub_category_id": 11,
    "way_bill_number": "fugiat",
    "source": 3,
    "stoppage": 1,
    "allocated_quantity": 16,
    "destination_allocation_ids": [
        3
    ],
    "remarks": "non",
    "load_type": "LIGHT",
    "rejection_reason": "doloribus",
    "submitted_user_id": 12,
    "approved_user_id": 16,
    "rejected_user_id": 5,
    "status": "Pending",
    "tonnage": "explicabo",
    "age": "consectetur",
    "trailer_type": "deserunt",
    "make": "quas",
    "contract": "rerum",
    "submitted_date": "2024-12-11T08:46:14",
    "approve_date": "2024-12-11T08:46:14",
    "reject_date": "2024-12-11T08:46:14"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "vendor_id": 310,
    "company_id": 44,
    "type": "waybill_request",
    "vehicle_id": 2079,
    "category_id": 7,
    "sub_category_id": 7,
    "way_bill_number": 16,
    "data": {
        "key": "value",
        "another_key": "another_value",
        "total_quantity": 0
    },
    "remarks": "You gave us three or more; They all returned from him to you, Though they were nice grand words to say.) Presently she began very cautiously: 'But I don't take this child away with me,' thought.",
    "rejection_reason": "Caterpillar. Alice said with a sudden leap out of breath, and said anxiously to herself, (not in a thick wood. 'The first thing I've got to the shore, and then she walked on in the direction it.",
    "status": "Pending",
    "cleared": "Pending",
    "updated_at": "2024-12-11T08:46:16.000000Z",
    "created_at": "2024-12-11T08:46:16.000000Z",
    "id": 46492,
    "requested_total_volume": null,
    "total_dispensed_volume": 0,
    "dispensed_status": "Invalid Quantity"
}
 

Request      

PUT api/bhn_requests/{id}

PATCH api/bhn_requests/{id}

URL Parameters

id  integer  

The ID of the BHN Request

Body Parameters

type  string  

Must be one of loading_request or waybill_request.

vehicle_id  integer  

category_id  integer  

sub_category_id  integer  

way_bill_number  string optional  

This field is required when type is waybill_request.

source  integer optional  

This field is required when type is waybill_request. The value and stoppage must be different.

stoppage  integer optional  

This field is required when type is waybill_request. The value and source must be different.

total_quantity  string optional  

added_quantity  string optional  

new_total_quantity  string optional  

allocated_quantity  integer optional  

This field is required when type is waybill_request.

destination_allocation_ids  integer[] optional  

remarks  string optional  

load_type  string optional  

Must be one of heavy, light, HEAVY, or LIGHT.

rejection_reason  string optional  

This field is required when status is Rejected.

submitted_user_id  integer optional  

approved_user_id  integer optional  

rejected_user_id  integer optional  

status  string optional  

Must be one of Pending, Approved, or Rejected.

tonnage  string optional  

This field is required when type is waybill_request.

age  string optional  

This field is required when type is waybill_request.

trailer_type  string optional  

This field is required when type is waybill_request.

make  string optional  

This field is required when type is waybill_request.

contract  string optional  

This field is required when type is waybill_request.

submitted_date  string optional  

Must be a valid date.

approve_date  string optional  

Must be a valid date.

reject_date  string optional  

Must be a valid date.

Delete a BHN Request

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bhn_requests/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/bhn_requests/{id}

URL Parameters

id  integer  

The ID of the BHN Request

This endpoint would be used to process the truck number sent from the mobile app when a request is initialized.

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/truck_data_map" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vehicle_id\": 14
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/truck_data_map"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vehicle_id": 14
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/truck_data_map

Body Parameters

vehicle_id  integer  

This endpoint would be used to update customer transaction id.

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/update_transaction_id" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"transaction_type\": \"cash\",
    \"id\": 17,
    \"transaction_id\": 18
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/update_transaction_id"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "transaction_type": "cash",
    "id": 17,
    "transaction_id": 18
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/update_transaction_id

Body Parameters

transaction_type  string  

Must be one of velox or cash.

id  integer  

transaction_id  integer  

This endpoint would be used to get the CUPID FLEET report.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/cupid_fleet_report" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cupid_fleet_report"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=fX0IvJixUGEVyg0ofv5FSjpTaJJlYxupdut1F7SB; expires=Wed, 11 Dec 2024 10:46:27 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/cupid_fleet_report could not be found."
}
 

Request      

GET api/cupid_fleet_report

Get drivers for dropdown.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_drivers?term=qui&per_page=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_drivers"
);

const params = {
    "term": "qui",
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1863,
            "fullname": "Dr. Felton Hahn",
            "company_id": 39
        },
        {
            "id": 1864,
            "fullname": "Elsie Swift",
            "company_id": 58
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/get_drivers

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Get Vehicles for dropdown.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_vehicles?vendor_id=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_vehicles"
);

const params = {
    "vendor_id": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": null,
            "company_id": 85,
            "vendor_id": null,
            "registration_number": "nu-606-mz"
        },
        {
            "id": 2105,
            "company_id": 82,
            "vendor_id": null,
            "registration_number": "mt-694-ep"
        }
    ]
}
 

Request      

GET api/get_vehicles

Query Parameters

vendor_id  integer optional  

Search query parameter

Get NfcTags for dropdown.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_nfc_tags?vendor_id=3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_nfc_tags"
);

const params = {
    "vendor_id": "3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 2106,
            "company_id": 9,
            "vendor_id": null,
            "registration_number": "mz-966-fd"
        },
        {
            "id": 2107,
            "company_id": 86,
            "vendor_id": null,
            "registration_number": "md-698-ua"
        }
    ]
}
 

Request      

GET api/get_nfc_tags

Query Parameters

vendor_id  integer optional  

Search query parameter

General Endpoints

List of audit trail logs

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/audit_trail?per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/audit_trail"
);

const params = {
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "company_group_id": null,
            "company_id": null,
            "user_type": null,
            "user_id": null,
            "event": "created",
            "auditable_type": "App\\Models\\User",
            "auditable_id": 11,
            "old_values": [],
            "new_values": {
                "title": "Eng",
                "name": "Super Admin",
                "email": "super_admin_0X0@smartflowtech.com",
                "phone": "(864) 935-4360",
                "username": "user_one",
                "gender": "Male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "card_token": null,
                "is_admin": 1,
                "is_vendor": 0,
                "updated_at": "2023-02-06 08:18:28",
                "created_at": "2023-02-06 08:18:28",
                "id": 11
            },
            "url": "https://cupidapiv2.smartflowtech.com/api/oauth/login",
            "ip_address": "154.113.84.185",
            "user_agent": "PostmanRuntime/7.29.2",
            "tags": null,
            "created_at": "2023-02-06T08:18:29.000000Z",
            "updated_at": "2023-02-06T08:18:29.000000Z",
            "deleted_at": null,
            "user": null
        },
        {
            "id": 1,
            "company_group_id": null,
            "company_id": null,
            "user_type": null,
            "user_id": null,
            "event": "created",
            "auditable_type": "App\\Models\\User",
            "auditable_id": 11,
            "old_values": [],
            "new_values": {
                "title": "Eng",
                "name": "Super Admin",
                "email": "super_admin_0X0@smartflowtech.com",
                "phone": "(864) 935-4360",
                "username": "user_one",
                "gender": "Male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "card_token": null,
                "is_admin": 1,
                "is_vendor": 0,
                "updated_at": "2023-02-06 08:18:28",
                "created_at": "2023-02-06 08:18:28",
                "id": 11
            },
            "url": "https://cupidapiv2.smartflowtech.com/api/oauth/login",
            "ip_address": "154.113.84.185",
            "user_agent": "PostmanRuntime/7.29.2",
            "tags": null,
            "created_at": "2023-02-06T08:18:29.000000Z",
            "updated_at": "2023-02-06T08:18:29.000000Z",
            "deleted_at": null,
            "user": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/audit_trail

Query Parameters

per_page  integer optional  

Items per page

Test Redis connection

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/test_redis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/test_redis"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=ogaX39Pe2TwM4ajEtvEldZ54tuRxPg4F1oLaNvXO; expires=Wed, 11 Dec 2024 10:36:39 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/test_redis could not be found."
}
 

Request      

GET api/test_redis

Display a listing of the states or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/states?term=mollitia&per_page=20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/states"
);

const params = {
    "term": "mollitia",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "country": {
                "id": 101,
                "code": "IN",
                "name": "India",
                "slug": null,
                "phonecode": 91,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        },
        {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "country": {
                "id": 101,
                "code": "IN",
                "name": "India",
                "slug": null,
                "phonecode": 91,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/states

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new state

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/states" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"aut\",
    \"country_id\": 14
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/states"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "aut",
    "country_id": 14
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Andaman and Nicobar Islands",
        "slug": null,
        "country_id": 101,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "country": {
            "id": 101,
            "code": "IN",
            "name": "India",
            "slug": null,
            "phonecode": 91,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

POST api/states

Body Parameters

name  string  

country_id  integer  

Show a specified state.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/states/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/states/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Andaman and Nicobar Islands",
        "slug": null,
        "country_id": 101,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "country": {
            "id": 101,
            "code": "IN",
            "name": "India",
            "slug": null,
            "phonecode": 91,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

GET api/states/{id}

URL Parameters

id  integer  

The ID of the state

Update the specified state

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/states/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"suscipit\",
    \"country_id\": 6
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/states/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "suscipit",
    "country_id": 6
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Andaman and Nicobar Islands",
        "slug": null,
        "country_id": 101,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "country": {
            "id": 101,
            "code": "IN",
            "name": "India",
            "slug": null,
            "phonecode": 91,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/states/{id}

PATCH api/states/{id}

URL Parameters

id  integer  

The ID of the state

Body Parameters

name  string  

country_id  integer  

Delete a state

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/states/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/states/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/states/{id}

URL Parameters

id  integer  

The ID of the state

Display a listing of the countries or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/countries?term=ea&per_page=2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/countries"
);

const params = {
    "term": "ea",
    "per_page": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        [],
        []
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/countries

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new country

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/countries" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"dolor\",
    \"code\": 1,
    \"phonecode\": 19
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/countries"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "dolor",
    "code": 1,
    "phonecode": 19
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

POST api/countries

Body Parameters

name  string  

code  integer  

phonecode  integer  

Show a specified country.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/countries/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/countries/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

GET api/countries/{id}

URL Parameters

id  integer  

The ID of the country

Update the specified country

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/countries/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"porro\",
    \"code\": 19,
    \"phonecode\": 2
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/countries/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "porro",
    "code": 19,
    "phonecode": 2
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

PUT api/countries/{id}

PATCH api/countries/{id}

URL Parameters

id  integer  

The ID of the country

Body Parameters

name  string  

code  integer  

phonecode  integer  

Delete a country

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/countries/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/countries/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/countries/{id}

URL Parameters

id  integer  

The ID of the country

Display a listing of the cities or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/cities?term=illum&per_page=9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cities"
);

const params = {
    "term": "illum",
    "per_page": "9",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Bombuflat",
            "slug": null,
            "state_id": 1,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "state": {
                "id": 1,
                "name": "Andaman and Nicobar Islands",
                "slug": null,
                "country_id": 101,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        },
        {
            "id": 1,
            "name": "Bombuflat",
            "slug": null,
            "state_id": 1,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "state": {
                "id": 1,
                "name": "Andaman and Nicobar Islands",
                "slug": null,
                "country_id": 101,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cities

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new city

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/cities" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"tempora\",
    \"state_id\": 5
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cities"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "tempora",
    "state_id": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Bombuflat",
        "slug": null,
        "state_id": 1,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "state": {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

POST api/cities

Body Parameters

name  string  

state_id  integer  

Show a specified city.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/cities/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cities/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Bombuflat",
        "slug": null,
        "state_id": 1,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "state": {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

GET api/cities/{id}

URL Parameters

id  integer  

The ID of the city

Update the specified city

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/cities/4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"tenetur\",
    \"state_id\": 15
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cities/4"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "tenetur",
    "state_id": 15
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Bombuflat",
        "slug": null,
        "state_id": 1,
        "created_at": null,
        "updated_at": null,
        "deleted_at": null,
        "state": {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/cities/{id}

PATCH api/cities/{id}

URL Parameters

id  integer  

The ID of the city

Body Parameters

name  string  

state_id  integer  

Delete a city

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/cities/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/cities/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/cities/{id}

URL Parameters

id  integer  

The ID of the city

Display a listing of the Vehicle Makes or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_make" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_make"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vehicleModel": []
        },
        {
            "vehicleModel": []
        }
    ]
}
 

Request      

GET api/vehicle_make

Display a listing of the Vehicle Models or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_model?vehicle_make_id=4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_model"
);

const params = {
    "vehicle_make_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vehicleMake": null
        },
        {
            "vehicleMake": null
        }
    ]
}
 

Request      

GET api/vehicle_model

Query Parameters

vehicle_make_id  integer optional  

Search query parameter

Display a listing of the Vehicle Types or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_type" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_type"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        [],
        []
    ]
}
 

Request      

GET api/vehicle_type

Display a listing of the Vehicle Makes or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_makes?term=ut&per_page=16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes"
);

const params = {
    "term": "ut",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vehicleModel": []
        },
        {
            "vehicleModel": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vehicle_makes

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new Vehicle Make

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"facilis\",
    \"code\": \"tempora\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "facilis",
    "code": "tempora"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleModel": []
    }
}
 

Request      

POST api/vehicle_makes

Body Parameters

name  string  

code  string  

logo  string optional  

Show a specified Vehicle Make.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleModel": []
    }
}
 

Request      

GET api/vehicle_makes/{id}

URL Parameters

id  integer  

The ID of the vehicle Make

Update the specified Vehicle Make

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"provident\",
    \"code\": \"tempore\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "provident",
    "code": "tempore"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleModel": []
    }
}
 

Request      

PUT api/vehicle_makes/{id}

PATCH api/vehicle_makes/{id}

URL Parameters

id  integer  

The ID of the vehicle Make

Body Parameters

name  string  

code  string  

logo  string optional  

Delete a Vehicle Make

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_makes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vehicle_makes/{id}

URL Parameters

id  integer  

The ID of the vehicle Make

Display a listing of the vehicle Models or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_models?term=sed&per_page=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models"
);

const params = {
    "term": "sed",
    "per_page": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vehicleMake": null
        },
        {
            "vehicleMake": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vehicle_models

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new Vehicle Model

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"tempora\",
    \"code\": \"ut\",
    \"vehicle_make_id\": \"numquam\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "tempora",
    "code": "ut",
    "vehicle_make_id": "numquam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleMake": null
    }
}
 

Request      

POST api/vehicle_models

Body Parameters

name  string  

code  string  

vehicle_make_id  string  

Show a specified Vehicle Model.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_models/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleMake": null
    }
}
 

Request      

GET api/vehicle_models/{id}

URL Parameters

id  integer  

The ID of the vehicleModel

Update the specified Vehicle Model

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"delectus\",
    \"code\": \"eos\",
    \"vehicle_make_id\": \"laboriosam\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "delectus",
    "code": "eos",
    "vehicle_make_id": "laboriosam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vehicleMake": null
    }
}
 

Request      

PUT api/vehicle_models/{id}

PATCH api/vehicle_models/{id}

URL Parameters

id  integer  

The ID of the vehicleModel

Body Parameters

name  string  

code  string  

vehicle_make_id  string  

Delete a Vehicle Model

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_models/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vehicle_models/{id}

URL Parameters

id  integer  

The ID of the vehicleModel

Display a listing of the vehicleTypes or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_types?term=asperiores&per_page=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types"
);

const params = {
    "term": "asperiores",
    "per_page": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        [],
        []
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vehicle_types

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new vehicleType

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

POST api/vehicle_types

Body Parameters

name  string  

Show a specified vehicleType.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vehicle_types/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

GET api/vehicle_types/{id}

URL Parameters

id  integer  

The ID of the vehicleType

Update the specified vehicleType

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"est\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "est"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": []
}
 

Request      

PUT api/vehicle_types/{id}

PATCH api/vehicle_types/{id}

URL Parameters

id  integer  

The ID of the vehicleType

Body Parameters

name  string  

Delete a vehicleType

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vehicle_types/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vehicle_types/{id}

URL Parameters

id  integer  

The ID of the vehicleType

Display a listing of the countries or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/country?term=odit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/country"
);

const params = {
    "term": "odit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        [],
        []
    ]
}
 

Request      

GET api/country

Query Parameters

term  string optional  

Search query parameter

Display a listing of the states or search by names

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/country/state?country_id=vero&term=voluptas" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/country/state"
);

const params = {
    "country_id": "vero",
    "term": "voluptas",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "country": {
                "id": 101,
                "code": "IN",
                "name": "India",
                "slug": null,
                "phonecode": 91,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        },
        {
            "id": 1,
            "name": "Andaman and Nicobar Islands",
            "slug": null,
            "country_id": 101,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "country": {
                "id": 101,
                "code": "IN",
                "name": "India",
                "slug": null,
                "phonecode": 91,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        }
    ]
}
 

Request      

GET api/country/state

Query Parameters

country_id  string optional  

Search query parameter

term  string optional  

Search query parameter

Display a listing of the cities or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/state/city?state_id=ex&term=a" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/state/city"
);

const params = {
    "state_id": "ex",
    "term": "a",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Bombuflat",
            "slug": null,
            "state_id": 1,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "state": {
                "id": 1,
                "name": "Andaman and Nicobar Islands",
                "slug": null,
                "country_id": 101,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        },
        {
            "id": 1,
            "name": "Bombuflat",
            "slug": null,
            "state_id": 1,
            "created_at": null,
            "updated_at": null,
            "deleted_at": null,
            "state": {
                "id": 1,
                "name": "Andaman and Nicobar Islands",
                "slug": null,
                "country_id": 101,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null
            }
        }
    ]
}
 

Request      

GET api/state/city

Query Parameters

state_id  string optional  

Search query parameter

term  string optional  

Search query parameter

Display a listing of the products or search by name, code.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/products?term=inventore&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/products"
);

const params = {
    "term": "inventore",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Gas",
            "code": "LPFO",
            "updated_at": "2024-12-11T08:51:22.000000Z",
            "created_at": "2024-12-11T08:51:22.000000Z",
            "id": 46
        },
        {
            "name": "Petrol",
            "code": "LPFO",
            "updated_at": "2024-12-11T08:51:23.000000Z",
            "created_at": "2024-12-11T08:51:23.000000Z",
            "id": 47
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/products

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new product

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/products" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"provident\",
    \"code\": \"eos\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/products"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "provident",
    "code": "eos"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Diesel",
        "code": "PMS",
        "updated_at": "2024-12-11T08:51:24.000000Z",
        "created_at": "2024-12-11T08:51:24.000000Z",
        "id": 48
    }
}
 

Request      

POST api/products

Body Parameters

name  string  

code  string  

Show a specified product.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/products/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/products/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Petrol",
        "code": "HHK",
        "updated_at": "2024-12-11T08:51:26.000000Z",
        "created_at": "2024-12-11T08:51:26.000000Z",
        "id": 49
    }
}
 

Request      

GET api/products/{id}

URL Parameters

id  integer  

The ID of the product

Update the specified product

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/products/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"aliquam\",
    \"code\": \"recusandae\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/products/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "aliquam",
    "code": "recusandae"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Kerosine",
        "code": "DPK",
        "updated_at": "2024-12-11T08:51:27.000000Z",
        "created_at": "2024-12-11T08:51:27.000000Z",
        "id": 50
    }
}
 

Request      

PUT api/products/{id}

PATCH api/products/{id}

URL Parameters

id  integer  

The ID of the product

Body Parameters

name  string  

code  string  

Delete a product

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/products/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/products/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/products/{id}

URL Parameters

id  integer  

The ID of the product

Display a listing of the payment methods or search by name, key, merchant code.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payment_methods?term=dolorem&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_methods"
);

const params = {
    "term": "dolorem",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Paystacks",
            "key": "paystack",
            "pay_percent": 1.5,
            "cap_fee": 2500,
            "max_commission": 2000,
            "verification_url": "https://api.paystack.co/transaction/verify/",
            "url": "https://api.paystack.co/",
            "public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
            "secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
            "merchant_no": null,
            "active": true
        },
        {
            "name": "Paystacks",
            "key": "paystack",
            "pay_percent": 1.5,
            "cap_fee": 2500,
            "max_commission": 2000,
            "verification_url": "https://api.paystack.co/transaction/verify/",
            "url": "https://api.paystack.co/",
            "public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
            "secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
            "merchant_no": null,
            "active": true
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/payment_methods

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new payment method

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payment_methods" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sapiente\",
    \"key\": \"vitae\",
    \"pay_percent\": 1221.6,
    \"cap_fee\": 16393.8222,
    \"max_commission\": 201344.24911787,
    \"verification_url\": \"http:\\/\\/www.terry.com\\/et-at-dicta-veniam-voluptates\",
    \"public_key\": \"tempora\",
    \"secret_key\": \"in\",
    \"merchant_no\": \"aut\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_methods"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sapiente",
    "key": "vitae",
    "pay_percent": 1221.6,
    "cap_fee": 16393.8222,
    "max_commission": 201344.24911787,
    "verification_url": "http:\/\/www.terry.com\/et-at-dicta-veniam-voluptates",
    "public_key": "tempora",
    "secret_key": "in",
    "merchant_no": "aut",
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Paystacks",
        "key": "paystack",
        "pay_percent": 1.5,
        "cap_fee": 2500,
        "max_commission": 2000,
        "verification_url": "https://api.paystack.co/transaction/verify/",
        "url": "https://api.paystack.co/",
        "public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
        "secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
        "merchant_no": null,
        "active": true
    }
}
 

Request      

POST api/payment_methods

Body Parameters

name  string  

key  string  

pay_percent  number  

cap_fee  number  

max_commission  number  

verification_url  string  

Must be a valid URL.

public_key  string  

secret_key  string  

merchant_no  string  

active  boolean  

Show a specified payment method.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payment_methods/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_methods/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Paystacks",
        "key": "paystack",
        "pay_percent": 1.5,
        "cap_fee": 2500,
        "max_commission": 2000,
        "verification_url": "https://api.paystack.co/transaction/verify/",
        "url": "https://api.paystack.co/",
        "public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
        "secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
        "merchant_no": null,
        "active": true
    }
}
 

Request      

GET api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

Update the specified payment method

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/payment_methods/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"quos\",
    \"key\": \"quia\",
    \"pay_percent\": 48,
    \"cap_fee\": 75764,
    \"max_commission\": 6443320.653,
    \"verification_url\": \"https:\\/\\/osinski.org\\/voluptatum-sapiente-recusandae-delectus-doloremque.html\",
    \"public_key\": \"est\",
    \"secret_key\": \"autem\",
    \"merchant_no\": \"aut\",
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_methods/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "quos",
    "key": "quia",
    "pay_percent": 48,
    "cap_fee": 75764,
    "max_commission": 6443320.653,
    "verification_url": "https:\/\/osinski.org\/voluptatum-sapiente-recusandae-delectus-doloremque.html",
    "public_key": "est",
    "secret_key": "autem",
    "merchant_no": "aut",
    "active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Paystacks",
        "key": "paystack",
        "pay_percent": 1.5,
        "cap_fee": 2500,
        "max_commission": 2000,
        "verification_url": "https://api.paystack.co/transaction/verify/",
        "url": "https://api.paystack.co/",
        "public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
        "secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
        "merchant_no": null,
        "active": true
    }
}
 

Request      

PUT api/payment_methods/{id}

PATCH api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

Body Parameters

name  string  

key  string  

pay_percent  number  

cap_fee  number  

max_commission  number  

verification_url  string  

Must be a valid URL.

public_key  string  

secret_key  string  

merchant_no  string  

active  boolean  

Delete a payment method

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/payment_methods/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_methods/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

Display a listing of the banks or search by name, ussd code.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/banks?term=iure&per_page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/banks"
);

const params = {
    "term": "iure",
    "per_page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "bank_name": "Access Bank",
            "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
            "bank_ussd_code": "*901#",
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        },
        {
            "id": 1,
            "bank_name": "Access Bank",
            "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
            "bank_ussd_code": "*901#",
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/banks

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new bank

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/banks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "bank_name=quis" \
    --form "bank_logo=@/tmp/phpUckB9R" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/banks"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('bank_name', 'quis');
body.append('bank_logo', document.querySelector('input[name="bank_logo"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "bank_name": "Access Bank",
        "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
        "bank_ussd_code": "*901#",
        "created_at": null,
        "updated_at": null,
        "deleted_at": null
    }
}
 

Request      

POST api/banks

Body Parameters

bank_name  string  

bank_logo  file optional  

Must be an image.

bank_ussd_code  string optional  

Show a specified bank.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/banks/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/banks/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "bank_name": "Access Bank",
        "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
        "bank_ussd_code": "*901#",
        "created_at": null,
        "updated_at": null,
        "deleted_at": null
    }
}
 

Request      

GET api/banks/{id}

URL Parameters

id  integer  

The ID of the bank

Update the specified bank

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/banks/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "bank_name=accusamus" \
    --form "bank_logo=@/tmp/phpjyIYMu" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/banks/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('bank_name', 'accusamus');
body.append('bank_logo', document.querySelector('input[name="bank_logo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "bank_name": "Access Bank",
        "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
        "bank_ussd_code": "*901#",
        "created_at": null,
        "updated_at": null,
        "deleted_at": null
    }
}
 

Request      

PUT api/banks/{id}

PATCH api/banks/{id}

URL Parameters

id  integer  

The ID of the bank

Body Parameters

bank_name  string  

bank_logo  file optional  

Must be an image.

bank_ussd_code  string optional  

Delete a bank

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/banks/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/banks/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/banks/{id}

URL Parameters

id  integer  

The ID of the bank

Get a list of Paystacks banks

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/paystack_bank_lists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/paystack_bank_lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=FckD8yxb5bHS3u2XT0SxSmm9V2ehAZChoLQd2s51; expires=Wed, 11 Dec 2024 10:51:37 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/paystack_bank_lists could not be found."
}
 

Request      

GET api/paystack_bank_lists

Display a listing of the banks or search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/bank_list?term=doloribus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/bank_list"
);

const params = {
    "term": "doloribus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "bank_name": "Access Bank",
            "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
            "bank_ussd_code": "*901#",
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        },
        {
            "id": 1,
            "bank_name": "Access Bank",
            "bank_logo": "https://i0.wp.com/naijaknowhow.net/wp-content/uploads/2019/04/access-bank-new-logo.jpg",
            "bank_ussd_code": "*901#",
            "created_at": null,
            "updated_at": null,
            "deleted_at": null
        }
    ]
}
 

Request      

GET api/bank_list

Query Parameters

term  string optional  

Search query parameter

PAM Endpoints

Display a listing of the PAM devices or search by mac address, ip address or codename.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_devices?term=expedita&per_page=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_devices"
);

const params = {
    "term": "expedita",
    "per_page": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "mac_address": "DC:03:E6:84:E8:00",
            "last_time_online": {
                "date": "2021-10-29 02:21:48.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "ip_address": "112.36.157.131",
            "current_station_name": "Balistreri-Buckridge",
            "current_oem_station_id": "032216",
            "current_app_version": "5.49.68",
            "expected_app_version": "6.18.36",
            "current_sm_company_id": 3,
            "current_sm_station_id": 7,
            "expected_sm_company_id": 6,
            "expected_sm_station_id": 9,
            "expected_oem_station_id": 9,
            "expected_station_name": "77:85:85:49:2F:50",
            "app_mode": "FCC MODE",
            "codename": "PAM-1",
            "last_local_mapping_updated_at": {
                "date": "2016-03-19 20:55:51.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "last_remote_mapping_updated_at": {
                "date": "1996-01-14 04:22:04.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "updated_at": "2024-12-11T08:37:04.000000Z",
            "created_at": "2024-12-11T08:37:04.000000Z",
            "id": 76
        },
        {
            "mac_address": "2E:FC:5A:2A:9F:B5",
            "last_time_online": {
                "date": "1972-07-31 14:00:46.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "ip_address": "52.139.79.121",
            "current_station_name": "Cole-Gleichner",
            "current_oem_station_id": "189800",
            "current_app_version": "8.17.18",
            "expected_app_version": "6.16.15",
            "current_sm_company_id": 4,
            "current_sm_station_id": 1,
            "expected_sm_company_id": 6,
            "expected_sm_station_id": 9,
            "expected_oem_station_id": 4,
            "expected_station_name": "FC:6C:3B:C8:BC:74",
            "app_mode": "NO FCC MODE",
            "codename": "PAM-1",
            "last_local_mapping_updated_at": {
                "date": "1998-01-24 20:52:53.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "last_remote_mapping_updated_at": {
                "date": "2015-06-29 03:18:25.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "updated_at": "2024-12-11T08:37:05.000000Z",
            "created_at": "2024-12-11T08:37:05.000000Z",
            "id": 77
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pam_devices

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new PAM device

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pam_devices" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mac_address\": \"sint\",
    \"ip_address\": \"81.79.120.86\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mac_address": "sint",
    "ip_address": "81.79.120.86"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "mac_address": "E5:38:87:D2:D4:88",
        "last_time_online": {
            "date": "1997-03-11 15:28:21.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "ip_address": "136.212.191.238",
        "current_station_name": "Lowe, Prosacco and Torphy",
        "current_oem_station_id": "436105",
        "current_app_version": "9.28.28",
        "expected_app_version": "2.52.73",
        "current_sm_company_id": 7,
        "current_sm_station_id": 7,
        "expected_sm_company_id": 7,
        "expected_sm_station_id": 1,
        "expected_oem_station_id": 9,
        "expected_station_name": "AB:72:4E:22:58:BE",
        "app_mode": "FCC MODE",
        "codename": "PAM-1",
        "last_local_mapping_updated_at": {
            "date": "2007-10-30 11:34:04.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "last_remote_mapping_updated_at": {
            "date": "1991-07-04 19:14:21.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": "2024-12-11T08:37:06.000000Z",
        "created_at": "2024-12-11T08:37:06.000000Z",
        "id": 78
    }
}
 

Request      

POST api/pam_devices

Body Parameters

mac_address  string  

ip_address  string optional  

Must be a valid IP address.

current_station_name  string optional  

current_oem_station_id  string optional  

current_app_version  string optional  

expected_app_version  string optional  

current_sm_company_id  string optional  

current_sm_station_id  string optional  

expected_sm_company_id  string optional  

expected_sm_station_id  string optional  

expected_oem_station_id  string optional  

expected_station_name  string optional  

app_mode  string optional  

codename  string optional  

Show a specified PAM device.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_devices/4?mac_address=inventore" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_devices/4"
);

const params = {
    "mac_address": "inventore",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "mac_address": "51:B5:BF:CF:F6:0A",
        "last_time_online": {
            "date": "1995-08-03 22:12:52.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "ip_address": "158.238.172.22",
        "current_station_name": "Rolfson, Hodkiewicz and Schultz",
        "current_oem_station_id": "327607",
        "current_app_version": "4.6.7",
        "expected_app_version": "6.41.33",
        "current_sm_company_id": 5,
        "current_sm_station_id": 6,
        "expected_sm_company_id": 9,
        "expected_sm_station_id": 2,
        "expected_oem_station_id": 9,
        "expected_station_name": "BE:B4:D8:A7:C7:B4",
        "app_mode": "FCC MODE",
        "codename": null,
        "last_local_mapping_updated_at": {
            "date": "1992-05-06 15:04:06.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "last_remote_mapping_updated_at": {
            "date": "1990-03-02 09:09:30.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": "2024-12-11T08:37:07.000000Z",
        "created_at": "2024-12-11T08:37:07.000000Z",
        "id": 79
    }
}
 

Request      

GET api/pam_devices/{id}

URL Parameters

id  integer  

The ID of the PAM device

Query Parameters

mac_address  string optional  

The MAC address of the PAM device

Update the specified PAM device

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/pam_devices/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mac_address\": \"in\",
    \"ip_address\": \"247.1.235.171\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_devices/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mac_address": "in",
    "ip_address": "247.1.235.171"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "mac_address": "B7:51:82:43:B8:1E",
        "last_time_online": {
            "date": "2012-11-01 09:12:16.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "ip_address": "111.146.120.163",
        "current_station_name": "Robel, Stracke and Hayes",
        "current_oem_station_id": "023042",
        "current_app_version": "3.86.93",
        "expected_app_version": "6.72.80",
        "current_sm_company_id": 1,
        "current_sm_station_id": 6,
        "expected_sm_company_id": 4,
        "expected_sm_station_id": 7,
        "expected_oem_station_id": 2,
        "expected_station_name": "87:9A:7C:BE:B0:06",
        "app_mode": "NO FCC MODE",
        "codename": null,
        "last_local_mapping_updated_at": {
            "date": "2008-11-07 11:58:20.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "last_remote_mapping_updated_at": {
            "date": "2002-01-16 02:06:29.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": "2024-12-11T08:37:08.000000Z",
        "created_at": "2024-12-11T08:37:08.000000Z",
        "id": 80
    }
}
 

Request      

PUT api/pam_devices/{id}

PATCH api/pam_devices/{id}

URL Parameters

id  integer  

The ID of the PAM device

Body Parameters

mac_address  string  

ip_address  string optional  

Must be a valid IP address.

current_station_name  string optional  

current_oem_station_id  string optional  

current_app_version  string optional  

expected_app_version  string optional  

current_sm_company_id  string optional  

current_sm_station_id  string optional  

expected_sm_company_id  string optional  

expected_sm_station_id  string optional  

expected_oem_station_id  string optional  

expected_station_name  string optional  

app_mode  string optional  

codename  string optional  

Delete a PAM device

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/pam_devices/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_devices/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/pam_devices/{id}

URL Parameters

id  integer  

The ID of the PAM device

Display a listing of the PAM transaction or search by mac address, ip address.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_transactions?term=praesentium&sm_company_id=dolorem&start_date=facere&end_date=maiores&per_page=6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions"
);

const params = {
    "term": "praesentium",
    "sm_company_id": "dolorem",
    "start_date": "facere",
    "end_date": "maiores",
    "per_page": "6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "updated_at": "2024-12-11T08:37:10.000000Z",
            "created_at": "2024-12-11T08:37:10.000000Z",
            "id": 3872157
        },
        {
            "updated_at": "2024-12-11T08:37:10.000000Z",
            "created_at": "2024-12-11T08:37:10.000000Z",
            "id": 3872158
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pam_transactions

Query Parameters

term  string optional  

Search query parameter

sm_company_id  string optional  

Search SM Company ID parameter

start_date  string optional  

Search Start Date parameter

end_date  string optional  

Search End Date parameter

per_page  integer optional  

Items per page

Create a new PAM transaction

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "updated_at": "2024-12-11T08:37:11.000000Z",
        "created_at": "2024-12-11T08:37:11.000000Z",
        "id": 3872159
    }
}
 

Request      

POST api/pam_transactions

Show a specified PAM transaction.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_transactions/4?mac_address=voluptas" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions/4"
);

const params = {
    "mac_address": "voluptas",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "updated_at": "2024-12-11T08:37:12.000000Z",
        "created_at": "2024-12-11T08:37:12.000000Z",
        "id": 3872160
    }
}
 

Request      

GET api/pam_transactions/{id}

URL Parameters

id  integer  

The ID of the PAM transaction

Query Parameters

mac_address  string optional  

The MAC address of the PAM transaction

Update the specified PAM transaction

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "updated_at": "2024-12-11T08:37:14.000000Z",
        "created_at": "2024-12-11T08:37:14.000000Z",
        "id": 3872161
    }
}
 

Request      

PUT api/pam_transactions/{id}

PATCH api/pam_transactions/{id}

URL Parameters

id  integer  

The ID of the PAM transaction

Delete a PAM transaction

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_transactions/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/pam_transactions/{id}

URL Parameters

id  integer  

The ID of the PAM transaction

Display a listing of the PAM attached devices or search by mac address, ip address, app client or station name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices?term=eius&per_page=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices"
);

const params = {
    "term": "eius",
    "per_page": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "last_time_online": {
                "date": "2015-02-24 20:22:12.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "mac_address": "8D:64:97:CA:33:FA",
            "ip_address": "4.180.25.150",
            "station_name": "Miller-Cartwright",
            "oem_station_id": 9,
            "sm_company_id": 6,
            "sm_station_id": 4,
            "app_client": "CUSTOMER SITES"
        },
        {
            "last_time_online": {
                "date": "1973-12-30 12:43:17.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "mac_address": "7B:C7:57:29:4B:24",
            "ip_address": "75.129.170.102",
            "station_name": "Klocko, Rempel and Aufderhar",
            "oem_station_id": 6,
            "sm_company_id": 5,
            "sm_station_id": 4,
            "app_client": "Simple Customer"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pam_attached_devices

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new PAM attached device

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mac_address\": \"excepturi\",
    \"ip_address\": \"159.30.146.3\",
    \"station_name\": \"magni\",
    \"oem_station_id\": 3,
    \"sm_company_id\": 3,
    \"sm_station_id\": 11,
    \"pam_device_id\": 6,
    \"app_client\": \"veniam\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mac_address": "excepturi",
    "ip_address": "159.30.146.3",
    "station_name": "magni",
    "oem_station_id": 3,
    "sm_company_id": 3,
    "sm_station_id": 11,
    "pam_device_id": 6,
    "app_client": "veniam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "last_time_online": {
            "date": "2016-11-08 03:16:13.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "mac_address": "92:CD:34:4B:1C:BC",
        "ip_address": "186.244.43.216",
        "station_name": "O'Connell-Parisian",
        "oem_station_id": 2,
        "sm_company_id": 1,
        "sm_station_id": 1,
        "app_client": "ELEPHANT GROUP LIMITED"
    }
}
 

Request      

POST api/pam_attached_devices

Body Parameters

mac_address  string  

ip_address  string optional  

Must be a valid IP address.

station_name  string optional  

oem_station_id  integer optional  

sm_company_id  integer optional  

sm_station_id  integer optional  

pam_device_id  integer optional  

app_client  string optional  

Show a specified PAM attached device.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/8?mac_address=corporis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/8"
);

const params = {
    "mac_address": "corporis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "last_time_online": {
            "date": "2018-09-11 03:14:37.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "mac_address": "56:52:90:84:9E:6E",
        "ip_address": "91.200.247.244",
        "station_name": "Marks-Labadie",
        "oem_station_id": 8,
        "sm_company_id": 4,
        "sm_station_id": 8,
        "app_client": "OMNIBIZ AFRICA"
    }
}
 

Request      

GET api/pam_attached_devices/{id}

URL Parameters

id  integer  

The ID of the PAM attached device

Query Parameters

mac_address  string optional  

The MAC address of the PAM attached device

Update the specified PAM attached device

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mac_address\": \"molestias\",
    \"ip_address\": \"7.189.146.181\",
    \"station_name\": \"enim\",
    \"oem_station_id\": 19,
    \"sm_company_id\": 9,
    \"sm_station_id\": 9,
    \"pam_device_id\": 18,
    \"app_client\": \"iure\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mac_address": "molestias",
    "ip_address": "7.189.146.181",
    "station_name": "enim",
    "oem_station_id": 19,
    "sm_company_id": 9,
    "sm_station_id": 9,
    "pam_device_id": 18,
    "app_client": "iure"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "last_time_online": {
            "date": "1999-07-30 21:21:50.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "mac_address": "22:C8:81:12:4A:BD",
        "ip_address": "117.149.119.12",
        "station_name": "Vandervort, Corkery and Hoppe",
        "oem_station_id": 3,
        "sm_company_id": 9,
        "sm_station_id": 1,
        "app_client": "CHI LIMITED"
    }
}
 

Request      

PUT api/pam_attached_devices/{id}

PATCH api/pam_attached_devices/{id}

URL Parameters

id  integer  

The ID of the PAM attached device

Body Parameters

mac_address  string  

ip_address  string optional  

Must be a valid IP address.

station_name  string optional  

oem_station_id  integer optional  

sm_company_id  integer optional  

sm_station_id  integer optional  

pam_device_id  integer optional  

app_client  string optional  

Delete a PAM attached device

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/pam_attached_devices/{id}

URL Parameters

id  integer  

The ID of the PAM attached device

POST api/pam_error_logs

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pam_error_logs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"station_name\": \"sequi\",
    \"sm_company_id\": 6,
    \"sm_station_id\": 20,
    \"error_message\": \"eius\",
    \"error_activity\": \"incidunt\",
    \"error_body\": \"molestias\",
    \"error_date_time\": \"totam\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pam_error_logs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "station_name": "sequi",
    "sm_company_id": 6,
    "sm_station_id": 20,
    "error_message": "eius",
    "error_activity": "incidunt",
    "error_body": "molestias",
    "error_date_time": "totam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/pam_error_logs

Body Parameters

station_name  string optional  

sm_company_id  integer optional  

sm_station_id  integer optional  

error_message  string  

error_activity  string  

error_body  string optional  

error_date_time  string optional  

PATCH api/transactions_flags

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/transactions_flags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/transactions_flags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/transactions_flags

POS Endpoints

Display a listing of the fuel purchase history or filter by company id, vendor id, cost center id, mac address, sm station id & date

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history?per_page=9&company_id=20&vendor_id=14&cost_center_id=15&sm_station_id=16&mac_address=sint&date=vitae" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history"
);

const params = {
    "per_page": "9",
    "company_id": "20",
    "vendor_id": "14",
    "cost_center_id": "15",
    "sm_station_id": "16",
    "mac_address": "sint",
    "date": "vitae",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 176,
            "vendor_id": 311,
            "user_id": 348,
            "cost_center_id": 364,
            "nfctag_id": 452,
            "driver_id": 1217,
            "way_bill_number": "WB-5952",
            "vendor_station_name": "Purdy, Welch and Roberts",
            "vehicle_plate_number": "mg-022-au",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 634.06,
            "volume": 0,
            "odometer_reading": 4,
            "product": "HHK",
            "pump": 5,
            "selling_price": 1.47,
            "current_credit_limit": 3018663.25,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 4974525.86,
            "last_amount_paid": 2158207.67,
            "transaction_seq_no": 34716,
            "is_balanced": true,
            "oem_station_id": 2,
            "sm_station_id": 8,
            "balance_refunded": 411424.18,
            "tapnet_amount": 364293.94,
            "tapnet_volume": 46044.72,
            "tapnet_transaction_time": {
                "date": "2005-10-08 14:36:56.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "NO FCC MODE",
            "mac_address": "1A:60:F4:0A:DE:C3",
            "release_token": "51",
            "is_fdc_value_fill": false,
            "fdc_volume": 2.35,
            "fdc_amount": 27.83,
            "last_tsn_source": null,
            "verified_volume": 208.24,
            "verified_amount": 28.17,
            "reconciliation_source": "FDC",
            "one_time_auth_id": 886,
            "recon_balance_refunded": true,
            "updated_at": "2024-12-11T08:46:47.000000Z",
            "created_at": "2024-12-11T08:46:47.000000Z",
            "id": 31870,
            "driver": {
                "id": 1217,
                "company_id": 37,
                "fullname": "SHAIBU SUNDAY AMOTO",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "412-527-9773",
                "email": "lWctoAQ@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T17:59:37.000000Z",
                "updated_at": "2023-09-01T21:42:34.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 176,
                "name": "CUSTOMER SITES",
                "email": "ayodeji.alabi@smartflowtech.com",
                "phone_number": "08130097929",
                "registration_number": "2357",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Gombi",
                "postcode": null,
                "address": "LAGOS",
                "sector": "Smartflow Technologies",
                "tin": 6773,
                "website": "https://cupidv2.smartflowtech.org",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": "Deji Akande",
                "contact_person_lastname": "Deji Akande",
                "app_uid": "66e07531d23d8",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2024-09-10T16:34:57.000000Z",
                "updated_at": "2024-09-10T16:34:57.000000Z",
                "deleted_at": null
            },
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "costCenter": {
                "id": 364,
                "company_id": 70,
                "name": "PABOD INTERNATIONAL BREWERIES PLC",
                "email": "vYuTltq@tolaram.com",
                "phone_number": "696-857-5548",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:38:14.000000Z",
                "updated_at": "2023-08-29T16:38:14.000000Z",
                "deleted_at": null
            },
            "nfcTag": {
                "id": 452,
                "company_id": 150,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-7617",
                "nfctag_oem_id": "96494C31",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "3696628291259",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-10-10T09:34:02.000000Z",
                "updated_at": "2023-09-01T18:40:34.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "userWallet": null,
            "remark": null
        },
        {
            "company_id": 55,
            "vendor_id": 311,
            "user_id": 369,
            "cost_center_id": 349,
            "nfctag_id": 1636,
            "driver_id": 883,
            "way_bill_number": "WB-6247",
            "vendor_station_name": "Green, Trantow and Hodkiewicz",
            "vehicle_plate_number": "lh-598-ze",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 418.67,
            "volume": 558.18,
            "odometer_reading": 0,
            "product": "PMS",
            "pump": 8,
            "selling_price": 0,
            "current_credit_limit": 11562.4,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 2641206.4,
            "last_amount_paid": 24673681.22,
            "transaction_seq_no": 23311,
            "is_balanced": true,
            "oem_station_id": 5,
            "sm_station_id": 1,
            "balance_refunded": 54.51,
            "tapnet_amount": 4294.17,
            "tapnet_volume": 4774802.48,
            "tapnet_transaction_time": {
                "date": "1970-10-17 19:40:22.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "NO FCC MODE",
            "mac_address": "E2:C0:BB:B0:05:CE",
            "release_token": "56",
            "is_fdc_value_fill": true,
            "fdc_volume": 571.48,
            "fdc_amount": 3.73,
            "last_tsn_source": null,
            "verified_volume": 611890803.1,
            "verified_amount": 6155311.27,
            "reconciliation_source": "FDC",
            "one_time_auth_id": 888,
            "recon_balance_refunded": false,
            "updated_at": "2024-12-11T08:46:51.000000Z",
            "created_at": "2024-12-11T08:46:51.000000Z",
            "id": 31871,
            "driver": {
                "id": 883,
                "company_id": 152,
                "fullname": "HUSSAINI ADAMU",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "829-284-9551",
                "email": "aSybVJN@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T17:49:25.000000Z",
                "updated_at": "2023-09-01T21:50:00.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 55,
                "name": "MULTIPRO CHOBA 2",
                "email": "emilylopez55@example.com",
                "phone_number": "177",
                "registration_number": "177",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 128547,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c153",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-12T13:44:17.000000Z",
                "updated_at": "2023-04-12T13:44:17.000000Z",
                "deleted_at": null
            },
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "costCenter": {
                "id": 349,
                "company_id": 55,
                "name": "MULTIPRO CHOBA 2",
                "email": "W7dd3WU@tolaram.com",
                "phone_number": "529-528-7747",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:38:02.000000Z",
                "updated_at": "2023-08-29T16:38:02.000000Z",
                "deleted_at": null
            },
            "nfcTag": {
                "id": 1636,
                "company_id": 141,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-10140",
                "nfctag_oem_id": "9A793ABE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "27092107",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-08-30T21:52:38.000000Z",
                "updated_at": "2023-09-01T18:54:55.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "userWallet": null,
            "remark": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/fuel_purchase_history

Query Parameters

per_page  integer optional  

Items per page

company_id  integer optional  

Filter items by company ID

vendor_id  integer optional  

Filter items by vendor ID

cost_center_id  integer optional  

Filter items by cost center ID

sm_station_id  integer optional  

Filter items by station manager station ID

mac_address  string optional  

Filter items by mac address

date  string optional  

datetime Filter items by date

Create a new Fuel purchase history

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 18,
    \"vendor_id\": 11,
    \"cost_center_id\": 12,
    \"nfctag_id\": 4,
    \"driver_id\": 14,
    \"way_bill_number\": \"sed\",
    \"vendor_station_name\": \"vitae\",
    \"vehicle_plate_number\": \"ratione\",
    \"auth_type\": \"Card\",
    \"barcode_id\": \"est\",
    \"amount_paid\": 195879.58991,
    \"volume\": 694606.157436558,
    \"odometer_reading\": 2627.98347841,
    \"product\": \"PMS\",
    \"pump\": 17,
    \"selling_price\": 22251186.85814,
    \"current_credit_limit\": 84070.3433163,
    \"attendant\": \"ipsum\",
    \"last_volume_dispensed\": 39.3217,
    \"last_amount_paid\": 104.636,
    \"transaction_seq_no\": 15,
    \"is_balanced\": false,
    \"oem_station_id\": 10,
    \"sm_station_id\": 14,
    \"balance_refunded\": 28474986,
    \"tapnet_amount\": 26246616.304771554,
    \"tapnet_volume\": 16019.62878,
    \"tapnet_transaction_time\": \"2024-12-11 08:46:56\",
    \"thankucash_reward_applied\": \"sit\",
    \"thankucash_reward_value\": \"perferendis\",
    \"app_mode\": \"NO FCC MODE\",
    \"release_token\": \"\",
    \"is_fdc_value_fill\": false,
    \"fdc_volume\": 563.954885577,
    \"fdc_amount\": 1.633534,
    \"last_tsn_source\": \"nihil\",
    \"verified_volume\": 1.5017,
    \"verified_amount\": 14,
    \"reconciliation_source\": \"FDC\",
    \"one_time_auth_id\": 14,
    \"recon_balance_refunded\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 18,
    "vendor_id": 11,
    "cost_center_id": 12,
    "nfctag_id": 4,
    "driver_id": 14,
    "way_bill_number": "sed",
    "vendor_station_name": "vitae",
    "vehicle_plate_number": "ratione",
    "auth_type": "Card",
    "barcode_id": "est",
    "amount_paid": 195879.58991,
    "volume": 694606.157436558,
    "odometer_reading": 2627.98347841,
    "product": "PMS",
    "pump": 17,
    "selling_price": 22251186.85814,
    "current_credit_limit": 84070.3433163,
    "attendant": "ipsum",
    "last_volume_dispensed": 39.3217,
    "last_amount_paid": 104.636,
    "transaction_seq_no": 15,
    "is_balanced": false,
    "oem_station_id": 10,
    "sm_station_id": 14,
    "balance_refunded": 28474986,
    "tapnet_amount": 26246616.304771554,
    "tapnet_volume": 16019.62878,
    "tapnet_transaction_time": "2024-12-11 08:46:56",
    "thankucash_reward_applied": "sit",
    "thankucash_reward_value": "perferendis",
    "app_mode": "NO FCC MODE",
    "release_token": "",
    "is_fdc_value_fill": false,
    "fdc_volume": 563.954885577,
    "fdc_amount": 1.633534,
    "last_tsn_source": "nihil",
    "verified_volume": 1.5017,
    "verified_amount": 14,
    "reconciliation_source": "FDC",
    "one_time_auth_id": 14,
    "recon_balance_refunded": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 7,
        "vendor_id": 306,
        "user_id": 249,
        "cost_center_id": 299,
        "nfctag_id": 740,
        "driver_id": 116,
        "way_bill_number": "WB-3773",
        "vendor_station_name": "Upton, Pouros and Wisoky",
        "vehicle_plate_number": "va-622-fy",
        "auth_type": "Key Tag",
        "barcode_id": null,
        "amount_paid": 11413.92,
        "volume": 3124925.39,
        "odometer_reading": 4,
        "product": "PMS",
        "pump": 9,
        "selling_price": 483999212.76,
        "current_credit_limit": 443.58,
        "attendant": "DEFAULT",
        "last_volume_dispensed": 44421.23,
        "last_amount_paid": 408114.52,
        "transaction_seq_no": 53123,
        "is_balanced": true,
        "oem_station_id": 3,
        "sm_station_id": 3,
        "balance_refunded": 11.33,
        "tapnet_amount": 778172.16,
        "tapnet_volume": 67639896.27,
        "tapnet_transaction_time": {
            "date": "1997-05-16 14:15:43.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "thankucash_reward_applied": null,
        "thankucash_reward_value": null,
        "app_mode": "FCC MODE",
        "mac_address": "0F:75:13:D3:89:92",
        "release_token": "99",
        "is_fdc_value_fill": true,
        "fdc_volume": 3816546.93,
        "fdc_amount": 1.16,
        "last_tsn_source": null,
        "verified_volume": 6931461.53,
        "verified_amount": 79.21,
        "reconciliation_source": "FDC",
        "one_time_auth_id": 898,
        "recon_balance_refunded": true,
        "updated_at": "2024-12-11T08:46:58.000000Z",
        "created_at": "2024-12-11T08:46:58.000000Z",
        "id": 31872,
        "driver": {
            "id": 116,
            "company_id": 7,
            "fullname": "ADAMU GARBA",
            "address": "sagamu",
            "phone_number": "8111111118",
            "email": "Sourabh.sanganeria9@tolaram.com",
            "driver_speciality": "Truck",
            "status": "active",
            "created_at": "2023-02-17T10:40:08.000000Z",
            "updated_at": "2024-08-09T19:01:31.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 7,
            "name": "BUA FOODS PLC",
            "email": "mikeanderson7@example.com",
            "phone_number": "129",
            "registration_number": "129",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 950826,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c105",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-23T13:44:17.000000Z",
            "updated_at": "2023-02-23T13:44:17.000000Z",
            "deleted_at": null
        },
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "costCenter": {
            "id": 299,
            "company_id": 7,
            "name": "BUA FOODS PLC",
            "email": "eLzQIhE@tolaram.com",
            "phone_number": "190-250-0697",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:31:08.000000Z",
            "updated_at": "2023-08-29T16:31:08.000000Z",
            "deleted_at": null
        },
        "nfcTag": {
            "id": 740,
            "company_id": 7,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-8080",
            "nfctag_oem_id": "B61B5031",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": "14462539000187",
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-07-24T09:34:02.000000Z",
            "updated_at": "2024-10-05T19:17:09.000000Z",
            "deleted_at": null,
            "upload_id": null
        },
        "userWallet": null,
        "remark": null
    }
}
 

Request      

POST api/fuel_purchase_history

Body Parameters

company_id  integer  

vendor_id  integer  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

way_bill_number  string optional  

vendor_station_name  string  

vehicle_plate_number  string  

auth_type  string  

Must be one of Card or Key Tag.

barcode_id  string optional  

amount_paid  number  

volume  number  

odometer_reading  number optional  

product  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

pump  integer  

selling_price  number  

current_credit_limit  number  

attendant  string optional  

last_volume_dispensed  number optional  

last_amount_paid  number optional  

transaction_seq_no  integer optional  

is_balanced  boolean optional  

oem_station_id  integer optional  

sm_station_id  integer optional  

balance_refunded  number optional  

tapnet_amount  number optional  

tapnet_volume  number optional  

tapnet_transaction_time  string optional  

Must be a valid date in the format Y-m-d H:i:s.

thankucash_reward_applied  string optional  

thankucash_reward_value  string optional  

app_mode  string  

Must be one of NO FCC MODE or FCC MODE.

mac_address  string optional  

release_token  string optional  

Must not be greater than 2 characters.

is_fdc_value_fill  boolean optional  

fdc_volume  number optional  

fdc_amount  number optional  

last_tsn_source  string optional  

verified_volume  number optional  

verified_amount  number optional  

reconciliation_source  string optional  

Must be one of MANUAL, FDC, or TAPNET.

one_time_auth_id  integer optional  

recon_balance_refunded  boolean optional  

Show a specified Fuel purchase history.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 24,
        "vendor_id": 310,
        "user_id": 11,
        "cost_center_id": 316,
        "nfctag_id": 1776,
        "driver_id": 505,
        "way_bill_number": "WB-5240",
        "vendor_station_name": "Stroman-Gerlach",
        "vehicle_plate_number": "cb-602-ki",
        "auth_type": "Card",
        "barcode_id": null,
        "amount_paid": 2370772.71,
        "volume": 3623562.38,
        "odometer_reading": 6,
        "product": "DPK",
        "pump": 9,
        "selling_price": 3.42,
        "current_credit_limit": 3290.74,
        "attendant": "DEFAULT",
        "last_volume_dispensed": 64.68,
        "last_amount_paid": 74210903.51,
        "transaction_seq_no": 15251,
        "is_balanced": false,
        "oem_station_id": 7,
        "sm_station_id": 9,
        "balance_refunded": 78.63,
        "tapnet_amount": 2725642.2,
        "tapnet_volume": 52500659.68,
        "tapnet_transaction_time": {
            "date": "2009-04-21 05:07:10.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "thankucash_reward_applied": null,
        "thankucash_reward_value": null,
        "app_mode": "FCC MODE",
        "mac_address": "A1:7A:87:46:EC:6B",
        "release_token": "94",
        "is_fdc_value_fill": true,
        "fdc_volume": 806812.16,
        "fdc_amount": 7314.02,
        "last_tsn_source": null,
        "verified_volume": 0,
        "verified_amount": 190.17,
        "reconciliation_source": "TAPNET",
        "one_time_auth_id": 549,
        "recon_balance_refunded": true,
        "updated_at": "2024-12-11T08:47:05.000000Z",
        "created_at": "2024-12-11T08:47:05.000000Z",
        "id": 31873,
        "driver": {
            "id": 505,
            "company_id": 4,
            "fullname": "ADEOSUN ABASS BOLAJI",
            "address": "SAGAMU",
            "phone_number": "8888555771",
            "email": "danielclark654@hotmail.com",
            "driver_speciality": "Truck",
            "status": "active",
            "created_at": "2023-11-29T12:03:02.000000Z",
            "updated_at": "2024-09-30T15:03:27.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 24,
            "name": "ELEPHANT GROUP LIMITED",
            "email": "annawright24@example.com",
            "phone_number": "146",
            "registration_number": "146",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 243189,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c122",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-12T13:44:17.000000Z",
            "updated_at": "2023-03-12T13:44:17.000000Z",
            "deleted_at": null
        },
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "costCenter": {
            "id": 316,
            "company_id": 24,
            "name": "ELEPHANT GROUP LIMITED",
            "email": "Tp964YT@tolaram.com",
            "phone_number": "790-828-5135",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:34:00.000000Z",
            "updated_at": "2023-08-29T16:34:00.000000Z",
            "deleted_at": null
        },
        "nfcTag": {
            "id": 1776,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-10280",
            "nfctag_oem_id": "8AF438BE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": "14622580",
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2023-08-30T22:01:28.000000Z",
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null,
            "upload_id": null
        },
        "userWallet": {
            "id": 11,
            "vendor_id": 11,
            "user_id": 11,
            "wallet_id": "102352689329",
            "balance": 69629.80324277,
            "credit_limit": 0,
            "active": 1,
            "created_by": null,
            "created_at": "2023-02-07T15:21:51.000000Z",
            "updated_at": "2023-02-07T15:21:51.000000Z",
            "deleted_at": null,
            "vendor_wallet_id": 11
        },
        "remark": null
    }
}
 

Request      

GET api/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Update the specified Fuel purchase history

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 18,
    \"vendor_id\": 15,
    \"cost_center_id\": 10,
    \"nfctag_id\": 9,
    \"driver_id\": 3,
    \"way_bill_number\": \"error\",
    \"vendor_station_name\": \"cumque\",
    \"vehicle_plate_number\": \"ut\",
    \"auth_type\": \"Key Tag\",
    \"barcode_id\": \"aut\",
    \"amount_paid\": 1.1501366,
    \"volume\": 52,
    \"odometer_reading\": 7368.2053,
    \"product\": \"PMS\",
    \"pump\": 6,
    \"selling_price\": 132,
    \"current_credit_limit\": 2487013.8799982,
    \"attendant\": \"consequuntur\",
    \"last_volume_dispensed\": 3401930.875,
    \"last_amount_paid\": 2946078.2,
    \"transaction_seq_no\": 12,
    \"is_balanced\": false,
    \"oem_station_id\": 11,
    \"sm_station_id\": 13,
    \"balance_refunded\": 19.5,
    \"tapnet_amount\": 6.01634,
    \"tapnet_volume\": 14990312.12432,
    \"tapnet_transaction_time\": \"2024-12-11 08:47:08\",
    \"thankucash_reward_applied\": \"debitis\",
    \"thankucash_reward_value\": \"est\",
    \"app_mode\": \"FCC MODE\",
    \"release_token\": \"c\",
    \"is_fdc_value_fill\": false,
    \"fdc_volume\": 1.869,
    \"fdc_amount\": 68237.200872056,
    \"last_tsn_source\": \"quisquam\",
    \"verified_volume\": 2995.3,
    \"verified_amount\": 3738061.5448,
    \"reconciliation_source\": \"TAPNET\",
    \"one_time_auth_id\": 15,
    \"recon_balance_refunded\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 18,
    "vendor_id": 15,
    "cost_center_id": 10,
    "nfctag_id": 9,
    "driver_id": 3,
    "way_bill_number": "error",
    "vendor_station_name": "cumque",
    "vehicle_plate_number": "ut",
    "auth_type": "Key Tag",
    "barcode_id": "aut",
    "amount_paid": 1.1501366,
    "volume": 52,
    "odometer_reading": 7368.2053,
    "product": "PMS",
    "pump": 6,
    "selling_price": 132,
    "current_credit_limit": 2487013.8799982,
    "attendant": "consequuntur",
    "last_volume_dispensed": 3401930.875,
    "last_amount_paid": 2946078.2,
    "transaction_seq_no": 12,
    "is_balanced": false,
    "oem_station_id": 11,
    "sm_station_id": 13,
    "balance_refunded": 19.5,
    "tapnet_amount": 6.01634,
    "tapnet_volume": 14990312.12432,
    "tapnet_transaction_time": "2024-12-11 08:47:08",
    "thankucash_reward_applied": "debitis",
    "thankucash_reward_value": "est",
    "app_mode": "FCC MODE",
    "release_token": "c",
    "is_fdc_value_fill": false,
    "fdc_volume": 1.869,
    "fdc_amount": 68237.200872056,
    "last_tsn_source": "quisquam",
    "verified_volume": 2995.3,
    "verified_amount": 3738061.5448,
    "reconciliation_source": "TAPNET",
    "one_time_auth_id": 15,
    "recon_balance_refunded": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 71,
        "vendor_id": 306,
        "user_id": 350,
        "cost_center_id": 365,
        "nfctag_id": 2329,
        "driver_id": 973,
        "way_bill_number": "WB-0342",
        "vendor_station_name": "Gleichner-Jacobi",
        "vehicle_plate_number": "zs-727-nv",
        "auth_type": "Card",
        "barcode_id": null,
        "amount_paid": 799306.89,
        "volume": 489.38,
        "odometer_reading": 1,
        "product": "AGO",
        "pump": 3,
        "selling_price": 17.33,
        "current_credit_limit": 9373.01,
        "attendant": "DEFAULT",
        "last_volume_dispensed": 0,
        "last_amount_paid": 5527070.86,
        "transaction_seq_no": 31780,
        "is_balanced": false,
        "oem_station_id": 8,
        "sm_station_id": 5,
        "balance_refunded": 48752.24,
        "tapnet_amount": 128383.67,
        "tapnet_volume": 386.16,
        "tapnet_transaction_time": {
            "date": "2008-07-05 00:33:10.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "thankucash_reward_applied": null,
        "thankucash_reward_value": null,
        "app_mode": "NO FCC MODE",
        "mac_address": "C9:82:BF:B7:03:1E",
        "release_token": "20",
        "is_fdc_value_fill": false,
        "fdc_volume": 65.71,
        "fdc_amount": 9337.42,
        "last_tsn_source": null,
        "verified_volume": 4.7,
        "verified_amount": 7869.15,
        "reconciliation_source": "TAPNET",
        "one_time_auth_id": 477,
        "recon_balance_refunded": true,
        "updated_at": "2024-12-11T08:47:11.000000Z",
        "created_at": "2024-12-11T08:47:11.000000Z",
        "id": 31874,
        "driver": {
            "id": 973,
            "company_id": 7,
            "fullname": "USMAN MUSTAPHA",
            "address": "BHN, Mowe Ogun State",
            "phone_number": "679-032-5654",
            "email": "lgnVbOI@tolaram.com",
            "driver_speciality": "Trucks",
            "status": "active",
            "created_at": "2023-08-28T17:53:34.000000Z",
            "updated_at": "2023-09-01T18:20:06.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 71,
            "name": "PASTA-MULTIPRO",
            "email": "elliegray71@example.com",
            "phone_number": "193",
            "registration_number": "193",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 810935,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c169",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-28T13:44:17.000000Z",
            "updated_at": "2023-04-28T13:44:17.000000Z",
            "deleted_at": null
        },
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "costCenter": {
            "id": 365,
            "company_id": 71,
            "name": "PASTA-MULTIPRO",
            "email": "GKInTsB@tolaram.com",
            "phone_number": "912-517-9460",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:38:15.000000Z",
            "updated_at": "2023-08-29T16:38:15.000000Z",
            "deleted_at": null
        },
        "nfcTag": {
            "id": 2329,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX 11436",
            "nfctag_oem_id": "DA5B2CBE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-05-24T10:19:48.000000Z",
            "updated_at": "2024-10-25T19:56:44.000000Z",
            "deleted_at": null,
            "upload_id": 18
        },
        "userWallet": null,
        "remark": null
    }
}
 

Request      

PUT api/fuel_purchase_history/{id}

PATCH api/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Body Parameters

company_id  integer  

vendor_id  integer  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

way_bill_number  string optional  

vendor_station_name  string  

vehicle_plate_number  string  

auth_type  string  

Must be one of Card or Key Tag.

barcode_id  string optional  

amount_paid  number  

volume  number  

odometer_reading  number optional  

product  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

pump  integer  

selling_price  number  

current_credit_limit  number  

attendant  string optional  

last_volume_dispensed  number optional  

last_amount_paid  number optional  

transaction_seq_no  integer optional  

is_balanced  boolean optional  

oem_station_id  integer optional  

sm_station_id  integer optional  

balance_refunded  number optional  

tapnet_amount  number optional  

tapnet_volume  number optional  

tapnet_transaction_time  string optional  

Must be a valid date in the format Y-m-d H:i:s.

thankucash_reward_applied  string optional  

thankucash_reward_value  string optional  

app_mode  string  

Must be one of NO FCC MODE or FCC MODE.

mac_address  string optional  

release_token  string optional  

Must not be greater than 2 characters.

is_fdc_value_fill  boolean optional  

fdc_volume  number optional  

fdc_amount  number optional  

last_tsn_source  string optional  

verified_volume  number optional  

verified_amount  number optional  

reconciliation_source  string optional  

Must be one of MANUAL, FDC, or TAPNET.

one_time_auth_id  integer optional  

recon_balance_refunded  boolean optional  

Delete a Fuel purchase history

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Display a listing of the refund history or filter by company id, vendor id, start_date and end_date

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/refund_history?per_page=20&company_id=19&vendor_id=11&start_date=occaecati&end_date=et" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/refund_history"
);

const params = {
    "per_page": "20",
    "company_id": "19",
    "vendor_id": "11",
    "start_date": "occaecati",
    "end_date": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor_id": 311,
            "company_id": 65,
            "user_id": 373,
            "amount_refunded": 33616.49,
            "start_company_balance": 0.61,
            "end_company_balance": 9585245.21,
            "refund_date": {
                "date": "1992-08-13 22:18:24.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "fuel_purchase_history_id": 27614,
            "vendor_station_name": "Zboncak Group",
            "vehicle_plate_number": "ONE TIME CUSTOMER-CALABAR",
            "auth_type": "o",
            "amount_paid": 6.46,
            "verified_amount": 6573664.85,
            "nfctag_id": 470,
            "driver_id": 1017,
            "volume": 216.87,
            "product": "AGO",
            "pump": 6,
            "selling_price": 787.97,
            "transaction_date": {
                "date": "1984-11-18 15:04:50.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "mac_address": 3,
            "one_time_auth_id": 6,
            "updated_at": "2024-12-11T08:47:16.000000Z",
            "created_at": "2024-12-11T08:47:16.000000Z",
            "id": 78,
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 65,
                "name": "ONE TIME CUSTOMER-CALABAR",
                "email": "austinlewis65@example.com",
                "phone_number": "187",
                "registration_number": "187",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 972513,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c163",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-22T13:44:17.000000Z",
                "updated_at": "2023-04-22T13:44:17.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 373,
                "title": null,
                "name": "Theo Rocker",
                "email": "theo@mailinator.com",
                "phone": "8023494855",
                "avatar": null,
                "username": "TRock",
                "gender": "female",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-04-29T07:20:56.000000Z",
                "updated_at": "2024-04-29T07:20:56.000000Z",
                "deleted_at": null
            },
            "fuel_purchase_history": {
                "id": 27614,
                "company_id": 150,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 277,
                "way_bill_number": "zfla93",
                "nfctag_id": 524,
                "driver_id": 567,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "AYE 528 ZQ",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 600,
                "volume": 60,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 6,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": 60,
                "last_amount_paid": 600,
                "transaction_seq_no": null,
                "is_balanced": 1,
                "oem_station_id": 2,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "6z",
                "is_fdc_value_fill": 0,
                "fdc_volume": null,
                "fdc_amount": null,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2024-11-04T08:00:12.000000Z",
                "updated_at": "2024-11-04T17:14:00.000000Z",
                "deleted_at": null,
                "transaction_id": null,
                "cost_center": {
                    "id": 277,
                    "company_id": 140,
                    "name": "FLOATING",
                    "email": "jas@fad.com",
                    "phone_number": "12345678901",
                    "daily_purchase_budget": 0,
                    "weekly_purchase_budget": 0,
                    "monthly_purchase_budget": 0,
                    "license_type": "lsc",
                    "active": 1,
                    "created_at": "2023-07-07T12:44:03.000000Z",
                    "updated_at": "2023-07-07T12:44:03.000000Z",
                    "deleted_at": null
                }
            },
            "nfc_tag": {
                "id": 470,
                "company_id": 150,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-7636",
                "nfctag_oem_id": "C6EC4C31",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "4369497710567",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-10-28T09:34:02.000000Z",
                "updated_at": "2023-09-01T18:40:34.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "driver": {
                "id": 1017,
                "company_id": 44,
                "fullname": "IBRAHIM BISHIR",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "422-400-9358",
                "email": "UxxhejU@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T17:54:42.000000Z",
                "updated_at": "2023-09-01T18:31:49.000000Z",
                "deleted_at": null
            },
            "cost_center": {
                "id": 277,
                "company_id": 140,
                "name": "FLOATING",
                "email": "jas@fad.com",
                "phone_number": "12345678901",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-07-07T12:44:03.000000Z",
                "updated_at": "2023-07-07T12:44:03.000000Z",
                "deleted_at": null
            }
        },
        {
            "vendor_id": 302,
            "company_id": 66,
            "user_id": 363,
            "amount_refunded": 6.64,
            "start_company_balance": 468537823.42,
            "end_company_balance": 68.98,
            "refund_date": {
                "date": "2022-04-12 19:16:12.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "fuel_purchase_history_id": 8007,
            "vendor_station_name": "Windler, Torp and Powlowski",
            "vehicle_plate_number": "ONEPORT 365 COMPANY",
            "auth_type": "a",
            "amount_paid": 51189.39,
            "verified_amount": 9957714.99,
            "nfctag_id": 2468,
            "driver_id": 792,
            "volume": 36979.18,
            "product": "PMS",
            "pump": 2,
            "selling_price": 3250742.83,
            "transaction_date": {
                "date": "1974-09-13 09:46:19.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "mac_address": 4,
            "one_time_auth_id": 0,
            "updated_at": "2024-12-11T08:47:19.000000Z",
            "created_at": "2024-12-11T08:47:19.000000Z",
            "id": 79,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 66,
                "name": "ONEPORT 365 COMPANY",
                "email": "addisoncooper66@example.com",
                "phone_number": "188",
                "registration_number": "188",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 439257,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c164",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-23T13:44:17.000000Z",
                "updated_at": "2023-04-23T13:44:17.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 363,
                "title": null,
                "name": "Isu Ibrahim",
                "email": "isu.ibrahim@tolaram.com",
                "phone": "7040954390",
                "avatar": null,
                "username": "isu.ibrahim@tolaram.com",
                "gender": "Male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-03-21T15:31:02.000000Z",
                "updated_at": "2024-03-21T15:31:02.000000Z",
                "deleted_at": null
            },
            "fuel_purchase_history": {
                "id": 8007,
                "company_id": 37,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 280,
                "way_bill_number": "H35mjx",
                "nfctag_id": 763,
                "driver_id": 700,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "MUS 909 XW",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 7270,
                "volume": 727,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 1,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": 531.3,
                "last_amount_paid": 5313,
                "transaction_seq_no": 24829,
                "is_balanced": 0,
                "oem_station_id": 2,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "Ls",
                "is_fdc_value_fill": 1,
                "fdc_volume": 100,
                "fdc_amount": 1000,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2024-05-23T08:10:13.000000Z",
                "updated_at": "2024-11-28T11:46:30.000000Z",
                "deleted_at": null,
                "transaction_id": null,
                "cost_center": {
                    "id": 280,
                    "company_id": 37,
                    "name": "INTERNATIONAL BREWERY",
                    "email": "jas@fad.com",
                    "phone_number": "12345678901",
                    "daily_purchase_budget": 0,
                    "weekly_purchase_budget": 0,
                    "monthly_purchase_budget": 0,
                    "license_type": "lsc",
                    "active": 1,
                    "created_at": "2023-08-14T08:25:10.000000Z",
                    "updated_at": "2023-08-14T08:25:10.000000Z",
                    "deleted_at": null
                }
            },
            "nfc_tag": {
                "id": 2468,
                "company_id": null,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX 10597",
                "nfctag_oem_id": "9AA32CBE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": null,
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2024-07-08T13:04:26.000000Z",
                "updated_at": "2024-07-08T13:04:26.000000Z",
                "deleted_at": null,
                "upload_id": 13
            },
            "driver": {
                "id": 792,
                "company_id": 141,
                "fullname": "YAKUBU ABDULHAMID",
                "address": "SAGAMU",
                "phone_number": "8888556059",
                "email": "yakubuabdulhamid@email.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2024-09-12T12:03:02.000000Z",
                "updated_at": "2023-09-01T18:54:55.000000Z",
                "deleted_at": null
            },
            "cost_center": {
                "id": 280,
                "company_id": 37,
                "name": "INTERNATIONAL BREWERY",
                "email": "jas@fad.com",
                "phone_number": "12345678901",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-14T08:25:10.000000Z",
                "updated_at": "2023-08-14T08:25:10.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/refund_history

Query Parameters

per_page  integer optional  

Items per page

company_id  integer optional  

Filter items by company ID

vendor_id  integer optional  

Filter items by vendor ID

start_date  string optional  

datetime FFilter items by date

end_date  string optional  

datetime Filter items by date

Create a refund history

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/refund_history" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/refund_history"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/refund_history

Show a specified refund history.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/refund_history/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/refund_history/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 311,
        "company_id": 37,
        "user_id": 19,
        "amount_refunded": 159857.51,
        "start_company_balance": 76524622.44,
        "end_company_balance": 4183588.04,
        "refund_date": {
            "date": "1988-11-08 16:21:33.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "fuel_purchase_history_id": 27778,
        "vendor_station_name": "Dickens Ltd",
        "vehicle_plate_number": "INTERNATIONAL BREWERY",
        "auth_type": "g",
        "amount_paid": 4831412.1,
        "verified_amount": 14.54,
        "nfctag_id": 1180,
        "driver_id": 1846,
        "volume": 35.65,
        "product": "DPK",
        "pump": 2,
        "selling_price": 23.15,
        "transaction_date": {
            "date": "1975-06-17 21:38:16.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "mac_address": 3,
        "one_time_auth_id": 7,
        "updated_at": "2024-12-11T08:47:26.000000Z",
        "created_at": "2024-12-11T08:47:26.000000Z",
        "id": 80,
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 37,
            "name": "INTERNATIONAL BREWERY",
            "email": "abigailturner37@example.com",
            "phone_number": "159",
            "registration_number": "159",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 964031,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c135",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-25T13:44:17.000000Z",
            "updated_at": "2023-03-25T13:44:17.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 19,
            "title": "Mr",
            "name": "Muibi Azeez Abolade",
            "email": "azeez.muibi@smartflowtech.com",
            "phone": "08136834496",
            "avatar": null,
            "username": "Haeyzed",
            "gender": "Male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 0,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-13T10:02:21.000000Z",
            "updated_at": "2023-11-20T13:09:22.000000Z",
            "deleted_at": null
        },
        "fuel_purchase_history": {
            "id": 27778,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "cost_center_id": 286,
            "way_bill_number": "60gpxo",
            "nfctag_id": 1683,
            "driver_id": 1333,
            "vendor_station_name": "MCPL PH",
            "vehicle_plate_number": "GBE 49 ZC",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 600,
            "volume": 30,
            "odometer_reading": "0",
            "product": "AGO",
            "pump": 3,
            "selling_price": 20,
            "current_credit_limit": 0,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 30,
            "last_amount_paid": 600,
            "transaction_seq_no": null,
            "is_balanced": 1,
            "oem_station_id": 4,
            "sm_station_id": 367,
            "balance_refunded": null,
            "tapnet_amount": null,
            "tapnet_volume": null,
            "tapnet_transaction_time": null,
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": null,
            "release_token": "Yt",
            "is_fdc_value_fill": 0,
            "fdc_volume": null,
            "fdc_amount": null,
            "last_tsn_source": null,
            "verified_volume": 0,
            "verified_amount": 0,
            "reconciliation_source": null,
            "one_time_auth_id": null,
            "recon_balance_refunded": 0,
            "created_at": "2024-11-04T20:58:26.000000Z",
            "updated_at": "2024-11-04T21:00:03.000000Z",
            "deleted_at": null,
            "transaction_id": null,
            "cost_center": {
                "id": 286,
                "company_id": 141,
                "name": "MCPL",
                "email": "tYfpFCM@tolaram.com",
                "phone_number": "570-506-3091",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-28T17:55:09.000000Z",
                "updated_at": "2023-08-28T17:55:09.000000Z",
                "deleted_at": null
            }
        },
        "nfc_tag": {
            "id": 1180,
            "company_id": 44,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-9681",
            "nfctag_oem_id": "0A2B3DBE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": null,
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null,
            "upload_id": null
        },
        "driver": {
            "id": 1846,
            "company_id": 4,
            "fullname": "FST 454 JR",
            "address": "FST 454 JR",
            "phone_number": "0980980987",
            "email": "FST454JR@gmail.com",
            "driver_speciality": null,
            "status": "active",
            "created_at": "2024-11-22T13:35:37.000000Z",
            "updated_at": "2024-11-22T13:39:10.000000Z",
            "deleted_at": null
        },
        "cost_center": {
            "id": 286,
            "company_id": 141,
            "name": "MCPL",
            "email": "tYfpFCM@tolaram.com",
            "phone_number": "570-506-3091",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-28T17:55:09.000000Z",
            "updated_at": "2023-08-28T17:55:09.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/refund_history/{id}

URL Parameters

id  integer  

The ID of the refund history

Update a refund history

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/refund_history/aut" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/refund_history/aut"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/refund_history/{id}

PATCH api/refund_history/{id}

URL Parameters

id  string  

The ID of the refund history.

Delete a Refund history

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/refund_history/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/refund_history/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/refund_history/{id}

URL Parameters

id  integer  

The ID of the Refund history

Display a listing of the refund history or filter by company id, vendor id, start_date and end_date

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/debit_history?per_page=14&company_id=4&vendor_id=20&start_date=quisquam&end_date=ut" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_history"
);

const params = {
    "per_page": "14",
    "company_id": "4",
    "vendor_id": "20",
    "start_date": "quisquam",
    "end_date": "ut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 90,
            "vendor_id": 310,
            "user_id": 435,
            "fuel_purchase_history_id": 4308,
            "start_company_balance": 684.84,
            "end_company_balance": 200444182.5,
            "current_credit_limit": 3,
            "updated_at": "2024-12-11T08:47:34.000000Z",
            "created_at": "2024-12-11T08:47:34.000000Z",
            "id": 58,
            "vendor": {
                "id": 310,
                "sm_company_id": 47,
                "name": "IBILE OIL AND GAS",
                "address": "VI",
                "email": "ayodeji.alabs@smartflowtech.com",
                "phone_number": "08130097924",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Ikeja",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "12345",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-08-07T15:59:28.000000Z",
                "updated_at": "2024-09-11T08:52:23.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 90,
                "name": "MULTIPRO CHOBA",
                "email": "lincolnhughes90@example.com",
                "phone_number": "212",
                "registration_number": "212",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 930586,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c152",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-11T13:44:17.000000Z",
                "updated_at": "2023-04-11T13:44:17.000000Z",
                "deleted_at": null
            },
            "fuel_purchase_history": {
                "id": 4308,
                "company_id": 141,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 286,
                "way_bill_number": "7QBRFX",
                "nfctag_id": 832,
                "driver_id": 769,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "LAR 318 XB",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 900,
                "volume": 90,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 3,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": null,
                "last_amount_paid": null,
                "transaction_seq_no": null,
                "is_balanced": 0,
                "oem_station_id": 204,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "XJ",
                "is_fdc_value_fill": 0,
                "fdc_volume": null,
                "fdc_amount": null,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2023-12-20T16:55:54.000000Z",
                "updated_at": "2023-12-20T16:55:54.000000Z",
                "deleted_at": null,
                "transaction_id": null
            },
            "user": {
                "id": 435,
                "title": null,
                "name": "Chika",
                "email": "chika_nwogu21@gmail.com",
                "phone": "8157628944",
                "avatar": null,
                "username": "chika_nwogu21@gmail.com",
                "gender": "Male",
                "newsletter": 0,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2024-07-15T18:10:18.000000Z",
                "updated_at": "2024-07-15T18:10:18.000000Z",
                "deleted_at": null
            }
        },
        {
            "company_id": 88,
            "vendor_id": 302,
            "user_id": 425,
            "fuel_purchase_history_id": 8942,
            "start_company_balance": 5367371.39,
            "end_company_balance": 4908.5,
            "current_credit_limit": 0,
            "updated_at": "2024-12-11T08:47:36.000000Z",
            "created_at": "2024-12-11T08:47:36.000000Z",
            "id": 59,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 88,
                "name": "VALENCY AGRO NIGERIA LIMITED",
                "email": "jasonrivera88@example.com",
                "phone_number": "210",
                "registration_number": "210",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 695428,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c186",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-05-15T13:44:17.000000Z",
                "updated_at": "2023-05-15T13:44:17.000000Z",
                "deleted_at": null
            },
            "fuel_purchase_history": {
                "id": 8942,
                "company_id": 11,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 281,
                "way_bill_number": "v5gsxq",
                "nfctag_id": 719,
                "driver_id": 661,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "WDE 594 XC",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 1000,
                "volume": 100,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 4,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": 100,
                "last_amount_paid": 1000,
                "transaction_seq_no": null,
                "is_balanced": 1,
                "oem_station_id": 2,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "I2",
                "is_fdc_value_fill": 0,
                "fdc_volume": null,
                "fdc_amount": null,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2024-06-05T14:30:14.000000Z",
                "updated_at": "2024-06-05T15:19:17.000000Z",
                "deleted_at": null,
                "transaction_id": null
            },
            "user": {
                "id": 425,
                "title": "Barr.",
                "name": "Stephen Okonji",
                "email": "stephenobiajulu6@gmail.com",
                "phone": "267-632-7839",
                "avatar": null,
                "username": "stephen.okonji_0bQ",
                "gender": "Female",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 0,
                "is_vendor": 0,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2024-06-27T11:27:41.000000Z",
                "updated_at": "2024-07-18T11:35:55.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/debit_history

Query Parameters

per_page  integer optional  

Items per page

company_id  integer optional  

Filter items by company ID

vendor_id  integer optional  

Filter items by vendor ID

start_date  string optional  

datetime FFilter items by date

end_date  string optional  

datetime Filter items by date

POST api/debit_history

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/debit_history" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_history"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/debit_history

Show a specified refund history.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/debit_history/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_history/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 62,
        "vendor_id": 302,
        "user_id": 365,
        "fuel_purchase_history_id": 16786,
        "start_company_balance": 599.67,
        "end_company_balance": 3542759.13,
        "current_credit_limit": 7,
        "updated_at": "2024-12-11T08:47:41.000000Z",
        "created_at": "2024-12-11T08:47:41.000000Z",
        "id": 60,
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 62,
            "name": "OLAM NIGERIA LIMITED",
            "email": "aaliyahmurphy62@example.com",
            "phone_number": "184",
            "registration_number": "184",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 315790,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c160",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-19T13:44:17.000000Z",
            "updated_at": "2023-04-19T13:44:17.000000Z",
            "deleted_at": null
        },
        "fuel_purchase_history": {
            "id": 16786,
            "company_id": 149,
            "vendor_id": 215,
            "user_id": 1,
            "cost_center_id": 369,
            "way_bill_number": "uw2bcr",
            "nfctag_id": 539,
            "driver_id": 327,
            "vendor_station_name": "MCPL MOWE",
            "vehicle_plate_number": "MUS 902 XW",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 1420,
            "volume": 142,
            "odometer_reading": "0",
            "product": "AGO",
            "pump": 2,
            "selling_price": 10,
            "current_credit_limit": 0,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 142,
            "last_amount_paid": 1420,
            "transaction_seq_no": null,
            "is_balanced": 1,
            "oem_station_id": 2,
            "sm_station_id": 364,
            "balance_refunded": null,
            "tapnet_amount": null,
            "tapnet_volume": null,
            "tapnet_transaction_time": null,
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": null,
            "release_token": "X6",
            "is_fdc_value_fill": 0,
            "fdc_volume": null,
            "fdc_amount": null,
            "last_tsn_source": null,
            "verified_volume": 0,
            "verified_amount": 0,
            "reconciliation_source": null,
            "one_time_auth_id": null,
            "recon_balance_refunded": 0,
            "created_at": "2024-08-26T09:22:22.000000Z",
            "updated_at": "2024-08-26T21:37:39.000000Z",
            "deleted_at": null,
            "transaction_id": null
        },
        "user": {
            "id": 365,
            "title": null,
            "name": "Vishal",
            "email": "vishal.kumar@tolaram.com",
            "phone": "9169984626",
            "avatar": null,
            "username": "vishal.kumar@tolaram.com",
            "gender": "male",
            "newsletter": 0,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 0,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2024-04-12T15:19:50.000000Z",
            "updated_at": "2024-06-10T11:21:11.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/debit_history/{id}

URL Parameters

id  integer  

The ID of the refund history

PUT api/debit_history/{id}

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/debit_history/voluptatem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_history/voluptatem"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/debit_history/{id}

PATCH api/debit_history/{id}

URL Parameters

id  string  

The ID of the debit history.

Delete a Refund history

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/debit_history/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_history/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/debit_history/{id}

URL Parameters

id  integer  

The ID of the Refund history

Display a listing of the one time authorizations or search by status, registration number, product.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/one_time_authorization?term=consectetur&per_page=14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization"
);

const params = {
    "term": "consectetur",
    "per_page": "14",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 42,
            "fuel_purchase_history_id": 6046,
            "cost_center_id": 336,
            "nfctag_id": 2263,
            "driver_id": 653,
            "volume": 23713.3153,
            "product": "HHK",
            "valid_till": {
                "date": "2019-12-05 09:41:07.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "status": "INACTIVE, AUTHORISED",
            "registration_number": "lb-375-mv",
            "ext_request_id": 8,
            "updated_at": "2024-12-11T08:47:47.000000Z",
            "created_at": "2024-12-11T08:47:47.000000Z",
            "id": 357,
            "driver": {
                "id": 653,
                "company_id": 54,
                "fullname": "BHN Driver 23",
                "address": "SAGAMU",
                "phone_number": "8888555919",
                "email": "jacobcampbell654@hotmail.com",
                "driver_speciality": "Truck",
                "status": "active",
                "created_at": "2024-04-25T12:03:02.000000Z",
                "updated_at": "2024-08-22T04:51:51.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 42,
                "name": "KINGS FLOUR MILL",
                "email": "danielhughes42@example.com",
                "phone_number": "164",
                "registration_number": "164",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 506912,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c140",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-03-30T13:44:17.000000Z",
                "updated_at": "2023-03-30T13:44:17.000000Z",
                "deleted_at": null
            },
            "fuelPurchaseHistory": {
                "id": 6046,
                "company_id": 141,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 286,
                "way_bill_number": "bcsfov",
                "nfctag_id": 391,
                "driver_id": 448,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "FST 35 YC",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 8650,
                "volume": 865,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 1,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": 83.76,
                "last_amount_paid": 8377,
                "transaction_seq_no": 25918,
                "is_balanced": 0,
                "oem_station_id": 2,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "r9",
                "is_fdc_value_fill": 1,
                "fdc_volume": 100,
                "fdc_amount": 1000,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2024-04-26T14:36:45.000000Z",
                "updated_at": "2024-12-09T15:18:37.000000Z",
                "deleted_at": null,
                "transaction_id": null
            },
            "nfcTag": {
                "id": 2263,
                "company_id": null,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX 11493",
                "nfctag_oem_id": "4AFD3BBE",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": null,
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2024-05-24T09:31:52.000000Z",
                "updated_at": "2024-05-24T09:31:52.000000Z",
                "deleted_at": null,
                "upload_id": 3
            },
            "costCenter": {
                "id": 336,
                "company_id": 42,
                "name": "KINGS FLOUR MILL",
                "email": "0fI0BHC@tolaram.com",
                "phone_number": "339-855-2801",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:37:50.000000Z",
                "updated_at": "2023-08-29T16:37:50.000000Z",
                "deleted_at": null
            }
        },
        {
            "company_id": 161,
            "fuel_purchase_history_id": 10803,
            "cost_center_id": 301,
            "nfctag_id": 469,
            "driver_id": 1265,
            "volume": 619510.8186,
            "product": "HHK",
            "valid_till": {
                "date": "1984-07-23 15:46:34.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "status": "INACTIVE, AUTHORISED",
            "registration_number": "bm-758-ag",
            "ext_request_id": 4,
            "updated_at": "2024-12-11T08:47:51.000000Z",
            "created_at": "2024-12-11T08:47:51.000000Z",
            "id": 358,
            "driver": {
                "id": 1265,
                "company_id": 151,
                "fullname": "GAMBO KARGI AUWALU",
                "address": "BHN, Mowe Ogun State",
                "phone_number": "738-277-7495",
                "email": "pWyTbCw@tolaram.com",
                "driver_speciality": "Trucks",
                "status": "active",
                "created_at": "2023-08-28T18:01:54.000000Z",
                "updated_at": "2023-09-01T21:42:34.000000Z",
                "deleted_at": null
            },
            "company": {
                "id": 161,
                "name": "DARAJU INDUSTRIES LIMITED",
                "email": "twjOIRo@tolaram.com",
                "phone_number": "489-305-3286",
                "registration_number": "tnVpa",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "address": "MCPL Nigeria",
                "sector": "Logistics",
                "tin": 1286450,
                "website": "https://www.tolaram.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "uaKVwByquT6GoyP",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-09-27T10:23:37.000000Z",
                "updated_at": "2023-09-27T10:23:37.000000Z",
                "deleted_at": null
            },
            "fuelPurchaseHistory": {
                "id": 10803,
                "company_id": 150,
                "vendor_id": 215,
                "user_id": 1,
                "cost_center_id": 277,
                "way_bill_number": "RP30DO",
                "nfctag_id": 462,
                "driver_id": 610,
                "vendor_station_name": "MCPL MOWE",
                "vehicle_plate_number": "EPE 609 XV",
                "auth_type": "Key Tag",
                "barcode_id": null,
                "amount_paid": 4330,
                "volume": 433,
                "odometer_reading": "0",
                "product": "AGO",
                "pump": 3,
                "selling_price": 10,
                "current_credit_limit": 0,
                "attendant": "DEFAULT",
                "last_volume_dispensed": 433,
                "last_amount_paid": 4330,
                "transaction_seq_no": null,
                "is_balanced": 1,
                "oem_station_id": 2,
                "sm_station_id": 364,
                "balance_refunded": null,
                "tapnet_amount": null,
                "tapnet_volume": null,
                "tapnet_transaction_time": null,
                "thankucash_reward_applied": null,
                "thankucash_reward_value": null,
                "app_mode": "FCC MODE",
                "mac_address": null,
                "release_token": "Nv",
                "is_fdc_value_fill": 0,
                "fdc_volume": null,
                "fdc_amount": null,
                "last_tsn_source": null,
                "verified_volume": 0,
                "verified_amount": 0,
                "reconciliation_source": null,
                "one_time_auth_id": null,
                "recon_balance_refunded": 0,
                "created_at": "2024-07-05T07:23:36.000000Z",
                "updated_at": "2024-07-08T07:07:58.000000Z",
                "deleted_at": null,
                "transaction_id": null
            },
            "nfcTag": {
                "id": 469,
                "company_id": 150,
                "vendor_id": 215,
                "user_id": 1,
                "station_id": null,
                "pin": "0000",
                "nfctag_type": "Key Tag",
                "nfctag_code": "VLX-7635",
                "nfctag_oem_id": "B6D54C31",
                "nfctag_url_slug": null,
                "created_by": null,
                "card_number": "4332116076161",
                "card_on_thankucash": null,
                "card_state": "Generic",
                "station_name": null,
                "active": 1,
                "created_at": "2023-10-27T09:34:02.000000Z",
                "updated_at": "2023-09-01T18:40:34.000000Z",
                "deleted_at": null,
                "upload_id": null
            },
            "costCenter": {
                "id": 301,
                "company_id": 9,
                "name": "CASH CUSTOMER",
                "email": "VyOENBp@tolaram.com",
                "phone_number": "359-362-1216",
                "daily_purchase_budget": 0,
                "weekly_purchase_budget": 0,
                "monthly_purchase_budget": 0,
                "license_type": "lsc",
                "active": 1,
                "created_at": "2023-08-29T16:33:41.000000Z",
                "updated_at": "2023-08-29T16:33:41.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/one_time_authorization

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new one time authorization

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 5,
    \"fuel_purchase_history_id\": 20,
    \"cost_center_id\": 10,
    \"nfctag_id\": 3,
    \"driver_id\": 11,
    \"valid_till\": \"2024-12-11 08:47:54\",
    \"status\": \"Inactive\",
    \"registration_number\": \"voluptatem\",
    \"ext_request_id\": 5.02,
    \"volume\": 15722.49,
    \"product\": \"LPG\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 5,
    "fuel_purchase_history_id": 20,
    "cost_center_id": 10,
    "nfctag_id": 3,
    "driver_id": 11,
    "valid_till": "2024-12-11 08:47:54",
    "status": "Inactive",
    "registration_number": "voluptatem",
    "ext_request_id": 5.02,
    "volume": 15722.49,
    "product": "LPG"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 44,
        "fuel_purchase_history_id": 2689,
        "cost_center_id": 282,
        "nfctag_id": 906,
        "driver_id": 126,
        "volume": 1.147,
        "product": "AGO",
        "valid_till": {
            "date": "1970-10-22 04:15:05.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "rx-275-uj",
        "ext_request_id": 2,
        "updated_at": "2024-12-11T08:47:56.000000Z",
        "created_at": "2024-12-11T08:47:56.000000Z",
        "id": 359,
        "driver": {
            "id": 126,
            "company_id": 44,
            "fullname": "ABDULLAHI ABUBKAR ABUBAKAR",
            "address": "sagamu",
            "phone_number": "8111111129",
            "email": "Sourabh.sanganeria19@tolaram.com",
            "driver_speciality": "Truck",
            "status": "active",
            "created_at": "2023-02-17T10:54:48.000000Z",
            "updated_at": "2024-09-29T13:44:24.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 44,
            "name": "LAFARGE AFRICA PLC",
            "email": "alexandersanchez44@example.com",
            "phone_number": "166",
            "registration_number": "166",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 321789,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c142",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-01T13:44:17.000000Z",
            "updated_at": "2023-04-01T13:44:17.000000Z",
            "deleted_at": null
        },
        "fuelPurchaseHistory": {
            "id": 2689,
            "company_id": 44,
            "vendor_id": 215,
            "user_id": 1,
            "cost_center_id": 282,
            "way_bill_number": "0000",
            "nfctag_id": 1184,
            "driver_id": 1614,
            "vendor_station_name": "MCPL MOWE",
            "vehicle_plate_number": "EPE 126 XX",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 4550,
            "volume": 455,
            "odometer_reading": "0",
            "product": "AGO",
            "pump": 1,
            "selling_price": 10,
            "current_credit_limit": 0,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 455,
            "last_amount_paid": 4550,
            "transaction_seq_no": null,
            "is_balanced": 1,
            "oem_station_id": 204,
            "sm_station_id": 360,
            "balance_refunded": null,
            "tapnet_amount": null,
            "tapnet_volume": null,
            "tapnet_transaction_time": null,
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": null,
            "release_token": "Dy",
            "is_fdc_value_fill": 0,
            "fdc_volume": null,
            "fdc_amount": null,
            "last_tsn_source": null,
            "verified_volume": 455,
            "verified_amount": 4550,
            "reconciliation_source": null,
            "one_time_auth_id": null,
            "recon_balance_refunded": 0,
            "created_at": "2023-08-31T16:16:19.000000Z",
            "updated_at": "2023-08-31T16:16:19.000000Z",
            "deleted_at": null,
            "transaction_id": null
        },
        "nfcTag": {
            "id": 906,
            "company_id": 44,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-9406",
            "nfctag_oem_id": "969199B9",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": null,
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null,
            "upload_id": null
        },
        "costCenter": {
            "id": 282,
            "company_id": 44,
            "name": "LAFARGE AFRICA PLC",
            "email": "jas@fad.com",
            "phone_number": "12345678901",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-18T15:20:09.000000Z",
            "updated_at": "2023-08-18T15:20:09.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/one_time_authorization

Body Parameters

company_id  integer optional  

fuel_purchase_history_id  integer optional  

cost_center_id  integer optional  

nfctag_id  integer  

driver_id  integer  

valid_till  string optional  

Must be a valid date in the format Y-m-d H:i:s.

status  string  

Must be one of Active or Inactive.

registration_number  string optional  

ext_request_id  number optional  

volume  number  

product  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

Show a specified one time authorization.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 58,
        "fuel_purchase_history_id": 20116,
        "cost_center_id": 352,
        "nfctag_id": 2128,
        "driver_id": 1683,
        "volume": 36.1797,
        "product": "PMS",
        "valid_till": {
            "date": "1977-02-16 18:42:53.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "yc-484-wf",
        "ext_request_id": 1,
        "updated_at": "2024-12-11T08:48:01.000000Z",
        "created_at": "2024-12-11T08:48:01.000000Z",
        "id": 360,
        "driver": {
            "id": 1683,
            "company_id": 150,
            "fullname": "BABA SULEIMAN",
            "address": "BHN, Mowe Ogun State",
            "phone_number": "950-473-6140",
            "email": "yfgDWke@tolaram.com",
            "driver_speciality": "Trucks",
            "status": "active",
            "created_at": "2023-08-28T18:19:33.000000Z",
            "updated_at": "2024-11-01T20:46:58.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 58,
            "name": "MULTIPRO KADUNA",
            "email": "hudsonramirez58@example.com",
            "phone_number": "180",
            "registration_number": "180",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 829476,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c156",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-15T13:44:17.000000Z",
            "updated_at": "2023-04-15T13:44:17.000000Z",
            "deleted_at": null
        },
        "fuelPurchaseHistory": {
            "id": 20116,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "cost_center_id": 286,
            "way_bill_number": "6o9ef7",
            "nfctag_id": 1764,
            "driver_id": 1451,
            "vendor_station_name": "MCPL MOWE",
            "vehicle_plate_number": "DED 574 XB",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 200,
            "volume": 20,
            "odometer_reading": "0",
            "product": "AGO",
            "pump": 4,
            "selling_price": 10,
            "current_credit_limit": 0,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 20,
            "last_amount_paid": 200,
            "transaction_seq_no": null,
            "is_balanced": 1,
            "oem_station_id": 2,
            "sm_station_id": 364,
            "balance_refunded": null,
            "tapnet_amount": null,
            "tapnet_volume": null,
            "tapnet_transaction_time": null,
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": null,
            "release_token": "E5",
            "is_fdc_value_fill": 0,
            "fdc_volume": null,
            "fdc_amount": null,
            "last_tsn_source": null,
            "verified_volume": 0,
            "verified_amount": 0,
            "reconciliation_source": null,
            "one_time_auth_id": null,
            "recon_balance_refunded": 0,
            "created_at": "2024-09-17T12:32:10.000000Z",
            "updated_at": "2024-09-17T17:28:04.000000Z",
            "deleted_at": null,
            "transaction_id": null
        },
        "nfcTag": {
            "id": 2128,
            "company_id": 37,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX 11643",
            "nfctag_oem_id": "BAE22BBE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-05-23T15:26:11.000000Z",
            "updated_at": "2024-08-10T09:11:02.000000Z",
            "deleted_at": null,
            "upload_id": 10
        },
        "costCenter": {
            "id": 352,
            "company_id": 58,
            "name": "MULTIPRO KADUNA",
            "email": "qM9Alv3@tolaram.com",
            "phone_number": "928-015-8259",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:38:05.000000Z",
            "updated_at": "2023-08-29T16:38:05.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

Update the specified one time authorization

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 3,
    \"fuel_purchase_history_id\": 16,
    \"cost_center_id\": 16,
    \"nfctag_id\": 17,
    \"driver_id\": 3,
    \"valid_till\": \"2024-12-11 08:48:03\",
    \"status\": \"Inactive\",
    \"registration_number\": \"distinctio\",
    \"ext_request_id\": 7995,
    \"volume\": 10.24399096,
    \"product\": \"AGO\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 3,
    "fuel_purchase_history_id": 16,
    "cost_center_id": 16,
    "nfctag_id": 17,
    "driver_id": 3,
    "valid_till": "2024-12-11 08:48:03",
    "status": "Inactive",
    "registration_number": "distinctio",
    "ext_request_id": 7995,
    "volume": 10.24399096,
    "product": "AGO"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 89,
        "fuel_purchase_history_id": 19580,
        "cost_center_id": 393,
        "nfctag_id": 2507,
        "driver_id": 1388,
        "volume": 244.994,
        "product": "DPK",
        "valid_till": {
            "date": "2024-02-01 11:41:38.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "vq-483-gx",
        "ext_request_id": 4,
        "updated_at": "2024-12-11T08:48:06.000000Z",
        "created_at": "2024-12-11T08:48:06.000000Z",
        "id": 361,
        "driver": {
            "id": 1388,
            "company_id": 141,
            "fullname": "SABIU YUNUSA",
            "address": "BHN, Mowe Ogun State",
            "phone_number": "847-749-8378",
            "email": "ShpmMpP@tolaram.com",
            "driver_speciality": "Trucks",
            "status": "active",
            "created_at": "2023-08-28T18:05:05.000000Z",
            "updated_at": "2023-09-01T21:50:00.000000Z",
            "deleted_at": null
        },
        "company": {
            "id": 89,
            "name": "WORKFIELD LIMITED",
            "email": "trinitymorris89@example.com",
            "phone_number": "211",
            "registration_number": "211",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 428936,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c187",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-05-16T13:44:17.000000Z",
            "updated_at": "2023-05-16T13:44:17.000000Z",
            "deleted_at": null
        },
        "fuelPurchaseHistory": {
            "id": 19580,
            "company_id": 141,
            "vendor_id": 215,
            "user_id": 1,
            "cost_center_id": 286,
            "way_bill_number": "tx1diu",
            "nfctag_id": 375,
            "driver_id": 432,
            "vendor_station_name": "MCPL PH",
            "vehicle_plate_number": "FST 19 YC",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 840,
            "volume": 42,
            "odometer_reading": "0",
            "product": "AGO",
            "pump": 3,
            "selling_price": 20,
            "current_credit_limit": 0,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 42,
            "last_amount_paid": 840,
            "transaction_seq_no": null,
            "is_balanced": 1,
            "oem_station_id": 4,
            "sm_station_id": 367,
            "balance_refunded": null,
            "tapnet_amount": null,
            "tapnet_volume": null,
            "tapnet_transaction_time": null,
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": null,
            "release_token": "cn",
            "is_fdc_value_fill": 0,
            "fdc_volume": null,
            "fdc_amount": null,
            "last_tsn_source": null,
            "verified_volume": 0,
            "verified_amount": 0,
            "reconciliation_source": null,
            "one_time_auth_id": null,
            "recon_balance_refunded": 0,
            "created_at": "2024-09-13T13:21:08.000000Z",
            "updated_at": "2024-09-19T15:53:00.000000Z",
            "deleted_at": null,
            "transaction_id": null
        },
        "nfcTag": {
            "id": 2507,
            "company_id": null,
            "vendor_id": 215,
            "user_id": 1,
            "station_id": null,
            "pin": "0000",
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX 10684",
            "nfctag_oem_id": "8AD836BE",
            "nfctag_url_slug": null,
            "created_by": null,
            "card_number": null,
            "card_on_thankucash": null,
            "card_state": "Generic",
            "station_name": null,
            "active": 1,
            "created_at": "2024-07-08T13:59:20.000000Z",
            "updated_at": "2024-07-08T13:59:20.000000Z",
            "deleted_at": null,
            "upload_id": 10
        },
        "costCenter": {
            "id": 393,
            "company_id": 89,
            "name": "WORKFIELD LIMITED",
            "email": "cDUIAny@tolaram.com",
            "phone_number": "323-820-2568",
            "daily_purchase_budget": 0,
            "weekly_purchase_budget": 0,
            "monthly_purchase_budget": 0,
            "license_type": "lsc",
            "active": 1,
            "created_at": "2023-08-29T16:38:35.000000Z",
            "updated_at": "2023-08-29T16:38:35.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/one_time_authorization/{id}

PATCH api/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

Body Parameters

company_id  integer optional  

fuel_purchase_history_id  integer optional  

cost_center_id  integer optional  

nfctag_id  integer  

driver_id  integer  

valid_till  string optional  

Must be a valid date in the format Y-m-d H:i:s.

status  string  

Must be one of Active or Inactive.

registration_number  string optional  

ext_request_id  number optional  

volume  number  

product  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

Delete a one time authorization

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/one_time_authorization/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

Check a customers' wallet balance

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/check_user_wallet_balance?email=temporibus&vendor_id=4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/check_user_wallet_balance"
);

const params = {
    "email": "temporibus",
    "vendor_id": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=AJL6Gws6v1Ol65yPi2Xi7zaa3BumMdoD4loat9CL; expires=Wed, 11 Dec 2024 10:48:31 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/check_user_wallet_balance could not be found."
}
 

Request      

GET api/check_user_wallet_balance

Query Parameters

email  string  

The email of the customer

vendor_id  integer  

The ID of the vendor that wants to see the users balance

Onboarding of a customer(driver, vehicle, user, wallet, loyalty) via terminal/POS

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/customers/pos/onboarding" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 2,
    \"sm_company_id\": 17,
    \"vendor_id\": 15,
    \"phone_number\": 36503737.874942,
    \"email\": \"alva81@example.net\",
    \"name\": \"eaque\",
    \"address\": \"iure\",
    \"driver_speciality\": \"ipsa\",
    \"gross_amount\": 36.6559521,
    \"wallet_amount\": 5.258113439,
    \"reference\": \"voluptas\",
    \"nfc_tag\": \"laudantium\",
    \"pin\": 15,
    \"vehicle_plate_number\": \"quia\",
    \"vehicle_fuel_type\": \"LPG\",
    \"vehicle_tank_capacity\": \"aut\",
    \"vehicle_auth_type\": \"impedit\",
    \"vehicle_tracker_id\": \"fuga\",
    \"vehicle_model\": \"non\",
    \"vehicle_engine_capacity\": \"iste\",
    \"vehicle_color\": \"possimus\",
    \"vehicle_brand\": \"officiis\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/customers/pos/onboarding"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 2,
    "sm_company_id": 17,
    "vendor_id": 15,
    "phone_number": 36503737.874942,
    "email": "alva81@example.net",
    "name": "eaque",
    "address": "iure",
    "driver_speciality": "ipsa",
    "gross_amount": 36.6559521,
    "wallet_amount": 5.258113439,
    "reference": "voluptas",
    "nfc_tag": "laudantium",
    "pin": 15,
    "vehicle_plate_number": "quia",
    "vehicle_fuel_type": "LPG",
    "vehicle_tank_capacity": "aut",
    "vehicle_auth_type": "impedit",
    "vehicle_tracker_id": "fuga",
    "vehicle_model": "non",
    "vehicle_engine_capacity": "iste",
    "vehicle_color": "possimus",
    "vehicle_brand": "officiis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/customers/pos/onboarding

Body Parameters

company_id  integer  

sm_company_id  integer  

vendor_id  integer  

phone_number  number  

email  string  

Must be a valid email address.

name  string  

gender  string optional  

address  string  

driver_speciality  string optional  

gross_amount  number  

wallet_amount  number optional  

reference  string  

nfc_tag  string  

pin  integer optional  

vehicle_plate_number  string  

vehicle_fuel_type  string  

Must be one of PMS, AGO, HHK, DPK, LPFO, LPG, or ATK.

vehicle_tank_capacity  string optional  

vehicle_auth_type  string optional  

vehicle_tracker_id  string optional  

vehicle_model  string optional  

vehicle_engine_capacity  string optional  

vehicle_color  string optional  

vehicle_brand  string optional  

vehicle_reward_type  string optional  

terminal_id  string optional  

Debit funds from a users wallet

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/debit_customer_wallet" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 1974700.2741615,
    \"vendor_id\": 10,
    \"email\": \"deborah67@example.org\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/debit_customer_wallet"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "amount": 1974700.2741615,
    "vendor_id": 10,
    "email": "deborah67@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/debit_customer_wallet

Body Parameters

amount  number  

vendor_id  integer  

customer_vendor_wallet_id  string optional  

email  string optional  

This field is required when company_wallet_id is not present. Must be a valid email address.

Export Fuel Purchase History by date range.

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/purchase_report?company_id=voluptatem&vendor_id=tempora&email=illum&start_date=aliquid&end_date=voluptas&extension=%22xlsx%22%2C+%22xls%22%2C+%22pdf%22%2C+%22csv%22%2C+%22html%22%2C+%22dompdf%22%2C+%22xml%22" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/purchase_report"
);

const params = {
    "company_id": "voluptatem",
    "vendor_id": "tempora",
    "email": "illum",
    "start_date": "aliquid",
    "end_date": "voluptas",
    "extension": ""xlsx", "xls", "pdf", "csv", "html", "dompdf", "xml"",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/purchase_report

Query Parameters

company_id  string optional  

inţ required company ID

vendor_id  string optional  

inţ required vendor ID

email  string optional  

email user email

start_date  string optional  

date Search query parameter

end_date  string optional  

date Search query parameter

extension  string  

string

Display a listing of the unverified transactions,

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/unverified_transactions?start_date=et&end_date=excepturi&company_id=atque&vendor_id=porro&per_page=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/unverified_transactions"
);

const params = {
    "start_date": "et",
    "end_date": "excepturi",
    "company_id": "atque",
    "vendor_id": "porro",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 94,
            "vendor_id": 306,
            "user_id": 434,
            "cost_center_id": 244,
            "nfctag_id": 508,
            "driver_id": 264,
            "way_bill_number": "WB-5008",
            "vendor_station_name": "Koch Group",
            "vehicle_plate_number": "dn-758-eu",
            "auth_type": "Key Tag",
            "barcode_id": null,
            "amount_paid": 0.12,
            "volume": 136.73,
            "odometer_reading": 1,
            "product": "PMS",
            "pump": 7,
            "selling_price": 4.77,
            "current_credit_limit": 1201.29,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 33.64,
            "last_amount_paid": 874.36,
            "transaction_seq_no": 69483,
            "is_balanced": true,
            "oem_station_id": 3,
            "sm_station_id": 4,
            "balance_refunded": 40.36,
            "tapnet_amount": 341.91,
            "tapnet_volume": 6.77,
            "tapnet_transaction_time": {
                "date": "2015-07-03 07:15:53.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": "24:2A:9A:03:4B:BE",
            "release_token": "51",
            "is_fdc_value_fill": false,
            "fdc_volume": 268816066.82,
            "fdc_amount": 38.01,
            "last_tsn_source": null,
            "verified_volume": 11801.38,
            "verified_amount": 146362.05,
            "reconciliation_source": "FDC",
            "one_time_auth_id": 366,
            "recon_balance_refunded": false,
            "updated_at": "2024-12-11T08:48:36.000000Z",
            "created_at": "2024-12-11T08:48:36.000000Z",
            "id": 31876,
            "company": {
                "id": 94,
                "name": "happy customer",
                "email": "xavierdavis94@example.com",
                "phone_number": "216",
                "registration_number": "216",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Ikeja",
                "postcode": null,
                "address": "ikeja",
                "sector": "oil and gas",
                "tin": 623894,
                "website": "https://www.smartflowtech.com/",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": "Jamiu",
                "contact_person_lastname": "Adeyemi",
                "app_uid": "642d5133777b6",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-04-05T11:45:07.000000Z",
                "updated_at": "2023-04-05T11:45:07.000000Z",
                "deleted_at": null
            },
            "userWallet": null
        },
        {
            "company_id": 177,
            "vendor_id": 310,
            "user_id": 19,
            "cost_center_id": 403,
            "nfctag_id": 2991,
            "driver_id": 1814,
            "way_bill_number": "WB-8591",
            "vendor_station_name": "Carter, Jenkins and Durgan",
            "vehicle_plate_number": "fn-507-cv",
            "auth_type": "Card",
            "barcode_id": null,
            "amount_paid": 520.75,
            "volume": 67.35,
            "odometer_reading": 9,
            "product": "LPG",
            "pump": 7,
            "selling_price": 2571103.72,
            "current_credit_limit": 602151822.67,
            "attendant": "DEFAULT",
            "last_volume_dispensed": 4963.38,
            "last_amount_paid": 202132.49,
            "transaction_seq_no": 6989,
            "is_balanced": true,
            "oem_station_id": 6,
            "sm_station_id": 2,
            "balance_refunded": 5.08,
            "tapnet_amount": 1829108.37,
            "tapnet_volume": 2.23,
            "tapnet_transaction_time": {
                "date": "1973-02-03 05:25:33.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "thankucash_reward_applied": null,
            "thankucash_reward_value": null,
            "app_mode": "FCC MODE",
            "mac_address": "DA:03:90:78:7C:F2",
            "release_token": "89",
            "is_fdc_value_fill": true,
            "fdc_volume": 72678.52,
            "fdc_amount": 1.76,
            "last_tsn_source": null,
            "verified_volume": 2743.53,
            "verified_amount": 301.69,
            "reconciliation_source": "TAPNET",
            "one_time_auth_id": 493,
            "recon_balance_refunded": true,
            "updated_at": "2024-12-11T08:48:38.000000Z",
            "created_at": "2024-12-11T08:48:38.000000Z",
            "id": 31877,
            "company": {
                "id": 177,
                "name": "IBILE YABA",
                "email": "jamiu.adeyemi@smartflowtech.com",
                "phone_number": "08034552059",
                "registration_number": "GR909090",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Gombi",
                "postcode": null,
                "address": "LAGOS",
                "sector": "OIL AND GAS",
                "tin": 12345,
                "website": "https://ibile.com",
                "logo": null,
                "active": 0,
                "on_loyalty_program": 0,
                "contact_person_first_name": "EBUN",
                "contact_person_lastname": "OGUNBIYI",
                "app_uid": "66f15ad82d72f",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2024-09-23T12:11:04.000000Z",
                "updated_at": "2024-09-23T12:22:06.000000Z",
                "deleted_at": null
            },
            "userWallet": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/unverified_transactions

Query Parameters

start_date  string optional  

From Date query parameter

end_date  string optional  

To Date query parameter

company_id  string optional  

Company query parameter

vendor_id  string optional  

Vendor query parameter

per_page  integer optional  

Items per page

Endpoint to reconcile undispensed transactions.

requires authentication

This endpoint allows you to reconcile undispensed transactions by performing various actions such as updating user wallets, creating refund history, and deleting records.

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/un_dispensed_transactions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/un_dispensed_transactions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Reconciliation Transaction Successful"
}
 

Request      

POST api/un_dispensed_transactions

URL Parameters

id  integer  

The ID of the transaction(s) to be reconciled.

POST api/dispensed_transactions

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/dispensed_transactions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/dispensed_transactions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/dispensed_transactions

Display a listing of the pos heartbeats or filter by mac address and ip address

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats?per_page=4&mac_address=possimus&ip_address=qui" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats"
);

const params = {
    "per_page": "4",
    "mac_address": "possimus",
    "ip_address": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "mac_address": "F1:D3:5A:E1:DA:CA",
            "ip_address": "84.104.165.205",
            "oem_station_id": 3,
            "station_name": "Schinner-Swaniawski",
            "last_time_online": "48 years ago",
            "current_app_version": "nihil",
            "expected_app_version": "expedita",
            "velox_mode": "aliquam",
            "loyalty_mode": "qui",
            "sm_company_id": 2,
            "sm_station_id": 0,
            "updated_at": "2024-12-11T08:48:43.000000Z",
            "created_at": "2024-12-11T08:48:43.000000Z",
            "id": 67,
            "status": "offline"
        },
        {
            "mac_address": "75:C2:1A:B4:B4:01",
            "ip_address": "243.96.13.43",
            "oem_station_id": 9,
            "station_name": "Marks, Stehr and Predovic",
            "last_time_online": "4 months ago",
            "current_app_version": "autem",
            "expected_app_version": "voluptatem",
            "velox_mode": "voluptatum",
            "loyalty_mode": "maxime",
            "sm_company_id": 9,
            "sm_station_id": 4,
            "updated_at": "2024-12-11T08:48:44.000000Z",
            "created_at": "2024-12-11T08:48:44.000000Z",
            "id": 68,
            "status": "offline"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pos_heartbeats

Query Parameters

per_page  integer optional  

Items per page

mac_address  string optional  

Filter items by mac address

ip_address  string optional  

Filter items by IP address

Create a Pos heartbeat

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/pos_heartbeats

Show a specified Pos Heartbeat.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "mac_address": "ED:77:4F:0E:7B:8E",
        "ip_address": "25.184.162.2",
        "oem_station_id": 4,
        "station_name": "Hegmann-Pouros",
        "last_time_online": "5 years ago",
        "current_app_version": "quia",
        "expected_app_version": "magnam",
        "velox_mode": "magni",
        "loyalty_mode": "voluptas",
        "sm_company_id": 5,
        "sm_station_id": 0,
        "updated_at": "2024-12-11T08:48:45.000000Z",
        "created_at": "2024-12-11T08:48:45.000000Z",
        "id": 69,
        "status": "offline"
    }
}
 

Request      

GET api/pos_heartbeats/{id}

URL Parameters

id  integer  

The ID of the pos Heartbeat

Update a Pos Heartbeat

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"last_time_online\": \"2024-12-11T08:48:46\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "last_time_online": "2024-12-11T08:48:46"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "mac_address": "B9:07:1C:50:32:D8",
        "ip_address": "79.37.3.194",
        "oem_station_id": 1,
        "station_name": "Flatley, Corkery and Ullrich",
        "last_time_online": "15 years ago",
        "current_app_version": "maxime",
        "expected_app_version": "repellendus",
        "velox_mode": "quidem",
        "loyalty_mode": "enim",
        "sm_company_id": 0,
        "sm_station_id": 2,
        "updated_at": "2024-12-11T08:48:46.000000Z",
        "created_at": "2024-12-11T08:48:46.000000Z",
        "id": 70,
        "status": "offline"
    }
}
 

Request      

PUT api/pos_heartbeats/{id}

PATCH api/pos_heartbeats/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Body Parameters

last_time_online  string optional  

Must be a valid date.

mac_address  string optional  

ip_address  string optional  

station_name  string optional  

oem_station_id  string optional  

current_app_version  string optional  

expected_app_version  string optional  

sm_company_id  string optional  

sm_station_id  string optional  

velox_mode  string optional  

loyalty_mode  string optional  

Delete a Pos heartbeat

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/pos_heartbeats/{id}

URL Parameters

id  integer  

The ID of the Pos heartbeat

Retrieve the purchase history for a user's company.

requires authentication

This endpoint calculates and returns the credit and debit history for a user's company.

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/total_debit_credit_history?company_id=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/total_debit_credit_history"
);

const params = {
    "company_id": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Fetch Debit and Credit History Successful",
    "credit_history": 5000,
    "debit_history": 3000
}
 

Example response (403):


{
    "message": "Forbidden. You do not have permission to access this resource."
}
 

Example response (500):


{
    "message": "Internal Server Error. Failed to retrieve purchase history."
}
 

Request      

GET api/total_debit_credit_history

Query Parameters

company_id  integer optional  

(optional) The ID of the company for which to retrieve history.

Display a listing of the Anomaly Report

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/anomaly_report?per_page=6&company_id=9&station_name=culpa&start_date=enim&end_date=similique" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/anomaly_report"
);

const params = {
    "per_page": "6",
    "company_id": "9",
    "station_name": "culpa",
    "start_date": "enim",
    "end_date": "similique",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company": {
                "id": null,
                "company_name": null
            }
        },
        {
            "company": {
                "id": null,
                "company_name": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/anomaly_report

Query Parameters

per_page  integer optional  

Items per page

company_id  integer optional  

Filter items by company ID

station_name  string optional  

Filter items by station names

start_date  string optional  

datetime Filter items by date

end_date  string optional  

datetime Filter items by date

Payment Endpoints

Initialise a new Paystack payment

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payments/initiate/paystack" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_bank_account_id\": 2,
    \"company_id\": 1,
    \"amount_to_pay\": 12
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/initiate/paystack"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_bank_account_id": 2,
    "company_id": 1,
    "amount_to_pay": 12
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "ref": "cupid-pay-756151296",
        "company_id": 132,
        "company_wallet_id": 200,
        "vendor_id": 215,
        "company_temps_id": 132,
        "initiator_id": 325,
        "payment_mode_id": 213,
        "status": "successful",
        "total_charged_amount": 7574.24,
        "original_amount": 0.55,
        "gateway_charged": 1333443.27,
        "wallet_amount": 27742.41,
        "amount_paid": 112822756.21,
        "fee_paid": 996.16,
        "webhook_confirmed": null,
        "date_webhook_confirmed": {
            "date": "2000-10-03 00:16:04.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "date_transaction_verified": {
            "date": "2013-09-24 21:39:03.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "verification_means": "web_callback",
        "payment_cause": "cupid_recharge",
        "initiating_users_name": "Olumide",
        "paystack_subaccount_code": 494023623,
        "updated_at": "2024-12-11T08:48:51.000000Z",
        "created_at": "2024-12-11T08:48:51.000000Z",
        "id": 514
    }
}
 

Request      

POST api/payments/initiate/paystack

Body Parameters

vendor_bank_account_id  integer  

company_id  integer  

amount_to_pay  integer  

Verify Paystack payment & give value for purchase

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payments/paystack?trxref=assumenda" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reference\": \"totam\",
    \"company_id\": 4,
    \"payment_uploaded_by\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/paystack"
);

const params = {
    "trxref": "assumenda",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reference": "totam",
    "company_id": 4,
    "payment_uploaded_by": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/payments/paystack

Query Parameters

trxref  string optional  

Search query parameter

Body Parameters

reference  string optional  

company_id  integer  

payment_uploaded_by  string optional  

Verify Paystack payment & give value for purchase

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payments/paystack/callback?trxref=ad" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reference\": \"eos\",
    \"company_id\": 16,
    \"payment_uploaded_by\": \"nobis\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/paystack/callback"
);

const params = {
    "trxref": "ad",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reference": "eos",
    "company_id": 16,
    "payment_uploaded_by": "nobis"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=TYVPwzsUAtaWZC8jqoN4R6laN026Bj1yOAZGYuU6; expires=Wed, 11 Dec 2024 10:48:53 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/payments/paystack/callback could not be found."
}
 

Request      

GET api/payments/paystack/callback

Query Parameters

trxref  string optional  

Search query parameter

Body Parameters

reference  string optional  

company_id  integer  

payment_uploaded_by  string optional  

Display a listing of the payments or search by ref, initiating users name, total charged amount, amount paid, payment cause, verification means.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payments?term=maiores&per_page=2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments"
);

const params = {
    "term": "maiores",
    "per_page": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "ref": "cupid-pay-1371701375",
            "company_id": 19,
            "company_wallet_id": 200,
            "vendor_id": 311,
            "company_temps_id": 19,
            "initiator_id": 370,
            "payment_mode_id": 213,
            "status": "successful",
            "total_charged_amount": 821.59,
            "original_amount": 38244990.66,
            "gateway_charged": 170689.98,
            "wallet_amount": 23003364.31,
            "amount_paid": 44255529.71,
            "fee_paid": 2.35,
            "webhook_confirmed": null,
            "date_webhook_confirmed": {
                "date": "2009-10-26 05:07:32.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "date_transaction_verified": {
                "date": "2005-01-26 06:35:37.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "verification_means": "sheduled_job",
            "payment_cause": "cupid_recharge",
            "initiating_users_name": "Afolayan",
            "paystack_subaccount_code": 263507358,
            "updated_at": "2024-12-11T08:48:55.000000Z",
            "created_at": "2024-12-11T08:48:55.000000Z",
            "id": 515
        },
        {
            "ref": "cupid-pay-813847237",
            "company_id": 163,
            "company_wallet_id": 200,
            "vendor_id": 306,
            "company_temps_id": 163,
            "initiator_id": 365,
            "payment_mode_id": 213,
            "status": "failed",
            "total_charged_amount": 0.75,
            "original_amount": 753332679.99,
            "gateway_charged": 7.78,
            "wallet_amount": 1306.24,
            "amount_paid": 12.98,
            "fee_paid": 4294.28,
            "webhook_confirmed": null,
            "date_webhook_confirmed": {
                "date": "2003-06-25 20:26:08.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "date_transaction_verified": {
                "date": "2009-11-14 13:33:25.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "verification_means": "web_callback",
            "payment_cause": "customer_onboarding",
            "initiating_users_name": "Vishal",
            "paystack_subaccount_code": 795330044,
            "updated_at": "2024-12-11T08:48:58.000000Z",
            "created_at": "2024-12-11T08:48:58.000000Z",
            "id": 516
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/payments

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new payment

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payments" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/payments

Show a specified payment.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payments/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "ref": "cupid-pay-1274496786",
        "company_id": 36,
        "company_wallet_id": 200,
        "vendor_id": 306,
        "company_temps_id": 36,
        "initiator_id": 446,
        "payment_mode_id": 213,
        "status": "failed",
        "total_charged_amount": 339.69,
        "original_amount": 42095.53,
        "gateway_charged": 3524104.39,
        "wallet_amount": 717.21,
        "amount_paid": 390879.81,
        "fee_paid": 2971.41,
        "webhook_confirmed": null,
        "date_webhook_confirmed": {
            "date": "2020-03-16 03:22:51.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "date_transaction_verified": {
            "date": "2018-12-30 16:29:42.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "verification_means": "web_callback",
        "payment_cause": "cupid_recharge",
        "initiating_users_name": "Chika",
        "paystack_subaccount_code": 646708424,
        "updated_at": "2024-12-11T08:49:01.000000Z",
        "created_at": "2024-12-11T08:49:01.000000Z",
        "id": 517
    }
}
 

Request      

GET api/payments/{id}

URL Parameters

id  integer  

The ID of the payment

Update the specified payment

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/payments/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reference\": \"libero\",
    \"company_id\": 17,
    \"payment_uploaded_by\": \"sit\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reference": "libero",
    "company_id": 17,
    "payment_uploaded_by": "sit"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "ref": "cupid-pay-55295268",
        "company_id": 148,
        "company_wallet_id": 200,
        "vendor_id": 306,
        "company_temps_id": 148,
        "initiator_id": 392,
        "payment_mode_id": 213,
        "status": "failed",
        "total_charged_amount": 33.26,
        "original_amount": 2123.42,
        "gateway_charged": 3910.61,
        "wallet_amount": 3545175.42,
        "amount_paid": 278.63,
        "fee_paid": 210844.22,
        "webhook_confirmed": null,
        "date_webhook_confirmed": {
            "date": "2014-01-29 19:33:36.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "date_transaction_verified": {
            "date": "2004-09-19 15:34:22.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "verification_means": "sheduled_job",
        "payment_cause": "customer_onboarding",
        "initiating_users_name": "Afolayan malle",
        "paystack_subaccount_code": 998065430,
        "updated_at": "2024-12-11T08:49:04.000000Z",
        "created_at": "2024-12-11T08:49:04.000000Z",
        "id": 518
    }
}
 

Request      

PUT api/payments/{id}

PATCH api/payments/{id}

URL Parameters

id  integer  

The ID of the payment

Body Parameters

reference  string optional  

company_id  integer  

payment_uploaded_by  string optional  

Delete a payment

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/payments/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/payments/{id}

URL Parameters

id  integer  

The ID of the payment

Get Paystack Sub Account

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/quis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/quis"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=wfZ2woqcvmWmgesNK33lquDbTry6kEsuUKhLiiVV; expires=Wed, 11 Dec 2024 10:49:07 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/payments/subaccount/paystack/quis could not be found."
}
 

Request      

GET api/payments/subaccount/paystack/{id}

URL Parameters

id  string  

The ID of the paystack.

List Paystack Sub Account

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack?int=3&datetime=6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack"
);

const params = {
    "int": "3",
    "datetime": "6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=aMAk1L93gKEOT25TGblltjLxDwwx6bexoA9YpPI8; expires=Wed, 11 Dec 2024 10:49:08 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/payments/subaccount/paystack could not be found."
}
 

Request      

GET api/payments/subaccount/paystack

Query Parameters

int  integer optional  

$page Current page

datetime  integer optional  

$to The date to stop listing sub accounts

Update Paystack Sub Account

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/quis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"quasi\",
    \"settlement_bank\": \"omnis\",
    \"account_number\": \"repellat\",
    \"percentage_charge\": 153584.8,
    \"description\": \"recusandae\",
    \"primary_contact_email\": \"perspiciatis\",
    \"primary_contact_name\": \"ea\",
    \"primary_contact_phone\": \"praesentium\",
    \"metadata\": \"ullam\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/quis"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "business_name": "quasi",
    "settlement_bank": "omnis",
    "account_number": "repellat",
    "percentage_charge": 153584.8,
    "description": "recusandae",
    "primary_contact_email": "perspiciatis",
    "primary_contact_name": "ea",
    "primary_contact_phone": "praesentium",
    "metadata": "ullam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/payments/subaccount/paystack/{id}

URL Parameters

id  string  

The ID of the paystack.

id_or_code  string  

The ID of the payment history

Body Parameters

business_name  string  

settlement_bank  string  

account_number  string  

percentage_charge  number  

description  string optional  

primary_contact_email  string optional  

primary_contact_name  string optional  

primary_contact_phone  string optional  

metadata  string optional  

Create Paystack Sub Account

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"consequuntur\",
    \"settlement_bank\": \"magni\",
    \"account_number\": \"hic\",
    \"percentage_charge\": 27652800.0385957,
    \"description\": \"rerum\",
    \"primary_contact_email\": \"enim\",
    \"primary_contact_name\": \"reiciendis\",
    \"primary_contact_phone\": \"molestiae\",
    \"metadata\": \"molestiae\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "business_name": "consequuntur",
    "settlement_bank": "magni",
    "account_number": "hic",
    "percentage_charge": 27652800.0385957,
    "description": "rerum",
    "primary_contact_email": "enim",
    "primary_contact_name": "reiciendis",
    "primary_contact_phone": "molestiae",
    "metadata": "molestiae"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/payments/subaccount/paystack

Body Parameters

business_name  string  

settlement_bank  string  

account_number  string  

percentage_charge  number  

description  string optional  

primary_contact_email  string optional  

primary_contact_name  string optional  

primary_contact_phone  string optional  

metadata  string optional  

Display a listing of the payment histories or search by amount paid, payment made by, payment status, payment uploaded by, payment approved by, reference, channel, amount paid, payment cause, verification means.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payment_histories?term=odit&per_page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_histories"
);

const params = {
    "term": "odit",
    "per_page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "payment_id": 52,
            "vendor_id": 311,
            "company_id": 65,
            "amount_paid": 19255.69,
            "start_company_balance": 1611.32,
            "end_company_balance": 12.26,
            "current_credit_limit": 45050.17,
            "payment_made_by": "ONE TIME CUSTOMER-CALABAR",
            "payment_date": {
                "date": "2008-02-04 09:36:08.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "payment_status": "Success",
            "payment_uploaded_by": "Athena Hand",
            "payment_approved_by": "Milin Shah",
            "reference": 943605164,
            "channel": "Manual Upload",
            "amount_net": 54.93,
            "amount_gross": 5.65,
            "fee": 1155926.11,
            "paystack_subaccount_code": "ACCT_9w4s0r2w2",
            "evidence_path": "https://via.placeholder.com/640x480.png/00ee88?text=nesciunt",
            "status_message": null,
            "wallet_amount": null,
            "app_label": null,
            "auth_code": null,
            "card_expire_date": null,
            "card_holder_name": null,
            "masked_pan": null,
            "message": null,
            "rrn": null,
            "stan": null,
            "status_code": null,
            "terminal_id": null,
            "payment_provider": "paystack",
            "payment_transaction_id": 999864917,
            "ussd_wallet_pay_id": 837693815,
            "ussd_onboard_id": 559432974,
            "updated_at": "2024-12-11T08:49:11.000000Z",
            "created_at": "2024-12-11T08:49:11.000000Z",
            "id": 6,
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            }
        },
        {
            "payment_id": 4,
            "vendor_id": 302,
            "company_id": 31,
            "amount_paid": 515.49,
            "start_company_balance": 309659675.84,
            "end_company_balance": 9852.15,
            "current_credit_limit": 8.17,
            "payment_made_by": "HFN",
            "payment_date": {
                "date": "1971-05-21 15:58:42.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "payment_status": "Success",
            "payment_uploaded_by": "Herman Rosenbaum",
            "payment_approved_by": "Agbo Chika",
            "reference": 621720561,
            "channel": "Paystack Online",
            "amount_net": 11815542.28,
            "amount_gross": 34694.39,
            "fee": 6642290.8,
            "paystack_subaccount_code": "ACCT_6s4t2t6s7",
            "evidence_path": "https://via.placeholder.com/640x480.png/00ee55?text=laudantium",
            "status_message": null,
            "wallet_amount": null,
            "app_label": null,
            "auth_code": null,
            "card_expire_date": null,
            "card_holder_name": null,
            "masked_pan": null,
            "message": null,
            "rrn": null,
            "stan": null,
            "status_code": null,
            "terminal_id": null,
            "payment_provider": "paystack",
            "payment_transaction_id": 1055218934,
            "ussd_wallet_pay_id": 982682166,
            "ussd_onboard_id": 750192166,
            "updated_at": "2024-12-11T08:49:13.000000Z",
            "created_at": "2024-12-11T08:49:13.000000Z",
            "id": 7,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/payment_histories

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new payment history

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/payment_histories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"customer_vendor_wallet_id\": 16,
    \"amount_paid\": 608.3,
    \"s3_url\": \"sit\",
    \"velox_vendor_id\": 17,
    \"velox_customer_id\": \"dolores\",
    \"velox_customer_name\": \"reiciendis\",
    \"uploaded_by\": \"similique\",
    \"payment_date\": \"2024-12-11\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_histories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "customer_vendor_wallet_id": 16,
    "amount_paid": 608.3,
    "s3_url": "sit",
    "velox_vendor_id": 17,
    "velox_customer_id": "dolores",
    "velox_customer_name": "reiciendis",
    "uploaded_by": "similique",
    "payment_date": "2024-12-11"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "payment_id": 89,
        "vendor_id": 302,
        "company_id": 37,
        "amount_paid": 79894824.62,
        "start_company_balance": 212.38,
        "end_company_balance": 4880244.53,
        "current_credit_limit": 3477912.67,
        "payment_made_by": "INTERNATIONAL BREWERY",
        "payment_date": {
            "date": "1993-06-29 08:58:17.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "payment_status": "Approved",
        "payment_uploaded_by": "Torrance D'Amore",
        "payment_approved_by": "Super Admin",
        "reference": 626887638,
        "channel": "Manual Upload",
        "amount_net": 24.89,
        "amount_gross": 446380.18,
        "fee": 74279740.93,
        "paystack_subaccount_code": "ACCT_9x0x6i7s0",
        "evidence_path": "https://via.placeholder.com/640x480.png/00cc33?text=dolor",
        "status_message": null,
        "wallet_amount": null,
        "app_label": null,
        "auth_code": null,
        "card_expire_date": null,
        "card_holder_name": null,
        "masked_pan": null,
        "message": null,
        "rrn": null,
        "stan": null,
        "status_code": null,
        "terminal_id": null,
        "payment_provider": "paystack",
        "payment_transaction_id": 1111861468,
        "ussd_wallet_pay_id": 857738749,
        "ussd_onboard_id": 817531778,
        "updated_at": "2024-12-11T08:49:17.000000Z",
        "created_at": "2024-12-11T08:49:17.000000Z",
        "id": 8,
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

POST api/payment_histories

Body Parameters

customer_vendor_wallet_id  integer  

amount_paid  number  

s3_url  string optional  

velox_vendor_id  integer  

velox_customer_id  string  

velox_customer_name  string optional  

uploaded_by  string  

payment_date  string  

Must be a valid date in the format Y-m-d.

Show a specified payment history

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/payment_histories/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_histories/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "payment_id": 111,
        "vendor_id": 306,
        "company_id": 150,
        "amount_paid": 6.46,
        "start_company_balance": 179245987.93,
        "end_company_balance": 5794.67,
        "current_credit_limit": 4.64,
        "payment_made_by": "EXTERNAL",
        "payment_date": {
            "date": "1999-01-08 23:17:36.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "payment_status": "Disapproved",
        "payment_uploaded_by": "Carolina Walter",
        "payment_approved_by": "Muibi Azeez",
        "reference": 250072468,
        "channel": "Paystack Online",
        "amount_net": 3892827.52,
        "amount_gross": 1105388.1,
        "fee": 10600.82,
        "paystack_subaccount_code": "ACCT_0t2l9c3j9",
        "evidence_path": "https://via.placeholder.com/640x480.png/008822?text=et",
        "status_message": null,
        "wallet_amount": null,
        "app_label": null,
        "auth_code": null,
        "card_expire_date": null,
        "card_holder_name": null,
        "masked_pan": null,
        "message": null,
        "rrn": null,
        "stan": null,
        "status_code": null,
        "terminal_id": null,
        "payment_provider": null,
        "payment_transaction_id": 497744886,
        "ussd_wallet_pay_id": 623193161,
        "ussd_onboard_id": 829184146,
        "updated_at": "2024-12-11T08:49:20.000000Z",
        "created_at": "2024-12-11T08:49:20.000000Z",
        "id": 9,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

GET api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

Update the specified payment history

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/payment_histories/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"selected_customer\": \"cupiditate\",
    \"payment_status\": \"reprehenderit\",
    \"amount_paid\": 66.6,
    \"payment_approved_by\": \"fugiat\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_histories/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "selected_customer": "cupiditate",
    "payment_status": "reprehenderit",
    "amount_paid": 66.6,
    "payment_approved_by": "fugiat"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "payment_id": 112,
        "vendor_id": 310,
        "company_id": 87,
        "amount_paid": 12.97,
        "start_company_balance": 9489.35,
        "end_company_balance": 26.85,
        "current_credit_limit": 138.89,
        "payment_made_by": "TGI DISTRI LTD.",
        "payment_date": {
            "date": "1971-07-23 19:07:33.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "payment_status": "Approved",
        "payment_uploaded_by": "Leola Batz",
        "payment_approved_by": "Kasope Johnson",
        "reference": 651206945,
        "channel": "Manual Upload",
        "amount_net": 12609.31,
        "amount_gross": 315.78,
        "fee": 1249624.43,
        "paystack_subaccount_code": "ACCT_3z2n2f4h2",
        "evidence_path": "https://via.placeholder.com/640x480.png/006699?text=a",
        "status_message": null,
        "wallet_amount": null,
        "app_label": null,
        "auth_code": null,
        "card_expire_date": null,
        "card_holder_name": null,
        "masked_pan": null,
        "message": null,
        "rrn": null,
        "stan": null,
        "status_code": null,
        "terminal_id": null,
        "payment_provider": null,
        "payment_transaction_id": 800419534,
        "ussd_wallet_pay_id": 651350131,
        "ussd_onboard_id": 616543629,
        "updated_at": "2024-12-11T08:49:23.000000Z",
        "created_at": "2024-12-11T08:49:23.000000Z",
        "id": 10,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

PUT api/payment_histories/{id}

PATCH api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

Body Parameters

selected_customer  string  

payment_status  string  

amount_paid  number  

payment_approved_by  string  

Delete a payment history

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/payment_histories/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/payment_histories/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

Push Notifications Endpoints

Create a new User Device Token

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/store_user_device_token" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 10,
    \"device_token\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/store_user_device_token"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 10,
    "device_token": "et"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "user_id": 312,
        "device_token": "ffsnc_WtQDS1Q_ejsU1gdJ:APA91bG7yh7dx5j6ptHvJYq5QDn3jMf_g6f-jYJCYJ-5KpjhGZULK7BldyJ2BdVF6HBSuJHAvKNL-xYacir4XneJVbi3Ma0kFtY09IGAsgB2kfEVLTIV8O4c6vWcug7dIqqQFaEZoR6N",
        "created_at": "2023-09-28T15:47:10.000000Z",
        "updated_at": "2024-03-26T10:23:51.000000Z",
        "deleted_at": null
    }
}
 

Request      

POST api/store_user_device_token

Body Parameters

user_id  integer optional  

device_token  string optional  

Update a new User Device Token

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/store_user_device_token" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/store_user_device_token"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1,
        "user_id": 312,
        "device_token": "ffsnc_WtQDS1Q_ejsU1gdJ:APA91bG7yh7dx5j6ptHvJYq5QDn3jMf_g6f-jYJCYJ-5KpjhGZULK7BldyJ2BdVF6HBSuJHAvKNL-xYacir4XneJVbi3Ma0kFtY09IGAsgB2kfEVLTIV8O4c6vWcug7dIqqQFaEZoR6N",
        "created_at": "2023-09-28T15:47:10.000000Z",
        "updated_at": "2024-03-26T10:23:51.000000Z",
        "deleted_at": null
    }
}
 

Request      

PUT api/store_user_device_token

Default function for sending push notification

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/push_notification_message

Display a listing of the User Push Notification Message.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/push_notification_message?per_page=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message"
);

const params = {
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 6,
            "user_id": 312,
            "title": "Approved Request",
            "message": "Your request for EKY 744 XH has been approved.",
            "is_read": true,
            "created_at": "2023-10-04T10:15:54.000000Z",
            "updated_at": "2023-10-04T10:16:30.000000Z",
            "deleted_at": null,
            "bhn_request_id": 45,
            "bhn_request": {
                "id": 45,
                "vendor_id": 215,
                "company_id": 145,
                "type": "loading_request",
                "vehicle_id": 779,
                "source": null,
                "stoppage": null,
                "category_id": 3,
                "sub_category_id": 14,
                "way_bill_number": "GEN-ZcdvQ0",
                "data": {
                    "added_quantity": "0",
                    "total_quantity": 50,
                    "new_total_quantity": 50
                },
                "remarks": "gjzfjb",
                "rejection_reason": null,
                "status": "Approved",
                "transaction_status": "Not yet dispensed",
                "cleared": "Not yet dispensed",
                "created_at": "2023-10-04T10:14:57.000000Z",
                "updated_at": "2023-10-04T10:15:54.000000Z",
                "deleted_at": null,
                "load_type": null,
                "tonnage": null,
                "age": null,
                "trailer_type": null,
                "make": null,
                "contract": null,
                "submitted_date": "2023-10-04 00:00:00",
                "approve_date": "2023-10-04 00:00:00",
                "reject_date": null,
                "station_name": null,
                "transaction_type": null,
                "requested_total_volume": 50,
                "total_dispensed_volume": 0,
                "dispensed_status": "Not Yet Dispensed"
            }
        },
        {
            "id": 6,
            "user_id": 312,
            "title": "Approved Request",
            "message": "Your request for EKY 744 XH has been approved.",
            "is_read": true,
            "created_at": "2023-10-04T10:15:54.000000Z",
            "updated_at": "2023-10-04T10:16:30.000000Z",
            "deleted_at": null,
            "bhn_request_id": 45,
            "bhn_request": {
                "id": 45,
                "vendor_id": 215,
                "company_id": 145,
                "type": "loading_request",
                "vehicle_id": 779,
                "source": null,
                "stoppage": null,
                "category_id": 3,
                "sub_category_id": 14,
                "way_bill_number": "GEN-ZcdvQ0",
                "data": {
                    "added_quantity": "0",
                    "total_quantity": 50,
                    "new_total_quantity": 50
                },
                "remarks": "gjzfjb",
                "rejection_reason": null,
                "status": "Approved",
                "transaction_status": "Not yet dispensed",
                "cleared": "Not yet dispensed",
                "created_at": "2023-10-04T10:14:57.000000Z",
                "updated_at": "2023-10-04T10:15:54.000000Z",
                "deleted_at": null,
                "load_type": null,
                "tonnage": null,
                "age": null,
                "trailer_type": null,
                "make": null,
                "contract": null,
                "submitted_date": "2023-10-04 00:00:00",
                "approve_date": "2023-10-04 00:00:00",
                "reject_date": null,
                "station_name": null,
                "transaction_type": null,
                "requested_total_volume": 50,
                "total_dispensed_volume": 0,
                "dispensed_status": "Not Yet Dispensed"
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/push_notification_message

Query Parameters

per_page  integer optional  

Items per page

Update the group of Push Notification Messages.

requires authentication

Example request:
curl --request PATCH \
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": [
        19
    ],
    \"is_read\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": [
        19
    ],
    "is_read": false
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 6,
        "user_id": 312,
        "title": "Approved Request",
        "message": "Your request for EKY 744 XH has been approved.",
        "is_read": true,
        "created_at": "2023-10-04T10:15:54.000000Z",
        "updated_at": "2023-10-04T10:16:30.000000Z",
        "deleted_at": null,
        "bhn_request_id": 45,
        "bhn_request": {
            "id": 45,
            "vendor_id": 215,
            "company_id": 145,
            "type": "loading_request",
            "vehicle_id": 779,
            "source": null,
            "stoppage": null,
            "category_id": 3,
            "sub_category_id": 14,
            "way_bill_number": "GEN-ZcdvQ0",
            "data": {
                "added_quantity": "0",
                "total_quantity": 50,
                "new_total_quantity": 50
            },
            "remarks": "gjzfjb",
            "rejection_reason": null,
            "status": "Approved",
            "transaction_status": "Not yet dispensed",
            "cleared": "Not yet dispensed",
            "created_at": "2023-10-04T10:14:57.000000Z",
            "updated_at": "2023-10-04T10:15:54.000000Z",
            "deleted_at": null,
            "load_type": null,
            "tonnage": null,
            "age": null,
            "trailer_type": null,
            "make": null,
            "contract": null,
            "submitted_date": "2023-10-04 00:00:00",
            "approve_date": "2023-10-04 00:00:00",
            "reject_date": null,
            "station_name": null,
            "transaction_type": null,
            "requested_total_volume": 50,
            "total_dispensed_volume": 0,
            "dispensed_status": "Not Yet Dispensed"
        }
    }
}
 

Request      

PATCH api/push_notification_message

URL Parameters

id  integer  

The ID of the NFC tag

Body Parameters

id  integer[] optional  

is_read  boolean optional  

Delete a group of Push Notification Messages.

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/push_notification_message/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/push_notification_message/{id}

URL Parameters

id  integer  

The ID of the NFC tag

User Endpoints

Permanently delete a user

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/users/force_delete_user/4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/force_delete_user/4"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/users/force_delete_user/{id}

URL Parameters

id  integer  

The ID of the user

Restore a deleted user

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/users/restore/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/restore/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=yq8FIkxkbuw5MrGCzqEHVK3Usegt6C1pwzcuCxso; expires=Wed, 11 Dec 2024 10:37:38 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/users/restore/9 could not be found."
}
 

Request      

GET api/users/restore/{id}

URL Parameters

id  integer  

The ID of the user

Display a listing of trash users.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/users/trash?term=officia&per_page=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/trash"
);

const params = {
    "term": "officia",
    "per_page": "19",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Mr.",
        "name": "Kassandra Turcotte",
        "email": "letha.effertz@example.com",
        "phone": "+1-352-749-5925",
        "avatar": "https://via.placeholder.com/200x200.png/00ffaa?text=avatar+voluptatem",
        "username": "hipolito21",
        "gender": "Male",
        "newsletter": true,
        "active": true,
        "card_brand": "Visa",
        "card_last_four": "4727",
        "is_vendor": true,
        "is_admin": false,
        "updated_at": "2024-12-11T08:37:38.000000Z",
        "created_at": "2024-12-11T08:37:38.000000Z",
        "id": 487,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 3,
                "name": "update"
            },
            {
                "id": 12,
                "name": "delete company"
            },
            {
                "id": 34,
                "name": "create pos"
            },
            {
                "id": 37,
                "name": "onboard customer"
            },
            {
                "id": 67,
                "name": "category delete"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

GET api/users/trash

Query Parameters

term  string optional  

Search term parameter

per_page  integer optional  

Items per page

Display a listing of the users or search by name, email, phone

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/users?term=velit&per_page=13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users"
);

const params = {
    "term": "velit",
    "per_page": "13",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "title": "Prof.",
            "name": "Emanuel McKenzie",
            "email": "katharina35@example.org",
            "phone": "+14639849321",
            "avatar": "https://via.placeholder.com/200x200.png/00bbcc?text=avatar+dolorum",
            "username": "whyatt",
            "gender": "Male",
            "newsletter": true,
            "active": true,
            "card_brand": "Visa",
            "card_last_four": "5518",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:37:50.000000Z",
            "created_at": "2024-12-11T08:37:50.000000Z",
            "id": 490,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 4,
                    "name": "delete"
                },
                {
                    "id": 6,
                    "name": "create acl"
                },
                {
                    "id": 42,
                    "name": "delete user wallet"
                },
                {
                    "id": 79,
                    "name": "truck contract delete"
                },
                {
                    "id": 83,
                    "name": "trip allocation delete"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        },
        {
            "title": "Mrs.",
            "name": "Ambrose Cruickshank DVM",
            "email": "monica.hilpert@example.net",
            "phone": "716.915.8785",
            "avatar": "https://via.placeholder.com/200x200.png/003355?text=avatar+iure",
            "username": "elena44",
            "gender": "Female",
            "newsletter": false,
            "active": true,
            "card_brand": "Visa",
            "card_last_four": "7812",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:37:51.000000Z",
            "created_at": "2024-12-11T08:37:51.000000Z",
            "id": 491,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 7,
                    "name": "update acl"
                },
                {
                    "id": 56,
                    "name": "create vendor group"
                },
                {
                    "id": 57,
                    "name": "update vendor group"
                },
                {
                    "id": 61,
                    "name": "request create"
                },
                {
                    "id": 77,
                    "name": "truck contract create"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/users

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/users?vendor_id=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"optio\",
    \"phone\": 610.96,
    \"email\": \"ydooley@example.com\",
    \"username\": \"nobis\",
    \"gender\": \"quos\",
    \"newsletter\": true,
    \"active\": true,
    \"is_admin\": false,
    \"is_vendor\": false,
    \"suspended\": true,
    \"vendors\": [
        17
    ],
    \"companies\": [
        11
    ],
    \"cost_centers\": [
        9
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users"
);

const params = {
    "vendor_id": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "optio",
    "phone": 610.96,
    "email": "ydooley@example.com",
    "username": "nobis",
    "gender": "quos",
    "newsletter": true,
    "active": true,
    "is_admin": false,
    "is_vendor": false,
    "suspended": true,
    "vendors": [
        17
    ],
    "companies": [
        11
    ],
    "cost_centers": [
        9
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Prof.",
        "name": "Prof. Javier Balistreri I",
        "email": "ddamore@example.com",
        "phone": "620.612.7805",
        "avatar": "https://via.placeholder.com/200x200.png/00ccee?text=avatar+quasi",
        "username": "rosalind.cummings",
        "gender": "Female",
        "newsletter": true,
        "active": true,
        "card_brand": "JCB",
        "card_last_four": "6453",
        "is_vendor": true,
        "is_admin": false,
        "updated_at": "2024-12-11T08:37:57.000000Z",
        "created_at": "2024-12-11T08:37:57.000000Z",
        "id": 492,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 24,
                "name": "delete fleet"
            },
            {
                "id": 34,
                "name": "create pos"
            },
            {
                "id": 44,
                "name": "view wallet history"
            },
            {
                "id": 71,
                "name": "destination delete"
            },
            {
                "id": 75,
                "name": "destination_allocation delete"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

POST api/users

Query Parameters

vendor_id  integer optional  

The Vendor ID of the user

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Show a specified user.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/users/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Prof.",
        "name": "Irving Luettgen",
        "email": "herminia22@example.net",
        "phone": "(864) 469-3204",
        "avatar": "https://via.placeholder.com/200x200.png/001144?text=avatar+voluptate",
        "username": "bjohnson",
        "gender": "Male",
        "newsletter": false,
        "active": true,
        "card_brand": "Visa",
        "card_last_four": "0146",
        "is_vendor": true,
        "is_admin": false,
        "updated_at": "2024-12-11T08:38:01.000000Z",
        "created_at": "2024-12-11T08:38:01.000000Z",
        "id": 493,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 8,
                "name": "delete acl"
            },
            {
                "id": 32,
                "name": "delete payment"
            },
            {
                "id": 46,
                "name": "create sub-wallet"
            },
            {
                "id": 55,
                "name": "view vendor group"
            },
            {
                "id": 63,
                "name": "request delete"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

GET api/users/{id}

URL Parameters

id  integer  

The ID of the user

Update the specified user

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/users/13?vendor_id=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"tempore\",
    \"phone\": 285.4,
    \"email\": \"hberge@example.org\",
    \"username\": \"aperiam\",
    \"gender\": \"optio\",
    \"newsletter\": true,
    \"active\": false,
    \"is_admin\": true,
    \"is_vendor\": true,
    \"suspended\": true,
    \"vendors\": [
        3
    ],
    \"companies\": [
        13
    ],
    \"cost_centers\": [
        16
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/13"
);

const params = {
    "vendor_id": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "tempore",
    "phone": 285.4,
    "email": "hberge@example.org",
    "username": "aperiam",
    "gender": "optio",
    "newsletter": true,
    "active": false,
    "is_admin": true,
    "is_vendor": true,
    "suspended": true,
    "vendors": [
        3
    ],
    "companies": [
        13
    ],
    "cost_centers": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Mr.",
        "name": "Ronaldo Beatty",
        "email": "luigi85@example.com",
        "phone": "703-475-6446",
        "avatar": "https://via.placeholder.com/200x200.png/00aa77?text=avatar+id",
        "username": "bschaden",
        "gender": "Male",
        "newsletter": false,
        "active": true,
        "card_brand": "MasterCard",
        "card_last_four": "2678",
        "is_vendor": true,
        "is_admin": true,
        "updated_at": "2024-12-11T08:38:11.000000Z",
        "created_at": "2024-12-11T08:38:11.000000Z",
        "id": 494,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 24,
                "name": "delete fleet"
            },
            {
                "id": 27,
                "name": "update user"
            },
            {
                "id": 51,
                "name": "view vendor"
            },
            {
                "id": 60,
                "name": "request view"
            },
            {
                "id": 65,
                "name": "category update"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

PUT api/users/{id}

PATCH api/users/{id}

URL Parameters

id  integer  

The ID of the user

Query Parameters

vendor_id  integer optional  

The Vendor ID of the user

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Delete a user

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/users/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/users/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Miss",
        "name": "Miss Earnestine Lindgren",
        "email": "tommie69@example.net",
        "phone": "(386) 222-8542",
        "avatar": "https://via.placeholder.com/200x200.png/0033aa?text=avatar+est",
        "username": "shaylee82",
        "gender": "Male",
        "newsletter": true,
        "active": true,
        "card_brand": "Visa",
        "card_last_four": "0223",
        "is_vendor": true,
        "is_admin": true,
        "updated_at": "2024-12-11T08:38:15.000000Z",
        "created_at": "2024-12-11T08:38:15.000000Z",
        "id": 495,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 9,
                "name": "view company"
            },
            {
                "id": 29,
                "name": "view payment"
            },
            {
                "id": 35,
                "name": "update pos"
            },
            {
                "id": 67,
                "name": "category delete"
            },
            {
                "id": 68,
                "name": "destination view"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

DELETE api/users/{id}

URL Parameters

id  integer  

The ID of the user

Get users by vendor. You can also search by name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_users/11?term=sint&per_page=19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/11"
);

const params = {
    "term": "sint",
    "per_page": "19",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "title": "Mr.",
            "name": "Lula Nicolas Jr.",
            "email": "luna.sauer@example.org",
            "phone": "1-918-745-0904",
            "avatar": "https://via.placeholder.com/200x200.png/005533?text=avatar+cupiditate",
            "username": "fern.schmitt",
            "gender": "Female",
            "newsletter": false,
            "active": true,
            "card_brand": "MasterCard",
            "card_last_four": "7059",
            "is_vendor": true,
            "is_admin": true,
            "updated_at": "2024-12-11T08:40:23.000000Z",
            "created_at": "2024-12-11T08:40:23.000000Z",
            "id": 496,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 1,
                    "name": "view"
                },
                {
                    "id": 3,
                    "name": "update"
                },
                {
                    "id": 16,
                    "name": "delete company group"
                },
                {
                    "id": 32,
                    "name": "delete payment"
                },
                {
                    "id": 77,
                    "name": "truck contract create"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        },
        {
            "title": "Mrs.",
            "name": "Leora Lowe",
            "email": "betty61@example.com",
            "phone": "(646) 622-8256",
            "avatar": "https://via.placeholder.com/200x200.png/00dd88?text=avatar+et",
            "username": "kaya.leuschke",
            "gender": "Female",
            "newsletter": false,
            "active": true,
            "card_brand": "Visa",
            "card_last_four": "1074",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:40:24.000000Z",
            "created_at": "2024-12-11T08:40:24.000000Z",
            "id": 497,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 11,
                    "name": "update company"
                },
                {
                    "id": 32,
                    "name": "delete payment"
                },
                {
                    "id": 42,
                    "name": "delete user wallet"
                },
                {
                    "id": 44,
                    "name": "view wallet history"
                },
                {
                    "id": 80,
                    "name": "trip allocation view"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_users/{vendor_id}

URL Parameters

vendor_id  integer  

The ID of the vendor

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

User Wallet Endpoints

Display a list of wallets by company

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_wallets_by_company/16?per_page=2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_wallets_by_company/16"
);

const params = {
    "per_page": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 11,
        "wallet_id": "884461538153",
        "balance": 173.134,
        "credit_limit": 9330.2206,
        "vendor_id": 310,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 21,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 11,
            "name": "CHI LIMITED",
            "email": "samthompson11@example.com",
            "phone_number": "133",
            "registration_number": "133",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 694281,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c109",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-27T13:44:17.000000Z",
            "updated_at": "2023-02-27T13:44:17.000000Z",
            "deleted_at": null
        },
        "nfctag": null
    }
}
 

Request      

GET api/get_wallets_by_company/{company_id}

URL Parameters

company_id  integer optional  

The ID of the company

Query Parameters

per_page  integer optional  

items per page

Display a list of wallets by user

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_wallets_by_user/10?per_page=16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_wallets_by_user/10"
);

const params = {
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "user_id": 395,
        "wallet_id": "647768529381",
        "balance": 69.76046,
        "credit_limit": 782953.3527,
        "vendor_id": 310,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 13,
        "updated_at": "2024-12-11T08:49:30.000000Z",
        "created_at": "2024-12-11T08:49:30.000000Z",
        "id": 46,
        "vendor_current_credit_limit": 422231.25149903,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "vendorWallet": {
            "id": 200,
            "vendor_id": 215,
            "current_balance": 84963.81831196,
            "current_credit_limit": 422231.25149903,
            "active": 1,
            "created_at": "2023-02-06T04:49:22.000000Z",
            "updated_at": "2023-02-06T04:49:22.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/get_wallets_by_user/{user_id}

URL Parameters

user_id  integer optional  

The ID of the user

Query Parameters

per_page  integer optional  

items per page

Display a listing of the company wallets or search by wallet ID.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_wallets?term=nostrum&per_page=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_wallets"
);

const params = {
    "term": "nostrum",
    "per_page": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "company_id": 164,
            "wallet_id": "724156665578",
            "balance": 116864080.7,
            "credit_limit": 133484242.6137,
            "vendor_id": 306,
            "vendor_wallet_id": 200,
            "active": true,
            "created_by": 113,
            "vendor": {
                "id": 306,
                "sm_company_id": 299,
                "name": "SmartFlow Test",
                "address": "Ikeja",
                "email": "Smartflow@test.com",
                "phone_number": "08889995641",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Ikeja",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "QA Test",
                "registration_number": "10000",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 0,
                "created_at": "2024-01-25T14:22:40.000000Z",
                "updated_at": "2024-01-25T14:22:40.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 164,
                "name": "QA COMPANY",
                "email": "Qacompany@gmail.com",
                "phone_number": "09059367934",
                "registration_number": "ded 123 we",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Surulere",
                "postcode": null,
                "address": "24, olowo street, mushin, Lagos",
                "sector": "Engineering",
                "tin": 123567,
                "website": "https://www.qa.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": "Afolayan",
                "contact_person_lastname": "Ola",
                "app_uid": "663b39ed1db14",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2024-05-08T08:38:05.000000Z",
                "updated_at": "2024-05-08T08:38:05.000000Z",
                "deleted_at": null
            },
            "nfctag": null
        },
        {
            "company_id": 24,
            "wallet_id": "793832929975",
            "balance": 73.812462,
            "credit_limit": 262895.432106357,
            "vendor_id": 310,
            "vendor_wallet_id": 200,
            "active": true,
            "created_by": 25,
            "vendor": {
                "id": 310,
                "sm_company_id": 47,
                "name": "IBILE OIL AND GAS",
                "address": "VI",
                "email": "ayodeji.alabs@smartflowtech.com",
                "phone_number": "08130097924",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Ikeja",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "12345",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-08-07T15:59:28.000000Z",
                "updated_at": "2024-09-11T08:52:23.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 24,
                "name": "ELEPHANT GROUP LIMITED",
                "email": "annawright24@example.com",
                "phone_number": "146",
                "registration_number": "146",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 243189,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c122",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-03-12T13:44:17.000000Z",
                "updated_at": "2023-03-12T13:44:17.000000Z",
                "deleted_at": null
            },
            "nfctag": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/company_wallets

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new company wallet

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/company_wallets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": 20,
    \"company_id\": 11,
    \"vendor_id\": 16,
    \"vendor_wallet_id\": 8,
    \"balance\": 209676402.3979,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_wallets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "otp": 20,
    "company_id": 11,
    "vendor_id": 16,
    "vendor_wallet_id": 8,
    "balance": 209676402.3979,
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 20,
        "wallet_id": "448162022030",
        "balance": 1.1334,
        "credit_limit": 748462829.5874457,
        "vendor_id": 215,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 1,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 20,
            "name": "DEEKAY AND SONS (NIGERIA) LIMITED",
            "email": "hannahgreen20@example.com",
            "phone_number": "142",
            "registration_number": "142",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 428195,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c118",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-03-08T13:44:17.000000Z",
            "updated_at": "2023-03-08T13:44:17.000000Z",
            "deleted_at": null
        },
        "nfctag": null
    }
}
 

Request      

POST api/company_wallets

Body Parameters

otp  integer  

company_id  integer  

vendor_id  integer  

vendor_wallet_id  integer optional  

balance  number  

active  boolean optional  

Show a specified company wallet.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/company_wallets/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_wallets/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 48,
        "wallet_id": "745918459052",
        "balance": 2853,
        "credit_limit": 28792588.62284638,
        "vendor_id": 215,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 1,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 48,
            "name": "MBH POWER LIMITED",
            "email": "owenmurphy48@example.com",
            "phone_number": "170",
            "registration_number": "170",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 473825,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c146",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-04-05T13:44:17.000000Z",
            "updated_at": "2023-04-05T13:44:17.000000Z",
            "deleted_at": null
        },
        "nfctag": null
    }
}
 

Request      

GET api/company_wallets/{id}

URL Parameters

id  integer  

The ID of the company wallet

Update the specified company wallet

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/company_wallets/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": 7,
    \"company_id\": 14,
    \"vendor_id\": 18,
    \"vendor_wallet_id\": 20,
    \"balance\": 4.476,
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_wallets/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "otp": 7,
    "company_id": 14,
    "vendor_id": 18,
    "vendor_wallet_id": 20,
    "balance": 4.476,
    "active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "company_id": 177,
        "wallet_id": "855135145221",
        "balance": 453455.41639,
        "credit_limit": 6135.28798722,
        "vendor_id": 215,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 224,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 177,
            "name": "IBILE YABA",
            "email": "jamiu.adeyemi@smartflowtech.com",
            "phone_number": "08034552059",
            "registration_number": "GR909090",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Gombi",
            "postcode": null,
            "address": "LAGOS",
            "sector": "OIL AND GAS",
            "tin": 12345,
            "website": "https://ibile.com",
            "logo": null,
            "active": 0,
            "on_loyalty_program": 0,
            "contact_person_first_name": "EBUN",
            "contact_person_lastname": "OGUNBIYI",
            "app_uid": "66f15ad82d72f",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2024-09-23T12:11:04.000000Z",
            "updated_at": "2024-09-23T12:22:06.000000Z",
            "deleted_at": null
        },
        "nfctag": null
    }
}
 

Request      

PUT api/company_wallets/{id}

PATCH api/company_wallets/{id}

URL Parameters

id  integer  

The ID of the company wallet

Body Parameters

otp  integer  

company_id  integer  

vendor_id  integer  

vendor_wallet_id  integer optional  

balance  number  

active  boolean optional  

Delete a company wallet

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/company_wallets/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/company_wallets/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/company_wallets/{id}

URL Parameters

id  integer  

The ID of the company wallet

Display a listing of the user wallets or search by wallet ID.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_wallets?term=placeat&per_page=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallets"
);

const params = {
    "term": "placeat",
    "per_page": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "user_id": 362,
            "wallet_id": "461412577695",
            "balance": 24.59360157,
            "credit_limit": 652915.407,
            "vendor_id": 302,
            "vendor_wallet_id": 200,
            "active": true,
            "created_by": 12,
            "updated_at": "2024-12-11T08:49:53.000000Z",
            "created_at": "2024-12-11T08:49:53.000000Z",
            "id": 47,
            "vendor_current_credit_limit": 422231.25149903,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "vendorWallet": {
                "id": 200,
                "vendor_id": 215,
                "current_balance": 84963.81831196,
                "current_credit_limit": 422231.25149903,
                "active": 1,
                "created_at": "2023-02-06T04:49:22.000000Z",
                "updated_at": "2023-02-06T04:49:22.000000Z",
                "deleted_at": null
            }
        },
        {
            "user_id": 359,
            "wallet_id": "209489736390",
            "balance": 2592241.4914813,
            "credit_limit": 1.4825448,
            "vendor_id": 302,
            "vendor_wallet_id": 200,
            "active": true,
            "created_by": 21,
            "updated_at": "2024-12-11T08:49:54.000000Z",
            "created_at": "2024-12-11T08:49:54.000000Z",
            "id": 48,
            "vendor_current_credit_limit": 422231.25149903,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "vendorWallet": {
                "id": 200,
                "vendor_id": 215,
                "current_balance": 84963.81831196,
                "current_credit_limit": 422231.25149903,
                "active": 1,
                "created_at": "2023-02-06T04:49:22.000000Z",
                "updated_at": "2023-02-06T04:49:22.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/user_wallets

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user wallet

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/user_wallets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": 13,
    \"user_id\": 16,
    \"vendor_id\": 5,
    \"vendor_wallet_id\": 17,
    \"balance\": 0,
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "otp": 13,
    "user_id": 16,
    "vendor_id": 5,
    "vendor_wallet_id": 17,
    "balance": 0,
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "user_id": 354,
        "wallet_id": "445500273540",
        "balance": 23832.04717712,
        "credit_limit": 38129.617,
        "vendor_id": 310,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 11,
        "vendor_current_credit_limit": 422231.25149903,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "vendorWallet": {
            "id": 200,
            "vendor_id": 215,
            "current_balance": 84963.81831196,
            "current_credit_limit": 422231.25149903,
            "active": 1,
            "created_at": "2023-02-06T04:49:22.000000Z",
            "updated_at": "2023-02-06T04:49:22.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/user_wallets

Body Parameters

otp  integer  

user_id  integer  

vendor_id  integer  

vendor_wallet_id  integer optional  

balance  number  

active  boolean optional  

Show a specified user wallet.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_wallets/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallets/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "user_id": 238,
        "wallet_id": "014132796137",
        "balance": 289318.375,
        "credit_limit": 28530107.3518,
        "vendor_id": 302,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 14,
        "vendor_current_credit_limit": 422231.25149903,
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "vendorWallet": {
            "id": 200,
            "vendor_id": 215,
            "current_balance": 84963.81831196,
            "current_credit_limit": 422231.25149903,
            "active": 1,
            "created_at": "2023-02-06T04:49:22.000000Z",
            "updated_at": "2023-02-06T04:49:22.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Update the specified user wallet

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/user_wallets/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": 10,
    \"user_id\": 12,
    \"vendor_id\": 9,
    \"vendor_wallet_id\": 7,
    \"balance\": 219503673.87085196,
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallets/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "otp": 10,
    "user_id": 12,
    "vendor_id": 9,
    "vendor_wallet_id": 7,
    "balance": 219503673.87085196,
    "active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "user_id": 440,
        "wallet_id": "813375960920",
        "balance": 246491.492,
        "credit_limit": 36513.284085,
        "vendor_id": 310,
        "vendor_wallet_id": 200,
        "active": true,
        "created_by": 224,
        "updated_at": "2024-12-11T08:50:06.000000Z",
        "created_at": "2024-12-11T08:50:06.000000Z",
        "id": 49,
        "vendor_current_credit_limit": 422231.25149903,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "vendorWallet": {
            "id": 200,
            "vendor_id": 215,
            "current_balance": 84963.81831196,
            "current_credit_limit": 422231.25149903,
            "active": 1,
            "created_at": "2023-02-06T04:49:22.000000Z",
            "updated_at": "2023-02-06T04:49:22.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/user_wallets/{id}

PATCH api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Body Parameters

otp  integer  

user_id  integer  

vendor_id  integer  

vendor_wallet_id  integer optional  

balance  number  

active  boolean optional  

Delete a user wallet

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/user_wallets/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallets/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Display a listing of the user wallet histories or search by status, payment reference.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories?term=quae&per_page=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories"
);

const params = {
    "term": "quae",
    "per_page": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "user_id": 1,
            "user_wallet_id": 1,
            "vendor_id": 302,
            "amount": 72969.55,
            "comment": "Excepturi laudantium iste et ab molestiae. Earum accusantium ut laborum assumenda. Est minus magnam inventore.",
            "payment_ref": "67595243125e2",
            "status": "failed"
        },
        {
            "user_id": 13,
            "user_wallet_id": 10,
            "vendor_id": 215,
            "amount": 36159.31,
            "comment": "Qui repellendus saepe voluptas asperiores eligendi aut omnis. Debitis nobis veritatis aut atque repellat expedita. Ut nihil corporis sed autem.",
            "payment_ref": "675952441a504",
            "status": "initialised",
            "updated_at": "2024-12-11T08:50:12.000000Z",
            "created_at": "2024-12-11T08:50:12.000000Z",
            "id": 121
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/user_wallet_histories

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Show a specified user wallet history

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "user_id": 13,
        "user_wallet_id": 10,
        "vendor_id": 311,
        "amount": 608.16123358,
        "comment": "Et harum dolorem voluptatem dolor quo debitis. Et vitae maxime exercitationem iure. Culpa ab aut esse quia recusandae. Exercitationem quo asperiores sint corporis.",
        "payment_ref": "675952460789d",
        "status": "initialised",
        "updated_at": "2024-12-11T08:50:14.000000Z",
        "created_at": "2024-12-11T08:50:14.000000Z",
        "id": 122
    }
}
 

Request      

GET api/user_wallet_histories/{id}

URL Parameters

id  integer  

The ID of the user wallet history

Delete a user wallet history

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/user_wallet_histories/{id}

URL Parameters

id  integer  

The ID of the user wallet history

Display a listing of the user wallet or search by status, payment reference.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_company_wallets?term=ullam&per_page=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets"
);

const params = {
    "term": "ullam",
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor": null
        },
        {
            "vendor_id": 302,
            "user_id": 1,
            "user_wallet_id": 1,
            "membership_no": "5971781028",
            "balance": 1.9466,
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/user_company_wallets

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user vendor wallet

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 15,
    \"user_id\": 12,
    \"balance\": 23516.05757,
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 15,
    "user_id": 12,
    "balance": 23516.05757,
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 310,
        "user_id": 12,
        "user_wallet_id": 12,
        "membership_no": "3817032530",
        "balance": 10657212.41809,
        "vendor": {
            "id": 310,
            "sm_company_id": 47,
            "name": "IBILE OIL AND GAS",
            "address": "VI",
            "email": "ayodeji.alabs@smartflowtech.com",
            "phone_number": "08130097924",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "12345",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-08-07T15:59:28.000000Z",
            "updated_at": "2024-09-11T08:52:23.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

POST api/user_company_wallets

Body Parameters

vendor_id  integer  

user_id  integer  

balance  number  

active  boolean optional  

Show a specified user vendor wallet

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 306,
        "user_id": 12,
        "user_wallet_id": 12,
        "membership_no": "1156277767",
        "balance": 772409,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

GET api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user vendor wallet

Update the specified user vendor wallet

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 13,
    \"user_id\": 14,
    \"balance\": 83817.5,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 13,
    "user_id": 14,
    "balance": 83817.5,
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 302,
        "user_id": 11,
        "user_wallet_id": 11,
        "membership_no": "8805253243",
        "balance": 193.000647873,
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

PUT api/user_company_wallets/{id}

PATCH api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user vendor wallet

Body Parameters

vendor_id  integer  

user_id  integer  

balance  number  

active  boolean optional  

Delete a user vendor wallet

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/user_company_wallets/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user vendor wallet

This endpoint allows users to create wallet(join loyalty program) themselves(if they don't already have one with the vendor)

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/create_wallet/dignissimos" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/create_wallet/dignissimos"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/create_wallet/{company_id}

URL Parameters

company_id  string  

The ID of the company.

vendor_id  integer  

The ID of the vendor

This endpoint allows users to create a vendor wallet(join loyalty program) themselves(if they don't already have one). This should be implemented only if the customer knows the vendor

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/create_company_wallet/19/perspiciatis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/create_company_wallet/19/perspiciatis"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/create_company_wallet/{vendor_id}/{group_id}

URL Parameters

vendor_id  integer  

The ID of the vendor

group_id  string  

The ID of the group.

Fund a users' wallet after verifying payment

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/fund_wallet/18/praesentium/voluptatum" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fund_wallet/18/praesentium/voluptatum"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/fund_wallet/{vendor_id}/{payment_method}/{payment_ref}

URL Parameters

vendor_id  integer  

the ID of the vendor the users' funds will be credited to

payment_method  string  

Name of the payment provider (paystack)

payment_ref  string  

Payment reference/nonce

Fund a company's wallet after verifying payment

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/fund_company_wallet/9/2/velit/doloremque/omnis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/fund_company_wallet/9/2/velit/doloremque/omnis"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/fund_company_wallet/{company_id}/{vendor_id}/{payment_method}/{payment_ref}/{amount_paid}

URL Parameters

company_id  integer  

the ID of the company the company' funds will be credited to

vendor_id  integer  

the ID of the vendor the users' funds will be credited to

payment_method  string  

Name of the payment provider (paystack)

payment_ref  string  

Payment reference/nonce

amount_paid  string  

Amount paid

Display a listing of the Credit Limit History or search by name, .

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/credit_limit_history?term=distinctio&per_page=20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history"
);

const params = {
    "term": "distinctio",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 15,
            "vendor_id": 215,
            "user_id": 12,
            "current_credit_limit": 0,
            "requested_credit_limit": 1000,
            "status": "Pending",
            "limit_requested_by": 12,
            "limit_approved_by": null,
            "created_at": "2023-02-27T16:38:13.000000Z",
            "updated_at": "2023-02-27T16:38:13.000000Z",
            "deleted_at": null,
            "company_id": 54,
            "vendor": {
                "id": 215,
                "sm_company_id": 42,
                "name": "BHN Logistics",
                "address": "sagamu",
                "email": "sourabh.sanganeria@tolaram.com",
                "phone_number": "08028268504",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Lagos",
                "postcode": null,
                "products_sold": "PMS, AGO",
                "payment_type": "neque",
                "contact_person": "Sourabh sanganeria",
                "registration_number": "1005",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-02-16T11:23:28.000000Z",
                "updated_at": "2023-03-14T15:26:36.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 54,
                "name": "BHN Logistics",
                "email": "Saurav.Agarwal@tolaram.com",
                "phone_number": "176",
                "registration_number": "176",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 934618,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c98",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-02-16T13:44:17.000000Z",
                "updated_at": "2023-02-16T13:44:17.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 12,
                "title": "Mr",
                "name": "Kasope Johnson",
                "email": "kasope.johnson@smartflowtech.com",
                "phone": "06547893249",
                "avatar": null,
                "username": "kash",
                "gender": "male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2023-02-07T10:32:29.000000Z",
                "updated_at": "2024-04-28T17:19:13.000000Z",
                "deleted_at": null
            },
            "limit_requested_user": {
                "id": 12,
                "title": "Mr",
                "name": "Kasope Johnson",
                "email": "kasope.johnson@smartflowtech.com",
                "phone": "06547893249",
                "avatar": null,
                "username": "kash",
                "gender": "male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2023-02-07T10:32:29.000000Z",
                "updated_at": "2024-04-28T17:19:13.000000Z",
                "deleted_at": null
            },
            "limit_approved_user": null
        },
        {
            "id": 15,
            "vendor_id": 215,
            "user_id": 12,
            "current_credit_limit": 0,
            "requested_credit_limit": 1000,
            "status": "Pending",
            "limit_requested_by": 12,
            "limit_approved_by": null,
            "created_at": "2023-02-27T16:38:13.000000Z",
            "updated_at": "2023-02-27T16:38:13.000000Z",
            "deleted_at": null,
            "company_id": 54,
            "vendor": {
                "id": 215,
                "sm_company_id": 42,
                "name": "BHN Logistics",
                "address": "sagamu",
                "email": "sourabh.sanganeria@tolaram.com",
                "phone_number": "08028268504",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Lagos",
                "postcode": null,
                "products_sold": "PMS, AGO",
                "payment_type": "neque",
                "contact_person": "Sourabh sanganeria",
                "registration_number": "1005",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-02-16T11:23:28.000000Z",
                "updated_at": "2023-03-14T15:26:36.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "company": {
                "id": 54,
                "name": "BHN Logistics",
                "email": "Saurav.Agarwal@tolaram.com",
                "phone_number": "176",
                "registration_number": "176",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "304",
                "address": "Sagamu",
                "sector": "Logistics",
                "tin": 934618,
                "website": "https://www.smartflowtech.com",
                "logo": null,
                "active": 1,
                "on_loyalty_program": 0,
                "contact_person_first_name": null,
                "contact_person_lastname": null,
                "app_uid": "63ee2521a5c98",
                "loyalty_points_by_group": 0,
                "loyalty_reward_percentage": null,
                "loyalty_reward_points": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_min_point": null,
                "created_at": "2023-02-16T13:44:17.000000Z",
                "updated_at": "2023-02-16T13:44:17.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 12,
                "title": "Mr",
                "name": "Kasope Johnson",
                "email": "kasope.johnson@smartflowtech.com",
                "phone": "06547893249",
                "avatar": null,
                "username": "kash",
                "gender": "male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2023-02-07T10:32:29.000000Z",
                "updated_at": "2024-04-28T17:19:13.000000Z",
                "deleted_at": null
            },
            "limit_requested_user": {
                "id": 12,
                "title": "Mr",
                "name": "Kasope Johnson",
                "email": "kasope.johnson@smartflowtech.com",
                "phone": "06547893249",
                "avatar": null,
                "username": "kash",
                "gender": "male",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 1,
                "active_vendor_group": null,
                "active_vendor": 87,
                "otp": null,
                "created_at": "2023-02-07T10:32:29.000000Z",
                "updated_at": "2024-04-28T17:19:13.000000Z",
                "deleted_at": null
            },
            "limit_approved_user": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/credit_limit_history

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new Credit Limit History

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 4,
    \"company_id\": 19,
    \"user_id\": 12,
    \"credit_limit\": 2389.2035321,
    \"limit_requested_by\": 18,
    \"limit_approved_by\": 17,
    \"status\": \"Disapproved\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 4,
    "company_id": 19,
    "user_id": 12,
    "credit_limit": 2389.2035321,
    "limit_requested_by": 18,
    "limit_approved_by": 17,
    "status": "Disapproved"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 15,
        "vendor_id": 215,
        "user_id": 12,
        "current_credit_limit": 0,
        "requested_credit_limit": 1000,
        "status": "Pending",
        "limit_requested_by": 12,
        "limit_approved_by": null,
        "created_at": "2023-02-27T16:38:13.000000Z",
        "updated_at": "2023-02-27T16:38:13.000000Z",
        "deleted_at": null,
        "company_id": 54,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 54,
            "name": "BHN Logistics",
            "email": "Saurav.Agarwal@tolaram.com",
            "phone_number": "176",
            "registration_number": "176",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 934618,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c98",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-16T13:44:17.000000Z",
            "updated_at": "2023-02-16T13:44:17.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_requested_user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_approved_user": null
    }
}
 

Request      

POST api/credit_limit_history

Body Parameters

vendor_id  integer optional  

company_id  integer optional  

user_id  integer  

credit_limit  number  

limit_requested_by  integer  

limit_approved_by  integer optional  

status  string optional  

Must be one of Pending, Approved, or Disapproved.

Show a specified Credit Limit History.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 15,
        "vendor_id": 215,
        "user_id": 12,
        "current_credit_limit": 0,
        "requested_credit_limit": 1000,
        "status": "Pending",
        "limit_requested_by": 12,
        "limit_approved_by": null,
        "created_at": "2023-02-27T16:38:13.000000Z",
        "updated_at": "2023-02-27T16:38:13.000000Z",
        "deleted_at": null,
        "company_id": 54,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 54,
            "name": "BHN Logistics",
            "email": "Saurav.Agarwal@tolaram.com",
            "phone_number": "176",
            "registration_number": "176",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 934618,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c98",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-16T13:44:17.000000Z",
            "updated_at": "2023-02-16T13:44:17.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_requested_user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_approved_user": null
    }
}
 

Request      

GET api/credit_limit_history/{id}

URL Parameters

id  integer  

The ID of the Credit Limit History

Update the specified Credit Limit History

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 3,
    \"company_id\": 8,
    \"user_id\": 2,
    \"credit_limit\": 15.7,
    \"limit_requested_by\": 3,
    \"limit_approved_by\": 4,
    \"status\": \"Approved\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 3,
    "company_id": 8,
    "user_id": 2,
    "credit_limit": 15.7,
    "limit_requested_by": 3,
    "limit_approved_by": 4,
    "status": "Approved"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 15,
        "vendor_id": 215,
        "user_id": 12,
        "current_credit_limit": 0,
        "requested_credit_limit": 1000,
        "status": "Pending",
        "limit_requested_by": 12,
        "limit_approved_by": null,
        "created_at": "2023-02-27T16:38:13.000000Z",
        "updated_at": "2023-02-27T16:38:13.000000Z",
        "deleted_at": null,
        "company_id": 54,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "company": {
            "id": 54,
            "name": "BHN Logistics",
            "email": "Saurav.Agarwal@tolaram.com",
            "phone_number": "176",
            "registration_number": "176",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "304",
            "address": "Sagamu",
            "sector": "Logistics",
            "tin": 934618,
            "website": "https://www.smartflowtech.com",
            "logo": null,
            "active": 1,
            "on_loyalty_program": 0,
            "contact_person_first_name": null,
            "contact_person_lastname": null,
            "app_uid": "63ee2521a5c98",
            "loyalty_points_by_group": 0,
            "loyalty_reward_percentage": null,
            "loyalty_reward_points": null,
            "loyalty_min_purchase_amount": null,
            "loyalty_min_point": null,
            "created_at": "2023-02-16T13:44:17.000000Z",
            "updated_at": "2023-02-16T13:44:17.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_requested_user": {
            "id": 12,
            "title": "Mr",
            "name": "Kasope Johnson",
            "email": "kasope.johnson@smartflowtech.com",
            "phone": "06547893249",
            "avatar": null,
            "username": "kash",
            "gender": "male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 1,
            "active_vendor_group": null,
            "active_vendor": 87,
            "otp": null,
            "created_at": "2023-02-07T10:32:29.000000Z",
            "updated_at": "2024-04-28T17:19:13.000000Z",
            "deleted_at": null
        },
        "limit_approved_user": null
    }
}
 

Request      

PUT api/credit_limit_history/{id}

PATCH api/credit_limit_history/{id}

URL Parameters

id  integer  

The ID of the Credit Limit History

Body Parameters

vendor_id  integer optional  

company_id  integer optional  

user_id  integer  

credit_limit  number  

limit_requested_by  integer  

limit_approved_by  integer optional  

status  string optional  

Must be one of Pending, Approved, or Disapproved.

Delete a Credit Limit History

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/credit_limit_history/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/credit_limit_history/{id}

URL Parameters

id  integer  

The ID of the Credit Limit History

Vendor Customer Boarding Endpoints

Display a listing of the vendor onboard details or search by contact_number.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details?term=placeat&per_page=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details"
);

const params = {
    "term": "placeat",
    "per_page": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor_id": 302,
            "min_wallet_recharge": 667,
            "tag_cost": 1193,
            "contact_number": "1-215-495-6856",
            "vendor": {
                "id": 302,
                "sm_company_id": 4337,
                "name": "BHN",
                "address": "Sagamu",
                "email": "anthony.braithwaite@tolaram.com",
                "phone_number": "994-061-2271",
                "country": "Nigeria",
                "state": "Ogun",
                "city": "Shagamu",
                "postcode": "230415",
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Anthony Braithwaite",
                "registration_number": "HsMDIeW",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-08-21T17:41:27.000000Z",
                "updated_at": "2023-08-21T17:41:27.000000Z",
                "deleted_at": null,
                "se_company_id": null
            }
        },
        {
            "vendor_id": 310,
            "min_wallet_recharge": 10936,
            "tag_cost": 887544803,
            "contact_number": "+1-607-305-9529",
            "vendor": {
                "id": 310,
                "sm_company_id": 47,
                "name": "IBILE OIL AND GAS",
                "address": "VI",
                "email": "ayodeji.alabs@smartflowtech.com",
                "phone_number": "08130097924",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Ikeja",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "12345",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-08-07T15:59:28.000000Z",
                "updated_at": "2024-09-11T08:52:23.000000Z",
                "deleted_at": null,
                "se_company_id": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendors_onboarding_details

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new vendor onboard details

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 1,
    \"min_wallet_recharge\": 5,
    \"tag_cost\": 306.042,
    \"contact_number\": 188.9
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 1,
    "min_wallet_recharge": 5,
    "tag_cost": 306.042,
    "contact_number": 188.9
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 311,
        "min_wallet_recharge": 126282,
        "tag_cost": 6359915,
        "contact_number": "224-429-2328",
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

POST api/vendors_onboarding_details

Body Parameters

vendor_id  integer  

min_wallet_recharge  number  

tag_cost  number  

contact_number  number  

Show a specified vendor onboard details.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 302,
        "min_wallet_recharge": 134083,
        "tag_cost": 125279,
        "contact_number": "(984) 960-4240",
        "vendor": {
            "id": 302,
            "sm_company_id": 4337,
            "name": "BHN",
            "address": "Sagamu",
            "email": "anthony.braithwaite@tolaram.com",
            "phone_number": "994-061-2271",
            "country": "Nigeria",
            "state": "Ogun",
            "city": "Shagamu",
            "postcode": "230415",
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Anthony Braithwaite",
            "registration_number": "HsMDIeW",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-08-21T17:41:27.000000Z",
            "updated_at": "2023-08-21T17:41:27.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

GET api/vendors_onboarding_details/{id}

URL Parameters

id  integer  

The ID of the vendor onboard details

Update the specified vendor onboard details

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 8,
    \"min_wallet_recharge\": 36876,
    \"tag_cost\": 48424.76883,
    \"contact_number\": 6292706.6
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 8,
    "min_wallet_recharge": 36876,
    "tag_cost": 48424.76883,
    "contact_number": 6292706.6
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 311,
        "min_wallet_recharge": 4,
        "tag_cost": 93459,
        "contact_number": "650-733-9426",
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        }
    }
}
 

Request      

PUT api/vendors_onboarding_details/{id}

PATCH api/vendors_onboarding_details/{id}

URL Parameters

id  integer  

The ID of the vendor onboard details

Body Parameters

vendor_id  integer  

min_wallet_recharge  number  

tag_cost  number  

contact_number  number  

Delete a vendor onboard details

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendors_onboarding_details/{id}

URL Parameters

id  integer  

The ID of the vendor onboard details

Get vendor onboard details by sm_company_id

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/get_by_sm_company_id/17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/get_by_sm_company_id/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=2npfKooqIHyaiHO8JuApWZYJOMO5iZGnS0TtSyXG; expires=Wed, 11 Dec 2024 10:48:17 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/vendors_onboarding_details/get_by_sm_company_id/17 could not be found."
}
 

Request      

GET api/vendors_onboarding_details/get_by_sm_company_id/{sm_company_id}

URL Parameters

sm_company_id  integer  

The ID of the station manager company ID

Get vendor onboard details by vendor hostname

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/get_by_hostname/ipsam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/get_by_hostname/ipsam"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=iLQbmaTRXP5fLDvrRzaSBBdimEG5KUY8Qy5xIvlK; expires=Wed, 11 Dec 2024 10:48:18 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/vendors_onboarding_details/get_by_hostname/ipsam could not be found."
}
 

Request      

GET api/vendors_onboarding_details/get_by_hostname/{hostname}

URL Parameters

hostname  string  

The hostname of the vendor(specified in the vendor config)

Display a listing of the tag pickup locations or search by name, address or contact_number.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations?term=tenetur&per_page=6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations"
);

const params = {
    "term": "tenetur",
    "per_page": "6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor_id": 311,
            "station_id": 601,
            "cod_id": 4,
            "name": "Walker, Bruen and Lesch",
            "address": "532 Jonas Spur\nSouth Crystal, SC 34167",
            "contact_number": "(854) 575-1585",
            "updated_at": "2024-12-11T08:48:19.000000Z",
            "created_at": "2024-12-11T08:48:19.000000Z",
            "id": 201,
            "vendor": {
                "id": 311,
                "sm_company_id": 40,
                "name": "SMARTFLOWTECH",
                "address": "MOWE",
                "email": "business.intelligence@smartflowtech.com",
                "phone_number": "08130097920",
                "country": "Nigeria",
                "state": "Adamawa",
                "city": "Girei",
                "postcode": null,
                "products_sold": "PMS,AGO",
                "payment_type": "neque",
                "contact_person": "Ayodeji Alabi",
                "registration_number": "5678",
                "status": 1,
                "has_active_paga_account": null,
                "on_loyalty_program": 1,
                "created_at": "2024-09-10T16:29:18.000000Z",
                "updated_at": "2024-09-10T16:29:18.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 601,
                "sm_station_id": 366,
                "vendor_id": 215,
                "name": "MCPL PH",
                "address": "MCPL Portharcourt",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:29:27.000000Z",
                "updated_at": "2024-01-30T13:29:27.000000Z",
                "deleted_at": null
            }
        },
        {
            "vendor_id": 215,
            "station_id": 601,
            "cod_id": 6,
            "name": "Kuvalis-Hermiston",
            "address": "9648 Shemar Flat Suite 304\nCollinsstad, HI 10117-7061",
            "contact_number": "838-337-1888",
            "updated_at": "2024-12-11T08:48:21.000000Z",
            "created_at": "2024-12-11T08:48:21.000000Z",
            "id": 202,
            "vendor": {
                "id": 215,
                "sm_company_id": 42,
                "name": "BHN Logistics",
                "address": "sagamu",
                "email": "sourabh.sanganeria@tolaram.com",
                "phone_number": "08028268504",
                "country": "Nigeria",
                "state": "Lagos",
                "city": "Lagos",
                "postcode": null,
                "products_sold": "PMS, AGO",
                "payment_type": "neque",
                "contact_person": "Sourabh sanganeria",
                "registration_number": "1005",
                "status": 1,
                "has_active_paga_account": 0,
                "on_loyalty_program": 0,
                "created_at": "2023-02-16T11:23:28.000000Z",
                "updated_at": "2023-03-14T15:26:36.000000Z",
                "deleted_at": null,
                "se_company_id": null
            },
            "station": {
                "id": 601,
                "sm_station_id": 366,
                "vendor_id": 215,
                "name": "MCPL PH",
                "address": "MCPL Portharcourt",
                "postcode": null,
                "country": null,
                "state": null,
                "city": null,
                "email": null,
                "phone_number": null,
                "created_at": "2024-01-30T13:29:27.000000Z",
                "updated_at": "2024-01-30T13:29:27.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendors_tag_pickup_locations

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new tag pickup location

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 4,
    \"vendor_id\": 14,
    \"station_id\": 20,
    \"name\": \"ducimus\",
    \"address\": \"reiciendis\",
    \"cod_id\": 18,
    \"contact_number\": 15092826.16676
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 4,
    "vendor_id": 14,
    "station_id": 20,
    "name": "ducimus",
    "address": "reiciendis",
    "cod_id": 18,
    "contact_number": 15092826.16676
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 215,
        "station_id": 601,
        "cod_id": 2,
        "name": "Nader-Bayer",
        "address": "3414 Minnie Via\nBrodyfort, WY 89597-3079",
        "contact_number": "1-209-257-2580",
        "updated_at": "2024-12-11T08:48:24.000000Z",
        "created_at": "2024-12-11T08:48:24.000000Z",
        "id": 203,
        "vendor": {
            "id": 215,
            "sm_company_id": 42,
            "name": "BHN Logistics",
            "address": "sagamu",
            "email": "sourabh.sanganeria@tolaram.com",
            "phone_number": "08028268504",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Lagos",
            "postcode": null,
            "products_sold": "PMS, AGO",
            "payment_type": "neque",
            "contact_person": "Sourabh sanganeria",
            "registration_number": "1005",
            "status": 1,
            "has_active_paga_account": 0,
            "on_loyalty_program": 0,
            "created_at": "2023-02-16T11:23:28.000000Z",
            "updated_at": "2023-03-14T15:26:36.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 601,
            "sm_station_id": 366,
            "vendor_id": 215,
            "name": "MCPL PH",
            "address": "MCPL Portharcourt",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:29:27.000000Z",
            "updated_at": "2024-01-30T13:29:27.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/vendors_tag_pickup_locations

Body Parameters

company_id  integer optional  

vendor_id  integer  

station_id  integer  

name  string  

address  string  

cod_id  integer optional  

contact_number  number  

Show a specified tag pickup location.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 311,
        "station_id": 603,
        "cod_id": 3,
        "name": "Hirthe-Feest",
        "address": "8354 Bins Isle\nPort Newell, UT 88533",
        "contact_number": "475.543.5545",
        "updated_at": "2024-12-11T08:48:26.000000Z",
        "created_at": "2024-12-11T08:48:26.000000Z",
        "id": 204,
        "vendor": {
            "id": 311,
            "sm_company_id": 40,
            "name": "SMARTFLOWTECH",
            "address": "MOWE",
            "email": "business.intelligence@smartflowtech.com",
            "phone_number": "08130097920",
            "country": "Nigeria",
            "state": "Adamawa",
            "city": "Girei",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "Ayodeji Alabi",
            "registration_number": "5678",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 1,
            "created_at": "2024-09-10T16:29:18.000000Z",
            "updated_at": "2024-09-10T16:29:18.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 603,
            "sm_station_id": 360,
            "vendor_id": 215,
            "name": "SFT EXHIBITION",
            "address": "19 Royal Avenue lagos",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:31:08.000000Z",
            "updated_at": "2024-01-30T13:31:08.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/vendors_tag_pickup_locations/{id}

URL Parameters

id  integer  

The ID of the tag pickup location

Update the specified tag pickup location

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 19,
    \"vendor_id\": 18,
    \"station_id\": 8,
    \"name\": \"similique\",
    \"address\": \"voluptate\",
    \"cod_id\": 13,
    \"contact_number\": 1.810478
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 19,
    "vendor_id": 18,
    "station_id": 8,
    "name": "similique",
    "address": "voluptate",
    "cod_id": 13,
    "contact_number": 1.810478
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_id": 306,
        "station_id": 602,
        "cod_id": 9,
        "name": "Kshlerin-Ledner",
        "address": "3248 Zulauf Terrace Suite 403\nKennedifort, NV 85067-1031",
        "contact_number": "(602) 812-2234",
        "updated_at": "2024-12-11T08:48:29.000000Z",
        "created_at": "2024-12-11T08:48:29.000000Z",
        "id": 205,
        "vendor": {
            "id": 306,
            "sm_company_id": 299,
            "name": "SmartFlow Test",
            "address": "Ikeja",
            "email": "Smartflow@test.com",
            "phone_number": "08889995641",
            "country": "Nigeria",
            "state": "Lagos",
            "city": "Ikeja",
            "postcode": null,
            "products_sold": "PMS,AGO",
            "payment_type": "neque",
            "contact_person": "QA Test",
            "registration_number": "10000",
            "status": 1,
            "has_active_paga_account": null,
            "on_loyalty_program": 0,
            "created_at": "2024-01-25T14:22:40.000000Z",
            "updated_at": "2024-01-25T14:22:40.000000Z",
            "deleted_at": null,
            "se_company_id": null
        },
        "station": {
            "id": 602,
            "sm_station_id": 364,
            "vendor_id": 215,
            "name": "Mcpl Mowes",
            "address": "Mowe",
            "postcode": null,
            "country": null,
            "state": null,
            "city": null,
            "email": null,
            "phone_number": null,
            "created_at": "2024-01-30T13:29:49.000000Z",
            "updated_at": "2024-01-30T13:29:49.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/vendors_tag_pickup_locations/{id}

PATCH api/vendors_tag_pickup_locations/{id}

URL Parameters

id  integer  

The ID of the tag pickup location

Body Parameters

company_id  integer optional  

vendor_id  integer  

station_id  integer  

name  string  

address  string  

cod_id  integer optional  

contact_number  number  

Delete a tag pickup location

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendors_tag_pickup_locations/{id}

URL Parameters

id  integer  

The ID of the tag pickup location

Get tag pickup location by vendor hostname

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/get_by_hostname/accusamus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/get_by_hostname/accusamus"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=QidFUe0ToqLzMfgSGDC3RiBwwbH8DsnQ6qC0lMjc; expires=Wed, 11 Dec 2024 10:48:31 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "The route api/vendors_tag_pickup_locations/get_by_hostname/accusamus could not be found."
}
 

Request      

GET api/vendors_tag_pickup_locations/get_by_hostname/{hostname}

URL Parameters

hostname  string  

The hostname of the vendor(specified in the vendor config)

Vendor Endpoints

Display a listing of the vendor app configurations by hostname

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_app_config?hostname=quia" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_config"
);

const params = {
    "hostname": "quia",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "hostname": "legros.biz",
            "logo_path": "https://via.placeholder.com/640x480.png/0055cc?text=perferendis",
            "app_name": "Kunze-Weber",
            "app_name_font_size": 68,
            "app_header_color": "#00ff77",
            "app_body_color": "#001100",
            "menu_header_color": "#001144",
            "menu_body_color": "#003311",
            "loyalty_reward_percentage": 1,
            "loyalty_min_purchase_amount": 9,
            "loyalty_min_point": 2,
            "status": null
        },
        {
            "hostname": "bauch.com",
            "logo_path": "https://via.placeholder.com/640x480.png/00ddcc?text=incidunt",
            "app_name": "Dietrich, Harvey and Marquardt",
            "app_name_font_size": 45,
            "app_header_color": "#0000bb",
            "app_body_color": "#00ccbb",
            "menu_header_color": "#005533",
            "menu_body_color": "#00ffcc",
            "loyalty_reward_percentage": 3,
            "loyalty_min_purchase_amount": 2,
            "loyalty_min_point": 1,
            "status": null
        }
    ]
}
 

Request      

GET api/vendor_app_config

Query Parameters

hostname  string optional  

Search query parameter

Display a listing of the vendor user or search by name, phone number, email, card last four digits, vendor name.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_users?vendor_id=4&per_page=8&term=fugit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users"
);

const params = {
    "vendor_id": "4",
    "per_page": "8",
    "term": "fugit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "title": "Prof.",
            "name": "Martina Herzog",
            "email": "hettie.muller@example.com",
            "phone": "617.499.6351",
            "avatar": "https://via.placeholder.com/200x200.png/005555?text=avatar+maiores",
            "username": "shields.cindy",
            "gender": "Female",
            "newsletter": false,
            "active": true,
            "card_brand": "Visa",
            "card_last_four": "1221",
            "is_vendor": false,
            "is_admin": false,
            "updated_at": "2024-12-11T08:41:06.000000Z",
            "created_at": "2024-12-11T08:41:06.000000Z",
            "id": 502,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 4,
                    "name": "delete"
                },
                {
                    "id": 15,
                    "name": "update company group"
                },
                {
                    "id": 25,
                    "name": "view user"
                },
                {
                    "id": 59,
                    "name": "restore user"
                },
                {
                    "id": 74,
                    "name": "destination_allocation update"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        },
        {
            "title": "Dr.",
            "name": "Dr. Elissa Gulgowski",
            "email": "narciso.brown@example.org",
            "phone": "478.809.7171",
            "avatar": "https://via.placeholder.com/200x200.png/00ee00?text=avatar+et",
            "username": "thelma.grady",
            "gender": "Male",
            "newsletter": true,
            "active": true,
            "card_brand": "MasterCard",
            "card_last_four": "9948",
            "is_vendor": true,
            "is_admin": false,
            "updated_at": "2024-12-11T08:41:07.000000Z",
            "created_at": "2024-12-11T08:41:07.000000Z",
            "id": 503,
            "companies": [],
            "vendors": [],
            "bankAccount": null,
            "permissions": [
                {
                    "id": 16,
                    "name": "delete company group"
                },
                {
                    "id": 18,
                    "name": "create cost center"
                },
                {
                    "id": 21,
                    "name": "view fleet"
                },
                {
                    "id": 36,
                    "name": "delete pos"
                },
                {
                    "id": 73,
                    "name": "destination_allocation create"
                }
            ],
            "costCenters": [],
            "roles": [],
            "stations": [],
            "wallet_details": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_users

Query Parameters

vendor_id  integer  

The ID of the vendor

per_page  integer optional  

Items per page

term  string optional  

Search query parameter

Create a new vendor user

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_users?vendor_id=13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sint\",
    \"phone\": 587035268.250528,
    \"email\": \"tanderson@example.org\",
    \"username\": \"labore\",
    \"gender\": \"asperiores\",
    \"newsletter\": false,
    \"active\": false,
    \"is_admin\": true,
    \"is_vendor\": false,
    \"suspended\": true,
    \"vendors\": [
        8
    ],
    \"companies\": [
        4
    ],
    \"cost_centers\": [
        5
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users"
);

const params = {
    "vendor_id": "13",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sint",
    "phone": 587035268.250528,
    "email": "tanderson@example.org",
    "username": "labore",
    "gender": "asperiores",
    "newsletter": false,
    "active": false,
    "is_admin": true,
    "is_vendor": false,
    "suspended": true,
    "vendors": [
        8
    ],
    "companies": [
        4
    ],
    "cost_centers": [
        5
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Miss",
        "name": "Domenica Kozey",
        "email": "jordon63@example.org",
        "phone": "+1 (228) 831-8912",
        "avatar": "https://via.placeholder.com/200x200.png/0044cc?text=avatar+rerum",
        "username": "wilderman.laurence",
        "gender": "Male",
        "newsletter": true,
        "active": true,
        "card_brand": "MasterCard",
        "card_last_four": "5815",
        "is_vendor": true,
        "is_admin": true,
        "updated_at": "2024-12-11T08:41:13.000000Z",
        "created_at": "2024-12-11T08:41:13.000000Z",
        "id": 504,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 8,
                "name": "delete acl"
            },
            {
                "id": 10,
                "name": "create company"
            },
            {
                "id": 11,
                "name": "update company"
            },
            {
                "id": 26,
                "name": "create user"
            },
            {
                "id": 51,
                "name": "view vendor"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

POST api/vendor_users

Query Parameters

vendor_id  integer  

The ID of the vendor

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Show a specified vendor user.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_users/18?vendor_id=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/18"
);

const params = {
    "vendor_id": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "title": "Mr.",
        "name": "Matteo Kertzmann",
        "email": "libby.ondricka@example.org",
        "phone": "+1-385-973-2869",
        "avatar": "https://via.placeholder.com/200x200.png/00cc00?text=avatar+id",
        "username": "eleonore86",
        "gender": "Female",
        "newsletter": false,
        "active": true,
        "card_brand": "MasterCard",
        "card_last_four": "0901",
        "is_vendor": true,
        "is_admin": false,
        "updated_at": "2024-12-11T08:41:17.000000Z",
        "created_at": "2024-12-11T08:41:17.000000Z",
        "id": 505,
        "companies": [],
        "vendors": [],
        "bankAccount": null,
        "permissions": [
            {
                "id": 12,
                "name": "delete company"
            },
            {
                "id": 23,
                "name": "update fleet"
            },
            {
                "id": 39,
                "name": "view user wallet"
            },
            {
                "id": 43,
                "name": "fund user wallet"
            },
            {
                "id": 75,
                "name": "destination_allocation delete"
            }
        ],
        "costCenters": [],
        "roles": [],
        "stations": [],
        "wallet_details": null
    }
}
 

Request      

GET api/vendor_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

vendor_id  integer  

The ID of the vendor

Update the specified vendor user without detaching the user from other vendors

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/20?vendor_id=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"voluptas\",
    \"phone\": 100165.33,
    \"email\": \"tkuhic@example.org\",
    \"username\": \"aut\",
    \"gender\": \"est\",
    \"newsletter\": true,
    \"active\": true,
    \"is_admin\": false,
    \"is_vendor\": true,
    \"suspended\": false,
    \"vendors\": [
        10
    ],
    \"companies\": [
        16
    ],
    \"cost_centers\": [
        12
    ]
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/20"
);

const params = {
    "vendor_id": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "voluptas",
    "phone": 100165.33,
    "email": "tkuhic@example.org",
    "username": "aut",
    "gender": "est",
    "newsletter": true,
    "active": true,
    "is_admin": false,
    "is_vendor": true,
    "suspended": false,
    "vendors": [
        10
    ],
    "companies": [
        16
    ],
    "cost_centers": [
        12
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Armstrong PLC",
        "email": "crist.charles@adams.com",
        "phone_number": "+1-351-521-7508",
        "country": "Bangladesh",
        "state": "Nevada",
        "city": "Loweborough",
        "postcode": "54530-5547",
        "address": "601 Earnestine Manors Suite 557",
        "registration_number": "RC-853273",
        "contact_person": "Aubrey Zulauf",
        "sm_company_id": 9,
        "products_sold": "LPG",
        "payment_type": "perferendis",
        "status": false,
        "has_active_paga_account": false,
        "updated_at": "2024-12-11T08:41:21.000000Z",
        "created_at": "2024-12-11T08:41:21.000000Z",
        "id": 320,
        "vendor_additional_details": null,
        "bank_accounts": null,
        "wallet_details": null,
        "app_config": null,
        "paga_details": null,
        "groups": []
    }
}
 

Request      

PUT api/vendor_users/{user_id}

PATCH api/vendor_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

vendor_id  integer  

The ID of the vendor

Body Parameters

name  string  

title  string optional  

phone  number  

email  string  

Must be a valid email address.

username  string optional  

gender  string optional  

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

suspended  boolean optional  

vendors  integer[] optional  

companies  integer[] optional  

cost_centers  integer[] optional  

Detach a user from a vendor

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/14?vendor_id=2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_users/14"
);

const params = {
    "vendor_id": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

vendor_id  integer  

The ID of the vendor

Display a listing of the groups or search by name, code.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/groups?term=nihil&per_page=8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/groups"
);

const params = {
    "term": "nihil",
    "per_page": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "name": "Rosemary Abshire",
            "description": "Sapiente et consectetur omnis nihil.",
            "active": true,
            "updated_at": "2024-12-11T08:42:28.000000Z",
            "created_at": "2024-12-11T08:42:28.000000Z",
            "id": 105,
            "vendors": []
        },
        {
            "name": "Prof. Wilfredo Bechtelar Jr.",
            "description": "Ex ratione iusto sed laudantium ut et aut.",
            "active": false,
            "updated_at": "2024-12-11T08:42:28.000000Z",
            "created_at": "2024-12-11T08:42:28.000000Z",
            "id": 106,
            "vendors": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/groups

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new group

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/groups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"rerum\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/groups"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "rerum",
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Asha Murphy IV",
        "description": "Occaecati unde architecto sequi labore distinctio.",
        "active": true,
        "updated_at": "2024-12-11T08:42:30.000000Z",
        "created_at": "2024-12-11T08:42:30.000000Z",
        "id": 107,
        "vendors": []
    }
}
 

Request      

POST api/groups

Body Parameters

name  string  

description  string optional  

active  boolean optional  

Show a specified group.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/groups/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/groups/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Mrs. Esperanza Kling",
        "description": "Aliquam eius fugiat non sunt est officia.",
        "active": false,
        "updated_at": "2024-12-11T08:42:32.000000Z",
        "created_at": "2024-12-11T08:42:32.000000Z",
        "id": 108,
        "vendors": []
    }
}
 

Request      

GET api/groups/{id}

URL Parameters

id  integer  

The ID of the group

Update the specified group

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/groups/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"doloribus\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/groups/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "doloribus",
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Soledad Heaney",
        "description": "Enim cupiditate in in sunt sit non.",
        "active": true,
        "updated_at": "2024-12-11T08:42:34.000000Z",
        "created_at": "2024-12-11T08:42:34.000000Z",
        "id": 109,
        "vendors": []
    }
}
 

Request      

PUT api/groups/{id}

PATCH api/groups/{id}

URL Parameters

id  integer  

The ID of the group

Body Parameters

name  string  

description  string optional  

active  boolean optional  

Delete a group

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/groups/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/groups/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "name": "Letha Powlowski",
        "description": "Suscipit sint ab enim et quisquam neque voluptatem illo.",
        "active": true,
        "updated_at": "2024-12-11T08:42:35.000000Z",
        "created_at": "2024-12-11T08:42:35.000000Z",
        "id": 110,
        "vendors": []
    }
}
 

Request      

DELETE api/groups/{id}

URL Parameters

id  integer  

The ID of the group

Display a listing of the vendors or search by name, phone number, email, address, state, country.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors?term=qui&per_page=8&status=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors"
);

const params = {
    "term": "qui",
    "per_page": "8",
    "status": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "vendor_additional_details": null,
            "bank_accounts": null,
            "wallet_details": null,
            "app_config": null,
            "paga_details": null,
            "groups": []
        },
        {
            "vendor_additional_details": null,
            "bank_accounts": null,
            "wallet_details": null,
            "app_config": null,
            "paga_details": null,
            "groups": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendors

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

status  integer optional  

check for Vendor status

Create a new vendor

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendors" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sm_company_id\": 8,
    \"se_company_id\": 17,
    \"name\": \"error\",
    \"address\": \"vel\",
    \"phone_number\": 60799605.65334,
    \"email\": \"repudiandae\",
    \"country\": \"necessitatibus\",
    \"state\": \"quasi\",
    \"city\": \"repellendus\",
    \"registration_number\": \"at\",
    \"contact_person\": \"magni\",
    \"products_sold\": \"aut\",
    \"payment_type\": \"voluptas\",
    \"has_active_paga_account\": true,
    \"status\": true,
    \"on_loyalty_program\": false,
    \"create_wallet\": true,
    \"group_id\": 10
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sm_company_id": 8,
    "se_company_id": 17,
    "name": "error",
    "address": "vel",
    "phone_number": 60799605.65334,
    "email": "repudiandae",
    "country": "necessitatibus",
    "state": "quasi",
    "city": "repellendus",
    "registration_number": "at",
    "contact_person": "magni",
    "products_sold": "aut",
    "payment_type": "voluptas",
    "has_active_paga_account": true,
    "status": true,
    "on_loyalty_program": false,
    "create_wallet": true,
    "group_id": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_additional_details": null,
        "bank_accounts": null,
        "wallet_details": null,
        "app_config": null,
        "paga_details": null,
        "groups": []
    }
}
 

Request      

POST api/vendors

Body Parameters

sm_company_id  integer optional  

se_company_id  integer optional  

name  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

country  string  

state  string  

city  string optional  

registration_number  string  

contact_person  string  

products_sold  string optional  

payment_type  string optional  

has_active_paga_account  boolean optional  

status  boolean optional  

on_loyalty_program  boolean optional  

create_wallet  boolean optional  

group_id  integer optional  

Show a specified vendor.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendors/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_additional_details": null,
        "bank_accounts": null,
        "wallet_details": null,
        "app_config": null,
        "paga_details": null,
        "groups": []
    }
}
 

Request      

GET api/vendors/{id}

URL Parameters

id  integer  

The ID of the vendor

Update the specified vendor

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendors/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sm_company_id\": 16,
    \"se_company_id\": 20,
    \"name\": \"nostrum\",
    \"address\": \"ut\",
    \"phone_number\": 434533074.51,
    \"email\": \"fuga\",
    \"country\": \"aut\",
    \"state\": \"unde\",
    \"city\": \"iusto\",
    \"registration_number\": \"iusto\",
    \"contact_person\": \"et\",
    \"products_sold\": \"qui\",
    \"payment_type\": \"temporibus\",
    \"has_active_paga_account\": false,
    \"status\": true,
    \"on_loyalty_program\": true,
    \"create_wallet\": false,
    \"group_id\": 11
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sm_company_id": 16,
    "se_company_id": 20,
    "name": "nostrum",
    "address": "ut",
    "phone_number": 434533074.51,
    "email": "fuga",
    "country": "aut",
    "state": "unde",
    "city": "iusto",
    "registration_number": "iusto",
    "contact_person": "et",
    "products_sold": "qui",
    "payment_type": "temporibus",
    "has_active_paga_account": false,
    "status": true,
    "on_loyalty_program": true,
    "create_wallet": false,
    "group_id": 11
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "vendor_additional_details": null,
        "bank_accounts": null,
        "wallet_details": null,
        "app_config": null,
        "paga_details": null,
        "groups": []
    }
}
 

Request      

PUT api/vendors/{id}

PATCH api/vendors/{id}

URL Parameters

id  integer  

The ID of the vendor

Body Parameters

sm_company_id  integer optional  

se_company_id  integer optional  

name  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

country  string  

state  string  

city  string optional  

registration_number  string  

contact_person  string  

products_sold  string optional  

payment_type  string optional  

has_active_paga_account  boolean optional  

status  boolean optional  

on_loyalty_program  boolean optional  

create_wallet  boolean optional  

group_id  integer optional  

Delete a vendor

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendors/4" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendors/4"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendors/{id}

URL Parameters

id  integer  

The ID of the vendor

Display a listing of the vendor companies or search by partnership code, status

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_companies?per_page=7&term=assumenda&vendor_id=est&company_id=placeat" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies"
);

const params = {
    "per_page": "7",
    "term": "assumenda",
    "vendor_id": "est",
    "company_id": "placeat",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "status": "Partnership Declined",
            "partnership_code": "7993082",
            "active": true,
            "partnership_ppv_mode": null,
            "pms_ppv": "07",
            "ago_ppv": "36",
            "discount_mode": "MONETARY_VALUE_DISCOUNT",
            "vendor": null,
            "company": null
        },
        {
            "status": "In Partnership",
            "partnership_code": "4250173",
            "active": true,
            "partnership_ppv_mode": "CUSTOM",
            "pms_ppv": "05",
            "ago_ppv": "66",
            "discount_mode": null,
            "vendor": null,
            "company": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_companies

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

vendor_id  string optional  

Search query parameter

company_id  string optional  

Search query parameter

Create a new vendor company

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 12,
    \"vendor_id\": 14,
    \"status\": \"ratione\",
    \"partnership_code\": \"dolores\",
    \"active\": false,
    \"partnership_ppv_mode\": \"consequatur\",
    \"pms_ppv\": \"deserunt\",
    \"ago_ppv\": \"perspiciatis\",
    \"discount_mode\": \"perferendis\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 12,
    "vendor_id": 14,
    "status": "ratione",
    "partnership_code": "dolores",
    "active": false,
    "partnership_ppv_mode": "consequatur",
    "pms_ppv": "deserunt",
    "ago_ppv": "perspiciatis",
    "discount_mode": "perferendis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "status": "Partnership Declined",
        "partnership_code": "9662397",
        "active": true,
        "partnership_ppv_mode": "CUSTOM",
        "pms_ppv": "54",
        "ago_ppv": "28",
        "discount_mode": "MONETARY_VALUE_DISCOUNT",
        "vendor": null,
        "company": null
    }
}
 

Request      

POST api/vendor_companies

Body Parameters

company_id  integer  

vendor_id  integer optional  

status  string  

partnership_code  string optional  

active  boolean optional  

partnership_ppv_mode  string  

pms_ppv  string optional  

ago_ppv  string optional  

discount_mode  string optional  

Show a specified vendor company.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_companies/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "status": "In Partnership",
        "partnership_code": "5850850",
        "active": true,
        "partnership_ppv_mode": "CUSTOM",
        "pms_ppv": "33",
        "ago_ppv": "98",
        "discount_mode": "MONETARY_VALUE_DISCOUNT",
        "vendor": null,
        "company": null
    }
}
 

Request      

GET api/vendor_companies/{id}

URL Parameters

id  integer  

The ID of the vendor company

Update the specified vendor company

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 12,
    \"vendor_id\": 18,
    \"status\": \"id\",
    \"partnership_code\": \"dolorem\",
    \"active\": true,
    \"partnership_ppv_mode\": \"laudantium\",
    \"pms_ppv\": \"tempora\",
    \"ago_ppv\": \"et\",
    \"discount_mode\": \"ipsum\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "company_id": 12,
    "vendor_id": 18,
    "status": "id",
    "partnership_code": "dolorem",
    "active": true,
    "partnership_ppv_mode": "laudantium",
    "pms_ppv": "tempora",
    "ago_ppv": "et",
    "discount_mode": "ipsum"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "status": "Partnership Declined",
        "partnership_code": "9797450",
        "active": true,
        "partnership_ppv_mode": "CUSTOM",
        "pms_ppv": "39",
        "ago_ppv": "49",
        "discount_mode": "MONETARY_VALUE_DISCOUNT",
        "vendor": null,
        "company": null
    }
}
 

Request      

PUT api/vendor_companies/{id}

PATCH api/vendor_companies/{id}

URL Parameters

id  integer  

The ID of the vendor company

Body Parameters

company_id  integer  

vendor_id  integer optional  

status  string  

partnership_code  string optional  

active  boolean optional  

partnership_ppv_mode  string  

pms_ppv  string optional  

ago_ppv  string optional  

discount_mode  string optional  

Delete a vendor company

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_companies/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_companies/{id}

URL Parameters

id  integer  

The ID of the vendor company

Display a listing of the vendor application configurations or search by app name, hostname

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs?per_page=9&term=possimus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs"
);

const params = {
    "per_page": "9",
    "term": "possimus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "hostname": "schimmel.com",
            "logo_path": "https://via.placeholder.com/640x480.png/0011cc?text=natus",
            "app_name": "Stiedemann, Weimann and Oberbrunner",
            "app_name_font_size": 69,
            "app_header_color": "#0022ee",
            "app_body_color": "#0033ee",
            "menu_header_color": "#005588",
            "menu_body_color": "#0055bb",
            "loyalty_reward_percentage": 7,
            "loyalty_min_purchase_amount": 6,
            "loyalty_min_point": 4,
            "status": null
        },
        {
            "hostname": "smith.com",
            "logo_path": "https://via.placeholder.com/640x480.png/0022ee?text=aspernatur",
            "app_name": "Christiansen Inc",
            "app_name_font_size": 98,
            "app_header_color": "#0033dd",
            "app_body_color": "#006622",
            "menu_header_color": "#008899",
            "menu_body_color": "#0077cc",
            "loyalty_reward_percentage": 5,
            "loyalty_min_purchase_amount": 7,
            "loyalty_min_point": 1,
            "status": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_app_configs

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

Create a new vendor application configuration

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "vendor_id=4" \
    --form "hostname=http://reilly.com/et-quam-excepturi-ex-dolor-porro-est-fugit" \
    --form "app_name=veniam" \
    --form "app_name_font_size=11143121.8" \
    --form "app_header_color=impedit" \
    --form "app_body_color=praesentium" \
    --form "menu_header_color=rerum" \
    --form "menu_body_color=fugiat" \
    --form "status=et" \
    --form "logo_path=@/tmp/phpC0vtiE" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('vendor_id', '4');
body.append('hostname', 'http://reilly.com/et-quam-excepturi-ex-dolor-porro-est-fugit');
body.append('app_name', 'veniam');
body.append('app_name_font_size', '11143121.8');
body.append('app_header_color', 'impedit');
body.append('app_body_color', 'praesentium');
body.append('menu_header_color', 'rerum');
body.append('menu_body_color', 'fugiat');
body.append('status', 'et');
body.append('logo_path', document.querySelector('input[name="logo_path"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hostname": "little.org",
        "logo_path": "https://via.placeholder.com/640x480.png/002288?text=facere",
        "app_name": "Baumbach LLC",
        "app_name_font_size": 35,
        "app_header_color": "#00aaff",
        "app_body_color": "#000011",
        "menu_header_color": "#006633",
        "menu_body_color": "#001133",
        "loyalty_reward_percentage": 2,
        "loyalty_min_purchase_amount": 4,
        "loyalty_min_point": 9,
        "status": null
    }
}
 

Request      

POST api/vendor_app_configs

Body Parameters

vendor_id  integer optional  

hostname  string  

Must be a valid URL.

logo_path  file optional  

Must be an image.

app_name  string  

app_name_font_size  number optional  

app_header_color  string optional  

app_body_color  string optional  

menu_header_color  string optional  

menu_body_color  string optional  

status  string optional  

loyalty_reward_percentage  string optional  

loyalty_min_purchase_amount  string optional  

loyalty_min_point  string optional  

Show a specified vendor application configuration.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hostname": "damore.com",
        "logo_path": "https://via.placeholder.com/640x480.png/008855?text=ad",
        "app_name": "Gulgowski Ltd",
        "app_name_font_size": 66,
        "app_header_color": "#0011aa",
        "app_body_color": "#005544",
        "menu_header_color": "#001166",
        "menu_body_color": "#00ddff",
        "loyalty_reward_percentage": 4,
        "loyalty_min_purchase_amount": 4,
        "loyalty_min_point": 3,
        "status": null
    }
}
 

Request      

GET api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Update the specified vendor application configuration

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "vendor_id=18" \
    --form "hostname=http://www.klocko.com/enim-velit-consectetur-aut.html" \
    --form "app_name=quia" \
    --form "app_name_font_size=205625683.14574" \
    --form "app_header_color=voluptatem" \
    --form "app_body_color=quam" \
    --form "menu_header_color=commodi" \
    --form "menu_body_color=asperiores" \
    --form "status=perspiciatis" \
    --form "logo_path=@/tmp/phpFCN20q" 
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('vendor_id', '18');
body.append('hostname', 'http://www.klocko.com/enim-velit-consectetur-aut.html');
body.append('app_name', 'quia');
body.append('app_name_font_size', '205625683.14574');
body.append('app_header_color', 'voluptatem');
body.append('app_body_color', 'quam');
body.append('menu_header_color', 'commodi');
body.append('menu_body_color', 'asperiores');
body.append('status', 'perspiciatis');
body.append('logo_path', document.querySelector('input[name="logo_path"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hostname": "grant.com",
        "logo_path": "https://via.placeholder.com/640x480.png/0000bb?text=odit",
        "app_name": "Koch Inc",
        "app_name_font_size": 77,
        "app_header_color": "#009900",
        "app_body_color": "#00bbdd",
        "menu_header_color": "#00dd99",
        "menu_body_color": "#0077aa",
        "loyalty_reward_percentage": 6,
        "loyalty_min_purchase_amount": 3,
        "loyalty_min_point": 7,
        "status": null
    }
}
 

Request      

PUT api/vendor_app_configs/{id}

PATCH api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Body Parameters

vendor_id  integer optional  

hostname  string  

Must be a valid URL.

logo_path  file optional  

Must be an image.

app_name  string  

app_name_font_size  number optional  

app_header_color  string optional  

app_body_color  string optional  

menu_header_color  string optional  

menu_body_color  string optional  

status  string optional  

loyalty_reward_percentage  string optional  

loyalty_min_purchase_amount  string optional  

loyalty_min_point  string optional  

Delete a vendor application configuration

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Display a list of the vendor banking details or search by account number, bank name, account name, paystack ID, paystack sub-account code

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts?per_page=15&term=ad" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts"
);

const params = {
    "per_page": "15",
    "term": "ad",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "account_number": "BR6147156278869100486057440A1",
            "bank_name": "Armstrong, Flatley and Oberbrunner",
            "account_name": "Kris, Feest and Nicolas",
            "paystack_id": 1,
            "paystack_subaccount_code": "ACCT_060766369",
            "payment_mode": null,
            "merchantcodes": "978988397196",
            "active": false,
            "vendor": null
        },
        {
            "account_number": "HU39488139935387002850175492",
            "bank_name": "Larson-Beer",
            "account_name": "Nitzsche LLC",
            "paystack_id": 6,
            "paystack_subaccount_code": "ACCT_034162098",
            "payment_mode": "paystack",
            "merchantcodes": "616669187293",
            "active": true,
            "vendor": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_bank_accounts

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

Create a new vendor banking details

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 4,
    \"account_number\": 6133.37,
    \"bank_name\": \"tempora\",
    \"account_name\": \"quam\",
    \"paystack_id\": 1391,
    \"paystack_subaccount_code\": \"itaque\",
    \"payment_mode\": \"paystack\",
    \"merchantcodes\": \"libero\",
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 4,
    "account_number": 6133.37,
    "bank_name": "tempora",
    "account_name": "quam",
    "paystack_id": 1391,
    "paystack_subaccount_code": "itaque",
    "payment_mode": "paystack",
    "merchantcodes": "libero",
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "account_number": "FR205227567340P89493W617D46",
        "bank_name": "Hand Inc",
        "account_name": "Funk-Dare",
        "paystack_id": 3,
        "paystack_subaccount_code": "ACCT_682758667",
        "payment_mode": "paystack",
        "merchantcodes": "145479097316",
        "active": true,
        "vendor": null
    }
}
 

Request      

POST api/vendor_bank_accounts

Body Parameters

vendor_id  integer optional  

account_number  number  

bank_name  string  

account_name  string  

paystack_id  number optional  

paystack_subaccount_code  string optional  

payment_mode  string optional  

Must be one of paystack, paga, or others.

merchantcodes  string optional  

active  boolean optional  

Show a specified vendor banking details.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/3?vendor_id=3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/3"
);

const params = {
    "vendor_id": "3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "account_number": "HU08478433934417307575462990",
        "bank_name": "Parker PLC",
        "account_name": "Adams-Skiles",
        "paystack_id": 8,
        "paystack_subaccount_code": "ACCT_019617366",
        "payment_mode": "paystack",
        "merchantcodes": "525867909412",
        "active": true,
        "vendor": null
    }
}
 

Request      

GET api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

Query Parameters

vendor_id  integer optional  

optional The ID of the vendor

Update the specified vendor banking details

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 5,
    \"account_number\": 1.5,
    \"bank_name\": \"impedit\",
    \"account_name\": \"voluptatum\",
    \"paystack_id\": 148.73,
    \"paystack_subaccount_code\": \"nostrum\",
    \"payment_mode\": \"paystack\",
    \"merchantcodes\": \"doloribus\",
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 5,
    "account_number": 1.5,
    "bank_name": "impedit",
    "account_name": "voluptatum",
    "paystack_id": 148.73,
    "paystack_subaccount_code": "nostrum",
    "payment_mode": "paystack",
    "merchantcodes": "doloribus",
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "account_number": "IS767976492459332699964419",
        "bank_name": "Morissette and Sons",
        "account_name": "Littel-Quigley",
        "paystack_id": 9,
        "paystack_subaccount_code": "ACCT_419050603",
        "payment_mode": null,
        "merchantcodes": "602002212187",
        "active": true,
        "vendor": null
    }
}
 

Request      

PUT api/vendor_bank_accounts/{id}

PATCH api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

Body Parameters

vendor_id  integer optional  

account_number  number  

bank_name  string  

account_name  string  

paystack_id  number optional  

paystack_subaccount_code  string optional  

payment_mode  string optional  

Must be one of paystack, paga, or others.

merchantcodes  string optional  

active  boolean optional  

Delete a vendor banking details

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

Display a listing of the vendor Paga details

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials?per_page=12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials"
);

const params = {
    "per_page": "12",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "hmac": "dd5d0b60-ed88-34e6-b787-293dac53460d",
            "secret_key": "f9466289-12ee-3af8-9a57-ef9c3dda76ac",
            "public_key": "1918502a-be8d-35dc-ae2d-1513e95f1e41",
            "active": true
        },
        {
            "hmac": "f9c4fa59-2ea2-3a96-8de8-ec62527a0a21",
            "secret_key": "c8400bb3-0114-3443-923f-7c27862d8576",
            "public_key": "2c123147-85f4-3257-b5db-21c4d0bad164",
            "active": true
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_paga_credentials

Query Parameters

per_page  integer optional  

items per page

Create a new vendor Paga credential

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 20,
    \"hmac\": \"alias\",
    \"secret_key\": \"odit\",
    \"public_key\": \"officia\",
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 20,
    "hmac": "alias",
    "secret_key": "odit",
    "public_key": "officia",
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hmac": "b07bc52a-62c2-3fe2-9ea9-10b5f99cb5b3",
        "secret_key": "ce8f6074-77f3-3e78-81b7-aba1296807b9",
        "public_key": "6f863014-51a9-3517-953a-4c5fad8b3f31",
        "active": true
    }
}
 

Request      

POST api/vendor_paga_credentials

Body Parameters

vendor_id  integer optional  

hmac  string optional  

secret_key  string  

public_key  string  

active  boolean optional  

Show a specified vendor Paga credential.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hmac": "2ea561b5-7426-3dc1-828a-0440c76d8ebb",
        "secret_key": "6fc680a5-53bb-3de8-b15d-01d1de257ec6",
        "public_key": "6a91f720-748c-3f9d-90b2-cc14a5b73608",
        "active": true
    }
}
 

Request      

GET api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor Paga credential

Update the specified vendor Paga credential

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/19" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 5,
    \"hmac\": \"sequi\",
    \"secret_key\": \"non\",
    \"public_key\": \"repellat\",
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 5,
    "hmac": "sequi",
    "secret_key": "non",
    "public_key": "repellat",
    "active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "hmac": "bd36e7fc-7309-39c6-8d50-b819182f7ee9",
        "secret_key": "e51c7a48-9e11-332e-9c42-88608e965d1b",
        "public_key": "93c28f76-d48d-3265-8d68-35a77018b742",
        "active": true
    }
}
 

Request      

PUT api/vendor_paga_credentials/{id}

PATCH api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor Paga credential

Body Parameters

vendor_id  integer optional  

hmac  string optional  

secret_key  string  

public_key  string  

active  boolean optional  

Delete a vendor Paga credential

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor paga credential

Display a listing of the vendor assign delivery stations or search by station name

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations?per_page=3&term=in" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations"
);

const params = {
    "per_page": "3",
    "term": "in",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "station_id": 602,
            "user_id": 441,
            "station_name": "Mcpl Mowes"
        },
        {
            "station_id": 601,
            "user_id": 354,
            "station_name": "MCPL PH"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_assigned_delivery_stations

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

Create a new vendor assigned delivery station

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 4,
    \"station_id\": 10,
    \"user_id\": 3,
    \"station_name\": \"laborum\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 4,
    "station_id": 10,
    "user_id": 3,
    "station_name": "laborum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "station_id": 601,
        "user_id": 290,
        "station_name": "MCPL PH"
    }
}
 

Request      

POST api/vendor_assigned_delivery_stations

Body Parameters

vendor_id  integer optional  

station_id  integer  

user_id  integer optional  

station_name  string  

Show a specified vendor assigned delivery station.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "station_id": 603,
        "user_id": 231,
        "station_name": "SFT EXHIBITION"
    }
}
 

Request      

GET api/vendor_assigned_delivery_stations/{id}

URL Parameters

id  integer  

The ID of the vendor assigned delivery station

Update the specified vendor assigned delivery station

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 19,
    \"station_id\": 16,
    \"user_id\": 10,
    \"station_name\": \"et\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 19,
    "station_id": 16,
    "user_id": 10,
    "station_name": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "station_id": 603,
        "user_id": 364,
        "station_name": "SFT EXHIBITION"
    }
}
 

Request      

PUT api/vendor_assigned_delivery_stations/{id}

PATCH api/vendor_assigned_delivery_stations/{id}

URL Parameters

id  integer  

The ID of the vendor assigned delivery station

Body Parameters

vendor_id  integer optional  

station_id  integer  

user_id  integer optional  

station_name  string  

Delete a vendor assigned delivery station

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_assigned_delivery_stations/{id}

URL Parameters

id  integer  

The ID of the vendor assigned delivery station

Display a listing of the vendor wallets

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_wallets?per_page=9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets"
);

const params = {
    "per_page": "9",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "current_balance": 3.822,
            "current_credit_limit": 3643941.65104,
            "active": true
        },
        {
            "current_balance": 6264.424615192,
            "current_credit_limit": 10508.606,
            "active": true
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/vendor_wallets

Query Parameters

per_page  integer optional  

Items per page

Create a new vendor wallet

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 7,
    \"current_balance\": 290943.88085,
    \"current_credit_limit\": 1036.2147,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 7,
    "current_balance": 290943.88085,
    "current_credit_limit": 1036.2147,
    "active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "current_balance": 0.63804074,
        "current_credit_limit": 6023531.60532226,
        "active": true
    }
}
 

Request      

POST api/vendor_wallets

Body Parameters

vendor_id  integer optional  

current_balance  number  

current_credit_limit  number  

active  boolean optional  

Show a specified vendor wallet.

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "current_balance": 3.842365,
        "current_credit_limit": 2.15895109,
        "active": true
    }
}
 

Request      

GET api/vendor_wallets/{id}

URL Parameters

id  integer  

The ID of the vendor wallet

Update the specified vendor wallet

requires authentication

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 14,
    \"current_balance\": 5.642033,
    \"current_credit_limit\": 628785.76145,
    \"active\": true
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 14,
    "current_balance": 5.642033,
    "current_credit_limit": 628785.76145,
    "active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "current_balance": 13.14,
        "current_credit_limit": 629797.80876,
        "active": true
    }
}
 

Request      

PUT api/vendor_wallets/{id}

PATCH api/vendor_wallets/{id}

URL Parameters

id  integer  

The ID of the vendor wallet

Body Parameters

vendor_id  integer optional  

current_balance  number  

current_credit_limit  number  

active  boolean optional  

Delete a vendor wallet

requires authentication

Example request:
curl --request DELETE \
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/vendor_wallets/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/vendor_wallets/{id}

URL Parameters

id  integer  

The ID of the vendor wallet

Attach a vendor to a group.

requires authentication

Note: Vendors within the same group will have access to each other's data according to their respective privileges. You need to generate an otp (api/issue_otp) to complete this action

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/attach_vendor_to_group" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"group_id\": 1,
    \"vendor_id\": 2,
    \"otp\": \"saepe\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/attach_vendor_to_group"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "group_id": 1,
    "vendor_id": 2,
    "otp": "saepe"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/attach_vendor_to_group

Body Parameters

group_id  integer  

vendor_id  integer  

otp  string  

Detach a vendor from a group.

requires authentication

Note: The referenced vendor will no longer have access to the data of the group it was attached to You need to generate an otp (api/issue_otp) to complete this action

Example request:
curl --request PUT \
    "https://cupidapiv2.smartflowtech.com/api/detach_vendor_from_group" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"group_id\": 3,
    \"vendor_id\": 4,
    \"otp\": \"qui\"
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/detach_vendor_from_group"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "group_id": 3,
    "vendor_id": 4,
    "otp": "qui"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/detach_vendor_from_group

Body Parameters

group_id  integer  

vendor_id  integer  

otp  string  

Display a list of companies by vendor

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/companies_by_vendor/4?per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/companies_by_vendor/4"
);

const params = {
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "status": "Request Pending",
            "partnership_code": "9818464",
            "active": true,
            "partnership_ppv_mode": "ON_SITE",
            "pms_ppv": "24",
            "ago_ppv": "76",
            "discount_mode": "MONETARY_VALUE_DISCOUNT",
            "vendor": null,
            "company": null
        },
        {
            "status": "Request Pending",
            "partnership_code": "7281611",
            "active": true,
            "partnership_ppv_mode": "CUSTOM",
            "pms_ppv": "50",
            "ago_ppv": "97",
            "discount_mode": null,
            "vendor": null,
            "company": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/companies_by_vendor/{vendor_id}

URL Parameters

vendor_id  integer optional  

The ID of the vendor

Query Parameters

per_page  integer optional  

items per page

Display a list of companies by vendor

requires authentication

Example request:
curl --request GET \
    --get "https://cupidapiv2.smartflowtech.com/api/get_companies_by_vendor/3?per_page=17" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/get_companies_by_vendor/3"
);

const params = {
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "status": "Request Pending",
            "partnership_code": "5183026",
            "active": false,
            "partnership_ppv_mode": null,
            "pms_ppv": "54",
            "ago_ppv": "30",
            "discount_mode": null,
            "vendor": null,
            "company": null
        },
        {
            "status": "Request Pending",
            "partnership_code": "2851166",
            "active": false,
            "partnership_ppv_mode": "CUSTOM",
            "pms_ppv": "61",
            "ago_ppv": "00",
            "discount_mode": "MONETARY_VALUE_DISCOUNT",
            "vendor": null,
            "company": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/get_companies_by_vendor/{vendor_id}

URL Parameters

vendor_id  integer optional  

The ID of the vendor

Query Parameters

per_page  integer optional  

items per page

POST api/create_vendor_ussd_account

requires authentication

Example request:
curl --request POST \
    "https://cupidapiv2.smartflowtech.com/api/create_vendor_ussd_account" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 16,
    \"payment_mode\": \"others\",
    \"merchantcodes\": \"est\",
    \"active\": false
}"
const url = new URL(
    "https://cupidapiv2.smartflowtech.com/api/create_vendor_ussd_account"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "vendor_id": 16,
    "payment_mode": "others",
    "merchantcodes": "est",
    "active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/create_vendor_ussd_account

Body Parameters

vendor_id  integer  

payment_mode  string  

Must be one of ussd or others.

merchantcodes  string  

active  boolean optional