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
This API is authenticated 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=occaecati" \
--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": "occaecati",
};
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=1Q4An9eFLKSyAZ6zPqWjgGcRqbSeRINVrCqGUYIY; expires=Tue, 25 Jun 2024 16:42:09 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\": \"libero\",
\"permissions\": [
12
]
}"
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": "libero",
"permissions": [
12
]
};
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/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vero\",
\"permissions\": [
14
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/roles/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vero",
"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/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/acl/roles/9"
);
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=ipsa" \
--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": "ipsa",
};
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=Tp8IT2FN6MlnlKVDthY708nvQtS79mYeLR6fuMyE; expires=Tue, 25 Jun 2024 16:42:16 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\": \"ut\",
\"module\": \"Company\",
\"guard_name\": \"api\"
}"
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": "ut",
"module": "Company",
"guard_name": "api"
};
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/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"hic\",
\"module\": \"Company\",
\"guard_name\": \"api\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/permissions/7"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "hic",
"module": "Company",
"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/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/acl/permissions/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:
Assign permissions to a user
requires authentication
Example request:
curl --request POST \
"https://cupidapiv2.smartflowtech.com/api/acl/user_assign_permissions?permission_names[]=voluptatem&email=dolorem" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permission_names\": [
\"corrupti\"
],
\"email\": \"carolina94@example.net\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/user_assign_permissions"
);
const params = {
"permission_names[]": "voluptatem",
"email": "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 = {
"permission_names": [
"corrupti"
],
"email": "carolina94@example.net"
};
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[]=maiores&email=repellendus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role_names\": [
\"modi\"
],
\"email\": \"dickinson.thea@example.com\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/user_assign_roles"
);
const params = {
"role_names[]": "maiores",
"email": "repellendus",
};
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": [
"modi"
],
"email": "dickinson.thea@example.com"
};
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[]=sed&email=sapiente" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role_names\": [
\"ab\"
],
\"email\": \"meta65@example.net\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_role"
);
const params = {
"role_names[]": "sed",
"email": "sapiente",
};
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": [
"ab"
],
"email": "meta65@example.net"
};
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[]=non&email=officiis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permission_names\": [
\"illum\"
],
\"email\": \"euna.runolfsson@example.org\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/revoke_user_permission"
);
const params = {
"permission_names[]": "non",
"email": "officiis",
};
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": [
"illum"
],
"email": "euna.runolfsson@example.org"
};
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[]=doloremque&role=et" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role\": \"aliquam\",
\"permission_names\": [
\"repudiandae\"
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/assign_permissions_to_role"
);
const params = {
"permission_names[]": "doloremque",
"role": "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",
};
let body = {
"role": "aliquam",
"permission_names": [
"repudiandae"
]
};
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[]=minima&role=architecto" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role\": \"cupiditate\",
\"permission_names\": [
\"exercitationem\"
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/acl/detach_permissions_from_role"
);
const params = {
"permission_names[]": "minima",
"role": "architecto",
};
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": "cupiditate",
"permission_names": [
"exercitationem"
]
};
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\": \"accusamus\",
\"password\": \"a\"
}"
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": "accusamus",
"password": "a"
};
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\": \"autem\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/reset_password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "autem"
};
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\": \"aut\",
\"name\": \"qui\",
\"email\": \"voluptatibus\",
\"username\": \"reprehenderit\",
\"phone\": \"maiores\",
\"gender\": \"eligendi\",
\"suspended\": \"saepe\",
\"active\": \"aperiam\",
\"is_admin\": \"ut\",
\"is_vendor\": \"eum\",
\"create_company\": true,
\"create_company_wallet\": true,
\"vendor_id\": 1,
\"vehicles\": [
{
\"cost_center_id\": 2,
\"driver_id\": 3,
\"group_id\": 9,
\"registration_number\": \"inxdnhvoikutftpgnzzaoiiteguteaegpgsgpivpkyqaahdnwdtqcorytjqoyrxtzliubmkmujneuctbpmmhxpmfltplptnuljafalgaa\",
\"tank_capacity\": 379351,
\"auth_type\": \"lxyvkzwcrwzckacduwvgcprxlbuxppblippvwotazsingfoaggvbqwsgigbfxfiiuhrjburpsyiyuwrkuiwxstvjoimiflqsinjmvewebfnyhzatylplgseyzyyxspxdtlhrwsdxsiafncjbuspvuuqivmfqgrrdgxvyeqavejffuaxvuhzlvhwppdlzwpaxtkhcmcrijkifnrrbfh\",
\"nfc_tag_id\": 11,
\"tracker_id\": 2,
\"model\": \"xxyrswlmrjcforxlzwtzpkmoyxykysvocw\",
\"engine_capacity\": 93962.4981213,
\"fuel_type\": \"uhpvczgtcxcnhnxzksrdvmlzmmqkwxjvqoevkbolyxefpakvjbhikyvuyobzynqpyfjeirkczejopyvxcwopmtcpgfcnzhoppkxxftdfredsrwqbmbfktjgcwxznhfdnkyuvlewyobkjsonudumsunnnpadgqjngsueixugyjuhfhqufgtncjyhbxnsptjolslrnzhxwkrzqatnhgqjl\",
\"color\": \"itcwu\",
\"brand\": \"kdyvfhjbjmofvbpnvexzxquacjlubaannkdimjuezmyswrjnfrzoabuliuxwekgbrqhwjdfbnwemzskmwsmj\",
\"reward_type\": \"ijnreddnivximdrwbypzhjlldbcsbibsqzavftzhoygucwybwnzylzwbjxfiycqjlqxnsyvhjkcmmaemjtjwhlhryxhwyyjuzrjsqkipmmzysgwwdmggbsqelwjgfepyotypolgougtpopu\",
\"active\": false
}
],
\"company_id\": 16
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "aut",
"name": "qui",
"email": "voluptatibus",
"username": "reprehenderit",
"phone": "maiores",
"gender": "eligendi",
"suspended": "saepe",
"active": "aperiam",
"is_admin": "ut",
"is_vendor": "eum",
"create_company": true,
"create_company_wallet": true,
"vendor_id": 1,
"vehicles": [
{
"cost_center_id": 2,
"driver_id": 3,
"group_id": 9,
"registration_number": "inxdnhvoikutftpgnzzaoiiteguteaegpgsgpivpkyqaahdnwdtqcorytjqoyrxtzliubmkmujneuctbpmmhxpmfltplptnuljafalgaa",
"tank_capacity": 379351,
"auth_type": "lxyvkzwcrwzckacduwvgcprxlbuxppblippvwotazsingfoaggvbqwsgigbfxfiiuhrjburpsyiyuwrkuiwxstvjoimiflqsinjmvewebfnyhzatylplgseyzyyxspxdtlhrwsdxsiafncjbuspvuuqivmfqgrrdgxvyeqavejffuaxvuhzlvhwppdlzwpaxtkhcmcrijkifnrrbfh",
"nfc_tag_id": 11,
"tracker_id": 2,
"model": "xxyrswlmrjcforxlzwtzpkmoyxykysvocw",
"engine_capacity": 93962.4981213,
"fuel_type": "uhpvczgtcxcnhnxzksrdvmlzmmqkwxjvqoevkbolyxefpakvjbhikyvuyobzynqpyfjeirkczejopyvxcwopmtcpgfcnzhoppkxxftdfredsrwqbmbfktjgcwxznhfdnkyuvlewyobkjsonudumsunnnpadgqjngsueixugyjuhfhqufgtncjyhbxnsptjolslrnzhxwkrzqatnhgqjl",
"color": "itcwu",
"brand": "kdyvfhjbjmofvbpnvexzxquacjlubaannkdimjuezmyswrjnfrzoabuliuxwekgbrqhwjdfbnwemzskmwsmj",
"reward_type": "ijnreddnivximdrwbypzhjlldbcsbibsqzavftzhoygucwybwnzylzwbjxfiycqjlqxnsyvhjkcmmaemjtjwhlhryxhwyyjuzrjsqkipmmzysgwwdmggbsqelwjgfepyotypolgougtpopu",
"active": false
}
],
"company_id": 16
};
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=2K2ApHcEj7JRFhHpRSHKoTy8NTSVsf1iujcQpZYq; expires=Tue, 25 Jun 2024 16:42:23 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": "Dr.",
"name": "Maritza Lakin",
"email": "lisandro66@example.net",
"phone": "(509) 435-8731",
"avatar": "https://via.placeholder.com/200x200.png/0088ff?text=avatar+et",
"username": "kdoyle",
"gender": "Female",
"newsletter": false,
"active": true,
"card_brand": "Visa",
"card_last_four": "8897",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:42:29.000000Z",
"created_at": "2024-06-25T14:42:29.000000Z",
"id": 407,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 3,
"name": "update"
},
{
"id": 8,
"name": "delete acl"
},
{
"id": 49,
"name": "update vendor wallet"
},
{
"id": 60,
"name": "request view"
},
{
"id": 61,
"name": "request create"
}
],
"costCenters": [],
"roles": [],
"stations": [],
"wallet_details": null
},
{
"title": "Prof.",
"name": "Miss Nia Schaden PhD",
"email": "olaf98@example.com",
"phone": "1-423-650-5889",
"avatar": "https://via.placeholder.com/200x200.png/0099ff?text=avatar+quo",
"username": "bernice.green",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "American Express",
"card_last_four": "8118",
"is_vendor": true,
"is_admin": true,
"updated_at": "2024-06-25T14:42:31.000000Z",
"created_at": "2024-06-25T14:42:31.000000Z",
"id": 408,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 16,
"name": "delete company group"
},
{
"id": 22,
"name": "create fleet"
},
{
"id": 30,
"name": "create payment"
},
{
"id": 54,
"name": "delete vendor"
},
{
"id": 55,
"name": "view vendor group"
}
],
"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/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/set_user_active_vendor/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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=ea9CNsn0pkVIVZ1vNfGMI7GPqpqk5RifWlpe4yEz; expires=Tue, 25 Jun 2024 16:42:39 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/set_user_active_vendor/7 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=vJfqG0U9i82wY2EzVU9COlbdpUPSbvxUoVfDVIJz; expires=Tue, 25 Jun 2024 16:43:29 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=temporibus" \
--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": "temporibus",
};
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": "Mohr, Becker and Haley",
"email": "ashley70@conroy.com",
"phone_number": "+1.682.793.1654",
"country": "Georgia",
"state": "Wisconsin",
"city": "Mayerville",
"postcode": "30072",
"address": "591 Walter Knoll",
"registration_number": "RC-638693",
"contact_person": "Mr. Miles Carroll",
"sm_company_id": 6,
"products_sold": "ATK",
"payment_type": "ut",
"status": false,
"has_active_paga_account": true,
"updated_at": "2024-06-25T14:43:30.000000Z",
"created_at": "2024-06-25T14:43:30.000000Z",
"id": 307,
"vendor_additional_details": null,
"bank_accounts": null,
"wallet_details": null,
"app_config": null,
"paga_details": null,
"groups": []
},
{
"name": "Rohan-Hauck",
"email": "deron37@rolfson.com",
"phone_number": "251.936.8561",
"country": "Mauritius",
"state": "Illinois",
"city": "Evelineview",
"postcode": "94547-2691",
"address": "488 Harber Oval",
"registration_number": "RC-472539",
"contact_person": "Rashad Jerde",
"sm_company_id": 1,
"products_sold": "PMS",
"payment_type": "totam",
"status": true,
"has_active_paga_account": false,
"updated_at": "2024-06-25T14:44:36.000000Z",
"created_at": "2024-06-25T14:44:36.000000Z",
"id": 308,
"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/17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cupid_id\": 12,
\"name\": \"debitis\",
\"email\": \"verona23@example.org\",
\"username\": \"vel\",
\"gender\": \"Male\",
\"phone\": \"inventore\",
\"current_password\": \"odit\",
\"password\": \"voluptatum\",
\"user_agent\": \"cupid_fleet\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/profile/update_profile/17"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cupid_id": 12,
"name": "debitis",
"email": "verona23@example.org",
"username": "vel",
"gender": "Male",
"phone": "inventore",
"current_password": "odit",
"password": "voluptatum",
"user_agent": "cupid_fleet"
};
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\": \"in\",
\"title\": \"pariatur\",
\"phone\": \"id\",
\"email\": \"nemo\",
\"username\": \"et\",
\"gender\": \"eos\",
\"newsletter\": true,
\"active\": \"dolorem\",
\"is_admin\": \"et\",
\"is_vendor\": \"expedita\",
\"suspended\": \"occaecati\",
\"vendors\": [
17
],
\"companies\": [
20
],
\"cost_centers\": [
4
]
}"
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": "in",
"title": "pariatur",
"phone": "id",
"email": "nemo",
"username": "et",
"gender": "eos",
"newsletter": true,
"active": "dolorem",
"is_admin": "et",
"is_vendor": "expedita",
"suspended": "occaecati",
"vendors": [
17
],
"companies": [
20
],
"cost_centers": [
4
]
};
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=ipsa&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/companies"
);
const params = {
"term": "ipsa",
"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": [
{
"id": 165,
"name": "Olson Group",
"email": "ara.hammes@zieme.info",
"phone_number": "561-282-4504",
"registration_number": "RC-149939893",
"country": "Canada",
"state": "Alabama",
"city": "Lorenashire",
"postcode": "88781",
"address": "72213 Sipes Throughway",
"sector": "fuga",
"tin": "116639",
"website": "blick.org",
"logo": "https://via.placeholder.com/200x200.png/0022dd?text=logo+unde",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Marjorie",
"contact_person_lastname": "Barton",
"app_uid": "667ad82843e03",
"created_at": "2024-06-25T14:46:00.000000Z",
"updated_at": "2024-06-25T14:46:00.000000Z",
"permissions": []
},
{
"id": 166,
"name": "Gottlieb Group",
"email": "ucole@purdy.org",
"phone_number": "714.438.1888",
"registration_number": "RC-860091117",
"country": "Dominica",
"state": "New York",
"city": "East Oma",
"postcode": "93683-8009",
"address": "72344 Calista Ranch",
"sector": "maiores",
"tin": "050713",
"website": "farrell.biz",
"logo": "https://via.placeholder.com/200x200.png/00bb88?text=logo+eos",
"active": false,
"on_loyalty_program": true,
"contact_person_first_name": "Mara",
"contact_person_lastname": "Davis",
"app_uid": "667ad82adfca9",
"created_at": "2024-06-25T14:46:02.000000Z",
"updated_at": "2024-06-25T14:46:02.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=aut" \
--form "phone_number=minima" \
--form "tin=19.32998421" \
--form "email=santa.oberbrunner@example.com" \
--form "registration_number=quia" \
--form "country=voluptatum" \
--form "state=vel" \
--form "city=natus" \
--form "postcode=433643.887" \
--form "address=ea" \
--form "sector=accusantium" \
--form "website=http://www.weissnat.biz/eum-tempore-neque-sunt-ut-nobis-in-officia-fuga" \
--form "active=" \
--form "on_loyalty_program=1" \
--form "loyalty_points_by_group=" \
--form "loyalty_reward_percentage=15" \
--form "loyalty_reward_points=37.17931703" \
--form "loyalty_min_purchase_amount=1.4907" \
--form "loyalty_min_point=947946.721865" \
--form "contact_person_first_name=est" \
--form "contact_person_lastname=ut" \
--form "permission_ids[]=suscipit" \
--form "logo=@/tmp/phpXlM84O"
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', 'aut');
body.append('phone_number', 'minima');
body.append('tin', '19.32998421');
body.append('email', 'santa.oberbrunner@example.com');
body.append('registration_number', 'quia');
body.append('country', 'voluptatum');
body.append('state', 'vel');
body.append('city', 'natus');
body.append('postcode', '433643.887');
body.append('address', 'ea');
body.append('sector', 'accusantium');
body.append('website', 'http://www.weissnat.biz/eum-tempore-neque-sunt-ut-nobis-in-officia-fuga');
body.append('active', '');
body.append('on_loyalty_program', '1');
body.append('loyalty_points_by_group', '');
body.append('loyalty_reward_percentage', '15');
body.append('loyalty_reward_points', '37.17931703');
body.append('loyalty_min_purchase_amount', '1.4907');
body.append('loyalty_min_point', '947946.721865');
body.append('contact_person_first_name', 'est');
body.append('contact_person_lastname', 'ut');
body.append('permission_ids[]', 'suscipit');
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": 167,
"name": "Schuster-Bode",
"email": "maci.sanford@crooks.com",
"phone_number": "(725) 715-9088",
"registration_number": "RC-500642128",
"country": "Israel",
"state": "Maryland",
"city": "Tierraton",
"postcode": "10371",
"address": "43273 Brenna Glen Apt. 835",
"sector": "nisi",
"tin": "322485",
"website": "pfannerstill.biz",
"logo": "https://via.placeholder.com/200x200.png/003399?text=logo+et",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Estrella",
"contact_person_lastname": "Mante",
"app_uid": "667ad82eaa235",
"created_at": "2024-06-25T14:46:06.000000Z",
"updated_at": "2024-06-25T14:46:06.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/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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 168,
"name": "Mante, Hauck and Nicolas",
"email": "lsimonis@hoeger.com",
"phone_number": "423.959.3425",
"registration_number": "RC-439534959",
"country": "Svalbard & Jan Mayen Islands",
"state": "Wisconsin",
"city": "New Lamarshire",
"postcode": "31746",
"address": "92397 Turner Radial",
"sector": "quidem",
"tin": "222442",
"website": "mitchell.com",
"logo": "https://via.placeholder.com/200x200.png/00bb99?text=logo+incidunt",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Annamarie",
"contact_person_lastname": "Schoen",
"app_uid": "667ad8316dd68",
"created_at": "2024-06-25T14:46:09.000000Z",
"updated_at": "2024-06-25T14:46:09.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=et" \
--form "phone_number=error" \
--form "tin=1" \
--form "email=tatum.smitham@example.com" \
--form "registration_number=laudantium" \
--form "country=non" \
--form "state=minus" \
--form "city=quae" \
--form "postcode=440.008909424" \
--form "address=cum" \
--form "sector=culpa" \
--form "website=http://www.mraz.com/omnis-aut-impedit-aliquid" \
--form "active=1" \
--form "on_loyalty_program=1" \
--form "loyalty_points_by_group=1" \
--form "loyalty_reward_percentage=65766958.7" \
--form "loyalty_reward_points=25354097.22494" \
--form "loyalty_min_purchase_amount=8.40344113" \
--form "loyalty_min_point=12162.437171" \
--form "contact_person_first_name=possimus" \
--form "contact_person_lastname=quas" \
--form "permission_ids[]=non" \
--form "logo=@/tmp/phprRAoOX"
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', 'et');
body.append('phone_number', 'error');
body.append('tin', '1');
body.append('email', 'tatum.smitham@example.com');
body.append('registration_number', 'laudantium');
body.append('country', 'non');
body.append('state', 'minus');
body.append('city', 'quae');
body.append('postcode', '440.008909424');
body.append('address', 'cum');
body.append('sector', 'culpa');
body.append('website', 'http://www.mraz.com/omnis-aut-impedit-aliquid');
body.append('active', '1');
body.append('on_loyalty_program', '1');
body.append('loyalty_points_by_group', '1');
body.append('loyalty_reward_percentage', '65766958.7');
body.append('loyalty_reward_points', '25354097.22494');
body.append('loyalty_min_purchase_amount', '8.40344113');
body.append('loyalty_min_point', '12162.437171');
body.append('contact_person_first_name', 'possimus');
body.append('contact_person_lastname', 'quas');
body.append('permission_ids[]', 'non');
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": 169,
"name": "Batz, Upton and Torphy",
"email": "cartwright.willie@thiel.com",
"phone_number": "+16517242458",
"registration_number": "RC-622497490",
"country": "Marshall Islands",
"state": "Oklahoma",
"city": "West Wilfredside",
"postcode": "04296-2569",
"address": "1052 Brendan Haven",
"sector": "aut",
"tin": "929558",
"website": "erdman.com",
"logo": "https://via.placeholder.com/200x200.png/001166?text=logo+et",
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": "Lonzo",
"contact_person_lastname": "Senger",
"app_uid": "667ad83428c3b",
"created_at": "2024-06-25T14:46:12.000000Z",
"updated_at": "2024-06-25T14:46:12.000000Z",
"permissions": []
}
}
Received response:
Request failed with error:
Delete a company
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/companies/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/companies/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 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=10&per_page=7&term=autem" \
--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": "10",
"per_page": "7",
"term": "autem",
};
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": "Miles Grady",
"email": "nickolas39@example.net",
"phone": "443-473-5714",
"avatar": "https://via.placeholder.com/200x200.png/001133?text=avatar+libero",
"username": "brendon56",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "6734",
"is_vendor": true,
"is_admin": true,
"updated_at": "2024-06-25T14:46:15.000000Z",
"created_at": "2024-06-25T14:46:15.000000Z",
"id": 417,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 7,
"name": "update acl"
},
{
"id": 12,
"name": "delete company"
},
{
"id": 29,
"name": "view payment"
},
{
"id": 72,
"name": "destination_allocation view"
},
{
"id": 80,
"name": "trip allocation view"
}
],
"costCenters": [],
"roles": [],
"stations": [],
"wallet_details": null
},
{
"title": "Prof.",
"name": "Mrs. Liza Grimes",
"email": "zlockman@example.org",
"phone": "+1.361.799.6542",
"avatar": "https://via.placeholder.com/200x200.png/0055bb?text=avatar+ut",
"username": "cmckenzie",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "6272",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:17.000000Z",
"created_at": "2024-06-25T14:46:17.000000Z",
"id": 418,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 31,
"name": "update payment"
},
{
"id": 51,
"name": "view vendor"
},
{
"id": 55,
"name": "view vendor group"
},
{
"id": 65,
"name": "category update"
},
{
"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=3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eum\",
\"phone\": 58506848.2747537,
\"email\": \"parker.emory@example.net\",
\"username\": \"ipsa\",
\"gender\": \"female\",
\"newsletter\": true,
\"active\": true,
\"is_admin\": true,
\"is_vendor\": true,
\"suspended\": true,
\"vendors\": [
17
],
\"companies\": [
17
],
\"cost_centers\": [
18
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/company_users"
);
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",
};
let body = {
"name": "eum",
"phone": 58506848.2747537,
"email": "parker.emory@example.net",
"username": "ipsa",
"gender": "female",
"newsletter": true,
"active": true,
"is_admin": true,
"is_vendor": true,
"suspended": true,
"vendors": [
17
],
"companies": [
17
],
"cost_centers": [
18
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Prof.",
"name": "Natalie Sanford",
"email": "zschaden@example.net",
"phone": "725-412-2474",
"avatar": "https://via.placeholder.com/200x200.png/0066dd?text=avatar+labore",
"username": "mfeil",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "American Express",
"card_last_four": "8437",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:24.000000Z",
"created_at": "2024-06-25T14:46:24.000000Z",
"id": 419,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 7,
"name": "update acl"
},
{
"id": 49,
"name": "update vendor wallet"
},
{
"id": 51,
"name": "view vendor"
},
{
"id": 61,
"name": "request create"
},
{
"id": 84,
"name": "update transaction id"
}
],
"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/2?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/company_users/2"
);
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):
{
"data": {
"title": "Prof.",
"name": "Miss Precious Ernser",
"email": "greenfelder.giles@example.net",
"phone": "+1-678-467-3245",
"avatar": "https://via.placeholder.com/200x200.png/00eedd?text=avatar+expedita",
"username": "leatha36",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "2399",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:28.000000Z",
"created_at": "2024-06-25T14:46:28.000000Z",
"id": 420,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 4,
"name": "delete"
},
{
"id": 7,
"name": "update acl"
},
{
"id": 24,
"name": "delete fleet"
},
{
"id": 47,
"name": "view vendor wallet"
},
{
"id": 61,
"name": "request create"
}
],
"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/10?company_id=14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"non\",
\"phone\": 24666,
\"email\": \"mattie04@example.org\",
\"username\": \"ipsam\",
\"gender\": \"Male\",
\"newsletter\": false,
\"active\": true,
\"is_admin\": false,
\"is_vendor\": true,
\"suspended\": true,
\"vendors\": [
18
],
\"companies\": [
11
],
\"cost_centers\": [
2
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/company_users/10"
);
const params = {
"company_id": "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",
};
let body = {
"name": "non",
"phone": 24666,
"email": "mattie04@example.org",
"username": "ipsam",
"gender": "Male",
"newsletter": false,
"active": true,
"is_admin": false,
"is_vendor": true,
"suspended": true,
"vendors": [
18
],
"companies": [
11
],
"cost_centers": [
2
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 170,
"name": "Hintz LLC",
"email": "ywuckert@mann.com",
"phone_number": "+13852462406",
"registration_number": "RC-988801657",
"country": "Ethiopia",
"state": "California",
"city": "New Eunice",
"postcode": "03558-4662",
"address": "91683 Pacocha Park Suite 938",
"sector": "voluptas",
"tin": "355893",
"website": "bosco.com",
"logo": "https://via.placeholder.com/200x200.png/007799?text=logo+illo",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Charity",
"contact_person_lastname": "McGlynn",
"app_uid": "667ad84a54757",
"created_at": "2024-06-25T14:46:34.000000Z",
"updated_at": "2024-06-25T14:46:34.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/17?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_users/17"
);
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:
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=9&per_page=7&term=velit" \
--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": "9",
"per_page": "7",
"term": "velit",
};
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=5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permission_ids\": [
\"voluptatem\"
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/company_permissions"
);
const params = {
"company_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 = {
"permission_ids": [
"voluptatem"
]
};
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/id" \
--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/id"
);
const 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=kuQDTC8E5lTyFILVNI48VRSwqQRNGkUjd3sqCKg4; expires=Tue, 25 Jun 2024 16:46:39 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/company_permissions/id 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/12?company_id=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/company_permissions/12"
);
const params = {
"company_id": "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: "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=et&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/stations"
);
const params = {
"term": "et",
"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": [
{
"name": "Hirthe PLC",
"email": "tsporer@feest.biz",
"phone_number": "308-462-7746",
"country": "Zambia",
"state": "Washington",
"city": "Bednarport",
"postcode": "93192-8392",
"address": "1341 Kaden Spurs"
},
{
"name": "Nitzsche-Kassulke",
"email": "rohan.rupert@mclaughlin.com",
"phone_number": "+1.669.786.0445",
"country": "Indonesia",
"state": "Maryland",
"city": "West Eleanore",
"postcode": "98484",
"address": "82535 Cielo Causeway Suite 944"
}
],
"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\": \"nobis\",
\"phone_number\": 38566.4015635,
\"email\": \"lucinda70@example.org\",
\"country\": \"tempora\",
\"state\": \"illum\",
\"city\": \"totam\",
\"postcode\": 33579.5803466,
\"address\": \"perspiciatis\",
\"vendor_id\": 15
}"
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": "nobis",
"phone_number": 38566.4015635,
"email": "lucinda70@example.org",
"country": "tempora",
"state": "illum",
"city": "totam",
"postcode": 33579.5803466,
"address": "perspiciatis",
"vendor_id": 15
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Marvin, Marks and Ferry",
"email": "kenya.kutch@brown.com",
"phone_number": "+1.769.306.1897",
"country": "Faroe Islands",
"state": "Maryland",
"city": "West Jaylonmouth",
"postcode": "83929",
"address": "43912 Grimes Shore"
}
}
Received response:
Request failed with error:
Show a specified station.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/stations/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/stations/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": "Dickens Group",
"email": "kraig.reichert@lesch.org",
"phone_number": "+1-256-913-3460",
"country": "Azerbaijan",
"state": "Colorado",
"city": "Marquardtborough",
"postcode": "66359",
"address": "25149 Noel Forks Apt. 130"
}
}
Received response:
Request failed with error:
Update the specified station
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/stations/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"et\",
\"phone_number\": 2120,
\"email\": \"amoore@example.org\",
\"country\": \"eaque\",
\"state\": \"repellendus\",
\"city\": \"qui\",
\"postcode\": 678333.232199626,
\"address\": \"reprehenderit\",
\"vendor_id\": 11
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/stations/14"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "et",
"phone_number": 2120,
"email": "amoore@example.org",
"country": "eaque",
"state": "repellendus",
"city": "qui",
"postcode": 678333.232199626,
"address": "reprehenderit",
"vendor_id": 11
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Gibson, Wisozk and Jerde",
"email": "asia.purdy@metz.com",
"phone_number": "586-282-3010",
"country": "Azerbaijan",
"state": "Maryland",
"city": "Eichmannport",
"postcode": "44444",
"address": "58849 Hartmann Radial"
}
}
Received response:
Request failed with error:
Delete a station
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/stations/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/stations/11"
);
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": "Cummerata, Wiza and Kling",
"email": "gibson.tianna@hamill.com",
"phone_number": "+1-904-289-3191",
"country": "Saudi Arabia",
"state": "Utah",
"city": "Unaborough",
"postcode": "60834-2155",
"address": "488 Schimmel Shores"
}
}
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/11?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/vendor_stations/11"
);
const params = {
"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": [
{
"name": "Borer-Thiel",
"email": "harry87@daugherty.com",
"phone_number": "+15029258474",
"country": "Switzerland",
"state": "New Mexico",
"city": "Kiarramouth",
"postcode": "26196-2587",
"address": "20114 Rath Key Apt. 053"
},
{
"name": "Sporer, Bednar and Huel",
"email": "louvenia16@ernser.com",
"phone_number": "(574) 595-1739",
"country": "Montserrat",
"state": "Utah",
"city": "West Bertastad",
"postcode": "15121",
"address": "286 Shanel Meadows Apt. 219"
}
],
"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=ut&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": "ut",
"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": "Schaden, Volkman and Hackett",
"email": "ivy06@treutel.com",
"phone_number": "+1.364.967.5874",
"company_id": 49,
"daily_purchase_budget": 4.22,
"weekly_purchase_budget": 85.5,
"monthly_purchase_budget": 2002.11,
"license_type": "228kaz",
"active": true,
"company": {
"id": 49,
"name": "MIMEE - MULTIPRO",
"email": "brooklynrobinson49@example.com",
"phone_number": "171",
"registration_number": "171",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 916503,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c147",
"created_at": "2023-04-06T13:44:17.000000Z",
"updated_at": "2023-04-06T13:44:17.000000Z",
"permissions": []
},
"users": []
},
{
"name": "Lakin Ltd",
"email": "gusikowski.stone@grady.biz",
"phone_number": "+1.731.792.2889",
"company_id": 87,
"daily_purchase_budget": 822.55,
"weekly_purchase_budget": 13658.33,
"monthly_purchase_budget": 0,
"license_type": "178vcz",
"active": true,
"company": {
"id": 87,
"name": "TGI DISTRI LTD.",
"email": "melanielong87@example.com",
"phone_number": "209",
"registration_number": "209",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 806493,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c185",
"created_at": "2023-05-14T13:44:17.000000Z",
"updated_at": "2023-05-14T13: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\": \"illo\",
\"phone_number\": 153563601.22453,
\"email\": \"ut\",
\"company_id\": 2,
\"daily_purchase_budget\": 4133390,
\"weekly_purchase_budget\": 7.2035752,
\"monthly_purchase_budget\": 9060.860895874,
\"license_type\": \"omnis\",
\"active\": false,
\"user_ids\": [
\"quam\"
]
}"
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": "illo",
"phone_number": 153563601.22453,
"email": "ut",
"company_id": 2,
"daily_purchase_budget": 4133390,
"weekly_purchase_budget": 7.2035752,
"monthly_purchase_budget": 9060.860895874,
"license_type": "omnis",
"active": false,
"user_ids": [
"quam"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Corwin, Nader and Pacocha",
"email": "bernhard.vivian@ankunding.org",
"phone_number": "(541) 934-4679",
"company_id": 70,
"daily_purchase_budget": 224.65,
"weekly_purchase_budget": 4935.33,
"monthly_purchase_budget": 800444.95,
"license_type": "235ryy",
"active": true,
"company": {
"id": 70,
"name": "PABOD INTERNATIONAL BREWERIES PLC",
"email": "christopherturner70@example.com",
"phone_number": "192",
"registration_number": "192",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 602187,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c168",
"created_at": "2023-04-27T13:44:17.000000Z",
"updated_at": "2023-04-27T13: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/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/cost_centers/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": "Hagenes PLC",
"email": "mjenkins@graham.info",
"phone_number": "469-776-8382",
"company_id": 54,
"daily_purchase_budget": 213713646.44,
"weekly_purchase_budget": 16.42,
"monthly_purchase_budget": 141078546.86,
"license_type": "842rnd",
"active": true,
"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": true,
"on_loyalty_program": false,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c98",
"created_at": "2023-02-16T13:44:17.000000Z",
"updated_at": "2023-02-16T13:44:17.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/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"aut\",
\"phone_number\": 2821.4646759,
\"email\": \"excepturi\",
\"company_id\": 13,
\"daily_purchase_budget\": 1487.04322,
\"weekly_purchase_budget\": 1.77063,
\"monthly_purchase_budget\": 2.55763,
\"license_type\": \"exercitationem\",
\"active\": true,
\"user_ids\": [
\"labore\"
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/cost_centers/10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "aut",
"phone_number": 2821.4646759,
"email": "excepturi",
"company_id": 13,
"daily_purchase_budget": 1487.04322,
"weekly_purchase_budget": 1.77063,
"monthly_purchase_budget": 2.55763,
"license_type": "exercitationem",
"active": true,
"user_ids": [
"labore"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Waelchi PLC",
"email": "donnie.kuhlman@denesik.com",
"phone_number": "423-875-1754",
"company_id": 9,
"daily_purchase_budget": 15.52,
"weekly_purchase_budget": 251339.3,
"monthly_purchase_budget": 135.84,
"license_type": "645mmf",
"active": true,
"company": {
"id": 9,
"name": "CASH CUSTOMER",
"email": "chrisjohnson9@example.com",
"phone_number": "131",
"registration_number": "131",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 761984,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c107",
"created_at": "2023-02-25T13:44:17.000000Z",
"updated_at": "2023-02-25T13: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/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/cost_centers/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:
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=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_transactions"
);
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": [
{
"ref": "cupid-pay-1574801538",
"company_id": 85,
"company_wallet_id": 200,
"vendor_id": 215,
"company_temps_id": 85,
"initiator_id": 402,
"payment_mode_id": 213,
"status": "initiated",
"total_charged_amount": 3.16,
"original_amount": 0,
"gateway_charged": 2110.56,
"wallet_amount": 4.61,
"amount_paid": 11320.27,
"fee_paid": 35.33,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "2018-11-17 21:29:58.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2015-02-03 13:27:54.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "customer_onboarding",
"initiating_users_name": "Ozabor peter",
"paystack_subaccount_code": 492042367,
"updated_at": "2024-06-25T14:40:50.000000Z",
"created_at": "2024-06-25T14:40:50.000000Z",
"id": 501
},
{
"ref": "cupid-pay-993812685",
"company_id": 164,
"company_wallet_id": 200,
"vendor_id": 306,
"company_temps_id": 164,
"initiator_id": 366,
"payment_mode_id": 213,
"status": "initiated",
"total_charged_amount": 3239417.16,
"original_amount": 762.86,
"gateway_charged": 5798.1,
"wallet_amount": 2233.1,
"amount_paid": 272840.89,
"fee_paid": 633775.96,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1973-02-06 03:31:29.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2006-01-12 11:25:16.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "cupid_recharge",
"initiating_users_name": "Obida Christian",
"paystack_subaccount_code": 66819002,
"updated_at": "2024-06-25T14:40:54.000000Z",
"created_at": "2024-06-25T14:40:54.000000Z",
"id": 502
}
],
"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=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/kpi/latest_fuel_purchases"
);
const params = {
"per_page": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"company_id": 91,
"vendor_id": 215,
"user_id": 271,
"cost_center_id": 355,
"nfctag_id": 222,
"driver_id": 686,
"way_bill_number": "WB-8519",
"vendor_station_name": "Lueilwitz, Stroman and Funk",
"vehicle_plate_number": "lj-350-cc",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 198.11,
"volume": 4.86,
"odometer_reading": 6,
"product": "PMS",
"pump": 3,
"selling_price": 1643,
"current_credit_limit": 354355455.43,
"attendant": "DEFAULT",
"last_volume_dispensed": 371095502.58,
"last_amount_paid": 917181.14,
"transaction_seq_no": 89895,
"is_balanced": true,
"oem_station_id": 5,
"sm_station_id": 2,
"balance_refunded": 42047535.73,
"tapnet_amount": 9927.66,
"tapnet_volume": 2046201.74,
"tapnet_transaction_time": {
"date": "2002-03-22 08:55:49.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "95:C6:19:59:7A:08",
"release_token": "96",
"is_fdc_value_fill": true,
"fdc_volume": 24.61,
"fdc_amount": 28.25,
"last_tsn_source": null,
"verified_volume": 21.03,
"verified_amount": 25228993.1,
"reconciliation_source": "FDC",
"one_time_auth_id": 96,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:40:59.000000Z",
"created_at": "2024-06-25T14:40:59.000000Z",
"id": 10200,
"driver": {
"id": 686,
"company_id": 11,
"fullname": "BHN Driver 46",
"address": "SAGAMU",
"phone_number": "8888555952",
"email": "sophiawalker456@hotmail.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2024-05-28T12:03:02.000000Z",
"updated_at": "2023-09-01T21:50:00.000000Z",
"deleted_at": null
},
"company": {
"id": 91,
"name": "NORTHERN NOODLE LIMITED (KADUNA)",
"email": "zoeyallen91@example.com",
"phone_number": "213",
"registration_number": "213",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 261409,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c159",
"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-18T13:44:17.000000Z",
"updated_at": "2023-04-18T13:44:17.000000Z",
"deleted_at": null
},
"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
},
"costCenter": {
"id": 355,
"company_id": 91,
"name": "NORTHERN NOODLE LIMITED (KADUNA)",
"email": "XCkcX6l@tolaram.com",
"phone_number": "538-151-9589",
"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": 222,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-7722",
"nfctag_oem_id": "96244831",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "73",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2023-02-16T12:48:14.000000Z",
"updated_at": "2023-09-01T18:07:51.000000Z",
"deleted_at": null,
"upload_id": null
},
"userWallet": null,
"remark": null
},
{
"company_id": 31,
"vendor_id": 215,
"user_id": 389,
"cost_center_id": 326,
"nfctag_id": 697,
"driver_id": 1597,
"way_bill_number": "WB-1853",
"vendor_station_name": "Schowalter, Nitzsche and Kovacek",
"vehicle_plate_number": "oo-329-on",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 179968.57,
"volume": 13602791.34,
"odometer_reading": 5,
"product": "ATK",
"pump": 1,
"selling_price": 502.49,
"current_credit_limit": 3710.91,
"attendant": "DEFAULT",
"last_volume_dispensed": 137501.89,
"last_amount_paid": 1.83,
"transaction_seq_no": 53629,
"is_balanced": true,
"oem_station_id": 5,
"sm_station_id": 8,
"balance_refunded": 56.5,
"tapnet_amount": 29331827.35,
"tapnet_volume": 12.93,
"tapnet_transaction_time": {
"date": "2011-08-29 06:25:45.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "CA:CB:40:DB:99:91",
"release_token": "42",
"is_fdc_value_fill": false,
"fdc_volume": 48227.63,
"fdc_amount": 1495749.91,
"last_tsn_source": null,
"verified_volume": 322.86,
"verified_amount": 795971.04,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 705,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:41:03.000000Z",
"created_at": "2024-06-25T14:41:03.000000Z",
"id": 10201,
"driver": {
"id": 1597,
"company_id": 44,
"fullname": "YUSUF DAIYABU IBRAHIM",
"address": "BHN, Mowe Ogun State",
"phone_number": "371-408-1515",
"email": "piJMrQg@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T18:17:26.000000Z",
"updated_at": "2023-09-01T21:50:00.000000Z",
"deleted_at": null
},
"company": {
"id": 31,
"name": "HFN",
"email": "aaronhill31@example.com",
"phone_number": "153",
"registration_number": "153",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 496182,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c129",
"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-19T13:44:17.000000Z",
"updated_at": "2023-03-19T13:44:17.000000Z",
"deleted_at": null
},
"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
},
"costCenter": {
"id": 326,
"company_id": 31,
"name": "HFN",
"email": "u7cUpUp@tolaram.com",
"phone_number": "904-626-9513",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:34:11.000000Z",
"updated_at": "2023-08-29T16:34:11.000000Z",
"deleted_at": null
},
"nfcTag": {
"id": 697,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-8037",
"nfctag_oem_id": "16185031",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "12855128720729",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2024-06-11T09:34:02.000000Z",
"updated_at": "2023-09-01T21:50:00.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=ONtWKptLaaM93N8dsdjGPVprjB8vaKxhCe7iPSeO; expires=Tue, 25 Jun 2024 16:41:12 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=KfbKGSsTqWRDaKvN05UcZbE8Ja8pNwuWPGnDWpgE; expires=Tue, 25 Jun 2024 16:41:13 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=50lgHQUkZ51zF9kq1vuQaIW5xFR4SKWxvh1q6Y2h; expires=Tue, 25 Jun 2024 16:41:14 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=1JqkOXAr6uM9fR6lZJunUcHq1Q3tSH0E0NggYuXa; expires=Tue, 25 Jun 2024 16:41:15 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=VizShxQNaP1wEYuHP3tE1VhJroFjLHHHYfQ8cxfd; expires=Tue, 25 Jun 2024 16:41:16 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=lJbZ5tc0KCGrVoIZAmJ3PilkYogp6vbj6Ko1vCfM; expires=Tue, 25 Jun 2024 16:41:16 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=wkPGRiMzEi3E0zdJoGCxZlc5uoyxLTL86eYHyie1; expires=Tue, 25 Jun 2024 16:41:17 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\": \"deleniti\",
\"vehicle_id\": 19,
\"company_id\": 14,
\"source_id\": 3,
\"destination_id\": 14,
\"tonnage\": \"aliquam\",
\"contract_type\": \"provident\",
\"trailer_type\": \"laborum\",
\"weight\": \"HEAVY\",
\"age\": \"nostrum\",
\"model\": \"laborum\"
}"
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": "deleniti",
"vehicle_id": 19,
"company_id": 14,
"source_id": 3,
"destination_id": 14,
"tonnage": "aliquam",
"contract_type": "provident",
"trailer_type": "laborum",
"weight": "HEAVY",
"age": "nostrum",
"model": "laborum"
};
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=cumque&contract_type=quia&company_id=9&source_id=9&active=&per_page=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/trip_allocations"
);
const params = {
"term": "cumque",
"contract_type": "quia",
"company_id": "9",
"source_id": "9",
"active": "0",
"per_page": "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": [
{
"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\": 2,
\"source_id\": 9,
\"destination_id\": 15,
\"tonnage\": \"vel\",
\"trailer_type\": \"quas\",
\"weight\": \"magnam\",
\"contract_type\": \"fixed\",
\"make\": \"sit\",
\"age\": \"facilis\",
\"diesel_quantity\": 7,
\"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": 2,
"source_id": 9,
"destination_id": 15,
"tonnage": "vel",
"trailer_type": "quas",
"weight": "magnam",
"contract_type": "fixed",
"make": "sit",
"age": "facilis",
"diesel_quantity": 7,
"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/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/trip_allocations/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": {
"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/sed" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 17,
\"source_id\": 12,
\"destination_id\": 12,
\"tonnage\": \"accusamus\",
\"trailer_type\": \"sint\",
\"weight\": \"sint\",
\"contract_type\": \"FIXED\",
\"make\": \"in\",
\"age\": \"eos\",
\"diesel_quantity\": 11,
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/trip_allocations/sed"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 17,
"source_id": 12,
"destination_id": 12,
"tonnage": "accusamus",
"trailer_type": "sint",
"weight": "sint",
"contract_type": "FIXED",
"make": "in",
"age": "eos",
"diesel_quantity": 11,
"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/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/trip_allocations/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:
Get pumps from station manager
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/sm_pumps?station_id=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/sm_pumps"
);
const params = {
"station_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",
};
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=RdkyyrGJ33qIPbHWL7lGm7gEO8LqwB6MH8ffOypV; expires=Tue, 25 Jun 2024 17:00:32 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/sm_pumps 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=non&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/spend_limit_groups"
);
const params = {
"term": "non",
"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": [
{
"name": "Mrs. Angelita Rogahn",
"company_id": 76,
"cost_center_id": 339,
"description": "Iusto enim aut et labore et.",
"daily_volume_limit": 3,
"weekly_volume_limit": 9,
"monthly_volume_limit": 5,
"status": null,
"code": 2,
"active": true,
"updated_at": "2024-06-25T14:49:32.000000Z",
"created_at": "2024-06-25T14:49:32.000000Z",
"id": 416
},
{
"name": "Ceasar Kub IV",
"company_id": 86,
"cost_center_id": 333,
"description": "Non omnis praesentium assumenda consequatur eos.",
"daily_volume_limit": 2,
"weekly_volume_limit": 7,
"monthly_volume_limit": 3,
"status": "Active",
"code": 7,
"active": true,
"updated_at": "2024-06-25T14:49:33.000000Z",
"created_at": "2024-06-25T14:49:33.000000Z",
"id": 417
}
],
"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\": \"atque\",
\"company_id\": 11,
\"cost_center_id\": 12,
\"description\": \"explicabo\",
\"code\": \"qui\",
\"daily_volume_limit\": 427058.6322,
\"weekly_volume_limit\": 5.821999,
\"monthly_volume_limit\": 5852002.94,
\"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": "atque",
"company_id": 11,
"cost_center_id": 12,
"description": "explicabo",
"code": "qui",
"daily_volume_limit": 427058.6322,
"weekly_volume_limit": 5.821999,
"monthly_volume_limit": 5852002.94,
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Dr. Demond King II",
"company_id": 2,
"cost_center_id": 349,
"description": "Enim repellendus pariatur corporis voluptates ipsam dolores.",
"daily_volume_limit": 1,
"weekly_volume_limit": 4,
"monthly_volume_limit": 1,
"status": "Inactive",
"code": 8,
"active": true,
"updated_at": "2024-06-25T14:49:36.000000Z",
"created_at": "2024-06-25T14:49:36.000000Z",
"id": 418
}
}
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/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/spend_limit_groups/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": {
"name": "Ignacio Watsica",
"company_id": 77,
"cost_center_id": 346,
"description": "Fuga quia reprehenderit qui excepturi laudantium illum qui.",
"daily_volume_limit": 3,
"weekly_volume_limit": 6,
"monthly_volume_limit": 6,
"status": null,
"code": 6,
"active": true,
"updated_at": "2024-06-25T14:49:38.000000Z",
"created_at": "2024-06-25T14:49:38.000000Z",
"id": 419
}
}
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/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"daily_volume_limit\": 12248.95772,
\"weekly_volume_limit\": 52.5159636,
\"monthly_volume_limit\": 185255219,
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/spend_limit_groups/7"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"daily_volume_limit": 12248.95772,
"weekly_volume_limit": 52.5159636,
"monthly_volume_limit": 185255219,
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Mr. Coleman Senger Jr.",
"company_id": 64,
"cost_center_id": 331,
"description": "Saepe tempora nesciunt repellat expedita excepturi.",
"daily_volume_limit": 9,
"weekly_volume_limit": 1,
"monthly_volume_limit": 8,
"status": null,
"code": 7,
"active": true,
"updated_at": "2024-06-25T14:49:40.000000Z",
"created_at": "2024-06-25T14:49:40.000000Z",
"id": 420
}
}
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/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/spend_limit_groups/7"
);
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": "Jesus Johnson I",
"company_id": 22,
"cost_center_id": 348,
"description": "Qui nobis quibusdam voluptatem eaque et.",
"daily_volume_limit": 8,
"weekly_volume_limit": 1,
"monthly_volume_limit": 9,
"status": "Active",
"code": 5,
"active": true,
"updated_at": "2024-06-25T14:49:42.000000Z",
"created_at": "2024-06-25T14:49:42.000000Z",
"id": 421
}
}
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=et&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": "et",
"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": "Ivah Corwin",
"email": "kautzer.serenity@yahoo.com",
"phone_number": "+1-458-336-0697",
"address": "75518 Sauer Manor Suite 976",
"driver_speciality": "Tricycle",
"status": "Suspended",
"company_id": 40,
"updated_at": "2024-06-25T14:49:44.000000Z",
"created_at": "2024-06-25T14:49:44.000000Z",
"id": 1786,
"company": {
"id": 40,
"name": "KC-MULTIPRO CONSUMER",
"email": "leviyoung40@example.com",
"phone_number": "162",
"registration_number": "162",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 679512,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c138",
"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-28T13:44:17.000000Z",
"updated_at": "2023-03-28T13:44:17.000000Z",
"deleted_at": null
},
"vehicles": []
},
{
"fullname": "Pansy Hodkiewicz",
"email": "ibradtke@gmail.com",
"phone_number": "(610) 444-3215",
"address": "71391 Faye Pike Apt. 314",
"driver_speciality": "SUV",
"status": "Inactive",
"company_id": 146,
"updated_at": "2024-06-25T14:49:46.000000Z",
"created_at": "2024-06-25T14:49:46.000000Z",
"id": 1787,
"company": {
"id": 146,
"name": "QUANTAM PACKAGING",
"email": "mViebIS@tolaram.com",
"phone_number": "870-200-8909",
"registration_number": "hJ28s",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "230415",
"address": "Sagamu",
"sector": "Logistics",
"tin": 3789412,
"website": "https://www.tolaram.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "p4zsyHbnYyUQIJZ",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-08-24T11:45:12.000000Z",
"updated_at": "2023-08-24T11:45:12.000000Z",
"deleted_at": null
},
"vehicles": []
}
],
"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\": 11,
\"fullname\": \"animi\",
\"address\": \"ut\",
\"phone_number\": 2.830501815,
\"email\": \"edward.fadel@example.net\",
\"driver_speciality\": \"voluptatem\",
\"status\": \"labore\"
}"
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": 11,
"fullname": "animi",
"address": "ut",
"phone_number": 2.830501815,
"email": "edward.fadel@example.net",
"driver_speciality": "voluptatem",
"status": "labore"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"fullname": "Ulises Wisozk",
"email": "walsh.victor@yahoo.com",
"phone_number": "+19854362601",
"address": "83172 Marks Burgs Apt. 916",
"driver_speciality": "Truck",
"status": "Suspended",
"company_id": 20,
"updated_at": "2024-06-25T14:49:50.000000Z",
"created_at": "2024-06-25T14:49:50.000000Z",
"id": 1788,
"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/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/drivers/1"
);
const headers = {
"Authorization": "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": "Charlene Kohler Jr.",
"email": "berge.guido@hotmail.com",
"phone_number": "785-556-8121",
"address": "10046 Fritsch Hollow",
"driver_speciality": "Jeep",
"status": "Inactive",
"company_id": 48,
"updated_at": "2024-06-25T14:49:52.000000Z",
"created_at": "2024-06-25T14:49:52.000000Z",
"id": 1789,
"company": {
"id": 48,
"name": "MBH POWER LIMITED",
"email": "owenmurphy48@example.com",
"phone_number": "170",
"registration_number": "170",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 473825,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c146",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-04-05T13:44:17.000000Z",
"updated_at": "2023-04-05T13:44:17.000000Z",
"deleted_at": null
},
"vehicles": []
}
}
Received response:
Request failed with error:
Update the specified driver
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/drivers/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 9,
\"fullname\": \"iusto\",
\"address\": \"aut\",
\"phone_number\": 966.6,
\"email\": \"zbotsford@example.net\",
\"driver_speciality\": \"sit\",
\"status\": \"pariatur\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/drivers/6"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 9,
"fullname": "iusto",
"address": "aut",
"phone_number": 966.6,
"email": "zbotsford@example.net",
"driver_speciality": "sit",
"status": "pariatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"fullname": "Talia Sanford III",
"email": "kuhic.montana@gmail.com",
"phone_number": "+1-713-206-0262",
"address": "48167 Altenwerth Centers Apt. 883",
"driver_speciality": null,
"status": "Inactive",
"company_id": 43,
"updated_at": "2024-06-25T14:49:55.000000Z",
"created_at": "2024-06-25T14:49:55.000000Z",
"id": 1790,
"company": {
"id": 43,
"name": "KT LFTZ ENTERPRISE",
"email": "nataliehall43@example.com",
"phone_number": "165",
"registration_number": "165",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 978463,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c141",
"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-31T13:44:17.000000Z",
"updated_at": "2023-03-31T13:44:17.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/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/drivers/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 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=qui&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/vehicles"
);
const params = {
"term": "qui",
"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": [
{
"company_id": 62,
"cost_center_id": 356,
"driver_id": 1286,
"nfc_tag_id": 602,
"group_id": 339,
"registration_number": "uq-157-zr",
"tank_capacity": 2,
"auth_type": null,
"tracker_id": "pgh036",
"model": "Karen",
"engine_capacity": null,
"fuel_type": "DPK",
"color": "White",
"brand": "Toyota",
"reward_type": null,
"active": true,
"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
},
"group": [],
"driver": {
"id": 1286,
"company_id": 151,
"fullname": "MUHAMMED ZAHARADEEN",
"address": "BHN, Mowe Ogun State",
"phone_number": "765-674-7356",
"email": "KdBenVo@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T18:02:21.000000Z",
"updated_at": "2023-09-01T21:42:34.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 356,
"company_id": 62,
"name": "OLAM NIGERIA LIMITED",
"email": "LBDMMMr@tolaram.com",
"phone_number": "680-385-5559",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:38:08.000000Z",
"updated_at": "2023-08-29T16:38:08.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "uq-157-zr",
"nfcTag": {
"id": 602,
"company_id": 141,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-7879",
"nfctag_oem_id": "26BC5331",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "9303873452159",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2024-03-08T09:34:02.000000Z",
"updated_at": "2023-09-01T18:54:55.000000Z",
"deleted_at": null,
"upload_id": null
}
},
{
"company_id": 38,
"cost_center_id": 332,
"driver_id": 881,
"nfc_tag_id": 2041,
"group_id": 406,
"registration_number": "mf-809-ak",
"tank_capacity": 82,
"auth_type": null,
"tracker_id": "hnm410",
"model": "Patjero",
"engine_capacity": null,
"fuel_type": "HHK",
"color": "Black",
"brand": "Isuzu",
"reward_type": null,
"active": true,
"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": 881,
"company_id": 7,
"fullname": "SANI SALEH",
"address": "BHN, Mowe Ogun State",
"phone_number": "447-610-6372",
"email": "qIeTagx@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T17:49:23.000000Z",
"updated_at": "2023-09-01T18:10:35.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": "mf-809-ak",
"nfcTag": {
"id": 2041,
"company_id": 54,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-11354",
"nfctag_oem_id": "5A253ABE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "785558267",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2023-02-16T12:36:12.000000Z",
"updated_at": "2023-09-01T18:07:51.000000Z",
"deleted_at": null,
"upload_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 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\": 1,
\"vendor_id\": 18,
\"driver_id\": 15,
\"nfc_tag_id\": 14,
\"group_id\": 19,
\"registration_number\": \"vitae\",
\"tank_capacity\": \"vero\",
\"auth_type\": \"libero\",
\"tracker_id\": \"est\",
\"model\": \"vel\",
\"engine_capacity\": \"sed\",
\"fuel_type\": \"LPG\",
\"color\": \"modi\",
\"brand\": \"sapiente\",
\"active\": false,
\"weight\": \"dignissimos\",
\"tonnage\": \"qui\",
\"trailer_type\": \"odio\",
\"age\": \"modi\"
}"
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": 1,
"vendor_id": 18,
"driver_id": 15,
"nfc_tag_id": 14,
"group_id": 19,
"registration_number": "vitae",
"tank_capacity": "vero",
"auth_type": "libero",
"tracker_id": "est",
"model": "vel",
"engine_capacity": "sed",
"fuel_type": "LPG",
"color": "modi",
"brand": "sapiente",
"active": false,
"weight": "dignissimos",
"tonnage": "qui",
"trailer_type": "odio",
"age": "modi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 32,
"cost_center_id": 327,
"driver_id": 349,
"nfc_tag_id": 1799,
"group_id": 315,
"registration_number": "wa-695-mq",
"tank_capacity": 35,
"auth_type": null,
"tracker_id": "pdo718",
"model": "Karen",
"engine_capacity": null,
"fuel_type": "DPK",
"color": "Silver",
"brand": "KIA",
"reward_type": null,
"active": true,
"company": {
"id": 32,
"name": "HYPO - MULTIPRO ENTERPRISES LIMITED (TRPT)",
"email": "averythomas32@example.com",
"phone_number": "154",
"registration_number": "154",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 158397,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c130",
"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-20T13:44:17.000000Z",
"updated_at": "2023-03-20T13:44:17.000000Z",
"deleted_at": null
},
"group": [],
"driver": {
"id": 349,
"company_id": 141,
"fullname": "MOHAMMED KASIMU",
"address": "SAGAMU",
"phone_number": "8888555614",
"email": "averyjackson987@yahoo.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2023-06-26T12:03:02.000000Z",
"updated_at": "2023-09-01T18:54:55.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 327,
"company_id": 32,
"name": "HYPO - MULTIPRO ENTERPRISES LIMITED (TRPT)",
"email": "qyhs8pz@tolaram.com",
"phone_number": "661-506-0134",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:34:11.000000Z",
"updated_at": "2023-08-29T16:34:11.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "wa-695-mq",
"nfcTag": {
"id": 1799,
"company_id": 141,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-10303",
"nfctag_oem_id": "7AE239BE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "51580632",
"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
}
}
}
Received response:
Request failed with error:
Show a specified vehicle.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vehicles/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/vehicles/10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 49,
"cost_center_id": 343,
"driver_id": 800,
"nfc_tag_id": 706,
"group_id": 315,
"registration_number": "sn-801-ui",
"tank_capacity": 21,
"auth_type": null,
"tracker_id": "sqb275",
"model": "Patjero",
"engine_capacity": null,
"fuel_type": "LPFO",
"color": "Blue",
"brand": "Isuzu",
"reward_type": null,
"active": true,
"company": {
"id": 49,
"name": "MIMEE - MULTIPRO",
"email": "brooklynrobinson49@example.com",
"phone_number": "171",
"registration_number": "171",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 916503,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c147",
"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-06T13:44:17.000000Z",
"updated_at": "2023-04-06T13:44:17.000000Z",
"deleted_at": null
},
"group": [],
"driver": {
"id": 800,
"company_id": 141,
"fullname": "RABIU SHEHU",
"address": "SAGAMU",
"phone_number": "8888556067",
"email": "rabiushehu@email.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2024-09-20T12:03:02.000000Z",
"updated_at": "2023-09-01T18:54:55.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 343,
"company_id": 49,
"name": "MIMEE - MULTIPRO",
"email": "S4ctulX@tolaram.com",
"phone_number": "170-335-0011",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:37:57.000000Z",
"updated_at": "2023-08-29T16:37:57.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "sn-801-ui",
"nfcTag": {
"id": 706,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-8046",
"nfctag_oem_id": "36025031",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "13191563430383",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2024-06-20T09:34:02.000000Z",
"updated_at": "2023-09-01T21:50:00.000000Z",
"deleted_at": null,
"upload_id": null
}
}
}
Received response:
Request failed with error:
Update the specified vehicle
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/vehicles/13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 18,
\"driver_id\": 12,
\"nfc_tag_id\": 3,
\"group_id\": 7,
\"registration_number\": \"dolores\",
\"tank_capacity\": \"reprehenderit\",
\"auth_type\": \"enim\",
\"tracker_id\": \"aut\",
\"model\": \"at\",
\"engine_capacity\": \"quia\",
\"fuel_type\": \"AGO\",
\"color\": \"vel\",
\"brand\": \"architecto\",
\"active\": false,
\"weight\": \"nihil\",
\"tonnage\": \"est\",
\"trailer_type\": \"maiores\",
\"age\": \"repellendus\"
}"
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",
};
let body = {
"company_id": 18,
"driver_id": 12,
"nfc_tag_id": 3,
"group_id": 7,
"registration_number": "dolores",
"tank_capacity": "reprehenderit",
"auth_type": "enim",
"tracker_id": "aut",
"model": "at",
"engine_capacity": "quia",
"fuel_type": "AGO",
"color": "vel",
"brand": "architecto",
"active": false,
"weight": "nihil",
"tonnage": "est",
"trailer_type": "maiores",
"age": "repellendus"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 14,
"cost_center_id": 305,
"driver_id": 1778,
"nfc_tag_id": 2076,
"group_id": 359,
"registration_number": "ad-825-mo",
"tank_capacity": 93,
"auth_type": null,
"tracker_id": "vhe332",
"model": "Karen",
"engine_capacity": null,
"fuel_type": "PMS",
"color": "Black",
"brand": "Isuzu",
"reward_type": null,
"active": true,
"company": {
"id": 14,
"name": "COLGATE-MULTIPRO CONSUMER",
"email": "sophiawhite14@example.com",
"phone_number": "136",
"registration_number": "136",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 789236,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c112",
"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-02T13:44:17.000000Z",
"updated_at": "2023-03-02T13:44:17.000000Z",
"deleted_at": null
},
"group": [],
"driver": {
"id": 1778,
"company_id": 14,
"fullname": "Adebola Mary",
"address": "24, olowo street, mushin, Lagos",
"phone_number": "09012123434",
"email": "mary1adebimpe017@gmail.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2024-05-02T14:56:38.000000Z",
"updated_at": "2024-05-02T14:56:38.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 305,
"company_id": 14,
"name": "COLGATE-MULTIPRO CONSUMER",
"email": "cNohWKP@tolaram.com",
"phone_number": "311-181-3156",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:33:44.000000Z",
"updated_at": "2023-08-29T16:33:44.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "ad-825-mo",
"nfcTag": {
"id": 2076,
"company_id": 14,
"vendor_id": 215,
"user_id": 114,
"station_id": null,
"pin": "8293",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-99993",
"nfctag_oem_id": "OTU5W56",
"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-05-17T13:49:57.000000Z",
"deleted_at": null,
"upload_id": null
}
}
}
Received response:
Request failed with error:
Delete a vehicle
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/vehicles/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/vehicles/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 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=provident&station_id=13&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/nfc_tag_trackers"
);
const params = {
"term": "provident",
"station_id": "13",
"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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=VzrYX7OBIZRQgfiAAoDMjmC7i0CjhidOG7GhLXqN; expires=Tue, 25 Jun 2024 16:51:18 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/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/8"
);
const 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=ekR5ERIWKJfobR3aD0PvX8Ms3BdFGXUBx0zqBMUW; expires=Tue, 25 Jun 2024 16:51:32 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/nfc_tag_trackers/8 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/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/nfc_tag_trackers/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:
Generate pin for specified NFC Tag
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/generate_pin/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/generate_pin/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=csplr5cKREDEWLnzZqZZ8AYtV4yygPM4xOpoXLzZ; expires=Tue, 25 Jun 2024 16:51:37 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/generate_pin/2 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/et" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle_id\": 9,
\"user_id\": 15,
\"company_id\": 12
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_assign_nfc_tag/et"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle_id": 9,
"user_id": 15,
"company_id": 12
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 21,
"vendor_id": 306,
"user_id": 259,
"station_id": 603,
"pin": 1097,
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-332",
"nfctag_oem_id": 86047140,
"nfctag_url_slug": null,
"created_by": 177,
"card_number": 985281384,
"card_on_thankucash": null,
"card_state": "OTA",
"station_name": "SFT EXHIBITION",
"updated_at": "2024-06-25T14:51:52.000000Z",
"created_at": "2024-06-25T14:51:52.000000Z",
"id": 2382,
"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
},
"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": 177,
"title": "Mr",
"name": "Victor Chinonso Ugwu",
"email": "victorhills42@gmail.com",
"phone": "090530032002",
"avatar": null,
"username": "Victor Chinonso Ugwu",
"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": 87,
"otp": null,
"created_at": "2023-04-26T11:26:39.000000Z",
"updated_at": "2024-06-13T23:43:07.000000Z",
"deleted_at": null
},
"company": {
"id": 21,
"name": "DUFIL - NOODLE (PHC)",
"email": "jacobturner21@example.com",
"phone_number": "143",
"registration_number": "143",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 175630,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c119",
"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-09T13:44:17.000000Z",
"updated_at": "2023-03-09T13:44:17.000000Z",
"deleted_at": null
},
"vehicles": [],
"user": {
"id": 259,
"title": "Mr",
"name": "Dan Kpama Samuel",
"email": "samdan71@gmail.com",
"phone": "864-277-6959",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=dan.kpama.samuel_7s1",
"username": "dan.kpama.samuel_7s1",
"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": "3875101",
"created_at": "2023-09-11T21:49:12.000000Z",
"updated_at": "2023-09-11T21:49:12.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/7?station_id=16&station_name=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/vendor_nfctag_stations/7"
);
const params = {
"station_id": "16",
"station_name": "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: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 46,
"vendor_id": 302,
"user_id": 276,
"station_id": 602,
"pin": 7887,
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-669",
"nfctag_oem_id": 94288158,
"nfctag_url_slug": null,
"created_by": 264,
"card_number": 629745848,
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": "Mcpl Mowes",
"updated_at": "2024-06-25T14:51:58.000000Z",
"created_at": "2024-06-25T14:51:58.000000Z",
"id": 2383,
"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
},
"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": 264,
"title": "Mr",
"name": "Awe Akinniyi",
"email": "olufunsoakinniyiawe@gmail.com",
"phone": "904-567-2964",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=awe.akinniyi_Dx3",
"username": "awe.akinniyi_Dx3",
"gender": "Male",
"newsletter": 0,
"active": 1,
"card_brand": null,
"card_last_four": null,
"is_admin": 0,
"is_vendor": 1,
"active_vendor_group": null,
"active_vendor": null,
"otp": "5927429",
"created_at": "2023-09-11T21:50:34.000000Z",
"updated_at": "2023-09-11T21:50:34.000000Z",
"deleted_at": null
},
"company": {
"id": 46,
"name": "MAGIK - MULTIPRO",
"email": "jacksullivan46@example.com",
"phone_number": "168",
"registration_number": "168",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 194286,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c144",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-04-03T13:44:17.000000Z",
"updated_at": "2023-04-03T13:44:17.000000Z",
"deleted_at": null
},
"vehicles": [],
"user": {
"id": 276,
"title": "Mrs",
"name": "Sonoiki Omotola",
"email": "omotolawilliams48@gmail.com",
"phone": "717-106-7196",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=sonoiki.omotola_WAE",
"username": "sonoiki.omotola_WAE",
"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": "6894975",
"created_at": "2023-09-11T21:50:42.000000Z",
"updated_at": "2023-09-11T21:50:42.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\": \"nulla\",
\"station_name\": \"natus\",
\"app_mode\": \"FCC MODE\",
\"group_id\": 7,
\"product\": \"ATK\",
\"volume\": \"porro\",
\"selling_price\": \"expedita\",
\"pin\": \"autem\",
\"pump\": \"quos\",
\"way_bill_number\": \"omnis\"
}"
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": "nulla",
"station_name": "natus",
"app_mode": "FCC MODE",
"group_id": 7,
"product": "ATK",
"volume": "porro",
"selling_price": "expedita",
"pin": "autem",
"pump": "quos",
"way_bill_number": "omnis"
};
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\": \"est\",
\"station_name\": \"libero\",
\"app_mode\": \"NO FCC MODE\",
\"group_id\": 19,
\"product\": \"HHK\",
\"volume\": \"repellendus\",
\"selling_price\": \"et\",
\"pin\": \"velit\",
\"pump\": \"tempore\",
\"way_bill_number\": \"ipsa\"
}"
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": "est",
"station_name": "libero",
"app_mode": "NO FCC MODE",
"group_id": 19,
"product": "HHK",
"volume": "repellendus",
"selling_price": "et",
"pin": "velit",
"pump": "tempore",
"way_bill_number": "ipsa"
};
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=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/bhn_destination"
);
const params = {
"term": "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": [
{
"name": "est",
"code": "sapiente-atque-dicta-maxime-officia",
"description": "I will tell you how the game was in the pool, 'and she sits purring so nicely by the soldiers, who of course you know what it was: she was going to begin with; and being ordered about by mice and.",
"updated_at": "2024-06-25T14:52:06.000000Z",
"created_at": "2024-06-25T14:52:06.000000Z",
"id": 700
},
{
"name": "eius",
"code": "ut-et-tempora-aut-incidunt-ut-itaque-similique",
"description": "Majesty,' the Hatter continued, 'in this way:-- \"Up above the world am I? Ah, THAT'S the great wonder is, that there's any one of them can explain it,' said the Eaglet. 'I don't know one,' said."
}
]
}
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=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/vehicle"
);
const params = {
"vendor_id": "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": [
{
"company_id": 79,
"cost_center_id": 373,
"driver_id": 695,
"nfc_tag_id": 1492,
"group_id": 386,
"registration_number": "or-584-es",
"tank_capacity": 2,
"auth_type": null,
"tracker_id": "vue620",
"model": "Patjero",
"engine_capacity": null,
"fuel_type": "PMS",
"color": "Silver",
"brand": "Toyota",
"reward_type": null,
"active": true,
"company": {
"id": 79,
"name": "PURE FLOUR MILLS LIMITED - ABA",
"email": "alexisrogers79@example.com",
"phone_number": "201",
"registration_number": "201",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 253196,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c177",
"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-06T13:44:17.000000Z",
"updated_at": "2023-05-06T13:44:17.000000Z",
"deleted_at": null
},
"group": [],
"driver": {
"id": 695,
"company_id": 37,
"fullname": "OLASUNKAMI KOLAWOLE K",
"address": "SAGAMU",
"phone_number": "8888555962",
"email": "olasunkamikolawole@email.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2024-06-07T12:03:02.000000Z",
"updated_at": "2023-09-01T18:40:34.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 373,
"company_id": 79,
"name": "PURE FLOUR MILLS LIMITED - ABA",
"email": "BMDwmsS@tolaram.com",
"phone_number": "612-481-8760",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:38:21.000000Z",
"updated_at": "2023-08-29T16:38:21.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "or-584-es",
"nfcTag": {
"id": 1492,
"company_id": 44,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-9996",
"nfctag_oem_id": "1A233ABE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "48894885",
"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:28:38.000000Z",
"deleted_at": null,
"upload_id": null
}
},
{
"company_id": 59,
"cost_center_id": 353,
"driver_id": 995,
"nfc_tag_id": 1761,
"group_id": 356,
"registration_number": "bk-380-bv",
"tank_capacity": 37,
"auth_type": null,
"tracker_id": "wmy500",
"model": "Kahaya",
"engine_capacity": null,
"fuel_type": "DPK",
"color": "Black",
"brand": "Nissan",
"reward_type": null,
"active": true,
"company": {
"id": 59,
"name": "MULTIPRO KANO",
"email": "evelynwatson59@example.com",
"phone_number": "181",
"registration_number": "181",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 271635,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c157",
"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-16T13:44:17.000000Z",
"updated_at": "2023-04-16T13:44:17.000000Z",
"deleted_at": null
},
"group": [],
"driver": {
"id": 995,
"company_id": 44,
"fullname": "YUSHAU SHUAIBU",
"address": "BHN, Mowe Ogun State",
"phone_number": "798-307-2817",
"email": "wKIrYVo@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T17:54:10.000000Z",
"updated_at": "2023-09-01T18:28:38.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 353,
"company_id": 59,
"name": "MULTIPRO KANO",
"email": "n2FmZgD@tolaram.com",
"phone_number": "556-853-3283",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:38:05.000000Z",
"updated_at": "2023-08-29T16:38:05.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "bk-380-bv",
"nfcTag": {
"id": 1761,
"company_id": 141,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-10265",
"nfctag_oem_id": "6A8C39BE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "96103684",
"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
}
}
]
}
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": "nam",
"destination_source_id": 564,
"destination_stoppage_id": 564,
"code": "quos-omnis-dicta-ut-cumque-nulla",
"allocated_quantity": 8,
"updated_at": "2024-06-25T14:52:29.000000Z",
"created_at": "2024-06-25T14:52:29.000000Z",
"id": 10
},
{
"name": "assumenda",
"destination_source_id": 552,
"destination_stoppage_id": 552,
"code": "est-excepturi-magnam-aut-et-repellendus",
"allocated_quantity": 7,
"updated_at": "2024-06-25T14:52:30.000000Z",
"created_at": "2024-06-25T14:52:30.000000Z",
"id": 11
}
]
}
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=2&destination_stoppage_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/bhn_destination_allocation_total_quantity"
);
const params = {
"destination_source_id": "2",
"destination_stoppage_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):
{
"data": [
{
"name": "voluptas",
"destination_source_id": 206,
"destination_stoppage_id": 206,
"code": "velit-ut-beatae-esse-ipsa-ut-repellat",
"allocated_quantity": 2,
"updated_at": "2024-06-25T14:52:32.000000Z",
"created_at": "2024-06-25T14:52:32.000000Z",
"id": 12
},
{
"name": "suscipit",
"destination_source_id": 10,
"destination_stoppage_id": 10,
"code": "laudantium-quasi-id-natus-earum-vitae-reprehenderit-consequatur",
"allocated_quantity": 4,
"updated_at": "2024-06-25T14:52:33.000000Z",
"created_at": "2024-06-25T14:52:33.000000Z",
"id": 13
}
]
}
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": 2,
"name": "ipsa",
"code": "quibusdam",
"updated_at": "2024-06-25T14:52:35.000000Z",
"created_at": "2024-06-25T14:52:35.000000Z",
"id": 42,
"is_parent": "nass"
},
{
"parent_id": 0,
"name": "atque",
"code": "numquam",
"updated_at": "2024-06-25T14:52:36.000000Z",
"created_at": "2024-06-25T14:52:36.000000Z",
"id": 43,
"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=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/bhn_sub_category"
);
const params = {
"category_id": "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": [
{
"parent_id": 1,
"name": "nam",
"code": "omnis",
"updated_at": "2024-06-25T14:52:38.000000Z",
"created_at": "2024-06-25T14:52:38.000000Z",
"id": 44,
"is_parent": "nass"
},
{
"parent_id": 4,
"name": "et",
"code": "sapiente",
"updated_at": "2024-06-25T14:52:39.000000Z",
"created_at": "2024-06-25T14:52:39.000000Z",
"id": 45,
"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=quibusdam&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/bhn_categories"
);
const params = {
"term": "quibusdam",
"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": [
{
"parent_id": 7,
"name": "eum",
"code": "aut",
"updated_at": "2024-06-25T14:52:40.000000Z",
"created_at": "2024-06-25T14:52:40.000000Z",
"id": 46,
"is_parent": "nass"
},
{
"parent_id": 1,
"name": "quo",
"code": "rerum",
"updated_at": "2024-06-25T14:52:41.000000Z",
"created_at": "2024-06-25T14:52:41.000000Z",
"id": 47,
"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\": 6,
\"name\": \"pariatur\",
\"code\": \"quod\"
}"
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": 6,
"name": "pariatur",
"code": "quod"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"parent_id": 5,
"name": "tempora",
"code": "maxime",
"updated_at": "2024-06-25T14:52:43.000000Z",
"created_at": "2024-06-25T14:52:43.000000Z",
"id": 48,
"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/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_categories/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": {
"parent_id": 8,
"name": "enim",
"code": "sed",
"updated_at": "2024-06-25T14:52:44.000000Z",
"created_at": "2024-06-25T14:52:44.000000Z",
"id": 49,
"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/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"parent_id\": 2,
\"name\": \"est\",
\"code\": \"autem\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/bhn_categories/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"parent_id": 2,
"name": "est",
"code": "autem"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"parent_id": 3,
"name": "aperiam",
"code": "omnis",
"updated_at": "2024-06-25T14:52:46.000000Z",
"created_at": "2024-06-25T14:52:46.000000Z",
"id": 50,
"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/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/bhn_categories/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 BHN Categories or search by name.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/bhn_contracts?term=consectetur&per_page=5&company_id=accusantium&vehicle_id=optio&source_id=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/bhn_contracts"
);
const params = {
"term": "consectetur",
"per_page": "5",
"company_id": "accusantium",
"vehicle_id": "optio",
"source_id": "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": [
{
"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\": \"non\",
\"vehicle_id\": \"ea\",
\"source_id\": \"et\",
\"contract_type\": \"consequatur\",
\"tenure_start_date\": \"2024-06-25T14:52:49\",
\"tenure_end_date\": \"2094-12-09\",
\"active\": false
}"
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": "non",
"vehicle_id": "ea",
"source_id": "et",
"contract_type": "consequatur",
"tenure_start_date": "2024-06-25T14:52:49",
"tenure_end_date": "2094-12-09",
"active": false
};
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/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_contracts/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": {
"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/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": \"quod\",
\"vehicle_id\": \"molestias\",
\"source_id\": \"ut\",
\"contract_type\": \"doloribus\",
\"tenure_start_date\": \"2024-06-25T14:52:51\",
\"tenure_end_date\": \"2036-11-10\",
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/bhn_contracts/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": "quod",
"vehicle_id": "molestias",
"source_id": "ut",
"contract_type": "doloribus",
"tenure_start_date": "2024-06-25T14:52:51",
"tenure_end_date": "2036-11-10",
"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/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_contracts/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 BHN Destinations or search by name.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/bhn_destinations?term=facilis&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/bhn_destinations"
);
const params = {
"term": "facilis",
"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": "magni",
"code": "accusamus-eius-dicta-quisquam-nulla",
"description": "I!' said the Gryphon, and the little passage: and THEN--she found herself in a rather offended tone, 'was, that the way to change the subject,' the March Hare said to herself. Imagine her surprise.",
"updated_at": "2024-06-25T14:52:53.000000Z",
"created_at": "2024-06-25T14:52:53.000000Z",
"id": 702
},
{
"name": "veritatis",
"code": "dolorem-iste-nesciunt-id-vel-ut-enim",
"description": "Alice,) 'Well, I hardly know--No more, thank ye; I'm better now--but I'm a hatter.' Here the other guinea-pig cheered, and was going on, as she could, and waited to see what was the Rabbit came near.",
"updated_at": "2024-06-25T14:52:54.000000Z",
"created_at": "2024-06-25T14:52:54.000000Z",
"id": 703
}
],
"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\": \"voluptas\",
\"code\": \"animi\",
\"description\": \"qui\"
}"
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": "voluptas",
"code": "animi",
"description": "qui"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "fuga",
"code": "quod-quo-magni-dolor-dolores-rem",
"description": "I wish you could manage it?) 'And what are they doing?' Alice whispered to the other, looking uneasily at the mouth with strings: into this they slipped the guinea-pig, head first, and then, 'we.",
"updated_at": "2024-06-25T14:52:55.000000Z",
"created_at": "2024-06-25T14:52:55.000000Z",
"id": 704
}
}
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/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_destinations/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": {
"name": "at",
"code": "nulla-minus-magni-repudiandae-alias",
"description": "Cat again, sitting on a little more conversation with her head!' Those whom she sentenced were taken into custody by the carrier,' she thought; 'and how funny it'll seem to come before that!' 'Call.",
"updated_at": "2024-06-25T14:52:56.000000Z",
"created_at": "2024-06-25T14:52:56.000000Z",
"id": 705
}
}
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/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ipsum\",
\"code\": \"numquam\",
\"description\": \"excepturi\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/bhn_destinations/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ipsum",
"code": "numquam",
"description": "excepturi"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "rerum",
"code": "facere-voluptatem-perferendis-dolor-nihil",
"description": "Queen. An invitation for the hedgehogs; and in despair she put her hand on the top of it. Presently the Rabbit hastily interrupted. 'There's a great hurry to change the subject of conversation.",
"updated_at": "2024-06-25T14:52:58.000000Z",
"created_at": "2024-06-25T14:52:58.000000Z",
"id": 706
}
}
Received response:
Request failed with error:
Delete a BHN Destination
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/bhn_destinations/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/bhn_destinations/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 BHN Destinations Allocations or search by name.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations?term=quaerat&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/bhn_destination_allocations"
);
const params = {
"term": "quaerat",
"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": "assumenda",
"destination_source_id": 259,
"destination_stoppage_id": 259,
"code": "voluptatem-architecto-rerum-et-quibusdam-at",
"allocated_quantity": 7,
"updated_at": "2024-06-25T14:53:00.000000Z",
"created_at": "2024-06-25T14:53:00.000000Z",
"id": 14
},
{
"name": "eos",
"destination_source_id": 157,
"destination_stoppage_id": 157,
"code": "voluptatem-non-molestias-exercitationem-voluptatibus",
"allocated_quantity": 2,
"updated_at": "2024-06-25T14:53:02.000000Z",
"created_at": "2024-06-25T14:53:02.000000Z",
"id": 15
}
],
"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\": \"voluptatem\",
\"destination_source_id\": \"ex\",
\"destination_stoppage_id\": \"molestiae\",
\"code\": \"incidunt\",
\"allocated_quantity\": \"ut\"
}"
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": "voluptatem",
"destination_source_id": "ex",
"destination_stoppage_id": "molestiae",
"code": "incidunt",
"allocated_quantity": "ut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "enim",
"destination_source_id": 674,
"destination_stoppage_id": 674,
"code": "et-vel-placeat-quaerat-minus",
"allocated_quantity": 8,
"updated_at": "2024-06-25T14:53:04.000000Z",
"created_at": "2024-06-25T14:53:04.000000Z",
"id": 16
}
}
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/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_destination_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": {
"name": "amet",
"destination_source_id": 137,
"destination_stoppage_id": 137,
"code": "corrupti-nihil-iure-sed-eos-eaque-quasi",
"allocated_quantity": 8,
"updated_at": "2024-06-25T14:53:06.000000Z",
"created_at": "2024-06-25T14:53:06.000000Z",
"id": 17
}
}
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/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"animi\",
\"destination_source_id\": \"saepe\",
\"destination_stoppage_id\": \"facere\",
\"code\": \"sunt\",
\"allocated_quantity\": \"quaerat\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/bhn_destination_allocations/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "animi",
"destination_source_id": "saepe",
"destination_stoppage_id": "facere",
"code": "sunt",
"allocated_quantity": "quaerat"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "possimus",
"destination_source_id": 391,
"destination_stoppage_id": 391,
"code": "doloribus-voluptas-consequatur-est-velit",
"allocated_quantity": 5,
"updated_at": "2024-06-25T14:53:08.000000Z",
"created_at": "2024-06-25T14:53:08.000000Z",
"id": 18
}
}
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/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_allocations/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 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=sequi&status=quod&type=quo&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/bhn_requests"
);
const params = {
"term": "sequi",
"status": "quod",
"type": "quo",
"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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=4I1id8WY8IXxQco3EQUracAlGPM1K90OkPEA0Phc; expires=Tue, 25 Jun 2024 16:53:16 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/bhn_requests could not be found."
}
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\": \"waybill_request\",
\"vehicle_id\": 5,
\"category_id\": 8,
\"sub_category_id\": 20,
\"way_bill_number\": \"vitae\",
\"source\": 16,
\"stoppage\": 3,
\"allocated_quantity\": 2,
\"destination_allocation_ids\": [
10
],
\"remarks\": \"nesciunt\",
\"load_type\": \"LIGHT\",
\"rejection_reason\": \"aliquid\",
\"submitted_user_id\": 9,
\"approved_user_id\": 16,
\"rejected_user_id\": 15,
\"status\": \"Pending\",
\"tonnage\": \"tempora\",
\"age\": \"omnis\",
\"trailer_type\": \"nihil\",
\"make\": \"fugiat\",
\"contract\": \"aperiam\",
\"submitted_date\": \"2024-06-25T14:53:16\",
\"approve_date\": \"2024-06-25T14:53:16\",
\"reject_date\": \"2024-06-25T14:53:16\"
}"
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": "waybill_request",
"vehicle_id": 5,
"category_id": 8,
"sub_category_id": 20,
"way_bill_number": "vitae",
"source": 16,
"stoppage": 3,
"allocated_quantity": 2,
"destination_allocation_ids": [
10
],
"remarks": "nesciunt",
"load_type": "LIGHT",
"rejection_reason": "aliquid",
"submitted_user_id": 9,
"approved_user_id": 16,
"rejected_user_id": 15,
"status": "Pending",
"tonnage": "tempora",
"age": "omnis",
"trailer_type": "nihil",
"make": "fugiat",
"contract": "aperiam",
"submitted_date": "2024-06-25T14:53:16",
"approve_date": "2024-06-25T14:53:16",
"reject_date": "2024-06-25T14:53:16"
};
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,
"vehicle": {
"id": 733,
"registration_number": "MUS 921 XW",
"fuel_type": "AGO"
},
"company": {
"id": 37,
"company_name": "INTERNATIONAL BREWERY"
},
"destination_allocation": [],
"category": {
"id": 1,
"parent_id": null,
"name": "RESERVE",
"code": null,
"created_at": "2023-05-19T10:35:38.000000Z",
"updated_at": "2023-05-19T10:35:38.000000Z",
"deleted_at": null
},
"sub_category": {
"id": 8,
"parent_id": 1,
"name": "LONG DOWN",
"code": "WHEN THE TRUCK IS COMING OUT OF W/S AFTER LONG TIME",
"created_at": "2023-05-19T10:38:08.000000Z",
"updated_at": "2023-05-19T10:38:08.000000Z",
"deleted_at": null
},
"submitted_by": {
"id": 312,
"name": "QA Dispatcher",
"email": "qa_dispatcher@smartflowtech.com"
},
"approved_by": null,
"rejected_by": {
"id": 231,
"name": "Shobhit Jain",
"email": "shobhit.jain@tolaram.com"
},
"initial_requested_volume": 21
}
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/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_requests/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=05tRn5wI2fDTYP6lPePCfJMSv2s8az7X0x1YljEs; expires=Tue, 25 Jun 2024 16:53:29 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/bhn_requests/17 could not be found."
}
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/8" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"loading_request\",
\"vehicle_id\": 9,
\"category_id\": 13,
\"sub_category_id\": 6,
\"way_bill_number\": \"consequatur\",
\"source\": 12,
\"stoppage\": 15,
\"allocated_quantity\": 19,
\"destination_allocation_ids\": [
2
],
\"remarks\": \"velit\",
\"load_type\": \"HEAVY\",
\"rejection_reason\": \"impedit\",
\"submitted_user_id\": 5,
\"approved_user_id\": 5,
\"rejected_user_id\": 2,
\"status\": \"Approved\",
\"tonnage\": \"mollitia\",
\"age\": \"aut\",
\"trailer_type\": \"dolor\",
\"make\": \"aut\",
\"contract\": \"inventore\",
\"submitted_date\": \"2024-06-25T14:53:29\",
\"approve_date\": \"2024-06-25T14:53:29\",
\"reject_date\": \"2024-06-25T14:53:29\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/bhn_requests/8"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "loading_request",
"vehicle_id": 9,
"category_id": 13,
"sub_category_id": 6,
"way_bill_number": "consequatur",
"source": 12,
"stoppage": 15,
"allocated_quantity": 19,
"destination_allocation_ids": [
2
],
"remarks": "velit",
"load_type": "HEAVY",
"rejection_reason": "impedit",
"submitted_user_id": 5,
"approved_user_id": 5,
"rejected_user_id": 2,
"status": "Approved",
"tonnage": "mollitia",
"age": "aut",
"trailer_type": "dolor",
"make": "aut",
"contract": "inventore",
"submitted_date": "2024-06-25T14:53:29",
"approve_date": "2024-06-25T14:53:29",
"reject_date": "2024-06-25T14:53:29"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete a BHN Request
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/bhn_requests/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/bhn_requests/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:
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\": 10
}"
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": 10
};
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\": 5,
\"transaction_id\": 12
}"
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": 5,
"transaction_id": 12
};
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=bRVIAbtl668tE6WtsODeCBmA3EjnQ9CBq7nhpxjH; expires=Tue, 25 Jun 2024 16:53:47 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=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/get_drivers"
);
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": 1791,
"fullname": "Ms. Estelle Gerhold DVM",
"company_id": 46
},
{
"id": 1792,
"fullname": "Maud Douglas",
"company_id": 87
}
],
"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": 49,
"vendor_id": null,
"registration_number": "ed-325-yd"
},
{
"id": null,
"company_id": 149,
"vendor_id": null,
"registration_number": "um-430-ay"
}
]
}
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=VwkOnG19BswsfWkM6nls6kjz32hC37qrJZ431C0b; expires=Tue, 25 Jun 2024 16:40:47 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=repellat&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/states"
);
const params = {
"term": "repellat",
"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": [
{
"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\": \"modi\",
\"country_id\": 19
}"
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": "modi",
"country_id": 19
};
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/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/states/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,
"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/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eaque\",
\"country_id\": 20
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/states/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eaque",
"country_id": 20
};
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/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/states/3"
);
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=quia&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/countries"
);
const params = {
"term": "quia",
"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": [
[],
[]
],
"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\": \"et\",
\"code\": 8,
\"phonecode\": 5
}"
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": "et",
"code": 8,
"phonecode": 5
};
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/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/countries/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": []
}
Received response:
Request failed with error:
Update the specified country
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/countries/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"qui\",
\"code\": 8,
\"phonecode\": 14
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/countries/14"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "qui",
"code": 8,
"phonecode": 14
};
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/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/countries/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:
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=saepe&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/cities"
);
const params = {
"term": "saepe",
"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": [
{
"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\": \"velit\",
\"state_id\": 10
}"
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": "velit",
"state_id": 10
};
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/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/cities/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": {
"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/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"impedit\",
\"state_id\": 12
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/cities/11"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "impedit",
"state_id": 12
};
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/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: "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=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/vehicle_model"
);
const params = {
"vehicle_make_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",
};
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=dicta&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/vehicle_makes"
);
const params = {
"term": "dicta",
"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": [
{
"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\": \"reprehenderit\",
\"code\": \"molestiae\"
}"
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": "reprehenderit",
"code": "molestiae"
};
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/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/vehicle_makes/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": {
"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/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sed\",
\"code\": \"culpa\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vehicle_makes/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sed",
"code": "culpa"
};
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/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/vehicle_makes/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 vehicle Models or search by name
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vehicle_models?term=quis&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/vehicle_models"
);
const params = {
"term": "quis",
"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": [
{
"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\": \"et\",
\"code\": \"quae\",
\"vehicle_make_id\": \"nisi\"
}"
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": "et",
"code": "quae",
"vehicle_make_id": "nisi"
};
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/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/vehicle_models/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": {
"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/17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sed\",
\"code\": \"illo\",
\"vehicle_make_id\": \"doloremque\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vehicle_models/17"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sed",
"code": "illo",
"vehicle_make_id": "doloremque"
};
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/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/vehicle_models/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 vehicleTypes or search by name
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vehicle_types?term=explicabo&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/vehicle_types"
);
const params = {
"term": "explicabo",
"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": [
[],
[]
],
"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\": \"tempora\"
}"
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": "tempora"
};
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/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_types/4"
);
const headers = {
"Authorization": "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/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"temporibus\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vehicle_types/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "temporibus"
};
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/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/vehicle_types/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 countries or search by name
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/country?term=dolore" \
--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": "dolore",
};
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=est&term=eos" \
--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": "est",
"term": "eos",
};
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=eum&term=illo" \
--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": "eum",
"term": "illo",
};
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=quos&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": "quos",
"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": "Petrol",
"code": "DPK",
"updated_at": "2024-06-25T15:00:13.000000Z",
"created_at": "2024-06-25T15:00:13.000000Z",
"id": 41
},
{
"name": "Kerosine",
"code": "DPK",
"updated_at": "2024-06-25T15:00:14.000000Z",
"created_at": "2024-06-25T15:00:14.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 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\": \"sint\",
\"code\": \"eaque\"
}"
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": "sint",
"code": "eaque"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Engine Oil",
"code": "ATK",
"updated_at": "2024-06-25T15:00:16.000000Z",
"created_at": "2024-06-25T15:00:16.000000Z",
"id": 43
}
}
Received response:
Request failed with error:
Show a specified product.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/products/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/products/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Gas",
"code": "ATK",
"updated_at": "2024-06-25T15:00:17.000000Z",
"created_at": "2024-06-25T15:00:17.000000Z",
"id": 44
}
}
Received response:
Request failed with error:
Update the specified product
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/products/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"delectus\",
\"code\": \"rerum\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/products/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "delectus",
"code": "rerum"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Gas",
"code": "LPG",
"updated_at": "2024-06-25T15:00:19.000000Z",
"created_at": "2024-06-25T15:00:19.000000Z",
"id": 45
}
}
Received response:
Request failed with error:
Delete a product
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/products/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/products/3"
);
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=vel&per_page=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/payment_methods"
);
const params = {
"term": "vel",
"per_page": "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": [
{
"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\": \"rerum\",
\"key\": \"in\",
\"pay_percent\": 22381184,
\"cap_fee\": 1935.37,
\"max_commission\": 3376425.36669,
\"verification_url\": \"http:\\/\\/gutkowski.org\\/quia-dolorem-ea-id-porro-quos-rerum\",
\"public_key\": \"voluptatibus\",
\"secret_key\": \"est\",
\"merchant_no\": \"laborum\",
\"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": "rerum",
"key": "in",
"pay_percent": 22381184,
"cap_fee": 1935.37,
"max_commission": 3376425.36669,
"verification_url": "http:\/\/gutkowski.org\/quia-dolorem-ea-id-porro-quos-rerum",
"public_key": "voluptatibus",
"secret_key": "est",
"merchant_no": "laborum",
"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/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/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": "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/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"repudiandae\",
\"key\": \"necessitatibus\",
\"pay_percent\": 8.959,
\"cap_fee\": 6778437.6,
\"max_commission\": 1.97283073,
\"verification_url\": \"http:\\/\\/www.satterfield.org\\/\",
\"public_key\": \"officia\",
\"secret_key\": \"eveniet\",
\"merchant_no\": \"excepturi\",
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/payment_methods/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "repudiandae",
"key": "necessitatibus",
"pay_percent": 8.959,
"cap_fee": 6778437.6,
"max_commission": 1.97283073,
"verification_url": "http:\/\/www.satterfield.org\/",
"public_key": "officia",
"secret_key": "eveniet",
"merchant_no": "excepturi",
"active": true
};
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/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/payment_methods/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 banks or search by name, ussd code.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/banks?term=temporibus&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/banks"
);
const params = {
"term": "temporibus",
"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": [
{
"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=praesentium" \
--form "bank_logo=@/tmp/php5enWsW"
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', 'praesentium');
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/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/banks/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,
"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/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "bank_name=iure" \
--form "bank_logo=@/tmp/phpOvw6qR"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/banks/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('bank_name', 'iure');
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/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/banks/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:
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=ZCsFtxATtyno7IbFXgAxeVu5MYug47QhnfUl5uIJ; expires=Tue, 25 Jun 2024 17:00:31 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=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/bank_list"
);
const params = {
"term": "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": [
{
"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=enim&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/pam_devices"
);
const params = {
"term": "enim",
"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": [
{
"mac_address": "9E:5E:5E:75:F1:C8",
"last_time_online": {
"date": "1994-12-11 00:53:18.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"ip_address": "100.156.69.227",
"current_station_name": "Bechtelar-Connelly",
"current_oem_station_id": "149997",
"current_app_version": "2.55.14",
"expected_app_version": "4.9.21",
"current_sm_company_id": 8,
"current_sm_station_id": 1,
"expected_sm_company_id": 7,
"expected_sm_station_id": 8,
"expected_oem_station_id": 7,
"expected_station_name": "80:B6:53:F5:96:B3",
"app_mode": "NO FCC MODE",
"codename": null,
"last_local_mapping_updated_at": {
"date": "1982-04-17 11:34:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"last_remote_mapping_updated_at": {
"date": "2009-09-13 00:02:49.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": "2024-06-25T14:41:23.000000Z",
"created_at": "2024-06-25T14:41:23.000000Z",
"id": 61
},
{
"mac_address": "73:C0:C1:B2:50:DD",
"last_time_online": {
"date": "1971-08-10 12:52:48.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"ip_address": "146.247.60.208",
"current_station_name": "Barton and Sons",
"current_oem_station_id": "128550",
"current_app_version": "3.31.2",
"expected_app_version": "8.31.70",
"current_sm_company_id": 2,
"current_sm_station_id": 5,
"expected_sm_company_id": 3,
"expected_sm_station_id": 5,
"expected_oem_station_id": 8,
"expected_station_name": "78:99:72:73:F4:36",
"app_mode": "FCC MODE",
"codename": "PAM-DUGBE",
"last_local_mapping_updated_at": {
"date": "2018-01-08 13:13:05.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"last_remote_mapping_updated_at": {
"date": "2013-02-02 17:51:33.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": "2024-06-25T14:41:24.000000Z",
"created_at": "2024-06-25T14:41:24.000000Z",
"id": 62
}
],
"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\": \"magnam\",
\"ip_address\": \"22.187.18.70\"
}"
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": "magnam",
"ip_address": "22.187.18.70"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"mac_address": "DC:A4:38:B6:8E:C0",
"last_time_online": {
"date": "2003-09-18 09:19:45.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"ip_address": "199.250.87.26",
"current_station_name": "Walter, Stanton and Smith",
"current_oem_station_id": "330390",
"current_app_version": "0.14.61",
"expected_app_version": "9.70.4",
"current_sm_company_id": 4,
"current_sm_station_id": 3,
"expected_sm_company_id": 7,
"expected_sm_station_id": 5,
"expected_oem_station_id": 8,
"expected_station_name": "B3:7F:3A:81:B6:9A",
"app_mode": "FCC MODE",
"codename": "PAM-DUGBE",
"last_local_mapping_updated_at": {
"date": "1988-12-14 06:58:03.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"last_remote_mapping_updated_at": {
"date": "1988-03-13 23:49:58.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": "2024-06-25T14:41:26.000000Z",
"created_at": "2024-06-25T14:41:26.000000Z",
"id": 63
}
}
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/8?mac_address=sint" \
--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/8"
);
const params = {
"mac_address": "sint",
};
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": "9A:E8:60:3C:AF:02",
"last_time_online": {
"date": "2014-07-11 14:50:27.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"ip_address": "202.189.36.7",
"current_station_name": "Ziemann-Carroll",
"current_oem_station_id": "319579",
"current_app_version": "8.96.39",
"expected_app_version": "9.42.50",
"current_sm_company_id": 3,
"current_sm_station_id": 1,
"expected_sm_company_id": 5,
"expected_sm_station_id": 2,
"expected_oem_station_id": 8,
"expected_station_name": "EF:C1:C0:1D:35:66",
"app_mode": "NO FCC MODE",
"codename": "PAM-1",
"last_local_mapping_updated_at": {
"date": "1992-09-22 09:29:40.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"last_remote_mapping_updated_at": {
"date": "1988-12-17 13:55:38.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": "2024-06-25T14:41:27.000000Z",
"created_at": "2024-06-25T14:41:27.000000Z",
"id": 64
}
}
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/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"mac_address\": \"ut\",
\"ip_address\": \"117.22.252.205\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/pam_devices/10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"mac_address": "ut",
"ip_address": "117.22.252.205"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"mac_address": "C6:33:1E:F4:14:44",
"last_time_online": {
"date": "2019-12-18 17:39:24.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"ip_address": "128.37.39.153",
"current_station_name": "Hilpert, Stroman and Hand",
"current_oem_station_id": "358589",
"current_app_version": "6.81.38",
"expected_app_version": "8.19.63",
"current_sm_company_id": 8,
"current_sm_station_id": 4,
"expected_sm_company_id": 4,
"expected_sm_station_id": 9,
"expected_oem_station_id": 1,
"expected_station_name": "0D:69:3A:68:DD:F9",
"app_mode": null,
"codename": null,
"last_local_mapping_updated_at": {
"date": "2005-12-17 07:47:57.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"last_remote_mapping_updated_at": {
"date": "1996-11-01 11:16:06.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": "2024-06-25T14:41:29.000000Z",
"created_at": "2024-06-25T14:41:29.000000Z",
"id": 65
}
}
Received response:
Request failed with error:
Delete a PAM device
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/pam_devices/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/pam_devices/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 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=quam&sm_company_id=facere&start_date=omnis&end_date=dignissimos&per_page=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/pam_transactions"
);
const params = {
"term": "quam",
"sm_company_id": "facere",
"start_date": "omnis",
"end_date": "dignissimos",
"per_page": "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": [
{
"updated_at": "2024-06-25T14:41:31.000000Z",
"created_at": "2024-06-25T14:41:31.000000Z",
"id": 2478743
},
{
"updated_at": "2024-06-25T14:41:32.000000Z",
"created_at": "2024-06-25T14:41:32.000000Z",
"id": 2478744
}
],
"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-06-25T14:41:34.000000Z",
"created_at": "2024-06-25T14:41:34.000000Z",
"id": 2478745
}
}
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/6?mac_address=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/pam_transactions/6"
);
const params = {
"mac_address": "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": {
"updated_at": "2024-06-25T14:41:36.000000Z",
"created_at": "2024-06-25T14:41:36.000000Z",
"id": 2478746
}
}
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/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/pam_transactions/2"
);
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-06-25T14:41:38.000000Z",
"created_at": "2024-06-25T14:41:38.000000Z",
"id": 2478747
}
}
Received response:
Request failed with error:
Delete a PAM transaction
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/pam_transactions/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_transactions/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 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=sit&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/pam_attached_devices"
);
const params = {
"term": "sit",
"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": [
{
"last_time_online": {
"date": "1985-06-23 13:32:30.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": "99:B6:3F:86:39:FE",
"ip_address": "80.29.10.193",
"station_name": "West Inc",
"oem_station_id": 4,
"sm_company_id": 6,
"sm_station_id": 1,
"app_client": "INSIGNIA"
},
{
"last_time_online": {
"date": "1979-06-05 02:46:47.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": "44:CF:7E:59:24:D1",
"ip_address": "157.162.170.249",
"station_name": "Lubowitz, Donnelly and Roberts",
"oem_station_id": 6,
"sm_company_id": 4,
"sm_station_id": 5,
"app_client": "MBH POWER LIMITED"
}
],
"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\": \"natus\",
\"ip_address\": \"88.113.97.3\",
\"station_name\": \"iste\",
\"oem_station_id\": 16,
\"sm_company_id\": 13,
\"sm_station_id\": 12,
\"pam_device_id\": 14,
\"app_client\": \"sint\"
}"
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": "natus",
"ip_address": "88.113.97.3",
"station_name": "iste",
"oem_station_id": 16,
"sm_company_id": 13,
"sm_station_id": 12,
"pam_device_id": 14,
"app_client": "sint"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"last_time_online": {
"date": "2013-12-10 06:17:48.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": "AF:3A:0C:2A:CC:76",
"ip_address": "251.50.162.248",
"station_name": "Maggio-Effertz",
"oem_station_id": 9,
"sm_company_id": 2,
"sm_station_id": 8,
"app_client": "PURE FLOUR MILLS LIMITED - PASTA (PHC)"
}
}
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/16?mac_address=vel" \
--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/16"
);
const params = {
"mac_address": "vel",
};
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": "2020-11-30 10:45:04.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": "15:AF:A8:24:AA:66",
"ip_address": "116.117.0.243",
"station_name": "Ratke LLC",
"oem_station_id": 7,
"sm_company_id": 3,
"sm_station_id": 5,
"app_client": "Simple Customer"
}
}
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/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"mac_address\": \"aut\",
\"ip_address\": \"125.163.197.103\",
\"station_name\": \"est\",
\"oem_station_id\": 6,
\"sm_company_id\": 6,
\"sm_station_id\": 10,
\"pam_device_id\": 5,
\"app_client\": \"dolores\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/pam_attached_devices/11"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"mac_address": "aut",
"ip_address": "125.163.197.103",
"station_name": "est",
"oem_station_id": 6,
"sm_company_id": 6,
"sm_station_id": 10,
"pam_device_id": 5,
"app_client": "dolores"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"last_time_online": {
"date": "2002-06-24 09:41:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": "77:06:94:8C:7F:05",
"ip_address": "88.141.83.141",
"station_name": "Ruecker, Jaskolski and Dicki",
"oem_station_id": 5,
"sm_company_id": 8,
"sm_station_id": 3,
"app_client": "PURE FLOUR MILL"
}
}
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/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/pam_attached_devices/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:
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\": \"rerum\",
\"sm_company_id\": 16,
\"sm_station_id\": 7,
\"error_message\": \"dolores\",
\"error_activity\": \"quod\",
\"error_body\": \"atque\",
\"error_date_time\": \"ut\"
}"
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": "rerum",
"sm_company_id": 16,
"sm_station_id": 7,
"error_message": "dolores",
"error_activity": "quod",
"error_body": "atque",
"error_date_time": "ut"
};
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=12&company_id=5&vendor_id=7&cost_center_id=17&sm_station_id=13&mac_address=animi&date=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/fuel_purchase_history"
);
const params = {
"per_page": "12",
"company_id": "5",
"vendor_id": "7",
"cost_center_id": "17",
"sm_station_id": "13",
"mac_address": "animi",
"date": "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": [
{
"company_id": 42,
"vendor_id": 215,
"user_id": 271,
"cost_center_id": 336,
"nfctag_id": 649,
"driver_id": 146,
"way_bill_number": "WB-2654",
"vendor_station_name": "Barton Ltd",
"vehicle_plate_number": "xq-329-ie",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 374246218.34,
"volume": 0,
"odometer_reading": 4,
"product": "ATK",
"pump": 3,
"selling_price": 9798.01,
"current_credit_limit": 388002.64,
"attendant": "DEFAULT",
"last_volume_dispensed": 284186412.99,
"last_amount_paid": 5.73,
"transaction_seq_no": 44959,
"is_balanced": true,
"oem_station_id": 4,
"sm_station_id": 4,
"balance_refunded": 4241090.89,
"tapnet_amount": 20.2,
"tapnet_volume": 1647.32,
"tapnet_transaction_time": {
"date": "2001-10-10 22:58:10.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "33:35:02:B2:E1:7D",
"release_token": "99",
"is_fdc_value_fill": true,
"fdc_volume": 139.3,
"fdc_amount": 1447.19,
"last_tsn_source": null,
"verified_volume": 46279.43,
"verified_amount": 114986.55,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 196,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:54:17.000000Z",
"created_at": "2024-06-25T14:54:17.000000Z",
"id": 10202,
"driver": {
"id": 146,
"company_id": 11,
"fullname": "YUSEA WOMELA",
"address": "SAGAMU",
"phone_number": "8111111154",
"email": "Sourabh.sanganeria48@tolaram.com",
"driver_speciality": "Truck",
"status": "active",
"created_at": "2023-02-17T11:32:07.000000Z",
"updated_at": "2023-09-01T18:10:35.000000Z",
"deleted_at": null
},
"company": {
"id": 42,
"name": "KINGS FLOUR MILL",
"email": "danielhughes42@example.com",
"phone_number": "164",
"registration_number": "164",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 506912,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c140",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-03-30T13:44:17.000000Z",
"updated_at": "2023-03-30T13:44:17.000000Z",
"deleted_at": null
},
"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
},
"costCenter": {
"id": 336,
"company_id": 42,
"name": "KINGS FLOUR MILL",
"email": "0fI0BHC@tolaram.com",
"phone_number": "339-855-2801",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:37:50.000000Z",
"updated_at": "2023-08-29T16:37:50.000000Z",
"deleted_at": null
},
"nfcTag": {
"id": 649,
"company_id": 150,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-7941",
"nfctag_oem_id": "C6635431",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "11060810269241",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2024-04-24T09:34:02.000000Z",
"updated_at": "2023-09-01T18:40:34.000000Z",
"deleted_at": null,
"upload_id": null
},
"userWallet": null,
"remark": null
},
{
"company_id": 94,
"vendor_id": 215,
"user_id": 394,
"cost_center_id": 244,
"nfctag_id": 1423,
"driver_id": 264,
"way_bill_number": "WB-4717",
"vendor_station_name": "Price, Klein and Gerhold",
"vehicle_plate_number": "rx-359-pz",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 36.92,
"volume": 18.86,
"odometer_reading": 1,
"product": "ATK",
"pump": 6,
"selling_price": 3.85,
"current_credit_limit": 4169860.55,
"attendant": "DEFAULT",
"last_volume_dispensed": 12000.64,
"last_amount_paid": 13256244.43,
"transaction_seq_no": 95771,
"is_balanced": true,
"oem_station_id": 5,
"sm_station_id": 9,
"balance_refunded": 1.18,
"tapnet_amount": 24.89,
"tapnet_volume": 2152.98,
"tapnet_transaction_time": {
"date": "2012-09-04 09:10:31.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "A1:36:87:41:F9:C5",
"release_token": "58",
"is_fdc_value_fill": true,
"fdc_volume": 0.16,
"fdc_amount": 229777066.43,
"last_tsn_source": null,
"verified_volume": 6407.65,
"verified_amount": 32126.43,
"reconciliation_source": "FDC",
"one_time_auth_id": 434,
"recon_balance_refunded": false,
"updated_at": "2024-06-25T14:54:20.000000Z",
"created_at": "2024-06-25T14:54:20.000000Z",
"id": 10203,
"driver": {
"id": 264,
"company_id": 94,
"fullname": "JAY",
"address": "IKEJA",
"phone_number": "8028268505",
"email": "abujamal1005@gmail.com",
"driver_speciality": "Saloon Car",
"status": "active",
"created_at": "2023-04-05T10:34:34.000000Z",
"updated_at": "2023-04-05T10:34:34.000000Z",
"deleted_at": null
},
"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
},
"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
},
"costCenter": {
"id": 244,
"company_id": 94,
"name": "Happy Cost center",
"email": "jas@fad.com",
"phone_number": "12345678901",
"daily_purchase_budget": 250,
"weekly_purchase_budget": 1000,
"monthly_purchase_budget": 5000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-04-05T11:24:41.000000Z",
"updated_at": "2023-04-05T11:24:41.000000Z",
"deleted_at": null
},
"nfcTag": {
"id": 1423,
"company_id": 44,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-9930",
"nfctag_oem_id": "9A0233BE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "13110132",
"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:10:35.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\": 12,
\"vendor_id\": 8,
\"cost_center_id\": 19,
\"nfctag_id\": 10,
\"driver_id\": 11,
\"way_bill_number\": \"iusto\",
\"vendor_station_name\": \"velit\",
\"vehicle_plate_number\": \"labore\",
\"auth_type\": \"Key Tag\",
\"barcode_id\": \"ab\",
\"amount_paid\": 3058414,
\"volume\": 271.01794,
\"odometer_reading\": 16.87,
\"product\": \"ATK\",
\"pump\": 20,
\"selling_price\": 2005709,
\"current_credit_limit\": 72946.3669866,
\"attendant\": \"praesentium\",
\"last_volume_dispensed\": 21845.13,
\"last_amount_paid\": 394.4472,
\"transaction_seq_no\": 16,
\"is_balanced\": false,
\"oem_station_id\": 7,
\"sm_station_id\": 10,
\"balance_refunded\": 8333.02126231,
\"tapnet_amount\": 88565.291329,
\"tapnet_volume\": 158272562.026686,
\"tapnet_transaction_time\": \"2024-06-25 14:54:27\",
\"thankucash_reward_applied\": \"alias\",
\"thankucash_reward_value\": \"est\",
\"app_mode\": \"FCC MODE\",
\"release_token\": \"jt\",
\"is_fdc_value_fill\": true,
\"fdc_volume\": 6910404.7,
\"fdc_amount\": 0,
\"last_tsn_source\": \"nulla\",
\"verified_volume\": 21.8805151,
\"verified_amount\": 139089403.0769195,
\"reconciliation_source\": \"MANUAL\",
\"one_time_auth_id\": 14,
\"recon_balance_refunded\": true
}"
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": 12,
"vendor_id": 8,
"cost_center_id": 19,
"nfctag_id": 10,
"driver_id": 11,
"way_bill_number": "iusto",
"vendor_station_name": "velit",
"vehicle_plate_number": "labore",
"auth_type": "Key Tag",
"barcode_id": "ab",
"amount_paid": 3058414,
"volume": 271.01794,
"odometer_reading": 16.87,
"product": "ATK",
"pump": 20,
"selling_price": 2005709,
"current_credit_limit": 72946.3669866,
"attendant": "praesentium",
"last_volume_dispensed": 21845.13,
"last_amount_paid": 394.4472,
"transaction_seq_no": 16,
"is_balanced": false,
"oem_station_id": 7,
"sm_station_id": 10,
"balance_refunded": 8333.02126231,
"tapnet_amount": 88565.291329,
"tapnet_volume": 158272562.026686,
"tapnet_transaction_time": "2024-06-25 14:54:27",
"thankucash_reward_applied": "alias",
"thankucash_reward_value": "est",
"app_mode": "FCC MODE",
"release_token": "jt",
"is_fdc_value_fill": true,
"fdc_volume": 6910404.7,
"fdc_amount": 0,
"last_tsn_source": "nulla",
"verified_volume": 21.8805151,
"verified_amount": 139089403.0769195,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 14,
"recon_balance_refunded": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 71,
"vendor_id": 302,
"user_id": 228,
"cost_center_id": 365,
"nfctag_id": 2269,
"driver_id": 1483,
"way_bill_number": "WB-0813",
"vendor_station_name": "Donnelly-Crooks",
"vehicle_plate_number": "cf-788-il",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 1630413.94,
"volume": 62152.51,
"odometer_reading": 1,
"product": "LPFO",
"pump": 6,
"selling_price": 291902461.16,
"current_credit_limit": 2246.3,
"attendant": "DEFAULT",
"last_volume_dispensed": 2.26,
"last_amount_paid": 3.91,
"transaction_seq_no": 81947,
"is_balanced": true,
"oem_station_id": 6,
"sm_station_id": 3,
"balance_refunded": 18210.78,
"tapnet_amount": 187130.48,
"tapnet_volume": 0.41,
"tapnet_transaction_time": {
"date": "1972-02-18 00:15:28.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "8C:7A:E0:BC:6C:67",
"release_token": "76",
"is_fdc_value_fill": true,
"fdc_volume": 775.87,
"fdc_amount": 2.37,
"last_tsn_source": null,
"verified_volume": 541184514.65,
"verified_amount": 85611025.68,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 126,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:54:31.000000Z",
"created_at": "2024-06-25T14:54:31.000000Z",
"id": 10204,
"driver": {
"id": 1483,
"company_id": 141,
"fullname": "YAHUZA SHUAIBU",
"address": "BHN, Mowe Ogun State",
"phone_number": "313-028-9485",
"email": "reWXhKE@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T18:12:57.000000Z",
"updated_at": "2023-09-01T21:50:00.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": 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
},
"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": 2269,
"company_id": null,
"vendor_id": 215,
"user_id": null,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX 11487",
"nfctag_oem_id": "9AFE3DBE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": null,
"card_on_thankucash": null,
"card_state": null,
"station_name": null,
"active": 1,
"created_at": "2024-05-24T09:31:53.000000Z",
"updated_at": "2024-05-24T09:31:53.000000Z",
"deleted_at": null,
"upload_id": 9
},
"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/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/fuel_purchase_history/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": {
"company_id": 86,
"vendor_id": 306,
"user_id": 289,
"cost_center_id": 388,
"nfctag_id": 1399,
"driver_id": 1402,
"way_bill_number": "WB-7980",
"vendor_station_name": "Larkin, Wuckert and Rempel",
"vehicle_plate_number": "op-666-vz",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 0.07,
"volume": 147.59,
"odometer_reading": 5,
"product": "AGO",
"pump": 3,
"selling_price": 570.15,
"current_credit_limit": 0.06,
"attendant": "DEFAULT",
"last_volume_dispensed": 2162.79,
"last_amount_paid": 119492240.42,
"transaction_seq_no": 82704,
"is_balanced": true,
"oem_station_id": 1,
"sm_station_id": 4,
"balance_refunded": 821.35,
"tapnet_amount": 1076.19,
"tapnet_volume": 2445640.48,
"tapnet_transaction_time": {
"date": "1973-04-03 11:05:58.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "19:94:B0:8D:37:50",
"release_token": "07",
"is_fdc_value_fill": false,
"fdc_volume": 369.87,
"fdc_amount": 0,
"last_tsn_source": null,
"verified_volume": 138.44,
"verified_amount": 10331870.47,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 936,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:54:39.000000Z",
"created_at": "2024-06-25T14:54:39.000000Z",
"id": 10205,
"driver": {
"id": 1402,
"company_id": 141,
"fullname": "YUSUF ANAS",
"address": "BHN, Mowe Ogun State",
"phone_number": "151-318-8377",
"email": "uHoJzcC@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T18:05:26.000000Z",
"updated_at": "2023-09-01T21:50:00.000000Z",
"deleted_at": null
},
"company": {
"id": 86,
"name": "TG ARLA DIARY PRODUCTS LFTZ ENTERPRISES",
"email": "joselopez86@example.com",
"phone_number": "208",
"registration_number": "208",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 197823,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c184",
"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-13T13:44:17.000000Z",
"updated_at": "2023-05-13T13: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
},
"costCenter": {
"id": 388,
"company_id": 86,
"name": "TG ARLA DIARY PRODUCTS LFTZ ENTERPRISES",
"email": "5d8IJHe@tolaram.com",
"phone_number": "546-472-4031",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:38:33.000000Z",
"updated_at": "2023-08-29T16:38:33.000000Z",
"deleted_at": null
},
"nfcTag": {
"id": 1399,
"company_id": 151,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-9901",
"nfctag_oem_id": "0AA23EBE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "43937151",
"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:42:34.000000Z",
"deleted_at": null,
"upload_id": null
},
"userWallet": null,
"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/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 9,
\"vendor_id\": 15,
\"cost_center_id\": 4,
\"nfctag_id\": 4,
\"driver_id\": 14,
\"way_bill_number\": \"qui\",
\"vendor_station_name\": \"fuga\",
\"vehicle_plate_number\": \"qui\",
\"auth_type\": \"Card\",
\"barcode_id\": \"quo\",
\"amount_paid\": 536.4,
\"volume\": 11.4505737,
\"odometer_reading\": 81,
\"product\": \"PMS\",
\"pump\": 7,
\"selling_price\": 35.44505,
\"current_credit_limit\": 2685892,
\"attendant\": \"sequi\",
\"last_volume_dispensed\": 384426887,
\"last_amount_paid\": 313871.18585,
\"transaction_seq_no\": 14,
\"is_balanced\": true,
\"oem_station_id\": 16,
\"sm_station_id\": 20,
\"balance_refunded\": 0,
\"tapnet_amount\": 0.897635,
\"tapnet_volume\": 359199246.28,
\"tapnet_transaction_time\": \"2024-06-25 14:54:42\",
\"thankucash_reward_applied\": \"nam\",
\"thankucash_reward_value\": \"et\",
\"app_mode\": \"NO FCC MODE\",
\"release_token\": \"\",
\"is_fdc_value_fill\": true,
\"fdc_volume\": 59436.81750634,
\"fdc_amount\": 552984686.8455313,
\"last_tsn_source\": \"eligendi\",
\"verified_volume\": 5.9,
\"verified_amount\": 33558.86,
\"reconciliation_source\": \"MANUAL\",
\"one_time_auth_id\": 1,
\"recon_balance_refunded\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/fuel_purchase_history/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 9,
"vendor_id": 15,
"cost_center_id": 4,
"nfctag_id": 4,
"driver_id": 14,
"way_bill_number": "qui",
"vendor_station_name": "fuga",
"vehicle_plate_number": "qui",
"auth_type": "Card",
"barcode_id": "quo",
"amount_paid": 536.4,
"volume": 11.4505737,
"odometer_reading": 81,
"product": "PMS",
"pump": 7,
"selling_price": 35.44505,
"current_credit_limit": 2685892,
"attendant": "sequi",
"last_volume_dispensed": 384426887,
"last_amount_paid": 313871.18585,
"transaction_seq_no": 14,
"is_balanced": true,
"oem_station_id": 16,
"sm_station_id": 20,
"balance_refunded": 0,
"tapnet_amount": 0.897635,
"tapnet_volume": 359199246.28,
"tapnet_transaction_time": "2024-06-25 14:54:42",
"thankucash_reward_applied": "nam",
"thankucash_reward_value": "et",
"app_mode": "NO FCC MODE",
"release_token": "",
"is_fdc_value_fill": true,
"fdc_volume": 59436.81750634,
"fdc_amount": 552984686.8455313,
"last_tsn_source": "eligendi",
"verified_volume": 5.9,
"verified_amount": 33558.86,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 1,
"recon_balance_refunded": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 88,
"vendor_id": 215,
"user_id": 316,
"cost_center_id": 391,
"nfctag_id": 1639,
"driver_id": 1767,
"way_bill_number": "WB-8441",
"vendor_station_name": "Doyle Inc",
"vehicle_plate_number": "hz-315-th",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 58522.17,
"volume": 99782632.87,
"odometer_reading": 1,
"product": "ATK",
"pump": 2,
"selling_price": 115723.06,
"current_credit_limit": 53947422.56,
"attendant": "DEFAULT",
"last_volume_dispensed": 1,
"last_amount_paid": 149.11,
"transaction_seq_no": 73726,
"is_balanced": true,
"oem_station_id": 4,
"sm_station_id": 9,
"balance_refunded": 3684247.56,
"tapnet_amount": 4050648.24,
"tapnet_volume": 691.39,
"tapnet_transaction_time": {
"date": "1979-02-17 17:49:36.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "54:7E:51:CF:DB:F0",
"release_token": "45",
"is_fdc_value_fill": false,
"fdc_volume": 256564.62,
"fdc_amount": 26471.17,
"last_tsn_source": null,
"verified_volume": 0.3,
"verified_amount": 2863451.38,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 659,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:54:46.000000Z",
"created_at": "2024-06-25T14:54:46.000000Z",
"id": 10206,
"driver": {
"id": 1767,
"company_id": 54,
"fullname": "Ola",
"address": "SAGAMU",
"phone_number": "012333333111111",
"email": "ola@bhn.com",
"driver_speciality": "SUV",
"status": "active",
"created_at": "2024-04-24T08:36:02.000000Z",
"updated_at": "2024-04-24T08:45:23.000000Z",
"deleted_at": 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
},
"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
},
"costCenter": {
"id": 391,
"company_id": 88,
"name": "VALENCY AGRO NIGERIA LIMITED",
"email": "Dtq2frr@tolaram.com",
"phone_number": "383-113-2884",
"daily_purchase_budget": 0,
"weekly_purchase_budget": 0,
"monthly_purchase_budget": 0,
"license_type": "lsc",
"active": 1,
"created_at": "2023-08-29T16:38:34.000000Z",
"updated_at": "2023-08-29T16:38:34.000000Z",
"deleted_at": null
},
"nfcTag": {
"id": 1639,
"company_id": 141,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-10143",
"nfctag_oem_id": "2A4739BE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "10911313",
"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
},
"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/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/fuel_purchase_history/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 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=14&company_id=13&vendor_id=18&start_date=architecto&end_date=sunt" \
--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": "14",
"company_id": "13",
"vendor_id": "18",
"start_date": "architecto",
"end_date": "sunt",
};
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": 13,
"user_id": 324,
"amount_refunded": 17128197.74,
"start_company_balance": 929.88,
"end_company_balance": 5576.02,
"refund_date": {
"date": "1987-11-14 04:38:41.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"fuel_purchase_history_id": 8884,
"vendor_station_name": "Greenholt, Veum and McCullough",
"vehicle_plate_number": "CIELO AZUL LOGISTIC LTD",
"auth_type": "m",
"amount_paid": 5236927.6,
"verified_amount": 92651.73,
"nfctag_id": 2335,
"driver_id": 1058,
"volume": 3.35,
"product": "AGO",
"pump": 0,
"selling_price": 179771973.53,
"transaction_date": {
"date": "1981-04-26 11:36:26.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": 4,
"one_time_auth_id": 4,
"updated_at": "2024-06-25T14:54:54.000000Z",
"created_at": "2024-06-25T14:54:54.000000Z",
"id": 75,
"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
},
"company": {
"id": 13,
"name": "CIELO AZUL LOGISTIC LTD",
"email": "matthewharris13@example.com",
"phone_number": "135",
"registration_number": "135",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 126804,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c111",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-03-01T13:44:17.000000Z",
"updated_at": "2023-03-01T13:44:17.000000Z",
"deleted_at": null
},
"user": {
"id": 324,
"title": null,
"name": "Ebunam chinonso",
"email": "Stphilips007@gmail.com",
"phone": "8063166037",
"avatar": null,
"username": "Stphilips007@gmail.com",
"gender": "male",
"newsletter": 0,
"active": 1,
"card_brand": null,
"card_last_four": null,
"is_admin": 0,
"is_vendor": 1,
"active_vendor_group": null,
"active_vendor": null,
"otp": null,
"created_at": "2023-12-13T13:59:02.000000Z",
"updated_at": "2023-12-13T13:59:02.000000Z",
"deleted_at": null
},
"fuel_purchase_history": {
"id": 8884,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 206,
"way_bill_number": "0mwqj9",
"nfctag_id": 217,
"driver_id": 120,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "DED 642 XB",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 1000,
"volume": 100,
"odometer_reading": "0",
"product": "AGO",
"pump": 1,
"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": "4j",
"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-04T18:58:32.000000Z",
"updated_at": "2024-06-04T20:12:50.000000Z",
"deleted_at": null,
"transaction_id": null,
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22:55.000000Z",
"deleted_at": null
}
},
"nfc_tag": {
"id": 2335,
"company_id": null,
"vendor_id": 215,
"user_id": null,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX 11430",
"nfctag_oem_id": "5A902ABE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": null,
"card_on_thankucash": null,
"card_state": null,
"station_name": null,
"active": 1,
"created_at": "2024-05-24T10:22:17.000000Z",
"updated_at": "2024-05-24T10:22:17.000000Z",
"deleted_at": null,
"upload_id": 3
},
"driver": {
"id": 1058,
"company_id": 141,
"fullname": "MUHAMMAD HARUNA WAKILI",
"address": "BHN, Mowe Ogun State",
"phone_number": "910-558-8912",
"email": "nZXpqBH@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T17:55:41.000000Z",
"updated_at": "2023-09-01T18:31:49.000000Z",
"deleted_at": null
},
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22:55.000000Z",
"deleted_at": null
}
},
{
"vendor_id": 302,
"company_id": 88,
"user_id": 261,
"amount_refunded": 1691580,
"start_company_balance": 372527443.92,
"end_company_balance": 17.12,
"refund_date": {
"date": "2009-04-25 06:39:38.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"fuel_purchase_history_id": 9313,
"vendor_station_name": "Lesch, Stamm and Spencer",
"vehicle_plate_number": "VALENCY AGRO NIGERIA LIMITED",
"auth_type": "x",
"amount_paid": 7368412.95,
"verified_amount": 3.22,
"nfctag_id": 1202,
"driver_id": 1640,
"volume": 37477.85,
"product": "DPK",
"pump": 4,
"selling_price": 73.61,
"transaction_date": {
"date": "1971-04-16 23:35:44.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": 2,
"one_time_auth_id": 0,
"updated_at": "2024-06-25T14:54:57.000000Z",
"created_at": "2024-06-25T14:54:57.000000Z",
"id": 76,
"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
},
"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
},
"user": {
"id": 261,
"title": "Mr",
"name": "Oyeladun Idowu",
"email": "oyeladun.idowu@tolaram.com",
"phone": "679-871-4955",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=oyeladun.idowu_Qle",
"username": "oyeladun.idowu_Qle",
"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": "7166685",
"created_at": "2023-09-11T21:49:14.000000Z",
"updated_at": "2023-09-11T21:49:14.000000Z",
"deleted_at": null
},
"fuel_purchase_history": {
"id": 9313,
"company_id": 54,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 206,
"way_bill_number": "XJNQ3B",
"nfctag_id": 2362,
"driver_id": 1784,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "JGB 725 ZT",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 480,
"volume": 40,
"odometer_reading": "0",
"product": "PMS",
"pump": 7,
"selling_price": 12,
"current_credit_limit": 0,
"attendant": "DEFAULT",
"last_volume_dispensed": 40,
"last_amount_paid": 480,
"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": "cT",
"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-11T08:12:36.000000Z",
"updated_at": "2024-06-11T08:17:43.000000Z",
"deleted_at": null,
"transaction_id": null,
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22:55.000000Z",
"deleted_at": null
}
},
"nfc_tag": {
"id": 1202,
"company_id": 44,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-9703",
"nfctag_oem_id": "9AA233BE",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "NA",
"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": 1640,
"company_id": 44,
"fullname": "OLADEJO TAIWO OLAITAN",
"address": "BHN, Mowe Ogun State",
"phone_number": "467-071-7357",
"email": "dbOMVAI@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T18:18:26.000000Z",
"updated_at": "2023-09-01T21:50:00.000000Z",
"deleted_at": null
},
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22: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:
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/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/refund_history/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,
"company_id": 10,
"user_id": 399,
"amount_refunded": 1868432.35,
"start_company_balance": 15942.17,
"end_company_balance": 515.6,
"refund_date": {
"date": "1975-02-22 02:51:42.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"fuel_purchase_history_id": 4551,
"vendor_station_name": "Donnelly-Ullrich",
"vehicle_plate_number": "CHECKERS AFRICA LIMITED",
"auth_type": "z",
"amount_paid": 34605.26,
"verified_amount": 267932.47,
"nfctag_id": 226,
"driver_id": 1116,
"volume": 28305.32,
"product": "PMS",
"pump": 5,
"selling_price": 486.13,
"transaction_date": {
"date": "2007-06-21 01:30:35.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"mac_address": 6,
"one_time_auth_id": 0,
"updated_at": "2024-06-25T14:55:07.000000Z",
"created_at": "2024-06-25T14:55:07.000000Z",
"id": 77,
"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
},
"company": {
"id": 10,
"name": "CHECKERS AFRICA LIMITED",
"email": "amyparker10@example.com",
"phone_number": "132",
"registration_number": "132",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 538917,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c108",
"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-26T13:44:17.000000Z",
"updated_at": "2023-02-26T13:44:17.000000Z",
"deleted_at": null
},
"user": {
"id": 399,
"title": null,
"name": "bili",
"email": "bili1@gmail.com",
"phone": "23456712",
"avatar": null,
"username": "bili1",
"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-06-19T15:07:03.000000Z",
"updated_at": "2024-06-19T15:12:52.000000Z",
"deleted_at": null
},
"fuel_purchase_history": {
"id": 4551,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 206,
"way_bill_number": "KC0I98",
"nfctag_id": 312,
"driver_id": 208,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "WDE 282 YE",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 200,
"volume": 20,
"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": "7Z",
"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-28T19:28:25.000000Z",
"updated_at": "2023-12-28T19:28:25.000000Z",
"deleted_at": null,
"transaction_id": null,
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22:55.000000Z",
"deleted_at": null
}
},
"nfc_tag": {
"id": 226,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"station_id": null,
"pin": "0000",
"nfctag_type": "Key Tag",
"nfctag_code": "VLX-7735",
"nfctag_oem_id": "96AE4831",
"nfctag_url_slug": null,
"created_by": null,
"card_number": "49",
"card_on_thankucash": null,
"card_state": "Generic",
"station_name": null,
"active": 1,
"created_at": "2023-02-16T13:01:41.000000Z",
"updated_at": "2023-09-01T18:10:35.000000Z",
"deleted_at": null,
"upload_id": null
},
"driver": {
"id": 1116,
"company_id": 37,
"fullname": "JERRY DANZEL",
"address": "BHN, Mowe Ogun State",
"phone_number": "644-214-7411",
"email": "hyCBetI@tolaram.com",
"driver_speciality": "Trucks",
"status": "active",
"created_at": "2023-08-28T17:57:09.000000Z",
"updated_at": "2023-09-01T18:40:34.000000Z",
"deleted_at": null
},
"cost_center": {
"id": 206,
"company_id": 54,
"name": "BHN Logistics",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "12345678901",
"daily_purchase_budget": 100000000,
"weekly_purchase_budget": 100000000,
"monthly_purchase_budget": 100000000,
"license_type": "lsc",
"active": 1,
"created_at": "2023-03-10T03:22:55.000000Z",
"updated_at": "2023-03-10T03:22:55.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/adipisci" \
--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/adipisci"
);
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/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/refund_history/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 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=13&company_id=20&vendor_id=19&start_date=eligendi&end_date=accusantium" \
--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": "13",
"company_id": "20",
"vendor_id": "19",
"start_date": "eligendi",
"end_date": "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",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"company_id": 29,
"vendor_id": 215,
"user_id": 285,
"fuel_purchase_history_id": 3128,
"start_company_balance": 8202845.83,
"end_company_balance": 17.33,
"current_credit_limit": 6,
"updated_at": "2024-06-25T14:55:14.000000Z",
"created_at": "2024-06-25T14:55:14.000000Z",
"id": 55,
"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
},
"company": {
"id": 29,
"name": "FORTUNE GLOBAL SHIPPING & LOGISTICS LTD",
"email": "lucasjames29@example.com",
"phone_number": "151",
"registration_number": "151",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 285046,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c127",
"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-17T13:44:17.000000Z",
"updated_at": "2023-03-17T13:44:17.000000Z",
"deleted_at": null
},
"fuel_purchase_history": {
"id": 3128,
"company_id": 11,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 206,
"way_bill_number": "0000",
"nfctag_id": 216,
"driver_id": 119,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "DED 641 XB",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 3080,
"volume": 308,
"odometer_reading": "0",
"product": "AGO",
"pump": 1,
"selling_price": 10,
"current_credit_limit": 0,
"attendant": "DEFAULT",
"last_volume_dispensed": 308,
"last_amount_paid": 3080,
"transaction_seq_no": null,
"is_balanced": 1,
"oem_station_id": 204,
"sm_station_id": 360,
"balance_refunded": null,
"tapnet_amount": null,
"tapnet_volume": null,
"tapnet_transaction_time": null,
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": null,
"release_token": "uV",
"is_fdc_value_fill": 0,
"fdc_volume": null,
"fdc_amount": null,
"last_tsn_source": null,
"verified_volume": 308,
"verified_amount": 3080,
"reconciliation_source": null,
"one_time_auth_id": null,
"recon_balance_refunded": 0,
"created_at": "2023-09-08T14:38:11.000000Z",
"updated_at": "2023-09-08T14:38:11.000000Z",
"deleted_at": null,
"transaction_id": null
},
"user": {
"id": 285,
"title": "Mr",
"name": "Temidayo Oluwatosin",
"email": "ogooluwatemidayo1@gmail.com",
"phone": "540-709-2159",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=temidayo.oluwatosin_Qfm",
"username": "temidayo.oluwatosin_Qfm",
"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": "5110441",
"created_at": "2023-09-11T21:50:48.000000Z",
"updated_at": "2023-09-11T21:50:48.000000Z",
"deleted_at": null
}
},
{
"company_id": 83,
"vendor_id": 306,
"user_id": 364,
"fuel_purchase_history_id": 3618,
"start_company_balance": 1080.91,
"end_company_balance": 2421.82,
"current_credit_limit": 2,
"updated_at": "2024-06-25T14:55:16.000000Z",
"created_at": "2024-06-25T14:55:16.000000Z",
"id": 56,
"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
},
"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
},
"fuel_purchase_history": {
"id": 3618,
"company_id": 4,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 285,
"way_bill_number": "522566",
"nfctag_id": 810,
"driver_id": 747,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "WDE 286 YE",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 6900,
"volume": 690,
"odometer_reading": "0",
"product": "AGO",
"pump": 2,
"selling_price": 10,
"current_credit_limit": 0,
"attendant": "DEFAULT",
"last_volume_dispensed": 690,
"last_amount_paid": 6900,
"transaction_seq_no": null,
"is_balanced": 1,
"oem_station_id": 204,
"sm_station_id": 360,
"balance_refunded": null,
"tapnet_amount": null,
"tapnet_volume": null,
"tapnet_transaction_time": null,
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": null,
"release_token": "R4",
"is_fdc_value_fill": 0,
"fdc_volume": null,
"fdc_amount": null,
"last_tsn_source": null,
"verified_volume": 690,
"verified_amount": 6900,
"reconciliation_source": null,
"one_time_auth_id": null,
"recon_balance_refunded": 0,
"created_at": "2023-09-22T10:01:55.000000Z",
"updated_at": "2023-09-22T10:01:55.000000Z",
"deleted_at": null,
"transaction_id": null
},
"user": {
"id": 364,
"title": null,
"name": "Anabuike Tochukwu Kennedy",
"email": "Kennedy@tolaram.com",
"phone": "8055096659",
"avatar": null,
"username": "Kennedy@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:40:31.000000Z",
"updated_at": "2024-03-21T15:40:31.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/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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 51,
"vendor_id": 215,
"user_id": 245,
"fuel_purchase_history_id": 2259,
"start_company_balance": 6.88,
"end_company_balance": 4189297.2,
"current_credit_limit": 2,
"updated_at": "2024-06-25T14:55:22.000000Z",
"created_at": "2024-06-25T14:55:22.000000Z",
"id": 57,
"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
},
"company": {
"id": 51,
"name": "MUKESH AS TEST CUSTOMER",
"email": "miafisher51@example.com",
"phone_number": "173",
"registration_number": "173",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 587319,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c149",
"loyalty_points_by_group": 0,
"loyalty_reward_percentage": null,
"loyalty_reward_points": null,
"loyalty_min_purchase_amount": null,
"loyalty_min_point": null,
"created_at": "2023-04-08T13:44:17.000000Z",
"updated_at": "2023-04-08T13:44:17.000000Z",
"deleted_at": null
},
"fuel_purchase_history": {
"id": 2259,
"company_id": 141,
"vendor_id": 215,
"user_id": 1,
"cost_center_id": 206,
"way_bill_number": "0000",
"nfctag_id": 893,
"driver_id": 830,
"vendor_station_name": "MCPL MOWE",
"vehicle_plate_number": "DED 712 XB",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 900,
"volume": 90,
"odometer_reading": "0",
"product": "AGO",
"pump": 2,
"selling_price": 10,
"current_credit_limit": 0,
"attendant": "DEFAULT",
"last_volume_dispensed": 90,
"last_amount_paid": 900,
"transaction_seq_no": null,
"is_balanced": 1,
"oem_station_id": 204,
"sm_station_id": 360,
"balance_refunded": null,
"tapnet_amount": null,
"tapnet_volume": null,
"tapnet_transaction_time": null,
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": null,
"release_token": "hm",
"is_fdc_value_fill": 0,
"fdc_volume": null,
"fdc_amount": null,
"last_tsn_source": null,
"verified_volume": 90,
"verified_amount": 900,
"reconciliation_source": null,
"one_time_auth_id": null,
"recon_balance_refunded": 0,
"created_at": "2023-08-03T14:52:37.000000Z",
"updated_at": "2023-08-03T14:52:37.000000Z",
"deleted_at": null,
"transaction_id": null
},
"user": {
"id": 245,
"title": "Mrs",
"name": "Tadios Betermarian",
"email": "tadi@tolaram.com",
"phone": "1231245645",
"avatar": "https://via.placeholder.com/200x200.png/0033ee?text=tadios.betermarian_T8f",
"username": "tadios.betermarian_T8f",
"gender": "male",
"newsletter": 0,
"active": 1,
"card_brand": null,
"card_last_four": null,
"is_admin": 0,
"is_vendor": 1,
"active_vendor_group": null,
"active_vendor": 87,
"otp": "2267897",
"created_at": "2023-09-11T21:49:03.000000Z",
"updated_at": "2024-06-10T11:13:41.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/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/debit_history/dignissimos"
);
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/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/debit_history/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 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=possimus&vendor_id=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/check_user_wallet_balance"
);
const params = {
"email": "possimus",
"vendor_id": "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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=XD57E1Fx7tzlKhS96sYKeK3bmh9PpNEBY2das8kZ; expires=Tue, 25 Jun 2024 16:56:30 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\": 9,
\"sm_company_id\": 20,
\"vendor_id\": 17,
\"phone_number\": 33093,
\"email\": \"aabbott@example.org\",
\"name\": \"minus\",
\"address\": \"est\",
\"driver_speciality\": \"fugit\",
\"gross_amount\": 123.2798,
\"wallet_amount\": 5,
\"reference\": \"quia\",
\"nfc_tag\": \"quo\",
\"pin\": 2,
\"vehicle_plate_number\": \"voluptatibus\",
\"vehicle_fuel_type\": \"HHK\",
\"vehicle_tank_capacity\": \"facilis\",
\"vehicle_auth_type\": \"qui\",
\"vehicle_tracker_id\": \"est\",
\"vehicle_model\": \"illum\",
\"vehicle_engine_capacity\": \"nam\",
\"vehicle_color\": \"tenetur\",
\"vehicle_brand\": \"et\"
}"
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": 9,
"sm_company_id": 20,
"vendor_id": 17,
"phone_number": 33093,
"email": "aabbott@example.org",
"name": "minus",
"address": "est",
"driver_speciality": "fugit",
"gross_amount": 123.2798,
"wallet_amount": 5,
"reference": "quia",
"nfc_tag": "quo",
"pin": 2,
"vehicle_plate_number": "voluptatibus",
"vehicle_fuel_type": "HHK",
"vehicle_tank_capacity": "facilis",
"vehicle_auth_type": "qui",
"vehicle_tracker_id": "est",
"vehicle_model": "illum",
"vehicle_engine_capacity": "nam",
"vehicle_color": "tenetur",
"vehicle_brand": "et"
};
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\": 501224820.06476,
\"vendor_id\": 20,
\"email\": \"rconnelly@example.net\"
}"
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": 501224820.06476,
"vendor_id": 20,
"email": "rconnelly@example.net"
};
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=maxime&vendor_id=tempora&email=reprehenderit&start_date=assumenda&end_date=vel&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": "maxime",
"vendor_id": "tempora",
"email": "reprehenderit",
"start_date": "assumenda",
"end_date": "vel",
"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=voluptatem&end_date=sed&company_id=iure&vendor_id=magni&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/unverified_transactions"
);
const params = {
"start_date": "voluptatem",
"end_date": "sed",
"company_id": "iure",
"vendor_id": "magni",
"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": [
{
"company_id": 3,
"vendor_id": 302,
"user_id": 395,
"cost_center_id": 295,
"nfctag_id": 1315,
"driver_id": 1763,
"way_bill_number": "WB-9160",
"vendor_station_name": "Terry, Bernhard and Herman",
"vehicle_plate_number": "ge-220-th",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 1420544.96,
"volume": 5792339.22,
"odometer_reading": 2,
"product": "PMS",
"pump": 3,
"selling_price": 1650.45,
"current_credit_limit": 1.18,
"attendant": "DEFAULT",
"last_volume_dispensed": 2833.67,
"last_amount_paid": 7012.01,
"transaction_seq_no": 7564,
"is_balanced": true,
"oem_station_id": 2,
"sm_station_id": 6,
"balance_refunded": 5815069.9,
"tapnet_amount": 300472307.28,
"tapnet_volume": 39.44,
"tapnet_transaction_time": {
"date": "1988-12-25 18:28:47.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "A1:0B:36:3D:8E:35",
"release_token": "90",
"is_fdc_value_fill": true,
"fdc_volume": 19860.97,
"fdc_amount": 48813.29,
"last_tsn_source": null,
"verified_volume": 787884698.76,
"verified_amount": 119.08,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 733,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:56:35.000000Z",
"created_at": "2024-06-25T14:56:35.000000Z",
"id": 10207,
"company": {
"id": 3,
"name": "ARLA - MULTIPRO",
"email": "alexbrown3@example.com",
"phone_number": "125",
"registration_number": "125",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 183946,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c101",
"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-19T13:44:17.000000Z",
"updated_at": "2023-02-19T13:44:17.000000Z",
"deleted_at": null
},
"userWallet": null
},
{
"company_id": 92,
"vendor_id": 215,
"user_id": 256,
"cost_center_id": 382,
"nfctag_id": 2220,
"driver_id": 262,
"way_bill_number": "WB-0671",
"vendor_station_name": "McKenzie-Braun",
"vehicle_plate_number": "rz-529-ve",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 91477.73,
"volume": 24062.47,
"odometer_reading": 5,
"product": "AGO",
"pump": 5,
"selling_price": 245369.28,
"current_credit_limit": 131390739.22,
"attendant": "DEFAULT",
"last_volume_dispensed": 81.2,
"last_amount_paid": 68354934.65,
"transaction_seq_no": 47323,
"is_balanced": false,
"oem_station_id": 1,
"sm_station_id": 5,
"balance_refunded": 28.29,
"tapnet_amount": 1763128.13,
"tapnet_volume": 19191.74,
"tapnet_transaction_time": {
"date": "1990-06-05 16:45:17.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "NO FCC MODE",
"mac_address": "B9:C6:66:C9:A7:11",
"release_token": "37",
"is_fdc_value_fill": false,
"fdc_volume": 451.11,
"fdc_amount": 10.95,
"last_tsn_source": null,
"verified_volume": 4416133.81,
"verified_amount": 4627262.11,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 378,
"recon_balance_refunded": true,
"updated_at": "2024-06-25T14:56:39.000000Z",
"created_at": "2024-06-25T14:56:39.000000Z",
"id": 10208,
"company": {
"id": 92,
"name": "Rose Customer",
"email": "kaidenbaker92@example.com",
"phone_number": "214",
"registration_number": "214",
"country": "Nigeria",
"state": "Kano",
"city": "Makoda",
"postcode": null,
"address": "Ikoyi Tower",
"sector": "Oil and Gas",
"tin": 489527,
"website": "https://qa.team/",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": "Rose FN",
"contact_person_lastname": "Cust LN",
"app_uid": "642443395141f",
"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-29T14:55:05.000000Z",
"updated_at": "2023-03-29T14:55:05.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=12&mac_address=odio&ip_address=repudiandae" \
--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": "12",
"mac_address": "odio",
"ip_address": "repudiandae",
};
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": "76:BC:26:B7:36:D7",
"ip_address": "140.82.10.142",
"oem_station_id": 4,
"station_name": "Kertzmann, Hackett and Jakubowski",
"last_time_online": "8 years ago",
"current_app_version": "incidunt",
"expected_app_version": "consequatur",
"velox_mode": "sunt",
"loyalty_mode": "repudiandae",
"sm_company_id": 7,
"sm_station_id": 9,
"updated_at": "2024-06-25T14:56:43.000000Z",
"created_at": "2024-06-25T14:56:43.000000Z",
"id": 63,
"status": "offline"
},
{
"mac_address": "14:3C:E3:60:4F:0B",
"ip_address": "163.49.241.103",
"oem_station_id": 4,
"station_name": "Hickle, Brakus and Jones",
"last_time_online": "11 years ago",
"current_app_version": "itaque",
"expected_app_version": "perspiciatis",
"velox_mode": "vel",
"loyalty_mode": "molestiae",
"sm_company_id": 6,
"sm_station_id": 6,
"updated_at": "2024-06-25T14:56:44.000000Z",
"created_at": "2024-06-25T14:56:44.000000Z",
"id": 64,
"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/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/pos_heartbeats/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": {
"mac_address": "34:06:4C:BB:6A:49",
"ip_address": "141.6.114.39",
"oem_station_id": 1,
"station_name": "Wisozk and Sons",
"last_time_online": "23 years ago",
"current_app_version": "doloremque",
"expected_app_version": "eaque",
"velox_mode": "et",
"loyalty_mode": "necessitatibus",
"sm_company_id": 8,
"sm_station_id": 9,
"updated_at": "2024-06-25T14:56:46.000000Z",
"created_at": "2024-06-25T14:56:46.000000Z",
"id": 65,
"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/13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"last_time_online\": \"2024-06-25T14:56:47\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/pos_heartbeats/13"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"last_time_online": "2024-06-25T14:56:47"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"mac_address": "29:84:51:C7:BD:7F",
"ip_address": "211.225.35.248",
"oem_station_id": 1,
"station_name": "Denesik and Sons",
"last_time_online": "52 years ago",
"current_app_version": "quisquam",
"expected_app_version": "totam",
"velox_mode": "autem",
"loyalty_mode": "quis",
"sm_company_id": 2,
"sm_station_id": 6,
"updated_at": "2024-06-25T14:56:47.000000Z",
"created_at": "2024-06-25T14:56:47.000000Z",
"id": 66,
"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/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/pos_heartbeats/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:
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=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/total_debit_credit_history"
);
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",
};
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:
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\": 12,
\"amount_to_pay\": 15
}"
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": 12,
"amount_to_pay": 15
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"ref": "cupid-pay-851789627",
"company_id": 46,
"company_wallet_id": 200,
"vendor_id": 215,
"company_temps_id": 46,
"initiator_id": 346,
"payment_mode_id": 213,
"status": "successful",
"total_charged_amount": 50.49,
"original_amount": 21481011.8,
"gateway_charged": 239057.1,
"wallet_amount": 8811314.55,
"amount_paid": 23829.26,
"fee_paid": 120550829.56,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1985-10-16 02:44:11.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "1999-04-23 01:03:49.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "customer_onboarding",
"initiating_users_name": "Joseph Titus Onu",
"paystack_subaccount_code": 669755535,
"updated_at": "2024-06-25T14:56:52.000000Z",
"created_at": "2024-06-25T14:56:52.000000Z",
"id": 503
}
}
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=omnis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference\": \"dolore\",
\"company_id\": 13,
\"payment_uploaded_by\": \"reiciendis\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/payments/paystack"
);
const params = {
"trxref": "omnis",
};
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": "dolore",
"company_id": 13,
"payment_uploaded_by": "reiciendis"
};
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=iste" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference\": \"qui\",
\"company_id\": 3,
\"payment_uploaded_by\": \"eos\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/payments/paystack/callback"
);
const params = {
"trxref": "iste",
};
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": "qui",
"company_id": 3,
"payment_uploaded_by": "eos"
};
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=Ytofnj7fgTwwXSm2F9rWZF6mmSxw8v9HAaUVO9b1; expires=Tue, 25 Jun 2024 16:56:54 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=voluptatem&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/payments"
);
const params = {
"term": "voluptatem",
"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": [
{
"ref": "cupid-pay-696860878",
"company_id": 21,
"company_wallet_id": 200,
"vendor_id": 215,
"company_temps_id": 21,
"initiator_id": 353,
"payment_mode_id": 213,
"status": "initiated",
"total_charged_amount": 1.97,
"original_amount": 5.26,
"gateway_charged": 134818.85,
"wallet_amount": 1.82,
"amount_paid": 152.82,
"fee_paid": 286.73,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1981-10-04 23:22:08.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2005-07-27 18:58:32.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "web_callback",
"payment_cause": "cupid_recharge",
"initiating_users_name": "CHINWE MADU",
"paystack_subaccount_code": 591587916,
"updated_at": "2024-06-25T14:56:57.000000Z",
"created_at": "2024-06-25T14:56:57.000000Z",
"id": 504
},
{
"ref": "cupid-pay-165290285",
"company_id": 15,
"company_wallet_id": 200,
"vendor_id": 306,
"company_temps_id": 15,
"initiator_id": 361,
"payment_mode_id": 213,
"status": "successful",
"total_charged_amount": 170642025.99,
"original_amount": 32.93,
"gateway_charged": 343358.77,
"wallet_amount": 2277.43,
"amount_paid": 16.94,
"fee_paid": 1673.92,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "2019-04-21 02:49:44.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "1980-03-16 08:11:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "customer_onboarding",
"initiating_users_name": "WEGWU BETTY",
"paystack_subaccount_code": 986537990,
"updated_at": "2024-06-25T14:57:00.000000Z",
"created_at": "2024-06-25T14:57:00.000000Z",
"id": 505
}
],
"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/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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"ref": "cupid-pay-1184725549",
"company_id": 146,
"company_wallet_id": 200,
"vendor_id": 302,
"company_temps_id": 146,
"initiator_id": 254,
"payment_mode_id": 213,
"status": "failed",
"total_charged_amount": 3002.02,
"original_amount": 4700572.14,
"gateway_charged": 9441819.54,
"wallet_amount": 2.02,
"amount_paid": 51.38,
"fee_paid": 33782.67,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1993-11-17 23:49:12.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2018-04-20 22:22:18.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "customer_onboarding",
"initiating_users_name": "Fadipe Esther",
"paystack_subaccount_code": 506778734,
"updated_at": "2024-06-25T14:57:05.000000Z",
"created_at": "2024-06-25T14:57:05.000000Z",
"id": 506
}
}
Received response:
Request failed with error:
Update the specified payment
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/payments/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference\": \"ipsam\",
\"company_id\": 6,
\"payment_uploaded_by\": \"quae\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/payments/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reference": "ipsam",
"company_id": 6,
"payment_uploaded_by": "quae"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"ref": "cupid-pay-1646535412",
"company_id": 46,
"company_wallet_id": 200,
"vendor_id": 302,
"company_temps_id": 46,
"initiator_id": 277,
"payment_mode_id": 213,
"status": "initiated",
"total_charged_amount": 1565.32,
"original_amount": 26.94,
"gateway_charged": 31995.14,
"wallet_amount": 6914.74,
"amount_paid": 1785074.21,
"fee_paid": 254555.41,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1980-10-26 11:20:51.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2022-11-07 15:34:51.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "cupid_recharge",
"initiating_users_name": "Erinwobu Paul Taiwo",
"paystack_subaccount_code": 437760897,
"updated_at": "2024-06-25T14:57:09.000000Z",
"created_at": "2024-06-25T14:57:09.000000Z",
"id": 507
}
}
Received response:
Request failed with error:
Delete a payment
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/payments/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/payments/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 Paystack Sub Account
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/expedita" \
--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/expedita"
);
const 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=2QcsZrBNYDVluKlyUB8pHMrOlIjvDvCvExZGBlul; expires=Tue, 25 Jun 2024 16:57:11 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/payments/subaccount/paystack/expedita 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=17&datetime=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/payments/subaccount/paystack"
);
const params = {
"int": "17",
"datetime": "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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=1QW3tKXa5bnrEdqN6jNdrteCMZuTJ8SLlsGzI3db; expires=Tue, 25 Jun 2024 16:57:12 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/commodi" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"business_name\": \"in\",
\"settlement_bank\": \"vel\",
\"account_number\": \"beatae\",
\"percentage_charge\": 187766.18953,
\"description\": \"consequatur\",
\"primary_contact_email\": \"eligendi\",
\"primary_contact_name\": \"sit\",
\"primary_contact_phone\": \"aut\",
\"metadata\": \"et\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/payments/subaccount/paystack/commodi"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"business_name": "in",
"settlement_bank": "vel",
"account_number": "beatae",
"percentage_charge": 187766.18953,
"description": "consequatur",
"primary_contact_email": "eligendi",
"primary_contact_name": "sit",
"primary_contact_phone": "aut",
"metadata": "et"
};
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\": \"explicabo\",
\"settlement_bank\": \"aspernatur\",
\"account_number\": \"error\",
\"percentage_charge\": 20669957.103524,
\"description\": \"mollitia\",
\"primary_contact_email\": \"qui\",
\"primary_contact_name\": \"nulla\",
\"primary_contact_phone\": \"ut\",
\"metadata\": \"dolorem\"
}"
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": "explicabo",
"settlement_bank": "aspernatur",
"account_number": "error",
"percentage_charge": 20669957.103524,
"description": "mollitia",
"primary_contact_email": "qui",
"primary_contact_name": "nulla",
"primary_contact_phone": "ut",
"metadata": "dolorem"
};
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=maxime&per_page=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/payment_histories"
);
const params = {
"term": "maxime",
"per_page": "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": [
{
"payment_id": 38,
"vendor_id": 302,
"company_id": 39,
"amount_paid": 1.19,
"start_company_balance": 17317867.12,
"end_company_balance": 10840878.74,
"current_credit_limit": 60889705.09,
"payment_made_by": "INTERNATIONAL BREWRIES PLC-GATEWAY BREWERIES",
"payment_date": {
"date": "1974-10-17 22:31:06.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Success",
"payment_uploaded_by": "Jamil Gusikowski",
"payment_approved_by": "Kasope Johnson",
"reference": 735545341,
"channel": "Paystack Online",
"amount_net": 0.51,
"amount_gross": 215423.34,
"fee": 162218.83,
"paystack_subaccount_code": "ACCT_6q8z4u8n7",
"evidence_path": "https://via.placeholder.com/640x480.png/00dd66?text=dolorum",
"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": 606746130,
"ussd_wallet_pay_id": 541607391,
"ussd_onboard_id": 106679977,
"updated_at": "2024-06-25T14:57:16.000000Z",
"created_at": "2024-06-25T14:57:16.000000Z",
"id": 1,
"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
}
},
{
"payment_id": 37,
"vendor_id": 215,
"company_id": 47,
"amount_paid": 11021220,
"start_company_balance": 6873938.65,
"end_company_balance": 24.66,
"current_credit_limit": 54803.64,
"payment_made_by": "MBH POWER",
"payment_date": {
"date": "2003-10-25 17:01:23.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Approved",
"payment_uploaded_by": "Mr. Roberto Goodwin III",
"payment_approved_by": "Kasope Johnson",
"reference": 683004672,
"channel": "Paystack Online",
"amount_net": 0.25,
"amount_gross": 261352.86,
"fee": 1182.58,
"paystack_subaccount_code": "ACCT_6s5l0t6e1",
"evidence_path": "https://via.placeholder.com/640x480.png/00bb77?text=non",
"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": 286372067,
"ussd_wallet_pay_id": 659328242,
"ussd_onboard_id": 534897794,
"updated_at": "2024-06-25T14:57:18.000000Z",
"created_at": "2024-06-25T14:57:18.000000Z",
"id": 2,
"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
}
}
],
"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\": 20,
\"amount_paid\": 0,
\"s3_url\": \"voluptatem\",
\"velox_vendor_id\": 18,
\"velox_customer_id\": \"ea\",
\"velox_customer_name\": \"illo\",
\"uploaded_by\": \"excepturi\",
\"payment_date\": \"2024-06-25\"
}"
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": 20,
"amount_paid": 0,
"s3_url": "voluptatem",
"velox_vendor_id": 18,
"velox_customer_id": "ea",
"velox_customer_name": "illo",
"uploaded_by": "excepturi",
"payment_date": "2024-06-25"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_id": 59,
"vendor_id": 302,
"company_id": 66,
"amount_paid": 13336.24,
"start_company_balance": 3658.18,
"end_company_balance": 2518939.91,
"current_credit_limit": 249624143.55,
"payment_made_by": "ONEPORT 365 COMPANY",
"payment_date": {
"date": "2011-03-24 18:50:47.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Pending",
"payment_uploaded_by": "Miss Rebeca Sipes II",
"payment_approved_by": "Edozie Chinonso",
"reference": 1592999982,
"channel": "Paystack Online",
"amount_net": 35765792.13,
"amount_gross": 780.33,
"fee": 0.25,
"paystack_subaccount_code": "ACCT_1i8s6l1x1",
"evidence_path": "https://via.placeholder.com/640x480.png/00ffff?text=reprehenderit",
"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": 788202015,
"ussd_wallet_pay_id": 992339047,
"ussd_onboard_id": 416616498,
"updated_at": "2024-06-25T14:57:22.000000Z",
"created_at": "2024-06-25T14:57:22.000000Z",
"id": 3,
"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
}
}
}
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/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/payment_histories/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": {
"payment_id": 4,
"vendor_id": 215,
"company_id": 31,
"amount_paid": 524058019.63,
"start_company_balance": 25256.74,
"end_company_balance": 13294.57,
"current_credit_limit": 6243132.11,
"payment_made_by": "HFN",
"payment_date": {
"date": "1999-12-24 12:08:07.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Pending",
"payment_uploaded_by": "Mr. Irwin Reinger I",
"payment_approved_by": "Muibi Azeez Abolade",
"reference": 1387385553,
"channel": "Manual Upload",
"amount_net": 0.22,
"amount_gross": 462536.02,
"fee": 198508547.18,
"paystack_subaccount_code": "ACCT_5r0l0g1x6",
"evidence_path": "https://via.placeholder.com/640x480.png/0055cc?text=adipisci",
"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": 75725173,
"ussd_wallet_pay_id": 718071166,
"ussd_onboard_id": 543130492,
"updated_at": "2024-06-25T14:57:25.000000Z",
"created_at": "2024-06-25T14:57:25.000000Z",
"id": 4,
"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
}
}
}
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/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"selected_customer\": \"iste\",
\"payment_status\": \"fuga\",
\"amount_paid\": 28301100.788347896,
\"payment_approved_by\": \"enim\"
}"
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",
};
let body = {
"selected_customer": "iste",
"payment_status": "fuga",
"amount_paid": 28301100.788347896,
"payment_approved_by": "enim"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_id": 10,
"vendor_id": 306,
"company_id": 23,
"amount_paid": 0.49,
"start_company_balance": 40075.44,
"end_company_balance": 59.65,
"current_credit_limit": 3.25,
"payment_made_by": "DUFIL-CASSAVA",
"payment_date": {
"date": "2011-06-28 02:08:16.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Disapproved",
"payment_uploaded_by": "Hailee Kreiger Sr.",
"payment_approved_by": "Agbo Chika",
"reference": 661676362,
"channel": "Paystack Online",
"amount_net": 1480092.32,
"amount_gross": 961991.41,
"fee": 480.2,
"paystack_subaccount_code": "ACCT_7j2j0m8s1",
"evidence_path": "https://via.placeholder.com/640x480.png/009999?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": "paystack",
"payment_transaction_id": 901347169,
"ussd_wallet_pay_id": 443458928,
"ussd_onboard_id": 676595005,
"updated_at": "2024-06-25T14:57:29.000000Z",
"created_at": "2024-06-25T14:57:29.000000Z",
"id": 5,
"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
}
}
}
Received response:
Request failed with error:
Delete a payment history
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/payment_histories/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/payment_histories/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:
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\": 13,
\"device_token\": \"non\"
}"
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": 13,
"device_token": "non"
};
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=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/push_notification_message"
);
const params = {
"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": [
{
"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,
"vehicle": {
"id": 779,
"registration_number": "EKY 744 XH",
"fuel_type": "AGO"
},
"company": {
"id": 145,
"company_name": "Raffles"
},
"destination_allocation": [],
"category": {
"id": 3,
"parent_id": null,
"name": "APPROVED",
"code": null,
"created_at": "2023-05-19T10:36:37.000000Z",
"updated_at": "2023-05-19T10:36:37.000000Z",
"deleted_at": null
},
"sub_category": {
"id": 14,
"parent_id": 3,
"name": "MAKE DIFFERENCE",
"code": "WHEN THE TRUCK TRANSLOADS OR TRANSHOOK ANY LOADED TRUCK",
"created_at": "2023-05-19T10:50:03.000000Z",
"updated_at": "2023-05-19T10:50:03.000000Z",
"deleted_at": null
},
"submitted_by": {
"id": 312,
"name": "QA Dispatcher",
"email": "qa_dispatcher@smartflowtech.com"
},
"approved_by": {
"id": 314,
"name": "QA Approver",
"email": "qa_approver@smartflowtech.com"
},
"rejected_by": null,
"initial_requested_volume": 50
}
},
{
"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,
"vehicle": {
"id": 779,
"registration_number": "EKY 744 XH",
"fuel_type": "AGO"
},
"company": {
"id": 145,
"company_name": "Raffles"
},
"destination_allocation": [],
"category": {
"id": 3,
"parent_id": null,
"name": "APPROVED",
"code": null,
"created_at": "2023-05-19T10:36:37.000000Z",
"updated_at": "2023-05-19T10:36:37.000000Z",
"deleted_at": null
},
"sub_category": {
"id": 14,
"parent_id": 3,
"name": "MAKE DIFFERENCE",
"code": "WHEN THE TRUCK TRANSLOADS OR TRANSHOOK ANY LOADED TRUCK",
"created_at": "2023-05-19T10:50:03.000000Z",
"updated_at": "2023-05-19T10:50:03.000000Z",
"deleted_at": null
},
"submitted_by": {
"id": 312,
"name": "QA Dispatcher",
"email": "qa_dispatcher@smartflowtech.com"
},
"approved_by": {
"id": 314,
"name": "QA Approver",
"email": "qa_approver@smartflowtech.com"
},
"rejected_by": null,
"initial_requested_volume": 50
}
}
],
"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\": [
17
],
\"is_read\": true
}"
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": [
17
],
"is_read": true
};
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,
"vehicle": {
"id": 779,
"registration_number": "EKY 744 XH",
"fuel_type": "AGO"
},
"company": {
"id": 145,
"company_name": "Raffles"
},
"destination_allocation": [],
"category": {
"id": 3,
"parent_id": null,
"name": "APPROVED",
"code": null,
"created_at": "2023-05-19T10:36:37.000000Z",
"updated_at": "2023-05-19T10:36:37.000000Z",
"deleted_at": null
},
"sub_category": {
"id": 14,
"parent_id": 3,
"name": "MAKE DIFFERENCE",
"code": "WHEN THE TRUCK TRANSLOADS OR TRANSHOOK ANY LOADED TRUCK",
"created_at": "2023-05-19T10:50:03.000000Z",
"updated_at": "2023-05-19T10:50:03.000000Z",
"deleted_at": null
},
"submitted_by": {
"id": 312,
"name": "QA Dispatcher",
"email": "qa_dispatcher@smartflowtech.com"
},
"approved_by": {
"id": 314,
"name": "QA Approver",
"email": "qa_approver@smartflowtech.com"
},
"rejected_by": null,
"initial_requested_volume": 50
}
}
}
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/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/push_notification_message/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:
User Endpoints
Permanently delete a user
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/users/force_delete_user/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/users/force_delete_user/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:
Restore a deleted user
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/users/restore/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/users/restore/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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_session=8U8pzzOjL4nyM5kAUO5epRlaW6wLvSJ5o2pfCU5R; expires=Tue, 25 Jun 2024 16:42:24 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/users/restore/16 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=rem&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/users/trash"
);
const params = {
"term": "rem",
"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": {
"title": "Mrs.",
"name": "Leatha Jacobi",
"email": "ole.lehner@example.org",
"phone": "+1-346-805-2454",
"avatar": "https://via.placeholder.com/200x200.png/00dd11?text=avatar+autem",
"username": "whagenes",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "3366",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:42:25.000000Z",
"created_at": "2024-06-25T14:42:25.000000Z",
"id": 406,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 50,
"name": "delete vendor wallet"
},
{
"id": 60,
"name": "request view"
},
{
"id": 65,
"name": "category update"
},
{
"id": 78,
"name": "truck contract update"
},
{
"id": 80,
"name": "trip allocation view"
}
],
"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=voluptate&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/users"
);
const params = {
"term": "voluptate",
"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": [
{
"title": "Ms.",
"name": "Anita Bartoletti",
"email": "labadie.christian@example.net",
"phone": "931-330-4513",
"avatar": "https://via.placeholder.com/200x200.png/0099cc?text=avatar+temporibus",
"username": "zoey.ritchie",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "2138",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:42:40.000000Z",
"created_at": "2024-06-25T14:42:40.000000Z",
"id": 409,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 11,
"name": "update company"
},
{
"id": 31,
"name": "update payment"
},
{
"id": 66,
"name": "category create"
},
{
"id": 67,
"name": "category delete"
},
{
"id": 71,
"name": "destination delete"
}
],
"costCenters": [],
"roles": [],
"stations": [],
"wallet_details": null
},
{
"title": "Prof.",
"name": "Tyra Langworth",
"email": "carroll.brad@example.com",
"phone": "726.210.1789",
"avatar": "https://via.placeholder.com/200x200.png/00dd99?text=avatar+ut",
"username": "ehoppe",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "2572",
"is_vendor": false,
"is_admin": false,
"updated_at": "2024-06-25T14:42:41.000000Z",
"created_at": "2024-06-25T14:42:41.000000Z",
"id": 410,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 13,
"name": "view company group"
},
{
"id": 22,
"name": "create fleet"
},
{
"id": 33,
"name": "view pos"
},
{
"id": 36,
"name": "delete pos"
},
{
"id": 85,
"name": "view vendor companies"
}
],
"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=6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"est\",
\"phone\": 8240.43,
\"email\": \"jacobs.heidi@example.com\",
\"username\": \"cupiditate\",
\"gender\": \"Male\",
\"newsletter\": true,
\"active\": false,
\"is_admin\": false,
\"is_vendor\": false,
\"suspended\": false,
\"vendors\": [
16
],
\"companies\": [
2
],
\"cost_centers\": [
1
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/users"
);
const params = {
"vendor_id": "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",
};
let body = {
"name": "est",
"phone": 8240.43,
"email": "jacobs.heidi@example.com",
"username": "cupiditate",
"gender": "Male",
"newsletter": true,
"active": false,
"is_admin": false,
"is_vendor": false,
"suspended": false,
"vendors": [
16
],
"companies": [
2
],
"cost_centers": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Prof.",
"name": "Mrs. Gilda Sipes MD",
"email": "whoppe@example.org",
"phone": "+1-475-373-6061",
"avatar": "https://via.placeholder.com/200x200.png/001144?text=avatar+similique",
"username": "fred.ferry",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "9443",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:43:02.000000Z",
"created_at": "2024-06-25T14:43:02.000000Z",
"id": 411,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 8,
"name": "delete acl"
},
{
"id": 13,
"name": "view company group"
},
{
"id": 20,
"name": "delete cost center"
},
{
"id": 23,
"name": "update fleet"
},
{
"id": 39,
"name": "view user wallet"
}
],
"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/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/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": {
"title": "Prof.",
"name": "Keaton Treutel PhD",
"email": "ken14@example.com",
"phone": "+1 (802) 217-6449",
"avatar": "https://via.placeholder.com/200x200.png/006699?text=avatar+non",
"username": "kimberly99",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "5280",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:43:11.000000Z",
"created_at": "2024-06-25T14:43:11.000000Z",
"id": 412,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 23,
"name": "update fleet"
},
{
"id": 30,
"name": "create payment"
},
{
"id": 40,
"name": "create user wallet"
},
{
"id": 68,
"name": "destination view"
},
{
"id": 78,
"name": "truck contract update"
}
],
"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=18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quo\",
\"phone\": 115.673,
\"email\": \"alfonso.wunsch@example.org\",
\"username\": \"est\",
\"gender\": \"female\",
\"newsletter\": false,
\"active\": true,
\"is_admin\": false,
\"is_vendor\": true,
\"suspended\": false,
\"vendors\": [
19
],
\"companies\": [
20
],
\"cost_centers\": [
7
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/users/13"
);
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",
};
let body = {
"name": "quo",
"phone": 115.673,
"email": "alfonso.wunsch@example.org",
"username": "est",
"gender": "female",
"newsletter": false,
"active": true,
"is_admin": false,
"is_vendor": true,
"suspended": false,
"vendors": [
19
],
"companies": [
20
],
"cost_centers": [
7
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Mr.",
"name": "Ernestina Connelly",
"email": "rowland.hintz@example.org",
"phone": "1-626-618-7217",
"avatar": "https://via.placeholder.com/200x200.png/00bbbb?text=avatar+est",
"username": "effie63",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "9859",
"is_vendor": false,
"is_admin": false,
"updated_at": "2024-06-25T14:43:17.000000Z",
"created_at": "2024-06-25T14:43:17.000000Z",
"id": 413,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 26,
"name": "create user"
},
{
"id": 53,
"name": "update vendor"
},
{
"id": 63,
"name": "request delete"
},
{
"id": 68,
"name": "destination view"
},
{
"id": 79,
"name": "truck contract delete"
}
],
"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/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/9"
);
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": "Dr.",
"name": "Uriel Berge II",
"email": "seamus.ratke@example.org",
"phone": "423.513.8482",
"avatar": "https://via.placeholder.com/200x200.png/004400?text=avatar+et",
"username": "kprosacco",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "5819",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:43:24.000000Z",
"created_at": "2024-06-25T14:43:24.000000Z",
"id": 414,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 5,
"name": "view acl"
},
{
"id": 13,
"name": "view company group"
},
{
"id": 30,
"name": "create payment"
},
{
"id": 36,
"name": "delete pos"
},
{
"id": 39,
"name": "view user wallet"
}
],
"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/15?term=quas&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/vendor_users/15"
);
const params = {
"term": "quas",
"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": [
{
"title": "Miss",
"name": "Prof. Nellie Reinger DVM",
"email": "jaron27@example.net",
"phone": "(740) 472-5489",
"avatar": "https://via.placeholder.com/200x200.png/0088ee?text=avatar+omnis",
"username": "elmore.hand",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "9936",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:45:48.000000Z",
"created_at": "2024-06-25T14:45:48.000000Z",
"id": 415,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 10,
"name": "create company"
},
{
"id": 29,
"name": "view payment"
},
{
"id": 39,
"name": "view user wallet"
},
{
"id": 72,
"name": "destination_allocation view"
},
{
"id": 84,
"name": "update transaction id"
}
],
"costCenters": [],
"roles": [],
"stations": [],
"wallet_details": null
},
{
"title": "Prof.",
"name": "Mr. Fredrick Harber",
"email": "thomas27@example.org",
"phone": "+1-762-737-1771",
"avatar": "https://via.placeholder.com/200x200.png/00ccff?text=avatar+minus",
"username": "tbeatty",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "Visa Retired",
"card_last_four": "5768",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:45:49.000000Z",
"created_at": "2024-06-25T14:45:49.000000Z",
"id": 416,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 1,
"name": "view"
},
{
"id": 7,
"name": "update acl"
},
{
"id": 18,
"name": "create cost center"
},
{
"id": 37,
"name": "onboard customer"
},
{
"id": 64,
"name": "category 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/9?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/get_wallets_by_company/9"
);
const params = {
"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": {
"company_id": 126,
"wallet_id": "269822080393",
"balance": 21194059.678430624,
"credit_limit": 62977843,
"vendor_id": 306,
"vendor_wallet_id": 200,
"active": true,
"created_by": 1,
"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
},
"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
},
"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/8?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/get_wallets_by_user/8"
);
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": {
"user_id": 361,
"wallet_id": "218821916019",
"balance": 19215801.8149,
"credit_limit": 36961.036927477,
"vendor_id": 306,
"vendor_wallet_id": 200,
"active": true,
"created_by": 113,
"updated_at": "2024-06-25T14:57:37.000000Z",
"created_at": "2024-06-25T14:57:37.000000Z",
"id": 43,
"vendor_current_credit_limit": 422231.25149903,
"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
},
"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=ea&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/company_wallets"
);
const params = {
"term": "ea",
"per_page": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"company_id": 50,
"wallet_id": "752099495612",
"balance": 395979415.92921,
"credit_limit": 553.6,
"vendor_id": 302,
"vendor_wallet_id": 200,
"active": true,
"created_by": 34,
"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
},
"company": {
"id": 50,
"name": "MINIMIE - MULTIPRO",
"email": "gabrielnorris50@example.com",
"phone_number": "172",
"registration_number": "172",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 352978,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c148",
"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-07T13:44:17.000000Z",
"updated_at": "2023-04-07T13:44:17.000000Z",
"deleted_at": null
},
"nfctag": null
},
{
"company_id": 53,
"wallet_id": "658137389665",
"balance": 120213327.93504,
"credit_limit": 2953.5925,
"vendor_id": 302,
"vendor_wallet_id": 200,
"active": true,
"created_by": 13,
"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
},
"company": {
"id": 53,
"name": "MULTIPRO BENIN",
"email": "addisongordon53@example.com",
"phone_number": "175",
"registration_number": "175",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 297541,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c151",
"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-10T13:44:17.000000Z",
"updated_at": "2023-04-10T13: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\": 1,
\"company_id\": 14,
\"vendor_id\": 13,
\"vendor_wallet_id\": 15,
\"balance\": 0.0248717,
\"active\": false
}"
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": 1,
"company_id": 14,
"vendor_id": 13,
"vendor_wallet_id": 15,
"balance": 0.0248717,
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 27,
"wallet_id": "251096640802",
"balance": 467.016,
"credit_limit": 2,
"vendor_id": 215,
"vendor_wallet_id": 200,
"active": true,
"created_by": 11,
"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
},
"company": {
"id": 27,
"name": "FAREAST IMPERIAL BRANDS NIG LTD",
"email": "ethanmitchell27@example.com",
"phone_number": "149",
"registration_number": "149",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 657934,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c125",
"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-15T13:44:17.000000Z",
"updated_at": "2023-03-15T13: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/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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 80,
"wallet_id": "602636556345",
"balance": 27738783.861426,
"credit_limit": 11849.1759,
"vendor_id": 302,
"vendor_wallet_id": 200,
"active": true,
"created_by": 14,
"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
},
"company": {
"id": 80,
"name": "PURE FLOUR MILLS LIMITED - PASTA (PHC)",
"email": "coltongonzalez80@example.com",
"phone_number": "202",
"registration_number": "202",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 941725,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c178",
"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-07T13:44:17.000000Z",
"updated_at": "2023-05-07T13: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/9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"otp\": 15,
\"company_id\": 3,
\"vendor_id\": 4,
\"vendor_wallet_id\": 19,
\"balance\": 370,
\"active\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/company_wallets/9"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"otp": 15,
"company_id": 3,
"vendor_id": 4,
"vendor_wallet_id": 19,
"balance": 370,
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 36,
"wallet_id": "947020517885",
"balance": 11639.08205,
"credit_limit": 1183903.8793,
"vendor_id": 302,
"vendor_wallet_id": 200,
"active": true,
"created_by": 21,
"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
},
"company": {
"id": 36,
"name": "INTEGRATED DAIRIES LIMITED",
"email": "leosebastian36@example.com",
"phone_number": "158",
"registration_number": "158",
"country": "Nigeria",
"state": "Ogun",
"city": "Shagamu",
"postcode": "304",
"address": "Sagamu",
"sector": "Logistics",
"tin": 527641,
"website": "https://www.smartflowtech.com",
"logo": null,
"active": 1,
"on_loyalty_program": 0,
"contact_person_first_name": null,
"contact_person_lastname": null,
"app_uid": "63ee2521a5c134",
"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-24T13:44:17.000000Z",
"updated_at": "2023-03-24T13:44:17.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/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/company_wallets/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 user wallets or search by wallet ID.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/user_wallets?term=ducimus&per_page=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/user_wallets"
);
const params = {
"term": "ducimus",
"per_page": "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": [
{
"user_id": 280,
"wallet_id": "510671750846",
"balance": 375857261.6057221,
"credit_limit": 6931,
"vendor_id": 215,
"vendor_wallet_id": 200,
"active": true,
"created_by": 34,
"vendor_current_credit_limit": 422231.25149903,
"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
},
"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": 264,
"wallet_id": "571612737661",
"balance": 4538710,
"credit_limit": 70639.63445,
"vendor_id": 215,
"vendor_wallet_id": 200,
"active": true,
"created_by": 34,
"updated_at": "2024-06-25T14:58:20.000000Z",
"created_at": "2024-06-25T14:58:20.000000Z",
"id": 44,
"vendor_current_credit_limit": 422231.25149903,
"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
},
"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\": 9,
\"user_id\": 2,
\"vendor_id\": 20,
\"vendor_wallet_id\": 9,
\"balance\": 19150.8786,
\"active\": true
}"
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": 9,
"user_id": 2,
"vendor_id": 20,
"vendor_wallet_id": 9,
"balance": 19150.8786,
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 268,
"wallet_id": "427348529218",
"balance": 588932.88645154,
"credit_limit": 905.457117,
"vendor_id": 306,
"vendor_wallet_id": 200,
"active": true,
"created_by": 34,
"updated_at": "2024-06-25T14:58:24.000000Z",
"created_at": "2024-06-25T14:58:24.000000Z",
"id": 45,
"vendor_current_credit_limit": 422231.25149903,
"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
},
"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/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_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": {
"user_id": 285,
"wallet_id": "810514993644",
"balance": 551782028.265142,
"credit_limit": 4.19618598,
"vendor_id": 302,
"vendor_wallet_id": 200,
"active": true,
"created_by": 178,
"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
},
"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/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"otp\": 6,
\"user_id\": 14,
\"vendor_id\": 19,
\"vendor_wallet_id\": 2,
\"balance\": 57499114.5,
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/user_wallets/10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"otp": 6,
"user_id": 14,
"vendor_id": 19,
"vendor_wallet_id": 2,
"balance": 57499114.5,
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 345,
"wallet_id": "947941083913",
"balance": 15307.9621,
"credit_limit": 190785.8281,
"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
},
"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/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_wallets/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 histories or search by status, payment reference.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/user_wallet_histories?term=dolor&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/user_wallet_histories"
);
const params = {
"term": "dolor",
"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": 12,
"user_wallet_id": 12,
"vendor_id": 215,
"amount": 3811231.5935275652,
"comment": "Quia eum omnis beatae. Iure sit delectus beatae alias blanditiis veniam excepturi. Corrupti facilis enim aut adipisci. Velit quae consequatur minima molestiae.",
"payment_ref": "667adb20bbe5c",
"status": "initialised"
},
{
"user_id": 12,
"user_wallet_id": 12,
"vendor_id": 306,
"amount": 10.85,
"comment": "Reprehenderit rem quisquam quia ad unde enim sit nesciunt. Harum pariatur pariatur illum aut. Cumque accusamus reiciendis assumenda sunt id dignissimos quis eum.",
"payment_ref": "667adb2307bc2",
"status": "successful"
}
],
"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": []
}
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/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_wallet_histories/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 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=et&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/user_company_wallets"
);
const params = {
"term": "et",
"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": [
{
"vendor_id": 306,
"user_id": 12,
"user_wallet_id": 12,
"membership_no": "1981032878",
"balance": 50155,
"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
}
},
{
"vendor_id": 302,
"user_id": 13,
"user_wallet_id": 10,
"membership_no": "1717067642",
"balance": 1.637696334,
"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
}
}
],
"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\": 8,
\"user_id\": 16,
\"balance\": 20766133.803702,
\"active\": true
}"
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": 8,
"user_id": 16,
"balance": 20766133.803702,
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 302,
"user_id": 12,
"user_wallet_id": 12,
"membership_no": "8009576224",
"balance": 68999755.684,
"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
}
}
}
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/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_company_wallets/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 215,
"user_id": 11,
"user_wallet_id": 11,
"membership_no": "1478665278",
"balance": 7869.2608655,
"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
}
}
}
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/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 14,
\"user_id\": 5,
\"balance\": 81915.717824,
\"active\": true
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/user_company_wallets/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 14,
"user_id": 5,
"balance": 81915.717824,
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 215,
"user_id": 12,
"user_wallet_id": 12,
"membership_no": "2166316773",
"balance": 110.3034,
"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
}
}
}
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/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/user_company_wallets/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:
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/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/create_wallet/quis"
);
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/13/sunt" \
--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/13/sunt"
);
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/14/dicta/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_wallet/14/dicta/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:
Fund a company's wallet after verifying payment
requires authentication
Example request:
curl --request POST \
"https://cupidapiv2.smartflowtech.com/api/fund_company_wallet/13/11/hic/eum/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/13/11/hic/eum/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=sed&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/credit_limit_history"
);
const params = {
"term": "sed",
"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": [
{
"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
},
"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
},
"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\": 16,
\"company_id\": 13,
\"user_id\": 17,
\"credit_limit\": 436.032357727,
\"limit_requested_by\": 10,
\"limit_approved_by\": 6,
\"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": 16,
"company_id": 13,
"user_id": 17,
"credit_limit": 436.032357727,
"limit_requested_by": 10,
"limit_approved_by": 6,
"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
},
"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/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/credit_limit_history/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": 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
},
"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/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 12,
\"company_id\": 16,
\"user_id\": 14,
\"credit_limit\": 112.493499,
\"limit_requested_by\": 20,
\"limit_approved_by\": 12,
\"status\": \"Pending\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/credit_limit_history/11"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 12,
"company_id": 16,
"user_id": 14,
"credit_limit": 112.493499,
"limit_requested_by": 20,
"limit_approved_by": 12,
"status": "Pending"
};
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
},
"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/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/credit_limit_history/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:
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=itaque&per_page=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_onboarding_details"
);
const params = {
"term": "itaque",
"per_page": "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": [
{
"vendor_id": 215,
"min_wallet_recharge": 50262,
"tag_cost": 4,
"contact_number": "775-555-7455",
"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
}
},
{
"vendor_id": 302,
"min_wallet_recharge": 5374,
"tag_cost": 572,
"contact_number": "417.796.4488",
"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
}
}
],
"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\": 19,
\"min_wallet_recharge\": 48.1,
\"tag_cost\": 4694353.1,
\"contact_number\": 3949811.044
}"
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": 19,
"min_wallet_recharge": 48.1,
"tag_cost": 4694353.1,
"contact_number": 3949811.044
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 306,
"min_wallet_recharge": 143996,
"tag_cost": 2677206,
"contact_number": "415.448.0715",
"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
}
}
}
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/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/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": {
"vendor_id": 306,
"min_wallet_recharge": 174,
"tag_cost": 263654,
"contact_number": "1-319-925-7623",
"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
}
}
}
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/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 16,
\"min_wallet_recharge\": 0.788953,
\"tag_cost\": 79828736.91554,
\"contact_number\": 38526650.591
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendors_onboarding_details/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 16,
"min_wallet_recharge": 0.788953,
"tag_cost": 79828736.91554,
"contact_number": 38526650.591
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 302,
"min_wallet_recharge": 46,
"tag_cost": 46577,
"contact_number": "601.973.7075",
"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
}
}
}
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/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/vendors_onboarding_details/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:
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=YoH1QCH4zKs8edyM1jwI562N0UMRbVtOffKFF8hb; expires=Tue, 25 Jun 2024 16:56:12 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/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/vendors_onboarding_details/get_by_hostname/quia"
);
const 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=3QKGeZYG0nwS5HMyzfx0tHHYgeIGEYzIX1oklYUQ; expires=Tue, 25 Jun 2024 16:56:13 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/vendors_onboarding_details/get_by_hostname/quia 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=natus&per_page=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/vendors_tag_pickup_locations"
);
const params = {
"term": "natus",
"per_page": "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": [
{
"vendor_id": 302,
"station_id": 603,
"cod_id": 5,
"name": "Schuster PLC",
"address": "35920 Dessie Ramp\nLake Elza, WA 43610",
"contact_number": "(906) 964-9249",
"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
},
"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
}
},
{
"vendor_id": 302,
"station_id": 603,
"cod_id": 6,
"name": "Langosh-Kemmer",
"address": "837 Wilkinson Forest\nSchillerville, CA 37436",
"contact_number": "1-352-687-9238",
"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
},
"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
}
}
],
"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\": 14,
\"vendor_id\": 6,
\"station_id\": 14,
\"name\": \"eum\",
\"address\": \"quasi\",
\"cod_id\": 13,
\"contact_number\": 9486
}"
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": 14,
"vendor_id": 6,
"station_id": 14,
"name": "eum",
"address": "quasi",
"cod_id": 13,
"contact_number": 9486
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 215,
"station_id": 602,
"cod_id": 3,
"name": "Kiehn, Gibson and Ledner",
"address": "84609 Annabel Stream Apt. 922\nEast Ron, AR 90678",
"contact_number": "+19527719098",
"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
},
"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:
Show a specified tag pickup location.
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/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/vendors_tag_pickup_locations/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": {
"vendor_id": 302,
"station_id": 601,
"cod_id": 5,
"name": "Pacocha, Hoeger and Hoeger",
"address": "3135 Altenwerth Tunnel\nSouth Donavon, OK 79121",
"contact_number": "(660) 563-8438",
"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
},
"station": {
"id": 601,
"sm_station_id": 366,
"vendor_id": 215,
"name": "MCPL_PH",
"address": "ph",
"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:
Update the specified tag pickup location
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 10,
\"vendor_id\": 7,
\"station_id\": 9,
\"name\": \"qui\",
\"address\": \"repellendus\",
\"cod_id\": 19,
\"contact_number\": 402725.448645
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/7"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 10,
"vendor_id": 7,
"station_id": 9,
"name": "qui",
"address": "repellendus",
"cod_id": 19,
"contact_number": 402725.448645
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"vendor_id": 302,
"station_id": 603,
"cod_id": 7,
"name": "Simonis PLC",
"address": "54467 Grady Station Apt. 221\nPowlowskitown, MI 20897-6372",
"contact_number": "+18102441212",
"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
},
"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:
Delete a tag pickup location
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/vendors_tag_pickup_locations/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/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:
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/vero" \
--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/vero"
);
const 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=MsbuHo0kMS9WMwxHVnFLB7nohiEH54M4f80rlgqo; expires=Tue, 25 Jun 2024 16:56:30 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "The route api/vendors_tag_pickup_locations/get_by_hostname/vero 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=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/vendor_app_config"
);
const params = {
"hostname": "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": [
{
"hostname": "ritchie.org",
"logo_path": "https://via.placeholder.com/640x480.png/0077dd?text=unde",
"app_name": "Swift-Kertzmann",
"app_name_font_size": 91,
"app_header_color": "#00ff66",
"app_body_color": "#00ddff",
"menu_header_color": "#003366",
"menu_body_color": "#0066ff",
"loyalty_reward_percentage": 5,
"loyalty_min_purchase_amount": 7,
"loyalty_min_point": 9,
"status": null
},
{
"hostname": "jones.biz",
"logo_path": "https://via.placeholder.com/640x480.png/00aaaa?text=occaecati",
"app_name": "Wuckert, Ritchie and Kunde",
"app_name_font_size": 16,
"app_header_color": "#0099ee",
"app_body_color": "#0066bb",
"menu_header_color": "#006611",
"menu_body_color": "#002277",
"loyalty_reward_percentage": 3,
"loyalty_min_purchase_amount": 7,
"loyalty_min_point": 8,
"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=15&per_page=17&term=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/vendor_users"
);
const params = {
"vendor_id": "15",
"per_page": "17",
"term": "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": [
{
"title": "Mrs.",
"name": "Mortimer Kulas",
"email": "ibotsford@example.net",
"phone": "+1-605-459-7748",
"avatar": "https://via.placeholder.com/200x200.png/001133?text=avatar+rem",
"username": "ndouglas",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "5632",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:42.000000Z",
"created_at": "2024-06-25T14:46:42.000000Z",
"id": 421,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 4,
"name": "delete"
},
{
"id": 14,
"name": "create company group"
},
{
"id": 20,
"name": "delete cost center"
},
{
"id": 25,
"name": "view user"
},
{
"id": 36,
"name": "delete pos"
}
],
"costCenters": [],
"roles": [],
"stations": [],
"wallet_details": null
},
{
"title": "Prof.",
"name": "Noelia Collier",
"email": "mateo.ryan@example.org",
"phone": "1-708-428-3459",
"avatar": "https://via.placeholder.com/200x200.png/006622?text=avatar+eum",
"username": "pankunding",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "Visa Retired",
"card_last_four": "3016",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:44.000000Z",
"created_at": "2024-06-25T14:46:44.000000Z",
"id": 422,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 4,
"name": "delete"
},
{
"id": 11,
"name": "update company"
},
{
"id": 26,
"name": "create user"
},
{
"id": 32,
"name": "delete payment"
},
{
"id": 71,
"name": "destination 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 vendor user
requires authentication
Example request:
curl --request POST \
"https://cupidapiv2.smartflowtech.com/api/vendor_users?vendor_id=19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"facere\",
\"phone\": 0.013107,
\"email\": \"ukemmer@example.com\",
\"username\": \"excepturi\",
\"gender\": \"male\",
\"newsletter\": false,
\"active\": false,
\"is_admin\": false,
\"is_vendor\": true,
\"suspended\": false,
\"vendors\": [
3
],
\"companies\": [
6
],
\"cost_centers\": [
18
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_users"
);
const params = {
"vendor_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",
};
let body = {
"name": "facere",
"phone": 0.013107,
"email": "ukemmer@example.com",
"username": "excepturi",
"gender": "male",
"newsletter": false,
"active": false,
"is_admin": false,
"is_vendor": true,
"suspended": false,
"vendors": [
3
],
"companies": [
6
],
"cost_centers": [
18
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Prof.",
"name": "Dr. Marlee Bosco",
"email": "melody.cole@example.net",
"phone": "+15857642089",
"avatar": "https://via.placeholder.com/200x200.png/005555?text=avatar+quos",
"username": "geovanny31",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "Discover Card",
"card_last_four": "4258",
"is_vendor": true,
"is_admin": false,
"updated_at": "2024-06-25T14:46:52.000000Z",
"created_at": "2024-06-25T14:46:52.000000Z",
"id": 423,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 19,
"name": "update cost center"
},
{
"id": 26,
"name": "create user"
},
{
"id": 32,
"name": "delete payment"
},
{
"id": 34,
"name": "create pos"
},
{
"id": 72,
"name": "destination_allocation view"
}
],
"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/20?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/vendor_users/20"
);
const params = {
"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 (200):
{
"data": {
"title": "Dr.",
"name": "Jacey Beier",
"email": "ebahringer@example.net",
"phone": "1-708-527-9998",
"avatar": "https://via.placeholder.com/200x200.png/008855?text=avatar+quis",
"username": "isom.considine",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "7782",
"is_vendor": true,
"is_admin": true,
"updated_at": "2024-06-25T14:46:57.000000Z",
"created_at": "2024-06-25T14:46:57.000000Z",
"id": 424,
"companies": [],
"vendors": [],
"bankAccount": null,
"permissions": [
{
"id": 8,
"name": "delete acl"
},
{
"id": 50,
"name": "delete vendor wallet"
},
{
"id": 60,
"name": "request view"
},
{
"id": 72,
"name": "destination_allocation view"
},
{
"id": 77,
"name": "truck contract create"
}
],
"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/6?vendor_id=14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"incidunt\",
\"phone\": 394437.8,
\"email\": \"murphy.audrey@example.net\",
\"username\": \"impedit\",
\"gender\": \"Male\",
\"newsletter\": false,
\"active\": true,
\"is_admin\": true,
\"is_vendor\": false,
\"suspended\": false,
\"vendors\": [
4
],
\"companies\": [
2
],
\"cost_centers\": [
5
]
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_users/6"
);
const params = {
"vendor_id": "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",
};
let body = {
"name": "incidunt",
"phone": 394437.8,
"email": "murphy.audrey@example.net",
"username": "impedit",
"gender": "Male",
"newsletter": false,
"active": true,
"is_admin": true,
"is_vendor": false,
"suspended": false,
"vendors": [
4
],
"companies": [
2
],
"cost_centers": [
5
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Greenfelder-Ebert",
"email": "hratke@lynch.biz",
"phone_number": "1-207-681-7974",
"country": "Indonesia",
"state": "North Carolina",
"city": "East Luciano",
"postcode": "47563-8631",
"address": "8525 Eve Station",
"registration_number": "RC-571543",
"contact_person": "Monserrat Sporer",
"sm_company_id": 7,
"products_sold": "LPFO",
"payment_type": "dolores",
"status": true,
"has_active_paga_account": false,
"updated_at": "2024-06-25T14:47:03.000000Z",
"created_at": "2024-06-25T14:47:03.000000Z",
"id": 309,
"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/20?vendor_id=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/vendor_users/20"
);
const params = {
"vendor_id": "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: "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=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/groups"
);
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": [
{
"name": "Prof. Magnus Wuckert III",
"description": "Ea laudantium quia rerum sunt.",
"active": true,
"updated_at": "2024-06-25T14:48:12.000000Z",
"created_at": "2024-06-25T14:48:12.000000Z",
"id": 87,
"vendors": []
},
{
"name": "Retha Gleichner",
"description": "Quod omnis sunt architecto praesentium explicabo laudantium excepturi.",
"active": true,
"updated_at": "2024-06-25T14:48:13.000000Z",
"created_at": "2024-06-25T14:48:13.000000Z",
"id": 88,
"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\": \"quaerat\",
\"active\": false
}"
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": "quaerat",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Friedrich Walsh",
"description": "Non aut quae laborum praesentium ducimus error.",
"active": false,
"updated_at": "2024-06-25T14:48:16.000000Z",
"created_at": "2024-06-25T14:48:16.000000Z",
"id": 89,
"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/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/groups/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": "Shayna Kuvalis",
"description": "Repellendus a dolores eius error et non in.",
"active": true,
"updated_at": "2024-06-25T14:48:18.000000Z",
"created_at": "2024-06-25T14:48:18.000000Z",
"id": 90,
"vendors": []
}
}
Received response:
Request failed with error:
Update the specified group
requires authentication
Example request:
curl --request PUT \
"https://cupidapiv2.smartflowtech.com/api/groups/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"fugit\",
\"active\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/groups/4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "fugit",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Kelly Stokes",
"description": "Culpa odio blanditiis perspiciatis necessitatibus.",
"active": true,
"updated_at": "2024-06-25T14:48:20.000000Z",
"created_at": "2024-06-25T14:48:20.000000Z",
"id": 91,
"vendors": []
}
}
Received response:
Request failed with error:
Delete a group
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/groups/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/groups/14"
);
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": "Nils Bergnaum",
"description": "In ullam est at eligendi.",
"active": true,
"updated_at": "2024-06-25T14:48:22.000000Z",
"created_at": "2024-06-25T14:48:22.000000Z",
"id": 92,
"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=maiores&per_page=13&status=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/vendors"
);
const params = {
"term": "maiores",
"per_page": "13",
"status": "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": [
{
"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\": 5,
\"name\": \"eum\",
\"address\": \"autem\",
\"phone_number\": 210475.03,
\"email\": \"sed\",
\"country\": \"aut\",
\"state\": \"ad\",
\"city\": \"commodi\",
\"registration_number\": \"veritatis\",
\"contact_person\": \"veritatis\",
\"products_sold\": \"voluptatem\",
\"payment_type\": \"nihil\",
\"has_active_paga_account\": false,
\"status\": true,
\"on_loyalty_program\": true,
\"create_wallet\": true,
\"group_id\": 16
}"
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": 5,
"name": "eum",
"address": "autem",
"phone_number": 210475.03,
"email": "sed",
"country": "aut",
"state": "ad",
"city": "commodi",
"registration_number": "veritatis",
"contact_person": "veritatis",
"products_sold": "voluptatem",
"payment_type": "nihil",
"has_active_paga_account": false,
"status": true,
"on_loyalty_program": true,
"create_wallet": true,
"group_id": 16
};
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/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: "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/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sm_company_id\": 20,
\"name\": \"ex\",
\"address\": \"repellat\",
\"phone_number\": 89.12571901,
\"email\": \"eum\",
\"country\": \"amet\",
\"state\": \"qui\",
\"city\": \"pariatur\",
\"registration_number\": \"atque\",
\"contact_person\": \"officiis\",
\"products_sold\": \"occaecati\",
\"payment_type\": \"harum\",
\"has_active_paga_account\": true,
\"status\": true,
\"on_loyalty_program\": false,
\"create_wallet\": false,
\"group_id\": 18
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendors/10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sm_company_id": 20,
"name": "ex",
"address": "repellat",
"phone_number": 89.12571901,
"email": "eum",
"country": "amet",
"state": "qui",
"city": "pariatur",
"registration_number": "atque",
"contact_person": "officiis",
"products_sold": "occaecati",
"payment_type": "harum",
"has_active_paga_account": true,
"status": true,
"on_loyalty_program": false,
"create_wallet": false,
"group_id": 18
};
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/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/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 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=10&term=laboriosam&vendor_id=iure&company_id=iste" \
--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": "10",
"term": "laboriosam",
"vendor_id": "iure",
"company_id": "iste",
};
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": "0867104",
"active": false,
"partnership_ppv_mode": "ON_SITE",
"pms_ppv": "47",
"ago_ppv": "08",
"discount_mode": null,
"vendor": null,
"company": null
},
{
"status": "Partnership Declined",
"partnership_code": "5902368",
"active": false,
"partnership_ppv_mode": null,
"pms_ppv": "65",
"ago_ppv": "24",
"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\": 1,
\"vendor_id\": 4,
\"status\": \"aut\",
\"partnership_code\": \"est\",
\"active\": true,
\"partnership_ppv_mode\": \"quas\",
\"pms_ppv\": \"neque\",
\"ago_ppv\": \"earum\",
\"discount_mode\": \"est\"
}"
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": 1,
"vendor_id": 4,
"status": "aut",
"partnership_code": "est",
"active": true,
"partnership_ppv_mode": "quas",
"pms_ppv": "neque",
"ago_ppv": "earum",
"discount_mode": "est"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"status": "In Partnership",
"partnership_code": "7143854",
"active": true,
"partnership_ppv_mode": null,
"pms_ppv": "60",
"ago_ppv": "62",
"discount_mode": null,
"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": "5261913",
"active": true,
"partnership_ppv_mode": "ON_SITE",
"pms_ppv": "51",
"ago_ppv": "26",
"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/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 19,
\"vendor_id\": 7,
\"status\": \"voluptatem\",
\"partnership_code\": \"consectetur\",
\"active\": false,
\"partnership_ppv_mode\": \"velit\",
\"pms_ppv\": \"fugiat\",
\"ago_ppv\": \"libero\",
\"discount_mode\": \"molestiae\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_companies/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 19,
"vendor_id": 7,
"status": "voluptatem",
"partnership_code": "consectetur",
"active": false,
"partnership_ppv_mode": "velit",
"pms_ppv": "fugiat",
"ago_ppv": "libero",
"discount_mode": "molestiae"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"status": "In Partnership",
"partnership_code": "8957111",
"active": true,
"partnership_ppv_mode": "CUSTOM",
"pms_ppv": "58",
"ago_ppv": "91",
"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/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/vendor_companies/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 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=6&term=enim" \
--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": "6",
"term": "enim",
};
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": "romaguera.com",
"logo_path": "https://via.placeholder.com/640x480.png/0077ee?text=nesciunt",
"app_name": "Kirlin-Stanton",
"app_name_font_size": 74,
"app_header_color": "#008888",
"app_body_color": "#00ffcc",
"menu_header_color": "#007788",
"menu_body_color": "#00eecc",
"loyalty_reward_percentage": 4,
"loyalty_min_purchase_amount": 7,
"loyalty_min_point": 9,
"status": null
},
{
"hostname": "abbott.com",
"logo_path": "https://via.placeholder.com/640x480.png/004411?text=ex",
"app_name": "Carroll, Upton and Stokes",
"app_name_font_size": 95,
"app_header_color": "#0066aa",
"app_body_color": "#00bb99",
"menu_header_color": "#0055ff",
"menu_body_color": "#0044bb",
"loyalty_reward_percentage": 8,
"loyalty_min_purchase_amount": 2,
"loyalty_min_point": 2,
"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=15" \
--form "hostname=http://www.baumbach.biz/" \
--form "app_name=voluptatem" \
--form "app_name_font_size=54500.83791275" \
--form "app_header_color=labore" \
--form "app_body_color=accusamus" \
--form "menu_header_color=aspernatur" \
--form "menu_body_color=aliquid" \
--form "status=blanditiis" \
--form "logo_path=@/tmp/phpiv47tG"
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', '15');
body.append('hostname', 'http://www.baumbach.biz/');
body.append('app_name', 'voluptatem');
body.append('app_name_font_size', '54500.83791275');
body.append('app_header_color', 'labore');
body.append('app_body_color', 'accusamus');
body.append('menu_header_color', 'aspernatur');
body.append('menu_body_color', 'aliquid');
body.append('status', 'blanditiis');
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": "hintz.com",
"logo_path": "https://via.placeholder.com/640x480.png/0099cc?text=et",
"app_name": "VonRueden Inc",
"app_name_font_size": 27,
"app_header_color": "#002299",
"app_body_color": "#00ee77",
"menu_header_color": "#001166",
"menu_body_color": "#002299",
"loyalty_reward_percentage": 9,
"loyalty_min_purchase_amount": 7,
"loyalty_min_point": 3,
"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/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_app_configs/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": {
"hostname": "kertzmann.com",
"logo_path": "https://via.placeholder.com/640x480.png/009933?text=non",
"app_name": "Barton PLC",
"app_name_font_size": 18,
"app_header_color": "#00bb11",
"app_body_color": "#00ffee",
"menu_header_color": "#00ff44",
"menu_body_color": "#00bb33",
"loyalty_reward_percentage": 3,
"loyalty_min_purchase_amount": 5,
"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/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "vendor_id=6" \
--form "hostname=http://www.kunde.com/tempora-et-facilis-similique-id-praesentium-enim-amet" \
--form "app_name=eos" \
--form "app_name_font_size=9599.6027873" \
--form "app_header_color=tempora" \
--form "app_body_color=dignissimos" \
--form "menu_header_color=aut" \
--form "menu_body_color=aut" \
--form "status=at" \
--form "logo_path=@/tmp/php99dTVf"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_app_configs/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('vendor_id', '6');
body.append('hostname', 'http://www.kunde.com/tempora-et-facilis-similique-id-praesentium-enim-amet');
body.append('app_name', 'eos');
body.append('app_name_font_size', '9599.6027873');
body.append('app_header_color', 'tempora');
body.append('app_body_color', 'dignissimos');
body.append('menu_header_color', 'aut');
body.append('menu_body_color', 'aut');
body.append('status', 'at');
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": "oconnell.net",
"logo_path": "https://via.placeholder.com/640x480.png/005555?text=exercitationem",
"app_name": "Ziemann, West and Mosciski",
"app_name_font_size": 95,
"app_header_color": "#0099ee",
"app_body_color": "#0099aa",
"menu_header_color": "#00ff99",
"menu_body_color": "#0022aa",
"loyalty_reward_percentage": 5,
"loyalty_min_purchase_amount": 4,
"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/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: "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=3&term=incidunt" \
--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": "3",
"term": "incidunt",
};
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": "ES0526141590502101375955",
"bank_name": "Legros Ltd",
"account_name": "Roob, Bruen and Prohaska",
"paystack_id": 6,
"paystack_subaccount_code": "ACCT_516115169",
"payment_mode": null,
"merchantcodes": "458238439267",
"active": true,
"vendor": null
},
{
"account_number": "DE79498915127623518602",
"bank_name": "Jones-Tillman",
"account_name": "Schmeler-Rice",
"paystack_id": 5,
"paystack_subaccount_code": "ACCT_901500445",
"payment_mode": "paystack",
"merchantcodes": "341075653931",
"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\": 1,
\"account_number\": 1.2367,
\"bank_name\": \"exercitationem\",
\"account_name\": \"perspiciatis\",
\"paystack_id\": 464436.93289169,
\"paystack_subaccount_code\": \"esse\",
\"payment_mode\": \"paystack\",
\"merchantcodes\": \"repellendus\",
\"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": 1,
"account_number": 1.2367,
"bank_name": "exercitationem",
"account_name": "perspiciatis",
"paystack_id": 464436.93289169,
"paystack_subaccount_code": "esse",
"payment_mode": "paystack",
"merchantcodes": "repellendus",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"account_number": "MC412444364991Y8I80LR3U9L41",
"bank_name": "McClure PLC",
"account_name": "Lemke, Farrell and Flatley",
"paystack_id": 7,
"paystack_subaccount_code": "ACCT_402990337",
"payment_mode": null,
"merchantcodes": "664853560535",
"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/2?vendor_id=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_bank_accounts/2"
);
const params = {
"vendor_id": "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": {
"account_number": "ES1114008216202367100426",
"bank_name": "Sanford-Kautzer",
"account_name": "Miller and Sons",
"paystack_id": 8,
"paystack_subaccount_code": "ACCT_730186710",
"payment_mode": "paystack",
"merchantcodes": "933160639434",
"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/17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 2,
\"account_number\": 43820344,
\"bank_name\": \"porro\",
\"account_name\": \"perspiciatis\",
\"paystack_id\": 208030.5448753,
\"paystack_subaccount_code\": \"qui\",
\"payment_mode\": \"paystack\",
\"merchantcodes\": \"et\",
\"active\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/17"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 2,
"account_number": 43820344,
"bank_name": "porro",
"account_name": "perspiciatis",
"paystack_id": 208030.5448753,
"paystack_subaccount_code": "qui",
"payment_mode": "paystack",
"merchantcodes": "et",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"account_number": "NL23JFDH4828642073",
"bank_name": "Batz PLC",
"account_name": "Purdy, Osinski and Conn",
"paystack_id": 6,
"paystack_subaccount_code": "ACCT_495198716",
"payment_mode": "paystack",
"merchantcodes": "139300065560",
"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/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_bank_accounts/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 vendor Paga details
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials?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/vendor_paga_credentials"
);
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": [
{
"hmac": "ef30ae61-d76b-3373-804b-4c1348cd0650",
"secret_key": "e73c30a8-b00e-31d1-ada4-708701361a8d",
"public_key": "3f1260f6-e1d0-3484-bb05-a4e63f03a56e",
"active": true
},
{
"hmac": "c5de22de-27a4-36ab-b848-67d8aaae3c3a",
"secret_key": "6be86570-0417-37fc-a7ee-92ba559eb682",
"public_key": "dd7e4b0c-d7d4-3ed8-bc4f-4c0c07f086fb",
"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\": 7,
\"hmac\": \"dolorem\",
\"secret_key\": \"explicabo\",
\"public_key\": \"nulla\",
\"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": 7,
"hmac": "dolorem",
"secret_key": "explicabo",
"public_key": "nulla",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"hmac": "f34bd6d6-1470-39ee-be5e-4d1baffbd51b",
"secret_key": "c3f14f61-01ec-3723-a53e-8ef35d9ea696",
"public_key": "40c9d4b5-2630-3965-8f85-f3ba77973f64",
"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/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/vendor_paga_credentials/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": {
"hmac": "7d0ebc35-0242-394d-9bd9-07c750e32c57",
"secret_key": "a67901dd-c438-3ace-8f41-bb1ce66ac3e8",
"public_key": "1a6f5352-e44f-36fe-815e-3b22f138e535",
"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/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 18,
\"hmac\": \"dolor\",
\"secret_key\": \"impedit\",
\"public_key\": \"commodi\",
\"active\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/6"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 18,
"hmac": "dolor",
"secret_key": "impedit",
"public_key": "commodi",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"hmac": "1f5d0284-2a04-3db8-9e5b-6dfa8daaab82",
"secret_key": "9f59ff3a-a604-3090-9b95-8f7a5b00ad63",
"public_key": "84cee6d5-e139-33b1-8c1a-a3ec63bc8329",
"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/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_paga_credentials/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 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=7&term=dolore" \
--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": "7",
"term": "dolore",
};
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": 603,
"user_id": 114,
"station_name": "SFT EXHIBITION"
},
{
"station_id": 601,
"user_id": 356,
"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\": 6,
\"station_id\": 14,
\"user_id\": 9,
\"station_name\": \"rerum\"
}"
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": 6,
"station_id": 14,
"user_id": 9,
"station_name": "rerum"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"station_id": 603,
"user_id": 114,
"station_name": "SFT EXHIBITION"
}
}
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/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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"station_id": 602,
"user_id": 259,
"station_name": "Mcpl Mowes"
}
}
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/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 12,
\"station_id\": 4,
\"user_id\": 19,
\"station_name\": \"accusantium\"
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations/6"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 12,
"station_id": 4,
"user_id": 19,
"station_name": "accusantium"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"station_id": 601,
"user_id": 248,
"station_name": "MCPL_PH"
}
}
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/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_assigned_delivery_stations/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 vendor wallets
requires authentication
Example request:
curl --request GET \
--get "https://cupidapiv2.smartflowtech.com/api/vendor_wallets?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_wallets"
);
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": [
{
"current_balance": 6055927,
"current_credit_limit": 2.648922,
"active": true
},
{
"current_balance": 160.68289,
"current_credit_limit": 4.7,
"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\": 20,
\"current_balance\": 292718.66,
\"current_credit_limit\": 72,
\"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": 20,
"current_balance": 292718.66,
"current_credit_limit": 72,
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"current_balance": 1419.79316765,
"current_credit_limit": 54.530521,
"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/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_wallets/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": {
"current_balance": 22596.147,
"current_credit_limit": 8110.1063976,
"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/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vendor_id\": 13,
\"current_balance\": 5.40423,
\"current_credit_limit\": 1.13269402,
\"active\": false
}"
const url = new URL(
"https://cupidapiv2.smartflowtech.com/api/vendor_wallets/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vendor_id": 13,
"current_balance": 5.40423,
"current_credit_limit": 1.13269402,
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"current_balance": 21.7,
"current_credit_limit": 213202.87473382,
"active": false
}
}
Received response:
Request failed with error:
Delete a vendor wallet
requires authentication
Example request:
curl --request DELETE \
"https://cupidapiv2.smartflowtech.com/api/vendor_wallets/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_wallets/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:
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\": 14,
\"vendor_id\": 7,
\"otp\": \"accusantium\"
}"
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": 14,
"vendor_id": 7,
"otp": "accusantium"
};
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\": 19,
\"vendor_id\": 7,
\"otp\": \"voluptas\"
}"
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": 19,
"vendor_id": 7,
"otp": "voluptas"
};
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/7?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/companies_by_vendor/7"
);
const params = {
"per_page": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"status": "In Partnership",
"partnership_code": "9508126",
"active": true,
"partnership_ppv_mode": "ON_SITE",
"pms_ppv": "45",
"ago_ppv": "32",
"discount_mode": "MONETARY_VALUE_DISCOUNT",
"vendor": null,
"company": null
},
{
"status": "Partnership Declined",
"partnership_code": "2563242",
"active": false,
"partnership_ppv_mode": "ON_SITE",
"pms_ppv": "70",
"ago_ppv": "81",
"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/7?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/get_companies_by_vendor/7"
);
const params = {
"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": [
{
"status": "In Partnership",
"partnership_code": "5613336",
"active": true,
"partnership_ppv_mode": null,
"pms_ppv": "59",
"ago_ppv": "50",
"discount_mode": "MONETARY_VALUE_DISCOUNT",
"vendor": null,
"company": null
},
{
"status": "Partnership Declined",
"partnership_code": "9875227",
"active": true,
"partnership_ppv_mode": null,
"pms_ppv": "96",
"ago_ppv": "26",
"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:
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\": 6,
\"payment_mode\": \"others\",
\"merchantcodes\": \"commodi\",
\"active\": true
}"
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": 6,
"payment_mode": "others",
"merchantcodes": "commodi",
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error: