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."
}
Received response:
Request failed with error:
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
}
}
]
}
}
Received response:
Request failed with error:
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
}
}
]
}
}
Received response:
Request failed with error:
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
}
}
]
}
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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"
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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": []
}
]
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
Get trends of fuel purchase
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
Display a listing of the FuelPay Transaction or search by mac address, ip address.
requires authentication
Create a new FuelPay Transaction
requires authentication
Show a specified FuelPay Transaction.
requires authentication
Update the specified FuelPay Transaction
requires authentication
Delete a FuelPay Transaction
requires authentication
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
Fleet Management Endpoints
NFC tag bulk upload
requires authentication
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
Create a new NFC tag
requires authentication
Show a specified NFC tag.
requires authentication
Update the specified NFC tag
requires authentication
Delete a NFC tag
requires authentication
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."
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
Get paginated list of unassigned NFC tags
requires authentication
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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
}
}
]
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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"
}
]
}
Received response:
Request failed with error:
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"
}
]
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
Received response:
Request failed with error:
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"
}
Received response:
Request failed with error:
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"
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
]
}
Received response:
Request failed with error:
Get NfcTags for dropdown.
requires authentication
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
}
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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": []
}
]
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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": [
[],
[]
]
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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": []
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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": [
[],
[]
]
}
Received response:
Request failed with error:
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
}
}
]
}
Received response:
Request failed with error:
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
}
}
]
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
Display a listing of the one time authorizations or search by status, registration number, product.
requires authentication
Create a new one time authorization
requires authentication
Show a specified one time authorization.
requires authentication
Update the specified one time authorization
requires authentication
Delete a one time authorization
requires authentication
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."
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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
}
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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."
}
Received response:
Request failed with error:
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
}
]
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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": []
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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"
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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());
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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
}
}
Received response:
Request failed with error:
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());
Received response:
Request failed with error: