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
http://cupidapiv2.smartflowtech.com
Authenticating requests
To authenticate requests, include a Authorization
header with the value "{YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can generate a token from the Login a user
endpoint
ACL(Access Control Level) Endpoints
Display a listing of the roles or filter by query
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/roles?term=quasi" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/roles"
);
const params = {
"term": "quasi",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=QmpqV2H0ypS8YpMhXPhCNSKJHGaMvoqFLvdACFoT; expires=Mon, 27-Jun-2022 12:43:12 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Add a new role
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/roles" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"\",
\"permissions\": [
11
],
\"status\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "",
"permissions": [
11
],
"status": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 39,
"name": "dolor",
"status": true,
"permissions": [],
"created_at": "2022-06-27T10:43:12.000000Z",
"updated_at": "2022-06-27T10:43:12.000000Z"
}
}
Received response:
Request failed with error:
Update a specific role
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/roles/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"yu\",
\"permissions\": [
9
],
\"status\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/roles/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "yu",
"permissions": [
9
],
"status": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 40,
"name": "perferendis",
"status": false,
"permissions": [],
"created_at": "2022-06-27T10:43:12.000000Z",
"updated_at": "2022-06-27T10:43:12.000000Z"
}
}
Received response:
Request failed with error:
Delete a specific role
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/roles/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/roles/3"
);
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": 41,
"name": "omnis",
"status": true,
"permissions": [],
"created_at": "2022-06-27T10:43:12.000000Z",
"updated_at": "2022-06-27T10:43:12.000000Z"
}
}
Received response:
Request failed with error:
Display a listing of the permission or filter by query
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/permissions?term=aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/permissions"
);
const params = {
"term": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=mrBp7gzK2XrGVKxoDwv10guYAmgxVbjvHuR1BXCQ; expires=Mon, 27-Jun-2022 12:43:12 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Add a new permission
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/permissions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"\",
\"status\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "",
"status": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": null,
"name": "exercitationem",
"key": "assumenda",
"status": false,
"created_at": null,
"updated_at": null
}
}
Received response:
Request failed with error:
Update a specific permission
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/permissions/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ele\",
\"status\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/permissions/6"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ele",
"status": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 97,
"name": "et",
"key": "et",
"status": false,
"created_at": "2022-06-27T10:43:12.000000Z",
"updated_at": "2022-06-27T10:43:12.000000Z"
}
}
Received response:
Request failed with error:
Delete a specific permission
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/permissions/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/permissions/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:
Authentication Endpoints
Login a user
Example request:
curl --request POST \
"http://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\": \"repellat\",
\"password\": \"consectetur\"
}"
const url = new URL(
"http://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": "repellat",
"password": "consectetur"
};
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 infor"
},
"companies": [
{
"id": 14,
"name": "Company Name Ltd"
},
],
"vendors": [
{
"id": 1,
"name": "Vendor One"
},
{
"id": 2,
"name": "Vendor Three"
}
]
}
}
Received response:
Request failed with error:
Set the user active vendor
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/oauth/user_active_vendor/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/user_active_vendor/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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=kZ3jm50oIVWtVNBHxNjtxL60v3Y35UKHi30XWVhG; expires=Mon, 27-Jun-2022 12:43:12 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Send OTP to a user
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/oauth/issue_otp" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=tLBS54lVuHHEoOkcADyvihlhm4qMNB4sHa5U79f6; expires=Mon, 27-Jun-2022 12:43:13 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
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 "http://cupidapiv2.smartflowtech.com/api/companies?term=nostrum&per_page=13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/companies"
);
const params = {
"term": "nostrum",
"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": 154,
"name": "Renner-Macejkovic",
"email": "leopoldo56@rippin.com",
"phone_number": "1-585-836-2495",
"registration_number": "RC-014577878",
"country": "Marshall Islands",
"state": "Virginia",
"city": "West Myronport",
"postcode": "31981-5012",
"address": "3082 Kennith Bridge Apt. 199",
"sector": "qui",
"tin": "470033",
"website": "moore.com",
"logo": "https://via.placeholder.com/200x200.png/0022aa?text=logo+esse",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Annabel",
"contact_person_lastname": "Kunze",
"app_uid": "8377dca5b4e50f5799fe2b715b43b575",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z",
"permissions": []
},
{
"id": 155,
"name": "Gerhold-Osinski",
"email": "ludwig32@thompson.biz",
"phone_number": "+1.585.812.9617",
"registration_number": "RC-299792526",
"country": "Samoa",
"state": "South Dakota",
"city": "Johnsshire",
"postcode": "06688",
"address": "5132 Tillman Mills",
"sector": "dolor",
"tin": "934012",
"website": "corwin.biz",
"logo": "https://via.placeholder.com/200x200.png/005522?text=logo+porro",
"active": false,
"on_loyalty_program": true,
"contact_person_first_name": "Sandra",
"contact_person_lastname": "Ryan",
"app_uid": "f85de857a41bf1d630e5fef75981078b",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.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:
Show a specified company.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/companies/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/companies/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": {
"id": 157,
"name": "Bahringer, Ankunding and Ernser",
"email": "fhackett@kling.biz",
"phone_number": "561-239-3417",
"registration_number": "RC-730607142",
"country": "Pitcairn Islands",
"state": "New Mexico",
"city": "New Joelbury",
"postcode": "73762-0449",
"address": "48474 Armstrong Plaza",
"sector": "sed",
"tin": "326143",
"website": "mccullough.info",
"logo": "https://via.placeholder.com/200x200.png/00aa99?text=logo+est",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Lance",
"contact_person_lastname": "Hermann",
"app_uid": "343ecead190c3004c851cb6512987c29",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z",
"permissions": []
}
}
Received response:
Request failed with error:
Update the specified company
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/companies/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=earum" \
--form "phone_number=0.2" \
--form "tin=0.268" \
--form "email=jcremin@example.org" \
--form "registration_number=assumenda" \
--form "country=et" \
--form "state=nesciunt" \
--form "city=hic" \
--form "postcode=3540" \
--form "address=sit" \
--form "user_id=5" \
--form "sector=mollitia" \
--form "website=http://www.oberbrunner.info/quas-necessitatibus-ut-omnis-et-consequuntur.html" \
--form "active=1" \
--form "on_loyalty_program=" \
--form "contact_person_first_name=delectus" \
--form "contact_person_lastname=dolorum" \
--form "app_uid=ipsum" \
--form "permission_ids[]=est" \
--form "logo=@/tmp/php0eMKDb"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/companies/4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'earum');
body.append('phone_number', '0.2');
body.append('tin', '0.268');
body.append('email', 'jcremin@example.org');
body.append('registration_number', 'assumenda');
body.append('country', 'et');
body.append('state', 'nesciunt');
body.append('city', 'hic');
body.append('postcode', '3540');
body.append('address', 'sit');
body.append('user_id', '5');
body.append('sector', 'mollitia');
body.append('website', 'http://www.oberbrunner.info/quas-necessitatibus-ut-omnis-et-consequuntur.html');
body.append('active', '1');
body.append('on_loyalty_program', '');
body.append('contact_person_first_name', 'delectus');
body.append('contact_person_lastname', 'dolorum');
body.append('app_uid', 'ipsum');
body.append('permission_ids[]', 'est');
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": 158,
"name": "Haley, Schiller and Davis",
"email": "lbartell@borer.com",
"phone_number": "1-769-460-1077",
"registration_number": "RC-651447274",
"country": "American Samoa",
"state": "Massachusetts",
"city": "Pablotown",
"postcode": "96387",
"address": "46928 Kassulke Burg Apt. 765",
"sector": "fuga",
"tin": "220792",
"website": "grady.org",
"logo": "https://via.placeholder.com/200x200.png/00dd22?text=logo+unde",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Julianne",
"contact_person_lastname": "Schiller",
"app_uid": "66ee0df010852d8fc243237a70291d87",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z",
"permissions": []
}
}
Received response:
Request failed with error:
Delete a company
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/companies/9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/companies/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:
Create a new company
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/companies" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=fuga" \
--form "phone_number=17.791681277" \
--form "tin=62.57" \
--form "email=brown.judson@example.net" \
--form "registration_number=error" \
--form "country=ut" \
--form "state=commodi" \
--form "city=necessitatibus" \
--form "postcode=2.779" \
--form "address=quia" \
--form "user_id=19" \
--form "sector=est" \
--form "website=http://www.ward.com/debitis-quod-cumque-numquam-voluptatem-laboriosam-sit-quo" \
--form "active=" \
--form "on_loyalty_program=1" \
--form "contact_person_first_name=est" \
--form "contact_person_lastname=eos" \
--form "app_uid=magnam" \
--form "permission_ids[]=quas" \
--form "logo=@/tmp/phpngOI9s"
const url = new URL(
"http://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', 'fuga');
body.append('phone_number', '17.791681277');
body.append('tin', '62.57');
body.append('email', 'brown.judson@example.net');
body.append('registration_number', 'error');
body.append('country', 'ut');
body.append('state', 'commodi');
body.append('city', 'necessitatibus');
body.append('postcode', '2.779');
body.append('address', 'quia');
body.append('user_id', '19');
body.append('sector', 'est');
body.append('website', 'http://www.ward.com/debitis-quod-cumque-numquam-voluptatem-laboriosam-sit-quo');
body.append('active', '');
body.append('on_loyalty_program', '1');
body.append('contact_person_first_name', 'est');
body.append('contact_person_lastname', 'eos');
body.append('app_uid', 'magnam');
body.append('permission_ids[]', 'quas');
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": 156,
"name": "Schneider-Schmitt",
"email": "margaretta93@pagac.net",
"phone_number": "(971) 568-5797",
"registration_number": "RC-045709146",
"country": "Israel",
"state": "Indiana",
"city": "Quintenmouth",
"postcode": "51585",
"address": "95434 Summer Neck Suite 890",
"sector": "rerum",
"tin": "639051",
"website": "davis.biz",
"logo": "https://via.placeholder.com/200x200.png/00cc55?text=logo+a",
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": "Kasey",
"contact_person_lastname": "Grant",
"app_uid": "a647ace5d878db120f8d2ebec648bd11",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z",
"permissions": []
}
}
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 "http://cupidapiv2.smartflowtech.com/api/company_users?company_id=2&per_page=12&term=aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_users"
);
const params = {
"company_id": "2",
"per_page": "12",
"term": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"title": "Prof.",
"name": "Carmine Schroeder",
"email": "kara48@example.com",
"phone": "325-286-3454",
"avatar": "https://via.placeholder.com/200x200.png/004488?text=avatar+iste",
"username": "sawayn.korey",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "1894",
"is_vendor": true,
"is_admin": true,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 110,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 8,
"name": "modi",
"key": "autem"
},
{
"id": 11,
"name": "quas",
"key": "qui"
},
{
"id": 13,
"name": "reprehenderit",
"key": "aliquid"
},
{
"id": 21,
"name": "nam",
"key": "saepe"
},
{
"id": 43,
"name": "iure",
"key": "unde"
}
]
},
{
"title": "Prof.",
"name": "Jeramie Fisher",
"email": "vstreich@example.net",
"phone": "+1-445-751-4203",
"avatar": "https://via.placeholder.com/200x200.png/0088cc?text=avatar+aliquam",
"username": "bkreiger",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "JCB",
"card_last_four": "1403",
"is_vendor": true,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 111,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 4,
"name": "itaque",
"key": "nemo"
},
{
"id": 5,
"name": "praesentium",
"key": "sunt"
},
{
"id": 14,
"name": "debitis",
"key": "laudantium"
},
{
"id": 21,
"name": "nam",
"key": "saepe"
},
{
"id": 48,
"name": "molestiae",
"key": "provident"
}
]
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/company_users?company_id=15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"doloremque\",
\"phone\": 437508.7,
\"email\": \"meghan72@example.com\",
\"username\": \"voluptatem\",
\"gender\": \"male\",
\"newsletter\": true,
\"active\": false,
\"is_admin\": true,
\"is_vendor\": true,
\"vendors\": [
19
],
\"permissions\": [
3
],
\"companies\": [
1
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_users"
);
const params = {
"company_id": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "doloremque",
"phone": 437508.7,
"email": "meghan72@example.com",
"username": "voluptatem",
"gender": "male",
"newsletter": true,
"active": false,
"is_admin": true,
"is_vendor": true,
"vendors": [
19
],
"permissions": [
3
],
"companies": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Mr.",
"name": "Savanah Borer",
"email": "jude36@example.com",
"phone": "1-332-215-1244",
"avatar": "https://via.placeholder.com/200x200.png/004444?text=avatar+sunt",
"username": "dtorphy",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "American Express",
"card_last_four": "2158",
"is_vendor": true,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 112,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 6,
"name": "incidunt",
"key": "dolore"
},
{
"id": 10,
"name": "amet",
"key": "possimus"
},
{
"id": 24,
"name": "eaque",
"key": "eveniet"
},
{
"id": 43,
"name": "iure",
"key": "unde"
},
{
"id": 44,
"name": "repellat",
"key": "neque"
}
]
}
}
Received response:
Request failed with error:
Show a specified company user.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/company_users/15?company_id=4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_users/15"
);
const params = {
"company_id": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Miss",
"name": "Shany Nienow",
"email": "collins.ignatius@example.org",
"phone": "669-251-8478",
"avatar": "https://via.placeholder.com/200x200.png/004444?text=avatar+qui",
"username": "maverick.nienow",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "2023",
"is_vendor": false,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 113,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 9,
"name": "quaerat",
"key": "ea"
},
{
"id": 17,
"name": "quos",
"key": "aperiam"
},
{
"id": 18,
"name": "repudiandae",
"key": "ratione"
},
{
"id": 25,
"name": "aliquam",
"key": "sed"
},
{
"id": 32,
"name": "ut",
"key": "non"
}
]
}
}
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 \
"http://cupidapiv2.smartflowtech.com/api/company_users/7?company_id=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"non\",
\"phone\": 811.1739,
\"email\": \"howard.murray@example.net\",
\"username\": \"debitis\",
\"gender\": \"male\",
\"newsletter\": false,
\"active\": false,
\"is_admin\": false,
\"is_vendor\": false,
\"vendors\": [
16
],
\"permissions\": [
12
],
\"companies\": [
10
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_users/7"
);
const params = {
"company_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",
};
let body = {
"name": "non",
"phone": 811.1739,
"email": "howard.murray@example.net",
"username": "debitis",
"gender": "male",
"newsletter": false,
"active": false,
"is_admin": false,
"is_vendor": false,
"vendors": [
16
],
"permissions": [
12
],
"companies": [
10
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 159,
"name": "Mayert-Jenkins",
"email": "lynch.louie@willms.com",
"phone_number": "+1-747-450-4467",
"registration_number": "RC-047522318",
"country": "Malaysia",
"state": "Nebraska",
"city": "McLaughlinmouth",
"postcode": "84024",
"address": "2249 Kaycee Knoll Suite 417",
"sector": "consequatur",
"tin": "947812",
"website": "huel.com",
"logo": "https://via.placeholder.com/200x200.png/005555?text=logo+assumenda",
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": "Nels",
"contact_person_lastname": "Heaney",
"app_uid": "7666190d666108a3f15e53adc27180b3",
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z",
"permissions": []
}
}
Received response:
Request failed with error:
Detach a user from a company
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/company_users/20?company_id=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_users/20"
);
const params = {
"company_id": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
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 "http://cupidapiv2.smartflowtech.com/api/company_permissions?company_id=18&per_page=13&term=maiores" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_permissions"
);
const params = {
"company_id": "18",
"per_page": "13",
"term": "maiores",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "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,
"name": "non",
"key": "recusandae",
"status": false,
"created_at": null,
"updated_at": null
},
{
"id": 99,
"name": "vel",
"key": "vel",
"status": true,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/company_permissions?company_id=9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"permission_ids\": [
\"omnis\"
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_permissions"
);
const params = {
"company_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",
};
let body = {
"permission_ids": [
"omnis"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Show a specified company permission
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/company_permissions/7?company_id=13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_permissions/7"
);
const params = {
"company_id": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 100,
"name": "repellendus",
"key": "repellendus",
"status": true,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
}
Received response:
Request failed with error:
Detach a permission from a company
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/company_permissions/11?company_id=6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_permissions/11"
);
const params = {
"company_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",
};
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 "http://cupidapiv2.smartflowtech.com/api/stations?term=iure&per_page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/stations"
);
const params = {
"term": "iure",
"per_page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"id": 305,
"name": "Leuschke Ltd",
"email": "ggreen@sipes.net",
"phone_number": "+1 (978) 331-9264",
"country": "Costa Rica",
"state": "New Hampshire",
"city": "Dooleymouth",
"postcode": "35761-3915",
"address": "21411 Purdy Highway",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
},
{
"id": 306,
"name": "Ziemann LLC",
"email": "zschultz@cartwright.com",
"phone_number": "+1-352-744-6702",
"country": "Wallis and Futuna",
"state": "Colorado",
"city": "South Cassandrefurt",
"postcode": "69710",
"address": "83454 Nia Key Apt. 499",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/stations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"distinctio\",
\"phone_number\": 16790420.19601,
\"email\": \"bernier.eino@example.com\",
\"country\": \"dolores\",
\"state\": \"optio\",
\"city\": \"eum\",
\"postcode\": 44.2998166,
\"address\": \"quia\",
\"company_id\": 19
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/stations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "distinctio",
"phone_number": 16790420.19601,
"email": "bernier.eino@example.com",
"country": "dolores",
"state": "optio",
"city": "eum",
"postcode": 44.2998166,
"address": "quia",
"company_id": 19
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 307,
"name": "Jenkins Group",
"email": "frami.angus@mosciski.com",
"phone_number": "+1 (973) 414-7318",
"country": "Guernsey",
"state": "Pennsylvania",
"city": "Keeblerton",
"postcode": "83826",
"address": "53633 Madaline Knoll",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
}
Received response:
Request failed with error:
Show a specified station.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/stations/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/stations/14"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 308,
"name": "Nienow, Gislason and Kirlin",
"email": "jtoy@gibson.com",
"phone_number": "580.964.5282",
"country": "Saint Lucia",
"state": "Colorado",
"city": "Annabelmouth",
"postcode": "75698",
"address": "5919 Emmy Groves",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
}
Received response:
Request failed with error:
Update the specified station
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/stations/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"praesentium\",
\"phone_number\": 585.960389,
\"email\": \"botsford.gerda@example.com\",
\"country\": \"exercitationem\",
\"state\": \"autem\",
\"city\": \"unde\",
\"postcode\": 120.74,
\"address\": \"rem\",
\"company_id\": 12
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/stations/7"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "praesentium",
"phone_number": 585.960389,
"email": "botsford.gerda@example.com",
"country": "exercitationem",
"state": "autem",
"city": "unde",
"postcode": 120.74,
"address": "rem",
"company_id": 12
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"id": 309,
"name": "Runte-Breitenberg",
"email": "wallace.veum@wintheiser.com",
"phone_number": "(615) 903-7246",
"country": "Cape Verde",
"state": "Hawaii",
"city": "Arifort",
"postcode": "22636-0536",
"address": "57560 Gutkowski Key",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
}
Received response:
Request failed with error:
Delete a station
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/stations/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/stations/15"
);
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": 310,
"name": "Jacobson Group",
"email": "felicia46@rodriguez.biz",
"phone_number": "(660) 369-7596",
"country": "Uzbekistan",
"state": "Nevada",
"city": "East Idaberg",
"postcode": "32041",
"address": "1640 Makayla Keys",
"company": null,
"created_at": "2022-06-27T10:43:13.000000Z",
"updated_at": "2022-06-27T10:43:13.000000Z"
}
}
Received response:
Request failed with error:
Cost Center 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 "http://cupidapiv2.smartflowtech.com/api/cost_centers?term=necessitatibus&per_page=5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/cost_centers"
);
const params = {
"term": "necessitatibus",
"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": [
{
"name": "Boyle, Brown and Kuphal",
"email": "jess.powlowski@oconner.com",
"phone_number": "(929) 935-7367",
"country": "Kiribati",
"state": "Massachusetts",
"city": "Lake Keltonport",
"postcode": "05498",
"address": "49207 Bednar Square Suite 554",
"region_id": null,
"company_id": 10,
"daily_purchase_budget": 1.9,
"monthly_purchase_budget": 2045.88,
"license_type": "110jmq",
"active": true,
"updated_at": "2022-06-27T10:43:15.000000Z",
"created_at": "2022-06-27T10:43:15.000000Z",
"id": 146,
"company": {
"id": 10,
"name": "Braun Ltd",
"email": "cullen.schmidt@ernser.net",
"phone_number": "+1-574-320-1314",
"registration_number": "RC-287272430",
"country": "Holy See (Vatican City State)",
"state": "Delaware",
"city": "Port Anselton",
"postcode": "34277",
"address": "170 Gerhold Estate",
"sector": "molestiae",
"tin": 500751,
"website": "bogisich.com",
"logo": "https://via.placeholder.com/200x200.png/0033ee?text=logo+est",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Brandy",
"contact_person_lastname": "Yost",
"app_uid": "a0260466808a99fae88d6b419a9c6147",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"permissions": []
}
},
{
"name": "Hickle-Fritsch",
"email": "imogene34@bergstrom.com",
"phone_number": "+1.959.219.9658",
"country": "Guadeloupe",
"state": "Oklahoma",
"city": "Lake Antoninashire",
"postcode": "60998-5912",
"address": "80740 Lukas Lock",
"region_id": null,
"company_id": 2,
"daily_purchase_budget": 11364185.82,
"monthly_purchase_budget": 94126694.43,
"license_type": "668sbo",
"active": true,
"updated_at": "2022-06-27T10:43:15.000000Z",
"created_at": "2022-06-27T10:43:15.000000Z",
"id": 147,
"company": {
"id": 2,
"name": "Herman and Sons",
"email": "phegmann@carter.com",
"phone_number": "737-658-8301",
"registration_number": "RC-067944528",
"country": "Cyprus",
"state": "Utah",
"city": "Larsonhaven",
"postcode": "43794",
"address": "78441 Nikolaus Extensions Apt. 522",
"sector": "doloremque",
"tin": 721893,
"website": "tremblay.org",
"logo": "https://via.placeholder.com/200x200.png/00ee88?text=logo+optio",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Wilford",
"contact_person_lastname": "Hettinger",
"app_uid": "27f268249f2b06e59993d2636245e4d7",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.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 cost center
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/cost_centers" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"minima\",
\"address\": \"libero\",
\"phone_number\": 3.59656569,
\"email\": \"minus\",
\"country\": \"optio\",
\"state\": \"sit\",
\"city\": \"assumenda\",
\"postcode\": 3.2,
\"region_id\": 19,
\"company_id\": 18,
\"daily_purchase_budget\": 498974,
\"monthly_purchase_budget\": 9128800.70701699,
\"license_type\": \"iusto\",
\"active\": false,
\"user_ids\": [
\"occaecati\"
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/cost_centers"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "minima",
"address": "libero",
"phone_number": 3.59656569,
"email": "minus",
"country": "optio",
"state": "sit",
"city": "assumenda",
"postcode": 3.2,
"region_id": 19,
"company_id": 18,
"daily_purchase_budget": 498974,
"monthly_purchase_budget": 9128800.70701699,
"license_type": "iusto",
"active": false,
"user_ids": [
"occaecati"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Schulist, Reilly and Denesik",
"email": "hhaley@rosenbaum.net",
"phone_number": "+1.951.466.2742",
"country": "Macedonia",
"state": "Michigan",
"city": "Medhurstmouth",
"postcode": "87066",
"address": "27398 Holden Keys Apt. 177",
"region_id": null,
"company_id": 24,
"daily_purchase_budget": 409.52,
"monthly_purchase_budget": 877.2,
"license_type": "811tii",
"active": true,
"updated_at": "2022-06-27T10:43:15.000000Z",
"created_at": "2022-06-27T10:43:15.000000Z",
"id": 148,
"company": {
"id": 24,
"name": "Muller, Stiedemann and Leannon",
"email": "trodriguez@wiegand.com",
"phone_number": "+1-364-996-9845",
"registration_number": "RC-253823311",
"country": "Kazakhstan",
"state": "Wyoming",
"city": "Port Tianna",
"postcode": "12003",
"address": "5081 Runolfsson Alley",
"sector": "tempore",
"tin": 853142,
"website": "ruecker.net",
"logo": "https://via.placeholder.com/200x200.png/0033cc?text=logo+ullam",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Ahmad",
"contact_person_lastname": "Renner",
"app_uid": "7e3ec675d5a4865451ecadf0ee3b37b4",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"permissions": []
}
}
}
Received response:
Request failed with error:
Show a specified cost center.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/cost_centers/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/cost_centers/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": {
"name": "Nicolas, Schmeler and Fahey",
"email": "ella32@mcclure.com",
"phone_number": "1-757-841-8981",
"country": "South Africa",
"state": "Vermont",
"city": "New Ulices",
"postcode": "36836",
"address": "4312 Schneider Trace",
"region_id": null,
"company_id": 31,
"daily_purchase_budget": 12304567.32,
"monthly_purchase_budget": 415.5,
"license_type": "345jmk",
"active": true,
"updated_at": "2022-06-27T10:43:15.000000Z",
"created_at": "2022-06-27T10:43:15.000000Z",
"id": 149,
"company": {
"id": 31,
"name": "Rolfson LLC",
"email": "pkihn@nikolaus.com",
"phone_number": "1-845-709-3398",
"registration_number": "RC-159659995",
"country": "Mali",
"state": "Florida",
"city": "Elishashire",
"postcode": "00422",
"address": "59926 Funk View Apt. 289",
"sector": "animi",
"tin": 957310,
"website": "bartell.com",
"logo": "https://via.placeholder.com/200x200.png/006600?text=logo+veritatis",
"active": true,
"on_loyalty_program": false,
"contact_person_first_name": "Chester",
"contact_person_lastname": "Walter",
"app_uid": "cd35e49097b397104b7a59110b229ec1",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"permissions": []
}
}
}
Received response:
Request failed with error:
Update the specified cost center
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/cost_centers/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dolor\",
\"address\": \"quidem\",
\"phone_number\": 368.888613,
\"email\": \"non\",
\"country\": \"omnis\",
\"state\": \"perferendis\",
\"city\": \"sed\",
\"postcode\": 95.28539959,
\"region_id\": 15,
\"company_id\": 12,
\"daily_purchase_budget\": 4548.3716,
\"monthly_purchase_budget\": 3262.95,
\"license_type\": \"molestias\",
\"active\": true,
\"user_ids\": [
\"inventore\"
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/cost_centers/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dolor",
"address": "quidem",
"phone_number": 368.888613,
"email": "non",
"country": "omnis",
"state": "perferendis",
"city": "sed",
"postcode": 95.28539959,
"region_id": 15,
"company_id": 12,
"daily_purchase_budget": 4548.3716,
"monthly_purchase_budget": 3262.95,
"license_type": "molestias",
"active": true,
"user_ids": [
"inventore"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Brown-Waelchi",
"email": "okey.altenwerth@cole.com",
"phone_number": "769.214.0419",
"country": "Timor-Leste",
"state": "Connecticut",
"city": "Clementton",
"postcode": "67327",
"address": "45513 Missouri Corners",
"region_id": null,
"company_id": 39,
"daily_purchase_budget": 53601.87,
"monthly_purchase_budget": 17.2,
"license_type": "942ufr",
"active": true,
"updated_at": "2022-06-27T10:43:15.000000Z",
"created_at": "2022-06-27T10:43:15.000000Z",
"id": 150,
"company": {
"id": 39,
"name": "Cole Inc",
"email": "xbradtke@turner.org",
"phone_number": "828.395.2616",
"registration_number": "RC-007921606",
"country": "Uzbekistan",
"state": "Nevada",
"city": "Gorczanyfort",
"postcode": "96713",
"address": "34289 Cremin Garden",
"sector": "iure",
"tin": 477015,
"website": "cormier.biz",
"logo": "https://via.placeholder.com/200x200.png/003333?text=logo+dolores",
"active": true,
"on_loyalty_program": true,
"contact_person_first_name": "Alf",
"contact_person_lastname": "Dach",
"app_uid": "09ebe62fe64247c75713e36cf9b682b5",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"permissions": []
}
}
}
Received response:
Request failed with error:
Delete a cost center
requires authentication
Example request:
curl --request DELETE \
"http://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(
"http://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:
Fleet Management Endpoints
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 "http://cupidapiv2.smartflowtech.com/api/drivers?term=libero&per_page=17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/drivers"
);
const params = {
"term": "libero",
"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": [
{
"fullname": "Robert Kulas",
"email": "tatyana.beier@bailey.org",
"phone_number": "773.410.3368",
"address": "90484 King Forks",
"driver_speciality": "Jeep",
"status": "Suspended",
"pin": 8,
"company_id": 18,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 146,
"company": {
"id": 18,
"name": "Dicki, McCullough and Mayert",
"email": "karolann21@kris.info",
"phone_number": "+1-520-396-1722",
"registration_number": "RC-344528449",
"country": "Bhutan",
"state": "Montana",
"city": "West Blancheborough",
"postcode": "14640",
"address": "14755 Cassin Motorway Apt. 339",
"sector": "nam",
"tin": 311515,
"website": "cummerata.com",
"logo": "https://via.placeholder.com/200x200.png/00ccdd?text=logo+perferendis",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Clinton",
"contact_person_lastname": "Muller",
"app_uid": "eb3bb0d66473bbe089d500c17fc861fd",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
},
{
"fullname": "Erika Armstrong",
"email": "howell.blaise@gmail.com",
"phone_number": "1-803-400-8432",
"address": "59423 Hansen Inlet",
"driver_speciality": "Motorbike",
"status": "Inactive",
"pin": 9,
"company_id": 13,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 147,
"company": {
"id": 13,
"name": "Block, Jaskolski and Miller",
"email": "tianna.little@predovic.com",
"phone_number": "(347) 494-9529",
"registration_number": "RC-664472926",
"country": "Egypt",
"state": "New Mexico",
"city": "West Filomena",
"postcode": "47257-7607",
"address": "84808 Samson Curve",
"sector": "sint",
"tin": 802625,
"website": "friesen.com",
"logo": "https://via.placeholder.com/200x200.png/00aaff?text=logo+accusantium",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Valerie",
"contact_person_lastname": "Von",
"app_uid": "d2ec9a2612866553eb87b6531dc22918",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new driver
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/drivers" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 3,
\"fullname\": \"ad\",
\"address\": \"sit\",
\"phone_number\": 0.71756,
\"email\": \"smills@example.org\",
\"driver_speciality\": \"sed\",
\"status\": \"est\",
\"pin\": 17
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/drivers"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 3,
"fullname": "ad",
"address": "sit",
"phone_number": 0.71756,
"email": "smills@example.org",
"driver_speciality": "sed",
"status": "est",
"pin": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"fullname": "Mrs. Elisabeth Reichert",
"email": "august78@nader.biz",
"phone_number": "+1.484.619.9246",
"address": "3790 Sophie Greens",
"driver_speciality": "Jeep",
"status": "Active",
"pin": 0,
"company_id": 19,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 148,
"company": {
"id": 19,
"name": "Predovic-Kuhic",
"email": "isabelle.kulas@konopelski.net",
"phone_number": "+13258423505",
"registration_number": "RC-398614098",
"country": "Ukraine",
"state": "Rhode Island",
"city": "Emardtown",
"postcode": "72264-8475",
"address": "9325 Barry Junction Apt. 902",
"sector": "sequi",
"tin": 500049,
"website": "goyette.com",
"logo": "https://via.placeholder.com/200x200.png/00ddaa?text=logo+fuga",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Clarissa",
"contact_person_lastname": "Ryan",
"app_uid": "98c1be13873286d2574ae670c94cdbed",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Show a specified driver.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/drivers/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/drivers/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": {
"fullname": "Kaia Stehr",
"email": "tbartell@veum.info",
"phone_number": "281.820.4698",
"address": "2168 Kuhic Mount Apt. 055",
"driver_speciality": "SUV",
"status": "Active",
"pin": 6,
"company_id": 11,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 149,
"company": {
"id": 11,
"name": "Morissette, Lesch and Yost",
"email": "juliana.abernathy@mclaughlin.org",
"phone_number": "629.439.5018",
"registration_number": "RC-412478835",
"country": "Cambodia",
"state": "South Dakota",
"city": "Reillyberg",
"postcode": "90707",
"address": "689 Regan Prairie",
"sector": "laboriosam",
"tin": 924010,
"website": "tillman.info",
"logo": "https://via.placeholder.com/200x200.png/003388?text=logo+mollitia",
"active": 0,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Janet",
"contact_person_lastname": "Greenfelder",
"app_uid": "9537a636ebaa950102eeed2f1aadb740",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Update the specified driver
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/drivers/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 13,
\"fullname\": \"possimus\",
\"address\": \"vel\",
\"phone_number\": 59891.5,
\"email\": \"aeffertz@example.net\",
\"driver_speciality\": \"quo\",
\"status\": \"ab\",
\"pin\": 11
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/drivers/19"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 13,
"fullname": "possimus",
"address": "vel",
"phone_number": 59891.5,
"email": "aeffertz@example.net",
"driver_speciality": "quo",
"status": "ab",
"pin": 11
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"fullname": "Arlene Hartmann",
"email": "price.adolphus@macejkovic.info",
"phone_number": "440-573-5444",
"address": "344 Rolfson Wells Suite 791",
"driver_speciality": "Motorbike",
"status": "Suspended",
"pin": 5,
"company_id": 46,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 150,
"company": {
"id": 46,
"name": "Grady LLC",
"email": "gerlach.melody@damore.info",
"phone_number": "1-480-707-8942",
"registration_number": "RC-057277166",
"country": "Gambia",
"state": "New Hampshire",
"city": "East Jeanieburgh",
"postcode": "23113",
"address": "745 Kuhic Shore Apt. 415",
"sector": "eligendi",
"tin": 391842,
"website": "batz.com",
"logo": "https://via.placeholder.com/200x200.png/0033dd?text=logo+explicabo",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Ardella",
"contact_person_lastname": "Rolfson",
"app_uid": "acda7b3153bb46e7ec76665829cd68a1",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Delete a driver
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/drivers/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/drivers/4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the groups or search by name, status, daily volume limit, weekly volume limit, monthly volume limit, code.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/groups?term=illo&per_page=18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/groups"
);
const params = {
"term": "illo",
"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": [
{
"company_id": 30,
"name": "Prof. Adela Pacocha",
"description": "Deserunt iure vitae eaque beatae voluptatem.",
"daily_volume_limit": 9,
"weekly_volume_limit": 3,
"monthly_volume_limit": 1,
"status": null,
"code": 8,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 76,
"company": {
"id": 30,
"name": "Lindgren-Blick",
"email": "maritza12@friesen.com",
"phone_number": "(980) 617-7968",
"registration_number": "RC-119798011",
"country": "Anguilla",
"state": "Colorado",
"city": "Mayerport",
"postcode": "42646-4163",
"address": "4604 Leonora Estate Apt. 938",
"sector": "aut",
"tin": 57622,
"website": "bauch.com",
"logo": "https://via.placeholder.com/200x200.png/002288?text=logo+sint",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Kirk",
"contact_person_lastname": "Tillman",
"app_uid": "90682b04ae3032d994220e085d7d3564",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
},
{
"company_id": 11,
"name": "Garnet Yundt",
"description": "Dolores veritatis quia natus amet iusto eum voluptatem.",
"daily_volume_limit": 7,
"weekly_volume_limit": 5,
"monthly_volume_limit": 2,
"status": null,
"code": 9,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 77,
"company": {
"id": 11,
"name": "Morissette, Lesch and Yost",
"email": "juliana.abernathy@mclaughlin.org",
"phone_number": "629.439.5018",
"registration_number": "RC-412478835",
"country": "Cambodia",
"state": "South Dakota",
"city": "Reillyberg",
"postcode": "90707",
"address": "689 Regan Prairie",
"sector": "laboriosam",
"tin": 924010,
"website": "tillman.info",
"logo": "https://via.placeholder.com/200x200.png/003388?text=logo+mollitia",
"active": 0,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Janet",
"contact_person_lastname": "Greenfelder",
"app_uid": "9537a636ebaa950102eeed2f1aadb740",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new group
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/groups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 1,
\"name\": \"eius\",
\"description\": \"velit\",
\"daily_volume_limit\": 6,
\"weekly_volume_limit\": 18,
\"monthly_volume_limit\": 10,
\"status\": \"Active\",
\"code\": \"facere\",
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/groups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 1,
"name": "eius",
"description": "velit",
"daily_volume_limit": 6,
"weekly_volume_limit": 18,
"monthly_volume_limit": 10,
"status": "Active",
"code": "facere",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 31,
"name": "Miss Georgianna Spinka",
"description": "Non eius rem dignissimos qui excepturi cum possimus.",
"daily_volume_limit": 6,
"weekly_volume_limit": 3,
"monthly_volume_limit": 9,
"status": "Inactive",
"code": 0,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 78,
"company": {
"id": 31,
"name": "Rolfson LLC",
"email": "pkihn@nikolaus.com",
"phone_number": "1-845-709-3398",
"registration_number": "RC-159659995",
"country": "Mali",
"state": "Florida",
"city": "Elishashire",
"postcode": "00422",
"address": "59926 Funk View Apt. 289",
"sector": "animi",
"tin": 957310,
"website": "bartell.com",
"logo": "https://via.placeholder.com/200x200.png/006600?text=logo+veritatis",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Chester",
"contact_person_lastname": "Walter",
"app_uid": "cd35e49097b397104b7a59110b229ec1",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Show a specified group.
requires authentication
Example request:
curl --request GET \
--get "http://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(
"http://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": {
"company_id": 150,
"name": "Jerod Ratke Sr.",
"description": "Aperiam consequatur dolorem sapiente.",
"daily_volume_limit": 4,
"weekly_volume_limit": 4,
"monthly_volume_limit": 3,
"status": "Active",
"code": 8,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 79,
"company": {
"id": 150,
"name": "aut",
"email": "coconnell@example.org",
"phone_number": "5355508.2961366",
"registration_number": "ACP-009-293HY",
"country": "odit",
"state": "praesentium",
"city": "id",
"postcode": "365.9",
"address": "odio",
"sector": "tempora",
"tin": 67291,
"website": "http://www.pouros.net/",
"logo": null,
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "voluptatem",
"contact_person_lastname": "sint",
"app_uid": "laudantium",
"created_at": "2022-06-27T10:38:59.000000Z",
"updated_at": "2022-06-27T10:38:59.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Update the specified group
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/groups/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 11,
\"name\": \"quia\",
\"description\": \"debitis\",
\"daily_volume_limit\": 10,
\"weekly_volume_limit\": 5,
\"monthly_volume_limit\": 2,
\"status\": \"Inactive\",
\"code\": \"ex\",
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/groups/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 11,
"name": "quia",
"description": "debitis",
"daily_volume_limit": 10,
"weekly_volume_limit": 5,
"monthly_volume_limit": 2,
"status": "Inactive",
"code": "ex",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 38,
"name": "Laurianne Gorczany IV",
"description": "Eveniet explicabo ad omnis nulla velit cumque rerum eaque.",
"daily_volume_limit": 6,
"weekly_volume_limit": 5,
"monthly_volume_limit": 6,
"status": "Active",
"code": 6,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 80,
"company": {
"id": 38,
"name": "Schaden LLC",
"email": "carey.ferry@hegmann.biz",
"phone_number": "+1-726-684-5587",
"registration_number": "RC-579236254",
"country": "Antigua and Barbuda",
"state": "Utah",
"city": "Lake Casper",
"postcode": "77859-1599",
"address": "2505 Casper Junctions",
"sector": "voluptatem",
"tin": 606693,
"website": "huel.com",
"logo": "https://via.placeholder.com/200x200.png/001144?text=logo+omnis",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Marianne",
"contact_person_lastname": "Larkin",
"app_uid": "3db9055171380d38345d873280652658",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Delete a group
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/groups/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/groups/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 vehicles or search by registration number, tank capacity, model, fuel type, color, brand.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vehicles?term=et&per_page=17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vehicles"
);
const params = {
"term": "et",
"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": [
{
"company_id": 36,
"cost_center_id": 20,
"group_id": 5,
"driver_id": 43,
"nfc_tag_id": 72,
"registration_number": "kx-467-zw",
"tank_capacity": 34,
"auth_type": null,
"tracker_id": "ezl263",
"model": "Sonata",
"engine_capacity": null,
"fuel_type": "ATK",
"color": "Red",
"brand": "Nissan",
"reward_type": null,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 246,
"company": {
"id": 36,
"name": "Cummerata LLC",
"email": "emma.reichert@kunze.biz",
"phone_number": "231-931-7116",
"registration_number": "RC-299606474",
"country": "Lithuania",
"state": "South Carolina",
"city": "O'Keefeburgh",
"postcode": "71073",
"address": "9974 Lubowitz Isle Suite 202",
"sector": "voluptatem",
"tin": 572340,
"website": "ankunding.org",
"logo": "https://via.placeholder.com/200x200.png/006611?text=logo+voluptas",
"active": 0,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Shanon",
"contact_person_lastname": "Pfannerstill",
"app_uid": "aff26edf68a6e5989fca010237b5f82c",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
},
"group": {
"id": 5,
"company_id": 13,
"name": "Luis Sanford",
"description": "Sit perferendis sed quia dolore.",
"daily_volume_limit": 7,
"weekly_volume_limit": 4,
"monthly_volume_limit": 9,
"code": "6",
"status": null,
"active": 1,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"driver": {
"id": 43,
"company_id": 36,
"fullname": "Nova Kirlin",
"address": "52382 Chaz Walk Apt. 799",
"phone_number": "321.515.1865",
"email": "salma.schimmel@brakus.net",
"driver_speciality": "Motorbike",
"status": "Active",
"pin": 3,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 20,
"company_id": 36,
"name": "Pfeffer Ltd",
"address": "745 Miguel Radial",
"country": "San Marino",
"state": "Wyoming",
"city": "DuBuqueside",
"email": "josephine.terry@bernier.com",
"phone_number": "+1-860-218-5923",
"postcode": "31646",
"region_id": null,
"daily_purchase_budget": 4.69,
"monthly_purchase_budget": 0.65,
"license_type": "286xgw",
"active": 1,
"created_at": "2022-06-06T21:44:30.000000Z",
"updated_at": "2022-06-06T21:44:30.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "kx-467-zw"
},
{
"company_id": 49,
"cost_center_id": 21,
"group_id": 11,
"driver_id": 37,
"nfc_tag_id": 2,
"registration_number": "am-713-ru",
"tank_capacity": 52,
"auth_type": null,
"tracker_id": "ozn684",
"model": "Sonata",
"engine_capacity": null,
"fuel_type": "PMS",
"color": "Silver",
"brand": "HYUNDAI",
"reward_type": null,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 247,
"company": {
"id": 49,
"name": "Schulist LLC",
"email": "kohler.maryse@littel.com",
"phone_number": "1-412-601-1268",
"registration_number": "RC-892173100",
"country": "Serbia",
"state": "Alaska",
"city": "East Kassandratown",
"postcode": "29474-3069",
"address": "18479 Pfeffer Squares",
"sector": "rem",
"tin": 669943,
"website": "roberts.com",
"logo": "https://via.placeholder.com/200x200.png/00dd77?text=logo+facilis",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Guy",
"contact_person_lastname": "Kuvalis",
"app_uid": "5b974b661b752ad9d5105255dd338eae",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
},
"group": {
"id": 11,
"company_id": 49,
"name": "Wilford Reynolds",
"description": "At ut sit facilis iusto non dolorem sint.",
"daily_volume_limit": 1,
"weekly_volume_limit": 3,
"monthly_volume_limit": 1,
"code": "2",
"status": "Inactive",
"active": 1,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"driver": {
"id": 37,
"company_id": 49,
"fullname": "Prof. Felton Lind PhD",
"address": "752 Christine Village Suite 344",
"phone_number": "(314) 916-2045",
"email": "muller.ellen@toy.info",
"driver_speciality": null,
"status": "Inactive",
"pin": 3,
"created_at": "2022-06-06T21:44:31.000000Z",
"updated_at": "2022-06-06T21:44:31.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 21,
"company_id": 49,
"name": "Shields-O'Connell",
"address": "924 Bernard Park Suite 056",
"country": "Canada",
"state": "Maine",
"city": "Port Palma",
"email": "koss.may@lockman.com",
"phone_number": "(458) 580-6781",
"postcode": "71854",
"region_id": null,
"daily_purchase_budget": 5513.15,
"monthly_purchase_budget": 2.28,
"license_type": "766mfs",
"active": 1,
"created_at": "2022-06-06T21:44:30.000000Z",
"updated_at": "2022-06-06T21:44:30.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "am-713-ru"
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/vehicles" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 7,
\"cost_center_id\": 12,
\"group_id\": 14,
\"driver_id\": 4,
\"nfc_tag_id\": 4,
\"registration_number\": \"cumque\",
\"tank_capacity\": \"dolor\",
\"auth_type\": \"praesentium\",
\"tracker_id\": \"consequatur\",
\"model\": \"praesentium\",
\"engine_capacity\": \"at\",
\"fuel_type\": \"AGO\",
\"color\": \"sit\",
\"brand\": \"hic\",
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vehicles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 7,
"cost_center_id": 12,
"group_id": 14,
"driver_id": 4,
"nfc_tag_id": 4,
"registration_number": "cumque",
"tank_capacity": "dolor",
"auth_type": "praesentium",
"tracker_id": "consequatur",
"model": "praesentium",
"engine_capacity": "at",
"fuel_type": "AGO",
"color": "sit",
"brand": "hic",
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 34,
"cost_center_id": 35,
"group_id": 6,
"driver_id": 18,
"nfc_tag_id": 13,
"registration_number": "ws-684-nd",
"tank_capacity": 42,
"auth_type": null,
"tracker_id": "ujh998",
"model": "Kahaya",
"engine_capacity": null,
"fuel_type": "HHK",
"color": "Red",
"brand": "Toyota",
"reward_type": null,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 248,
"company": {
"id": 34,
"name": "Terry, Wolff and Hayes",
"email": "purdy.lisette@maggio.com",
"phone_number": "+13467699072",
"registration_number": "RC-359387436",
"country": "Antigua and Barbuda",
"state": "Alabama",
"city": "Daughertyport",
"postcode": "51161",
"address": "86186 Arnulfo Estate",
"sector": "rerum",
"tin": 850536,
"website": "mcglynn.com",
"logo": "https://via.placeholder.com/200x200.png/00bb77?text=logo+omnis",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Abdiel",
"contact_person_lastname": "Pacocha",
"app_uid": "ac725979f6e8582a9abde9793a27f12d",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
},
"group": {
"id": 6,
"company_id": 29,
"name": "Raheem Rohan",
"description": "Optio ut soluta dolore provident aut voluptatibus.",
"daily_volume_limit": 8,
"weekly_volume_limit": 9,
"monthly_volume_limit": 7,
"code": "8",
"status": null,
"active": 1,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"driver": {
"id": 18,
"company_id": 34,
"fullname": "Prof. Althea Ortiz IV",
"address": "48488 Graciela Oval Suite 141",
"phone_number": "+17474592110",
"email": "uconsidine@gmail.com",
"driver_speciality": "Tricycle",
"status": "Suspended",
"pin": 8,
"created_at": "2022-06-06T21:44:31.000000Z",
"updated_at": "2022-06-06T21:44:31.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 35,
"company_id": 34,
"name": "Nikolaus and Sons",
"address": "3806 Dessie Plain Suite 268",
"country": "Kazakhstan",
"state": "Iowa",
"city": "Summertown",
"email": "jemard@upton.biz",
"phone_number": "+1-585-227-7318",
"postcode": "88591",
"region_id": null,
"daily_purchase_budget": 1.26,
"monthly_purchase_budget": 7.29,
"license_type": "910mjk",
"active": 1,
"created_at": "2022-06-06T21:44:30.000000Z",
"updated_at": "2022-06-06T21:44:30.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "ws-684-nd"
}
}
Received response:
Request failed with error:
Show a specified vehicle.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vehicles/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vehicles/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": {
"company_id": 10,
"cost_center_id": 1,
"group_id": 28,
"driver_id": 61,
"nfc_tag_id": 65,
"registration_number": "aq-292-no",
"tank_capacity": 98,
"auth_type": null,
"tracker_id": "hff862",
"model": "Dasun",
"engine_capacity": null,
"fuel_type": "LPFO",
"color": "Black",
"brand": "Nissan",
"reward_type": null,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 249,
"company": {
"id": 10,
"name": "Braun Ltd",
"email": "cullen.schmidt@ernser.net",
"phone_number": "+1-574-320-1314",
"registration_number": "RC-287272430",
"country": "Holy See (Vatican City State)",
"state": "Delaware",
"city": "Port Anselton",
"postcode": "34277",
"address": "170 Gerhold Estate",
"sector": "molestiae",
"tin": 500751,
"website": "bogisich.com",
"logo": "https://via.placeholder.com/200x200.png/0033ee?text=logo+est",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Brandy",
"contact_person_lastname": "Yost",
"app_uid": "a0260466808a99fae88d6b419a9c6147",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
},
"group": {
"id": 28,
"company_id": 1,
"name": "Ms. Corene Conn",
"description": "Adipisci placeat voluptas sit incidunt autem beatae.",
"daily_volume_limit": 1,
"weekly_volume_limit": 5,
"monthly_volume_limit": 1,
"code": "7",
"status": "Active",
"active": 0,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"driver": {
"id": 61,
"company_id": 10,
"fullname": "Callie Lueilwitz",
"address": "9923 Toney Fort",
"phone_number": "+18434207568",
"email": "yvonne.rutherford@yahoo.com",
"driver_speciality": "Motorbike",
"status": "Inactive",
"pin": 3,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 1,
"company_id": 10,
"name": "Turcotte, Hill and Hills",
"address": "79458 Zboncak Wall",
"country": "Latvia",
"state": "Delaware",
"city": "Mikebury",
"email": "drowe@block.com",
"phone_number": "586-691-6767",
"postcode": "85282",
"region_id": null,
"daily_purchase_budget": 0.82,
"monthly_purchase_budget": 7352057.87,
"license_type": "449wrr",
"active": 1,
"created_at": "2022-06-06T21:44:29.000000Z",
"updated_at": "2022-06-06T21:44:29.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "aq-292-no"
}
}
Received response:
Request failed with error:
Update the specified vehicle
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/vehicles/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 15,
\"cost_center_id\": 5,
\"group_id\": 14,
\"driver_id\": 10,
\"nfc_tag_id\": 19,
\"registration_number\": \"voluptas\",
\"tank_capacity\": \"eveniet\",
\"auth_type\": \"est\",
\"tracker_id\": \"tempora\",
\"model\": \"dolore\",
\"engine_capacity\": \"sed\",
\"fuel_type\": \"DPK\",
\"color\": \"quo\",
\"brand\": \"iste\",
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vehicles/6"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 15,
"cost_center_id": 5,
"group_id": 14,
"driver_id": 10,
"nfc_tag_id": 19,
"registration_number": "voluptas",
"tank_capacity": "eveniet",
"auth_type": "est",
"tracker_id": "tempora",
"model": "dolore",
"engine_capacity": "sed",
"fuel_type": "DPK",
"color": "quo",
"brand": "iste",
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 49,
"cost_center_id": 21,
"group_id": 11,
"driver_id": 37,
"nfc_tag_id": 2,
"registration_number": "oj-684-mu",
"tank_capacity": 89,
"auth_type": null,
"tracker_id": "asv952",
"model": "Dasun",
"engine_capacity": null,
"fuel_type": "LPG",
"color": "Black",
"brand": "HYUNDAI",
"reward_type": null,
"active": true,
"updated_at": "2022-06-27T10:43:16.000000Z",
"created_at": "2022-06-27T10:43:16.000000Z",
"id": 250,
"company": {
"id": 49,
"name": "Schulist LLC",
"email": "kohler.maryse@littel.com",
"phone_number": "1-412-601-1268",
"registration_number": "RC-892173100",
"country": "Serbia",
"state": "Alaska",
"city": "East Kassandratown",
"postcode": "29474-3069",
"address": "18479 Pfeffer Squares",
"sector": "rem",
"tin": 669943,
"website": "roberts.com",
"logo": "https://via.placeholder.com/200x200.png/00dd77?text=logo+facilis",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Guy",
"contact_person_lastname": "Kuvalis",
"app_uid": "5b974b661b752ad9d5105255dd338eae",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
},
"group": {
"id": 11,
"company_id": 49,
"name": "Wilford Reynolds",
"description": "At ut sit facilis iusto non dolorem sint.",
"daily_volume_limit": 1,
"weekly_volume_limit": 3,
"monthly_volume_limit": 1,
"code": "2",
"status": "Inactive",
"active": 1,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"driver": {
"id": 37,
"company_id": 49,
"fullname": "Prof. Felton Lind PhD",
"address": "752 Christine Village Suite 344",
"phone_number": "(314) 916-2045",
"email": "muller.ellen@toy.info",
"driver_speciality": null,
"status": "Inactive",
"pin": 3,
"created_at": "2022-06-06T21:44:31.000000Z",
"updated_at": "2022-06-06T21:44:31.000000Z",
"deleted_at": null
},
"costCenter": {
"id": 21,
"company_id": 49,
"name": "Shields-O'Connell",
"address": "924 Bernard Park Suite 056",
"country": "Canada",
"state": "Maine",
"city": "Port Palma",
"email": "koss.may@lockman.com",
"phone_number": "(458) 580-6781",
"postcode": "71854",
"region_id": null,
"daily_purchase_budget": 5513.15,
"monthly_purchase_budget": 2.28,
"license_type": "766mfs",
"active": 1,
"created_at": "2022-06-06T21:44:30.000000Z",
"updated_at": "2022-06-06T21:44:30.000000Z",
"deleted_at": null
},
"vehicle_plate_number": "oj-684-mu"
}
}
Received response:
Request failed with error:
Delete a vehicle
requires authentication
Example request:
curl --request DELETE \
"http://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(
"http://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
Generate pin for specified NFC Tag
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/generate_pin/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/generate_pin/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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=07zjIWbvjlwIQIZkXBrVR3VPbkJh6r8ILNVVwZkV; expires=Mon, 27-Jun-2022 12:43:17 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
General Endpoints
Get logged-in user
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=VVHdjxVF2BoOnEfAsAWi3rS8NyueZded92TetMMv; expires=Mon, 27-Jun-2022 12:43:12 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
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 "http://cupidapiv2.smartflowtech.com/api/products?term=dolor&per_page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/products"
);
const params = {
"term": "dolor",
"per_page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"name": "Engine Oil",
"code": "DPK",
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 51
},
{
"name": "Gas",
"code": "ATK",
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 52
}
],
"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 "http://cupidapiv2.smartflowtech.com/api/test_redis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://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 (200):
Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=3yKPMlUzZ2Ts1KYsJm9ALcPzT9gpjMgsaNSiU1WV; expires=Mon, 27-Jun-2022 12:43:12 GMT; Max-Age=7200; path=/; httponly; samesite=lax
1
Received response:
Request failed with error:
Create a new product
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"odio\",
\"code\": \"aut\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "odio",
"code": "aut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Kerosine",
"code": "DPK",
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 53
}
}
Received response:
Request failed with error:
Show a specified product.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/products/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/products/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": {
"name": "Petrol",
"code": "ATK",
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 54
}
}
Received response:
Request failed with error:
Update the specified product
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/products/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vel\",
\"code\": \"hic\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/products/19"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vel",
"code": "hic"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Gas",
"code": "ATK",
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 55
}
}
Received response:
Request failed with error:
Delete a product
requires authentication
Example request:
curl --request DELETE \
"http://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(
"http://cupidapiv2.smartflowtech.com/api/products/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 payment methods or search by name, key, merchant code.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/payment_methods?term=voluptatem&per_page=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_methods"
);
const params = {
"term": "voluptatem",
"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": [
{
"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": "110766",
"active": true,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 47
},
{
"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": "110766",
"active": true,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 48
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/payment_methods" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quod\",
\"key\": \"sunt\",
\"pay_percent\": 10576.3745495,
\"cap_fee\": 107771623.57697143,
\"max_commission\": 234483332.45735016,
\"verification_url\": \"https:\\/\\/www.koepp.biz\\/non-recusandae-officia-ab-nihil\",
\"public_key\": \"iste\",
\"secret_key\": \"autem\",
\"merchant_no\": \"ducimus\",
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_methods"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quod",
"key": "sunt",
"pay_percent": 10576.3745495,
"cap_fee": 107771623.57697143,
"max_commission": 234483332.45735016,
"verification_url": "https:\/\/www.koepp.biz\/non-recusandae-officia-ab-nihil",
"public_key": "iste",
"secret_key": "autem",
"merchant_no": "ducimus",
"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": "110766",
"active": true,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 49
}
}
Received response:
Request failed with error:
Show a specified payment method.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/payment_methods/8" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_methods/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 (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": "110766",
"active": true,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 50
}
}
Received response:
Request failed with error:
Update the specified payment method
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/payment_methods/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ut\",
\"key\": \"quos\",
\"pay_percent\": 0.158458,
\"cap_fee\": 112374943.0249192,
\"max_commission\": 394412,
\"verification_url\": \"https:\\/\\/www.thompson.biz\\/dolorum-ducimus-id-aut-necessitatibus\",
\"public_key\": \"quis\",
\"secret_key\": \"nobis\",
\"merchant_no\": \"qui\",
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_methods/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ut",
"key": "quos",
"pay_percent": 0.158458,
"cap_fee": 112374943.0249192,
"max_commission": 394412,
"verification_url": "https:\/\/www.thompson.biz\/dolorum-ducimus-id-aut-necessitatibus",
"public_key": "quis",
"secret_key": "nobis",
"merchant_no": "qui",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"name": "Paystacks",
"key": "paystack",
"pay_percent": 1.5,
"cap_fee": 2500,
"max_commission": 2000,
"verification_url": "https://api.paystack.co/transaction/verify/",
"url": "https://api.paystack.co/",
"public_key": "pk_test_226b36f5c5965953a578ba834bb9e8d9b8ceb1a2",
"secret_key": "sk_test_c2c5584f2bb181d9620ceca8341bbcdadb6ac2a6",
"merchant_no": "110766",
"active": true,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 51
}
}
Received response:
Request failed with error:
Delete a payment method
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/payment_methods/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_methods/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:
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 "http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history?per_page=4&company_id=11&vendor_id=8&cost_center_id=6&sm_station_id=3&mac_address=veniam&date=aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history"
);
const params = {
"per_page": "4",
"company_id": "11",
"vendor_id": "8",
"cost_center_id": "6",
"sm_station_id": "3",
"mac_address": "veniam",
"date": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"company_id": 30,
"vendor_id": 117,
"cost_center_id": 16,
"nfctag_id": 44,
"driver_id": 4,
"vendor_station_name": "Bauch, Mueller and Berge",
"vehicle_plate_number": "wy-201-ic",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 610.14,
"volume": 0.47,
"odometer_reading": 0,
"product": "AGO",
"pump": 3,
"selling_price": 507094896.39,
"current_credit_limit": 25614406.81,
"attendant": "DEFAULT",
"last_volume_dispensed": 663.84,
"last_amount_paid": 43.56,
"transaction_seq_no": 44725,
"is_balanced": true,
"oem_station_id": 2,
"sm_station_id": 3,
"balance_refunded": 5952.54,
"tapnet_amount": 21471.42,
"tapnet_volume": 5039470.87,
"tapnet_transaction_time": {
"date": "2017-05-07 06:26:44.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "42:A8:7D:73:7C:5E",
"release_token": "21",
"is_fdc_value_fill": true,
"fdc_volume": 31.93,
"fdc_amount": 713.43,
"last_tsn_source": null,
"verified_volume": 0.61,
"verified_amount": 86317743.6,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 379,
"recon_balance_refunded": true,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 46,
"driver": {
"id": 4,
"company_id": 30,
"fullname": "Reese Lindgren",
"address": "15447 Kenneth Shore",
"phone_number": "+1-773-802-4897",
"email": "grimes.kim@collier.com",
"driver_speciality": null,
"status": "Active",
"pin": 0,
"created_at": "2022-06-06T21:44:31.000000Z",
"updated_at": "2022-06-06T21:44:31.000000Z",
"deleted_at": null
},
"company": {
"id": 30,
"name": "Lindgren-Blick",
"email": "maritza12@friesen.com",
"phone_number": "(980) 617-7968",
"registration_number": "RC-119798011",
"country": "Anguilla",
"state": "Colorado",
"city": "Mayerport",
"postcode": "42646-4163",
"address": "4604 Leonora Estate Apt. 938",
"sector": "aut",
"tin": 57622,
"website": "bauch.com",
"logo": "https://via.placeholder.com/200x200.png/002288?text=logo+sint",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Kirk",
"contact_person_lastname": "Tillman",
"app_uid": "90682b04ae3032d994220e085d7d3564",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
},
{
"company_id": 10,
"vendor_id": 91,
"cost_center_id": 1,
"nfctag_id": 65,
"driver_id": 61,
"vendor_station_name": "Kuvalis PLC",
"vehicle_plate_number": "mm-445-te",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 4717.3,
"volume": 3760.11,
"odometer_reading": 1,
"product": "PMS",
"pump": 4,
"selling_price": 8326359.71,
"current_credit_limit": 4091.53,
"attendant": "DEFAULT",
"last_volume_dispensed": 12809.06,
"last_amount_paid": 19954.29,
"transaction_seq_no": 74841,
"is_balanced": true,
"oem_station_id": 5,
"sm_station_id": 3,
"balance_refunded": 25349224.65,
"tapnet_amount": 2363.93,
"tapnet_volume": 477348.29,
"tapnet_transaction_time": {
"date": "1992-07-25 01:20:13.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "9D:F9:55:18:B4:F1",
"release_token": "43",
"is_fdc_value_fill": true,
"fdc_volume": 6829.65,
"fdc_amount": 94535.59,
"last_tsn_source": null,
"verified_volume": 325.74,
"verified_amount": 40.42,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 52,
"recon_balance_refunded": false,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 47,
"driver": {
"id": 61,
"company_id": 10,
"fullname": "Callie Lueilwitz",
"address": "9923 Toney Fort",
"phone_number": "+18434207568",
"email": "yvonne.rutherford@yahoo.com",
"driver_speciality": "Motorbike",
"status": "Inactive",
"pin": 3,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"company": {
"id": 10,
"name": "Braun Ltd",
"email": "cullen.schmidt@ernser.net",
"phone_number": "+1-574-320-1314",
"registration_number": "RC-287272430",
"country": "Holy See (Vatican City State)",
"state": "Delaware",
"city": "Port Anselton",
"postcode": "34277",
"address": "170 Gerhold Estate",
"sector": "molestiae",
"tin": 500751,
"website": "bogisich.com",
"logo": "https://via.placeholder.com/200x200.png/0033ee?text=logo+est",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Brandy",
"contact_person_lastname": "Yost",
"app_uid": "a0260466808a99fae88d6b419a9c6147",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new Fuel purchase history
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 12,
\"vendor_id\": 17,
\"cost_center_id\": 2,
\"nfctag_id\": 2,
\"driver_id\": 3,
\"vendor_station_name\": \"repellat\",
\"vehicle_plate_number\": \"nemo\",
\"auth_type\": \"Key Tag\",
\"barcode_id\": \"adipisci\",
\"amount_paid\": 2177786.96803,
\"volume\": 50,
\"odometer_reading\": 2234152.9746,
\"product\": \"LPG\",
\"pump\": 4,
\"selling_price\": 5.0819,
\"current_credit_limit\": 5312225.0118827,
\"attendant\": \"rerum\",
\"last_volume_dispensed\": 68.348,
\"last_amount_paid\": 6062156.9699,
\"transaction_seq_no\": 9,
\"is_balanced\": false,
\"oem_station_id\": 1,
\"sm_station_id\": 15,
\"balance_refunded\": 18.2575,
\"tapnet_amount\": 263958.61837574,
\"tapnet_volume\": 4446.4505163,
\"tapnet_transaction_time\": \"2022-06-27 10:43:17\",
\"thankucash_reward_applied\": \"aspernatur\",
\"thankucash_reward_value\": \"architecto\",
\"app_mode\": \"NO FCC MODE\",
\"release_token\": \"r\",
\"is_fdc_value_fill\": true,
\"fdc_volume\": 230895.45267,
\"fdc_amount\": 23022.06728,
\"last_tsn_source\": \"itaque\",
\"verified_volume\": 583777064,
\"verified_amount\": 23363370.189,
\"reconciliation_source\": \"MANUAL\",
\"one_time_auth_id\": 7,
\"recon_balance_refunded\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 12,
"vendor_id": 17,
"cost_center_id": 2,
"nfctag_id": 2,
"driver_id": 3,
"vendor_station_name": "repellat",
"vehicle_plate_number": "nemo",
"auth_type": "Key Tag",
"barcode_id": "adipisci",
"amount_paid": 2177786.96803,
"volume": 50,
"odometer_reading": 2234152.9746,
"product": "LPG",
"pump": 4,
"selling_price": 5.0819,
"current_credit_limit": 5312225.0118827,
"attendant": "rerum",
"last_volume_dispensed": 68.348,
"last_amount_paid": 6062156.9699,
"transaction_seq_no": 9,
"is_balanced": false,
"oem_station_id": 1,
"sm_station_id": 15,
"balance_refunded": 18.2575,
"tapnet_amount": 263958.61837574,
"tapnet_volume": 4446.4505163,
"tapnet_transaction_time": "2022-06-27 10:43:17",
"thankucash_reward_applied": "aspernatur",
"thankucash_reward_value": "architecto",
"app_mode": "NO FCC MODE",
"release_token": "r",
"is_fdc_value_fill": true,
"fdc_volume": 230895.45267,
"fdc_amount": 23022.06728,
"last_tsn_source": "itaque",
"verified_volume": 583777064,
"verified_amount": 23363370.189,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 7,
"recon_balance_refunded": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 19,
"vendor_id": 48,
"cost_center_id": 25,
"nfctag_id": 44,
"driver_id": 98,
"vendor_station_name": "Maggio Group",
"vehicle_plate_number": "kr-629-xe",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 8880559.03,
"volume": 44.47,
"odometer_reading": 3,
"product": "LPG",
"pump": 4,
"selling_price": 266.22,
"current_credit_limit": 9283.6,
"attendant": "DEFAULT",
"last_volume_dispensed": 4253.8,
"last_amount_paid": 120530.37,
"transaction_seq_no": 5465,
"is_balanced": true,
"oem_station_id": 7,
"sm_station_id": 4,
"balance_refunded": 285.29,
"tapnet_amount": 37145.82,
"tapnet_volume": 6.42,
"tapnet_transaction_time": {
"date": "1999-01-06 14:04:04.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "A6:97:B6:A9:D5:32",
"release_token": "84",
"is_fdc_value_fill": true,
"fdc_volume": 261260.31,
"fdc_amount": 3.7,
"last_tsn_source": null,
"verified_volume": 0.46,
"verified_amount": 416.91,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 744,
"recon_balance_refunded": true,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 48,
"driver": {
"id": 98,
"company_id": 19,
"fullname": "Zoie Pollich DDS",
"address": "974 Carson Expressway",
"phone_number": "949-818-7279",
"email": "hermiston.lelia@treutel.com",
"driver_speciality": "SUV",
"status": "Active",
"pin": 9,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"company": {
"id": 19,
"name": "Predovic-Kuhic",
"email": "isabelle.kulas@konopelski.net",
"phone_number": "+13258423505",
"registration_number": "RC-398614098",
"country": "Ukraine",
"state": "Rhode Island",
"city": "Emardtown",
"postcode": "72264-8475",
"address": "9325 Barry Junction Apt. 902",
"sector": "sequi",
"tin": 500049,
"website": "goyette.com",
"logo": "https://via.placeholder.com/200x200.png/00ddaa?text=logo+fuga",
"active": 1,
"on_loyalty_program": 0,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Clarissa",
"contact_person_lastname": "Ryan",
"app_uid": "98c1be13873286d2574ae670c94cdbed",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Show a specified Fuel purchase history.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/13"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 11,
"vendor_id": 37,
"cost_center_id": 5,
"nfctag_id": 111,
"driver_id": 90,
"vendor_station_name": "Wyman, O'Kon and Medhurst",
"vehicle_plate_number": "nk-234-sl",
"auth_type": "Key Tag",
"barcode_id": null,
"amount_paid": 48.18,
"volume": 37195748.64,
"odometer_reading": 8,
"product": "LPFO",
"pump": 8,
"selling_price": 7980169.93,
"current_credit_limit": 54747862.26,
"attendant": "DEFAULT",
"last_volume_dispensed": 1.94,
"last_amount_paid": 293067.13,
"transaction_seq_no": 17562,
"is_balanced": false,
"oem_station_id": 7,
"sm_station_id": 8,
"balance_refunded": 48603082.17,
"tapnet_amount": 4955499.27,
"tapnet_volume": 38.06,
"tapnet_transaction_time": {
"date": "2000-05-21 23:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "9E:2F:2D:2B:7F:FC",
"release_token": "40",
"is_fdc_value_fill": false,
"fdc_volume": 325.02,
"fdc_amount": 793236.56,
"last_tsn_source": null,
"verified_volume": 131802.56,
"verified_amount": 409110896.16,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 190,
"recon_balance_refunded": true,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 49,
"driver": {
"id": 90,
"company_id": 11,
"fullname": "Jaquan Hintz",
"address": "1621 Toy Run Apt. 376",
"phone_number": "1-845-376-6519",
"email": "gmarquardt@yahoo.com",
"driver_speciality": "Tricycle",
"status": "Active",
"pin": 2,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"company": {
"id": 11,
"name": "Morissette, Lesch and Yost",
"email": "juliana.abernathy@mclaughlin.org",
"phone_number": "629.439.5018",
"registration_number": "RC-412478835",
"country": "Cambodia",
"state": "South Dakota",
"city": "Reillyberg",
"postcode": "90707",
"address": "689 Regan Prairie",
"sector": "laboriosam",
"tin": 924010,
"website": "tillman.info",
"logo": "https://via.placeholder.com/200x200.png/003388?text=logo+mollitia",
"active": 0,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Janet",
"contact_person_lastname": "Greenfelder",
"app_uid": "9537a636ebaa950102eeed2f1aadb740",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Update the specified Fuel purchase history
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 19,
\"vendor_id\": 19,
\"cost_center_id\": 5,
\"nfctag_id\": 1,
\"driver_id\": 19,
\"vendor_station_name\": \"nam\",
\"vehicle_plate_number\": \"dolorem\",
\"auth_type\": \"Key Tag\",
\"barcode_id\": \"harum\",
\"amount_paid\": 4950.73819,
\"volume\": 21364173.197,
\"odometer_reading\": 233650.86,
\"product\": \"HHK\",
\"pump\": 17,
\"selling_price\": 399685.27571176,
\"current_credit_limit\": 38.08,
\"attendant\": \"doloribus\",
\"last_volume_dispensed\": 0.25246453,
\"last_amount_paid\": 146806061.3339,
\"transaction_seq_no\": 10,
\"is_balanced\": false,
\"oem_station_id\": 14,
\"sm_station_id\": 9,
\"balance_refunded\": 3.2846,
\"tapnet_amount\": 45.22,
\"tapnet_volume\": 57046816.7271,
\"tapnet_transaction_time\": \"2022-06-27 10:43:17\",
\"thankucash_reward_applied\": \"maxime\",
\"thankucash_reward_value\": \"reiciendis\",
\"app_mode\": \"FCC MODE\",
\"release_token\": \"\",
\"is_fdc_value_fill\": false,
\"fdc_volume\": 66,
\"fdc_amount\": 3.97111403,
\"last_tsn_source\": \"iure\",
\"verified_volume\": 438263.9664709,
\"verified_amount\": 11.237,
\"reconciliation_source\": \"TAPNET\",
\"one_time_auth_id\": 20,
\"recon_balance_refunded\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 19,
"vendor_id": 19,
"cost_center_id": 5,
"nfctag_id": 1,
"driver_id": 19,
"vendor_station_name": "nam",
"vehicle_plate_number": "dolorem",
"auth_type": "Key Tag",
"barcode_id": "harum",
"amount_paid": 4950.73819,
"volume": 21364173.197,
"odometer_reading": 233650.86,
"product": "HHK",
"pump": 17,
"selling_price": 399685.27571176,
"current_credit_limit": 38.08,
"attendant": "doloribus",
"last_volume_dispensed": 0.25246453,
"last_amount_paid": 146806061.3339,
"transaction_seq_no": 10,
"is_balanced": false,
"oem_station_id": 14,
"sm_station_id": 9,
"balance_refunded": 3.2846,
"tapnet_amount": 45.22,
"tapnet_volume": 57046816.7271,
"tapnet_transaction_time": "2022-06-27 10:43:17",
"thankucash_reward_applied": "maxime",
"thankucash_reward_value": "reiciendis",
"app_mode": "FCC MODE",
"release_token": "",
"is_fdc_value_fill": false,
"fdc_volume": 66,
"fdc_amount": 3.97111403,
"last_tsn_source": "iure",
"verified_volume": 438263.9664709,
"verified_amount": 11.237,
"reconciliation_source": "TAPNET",
"one_time_auth_id": 20,
"recon_balance_refunded": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 4,
"vendor_id": 76,
"cost_center_id": 33,
"nfctag_id": 32,
"driver_id": 38,
"vendor_station_name": "Pfeffer-Rice",
"vehicle_plate_number": "tg-015-ec",
"auth_type": "Card",
"barcode_id": null,
"amount_paid": 46511005.63,
"volume": 77395533.27,
"odometer_reading": 2,
"product": "LPFO",
"pump": 3,
"selling_price": 141.57,
"current_credit_limit": 67365.01,
"attendant": "DEFAULT",
"last_volume_dispensed": 60330667.32,
"last_amount_paid": 231100.83,
"transaction_seq_no": 20971,
"is_balanced": true,
"oem_station_id": 4,
"sm_station_id": 4,
"balance_refunded": 1223355.3,
"tapnet_amount": 1903.08,
"tapnet_volume": 8393932.61,
"tapnet_transaction_time": {
"date": "1992-09-04 13:46:49.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"thankucash_reward_applied": null,
"thankucash_reward_value": null,
"app_mode": "FCC MODE",
"mac_address": "CD:97:95:1C:E0:0A",
"release_token": "86",
"is_fdc_value_fill": true,
"fdc_volume": 290.82,
"fdc_amount": 67242965.04,
"last_tsn_source": null,
"verified_volume": 40.61,
"verified_amount": 8.52,
"reconciliation_source": "MANUAL",
"one_time_auth_id": 500,
"recon_balance_refunded": true,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 50,
"driver": {
"id": 38,
"company_id": 4,
"fullname": "Pete Bahringer III",
"address": "70853 Armstrong Valley Apt. 425",
"phone_number": "+1-458-862-0693",
"email": "ogreen@streich.info",
"driver_speciality": "Tricycle",
"status": "Suspended",
"pin": 8,
"created_at": "2022-06-06T21:44:32.000000Z",
"updated_at": "2022-06-06T21:44:32.000000Z",
"deleted_at": null
},
"company": {
"id": 4,
"name": "Little, Volkman and Harris",
"email": "nikolas15@bruen.com",
"phone_number": "434-314-8144",
"registration_number": "RC-417522063",
"country": "Kiribati",
"state": "Virginia",
"city": "Bradymouth",
"postcode": "19553",
"address": "377 Demond Square",
"sector": "nam",
"tin": 604563,
"website": "jacobson.com",
"logo": "https://via.placeholder.com/200x200.png/00dd99?text=logo+consectetur",
"active": 1,
"on_loyalty_program": 1,
"loyalty_reward_percentage": null,
"loyalty_min_purchase_amount": null,
"loyalty_points_by_group": 0,
"contact_person_first_name": "Liam",
"contact_person_lastname": "Labadie",
"app_uid": "354e60b60fc151097e7fdae67b780b9b",
"created_at": "2022-06-06T21:43:40.000000Z",
"updated_at": "2022-06-06T21:43:40.000000Z",
"deleted_at": null
}
}
}
Received response:
Request failed with error:
Display a listing of the one time authorizations or search by status, registration number, product.
requires authentication
Delete a Fuel purchase history
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/pos/fuel_purchase_history/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:
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
Payment Endpoints
Initialise a new Paystack payment
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/payments/initiate/paystack" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payment_mode_id\": 5,
\"company_id\": 13,
\"amount_to_pay\": 12
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payments/initiate/paystack"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payment_mode_id": 5,
"company_id": 13,
"amount_to_pay": 12
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"ref": "cupid-pay-508306598",
"company_id": 38,
"vendor_wallet_id": 18,
"vendor_id": 35,
"company_temps_id": 38,
"initiator_id": 2,
"payment_mode_id": 33,
"status": "successful",
"total_charged_amount": 123020497.97,
"original_amount": 521.13,
"gateway_charged": 547615666.12,
"wallet_amount": 28515461.93,
"amount_paid": 1983.15,
"fee_paid": 3122880.08,
"webhook_confirmed": null,
"date_webhook_confirmed": {
"date": "1970-02-07 17:03:47.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"date_transaction_verified": {
"date": "2015-09-04 07:52:38.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"verification_means": "sheduled_job",
"payment_cause": "cupid_recharge",
"initiating_users_name": "Dr. Bridgette Roob DVM",
"paystack_subaccount_code": 283266826,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 510
}
}
Received response:
Request failed with error:
Verify Paystack payment & give value for purchase
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/payments/paystack" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference\": \"mollitia\",
\"company_id\": 9,
\"payment_uploaded_by\": \"quaerat\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payments/paystack"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reference": "mollitia",
"company_id": 9,
"payment_uploaded_by": "quaerat"
};
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 "http://cupidapiv2.smartflowtech.com/api/payment_histories?term=soluta&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_histories"
);
const params = {
"term": "soluta",
"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": [
{
"payment_id": 15,
"vendor_id": 66,
"company_id": 50,
"amount_paid": 202011516.01,
"start_company_balance": 29.66,
"end_company_balance": 142851455.41,
"current_credit_limit": 4.18,
"payment_made_by": "Kemmer-Cole",
"payment_date": {
"date": "1990-01-05 07:37:36.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Pending",
"payment_uploaded_by": "Waldo Kuvalis",
"payment_approved_by": "Gianni Hettinger",
"reference": 914949268,
"channel": "Paystack Online",
"amount_net": 53728.85,
"amount_gross": 2422.42,
"fee": 0,
"paystack_subaccount_code": "ACCT_8p7c3n5o1",
"evidence_path": "https://via.placeholder.com/640x480.png/008833?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": 1141084053,
"ussd_wallet_pay_id": 665738036,
"ussd_onboard_id": 362193994,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 546
},
{
"payment_id": 2,
"vendor_id": 22,
"company_id": 16,
"amount_paid": 2.23,
"start_company_balance": 51.44,
"end_company_balance": 417412.34,
"current_credit_limit": 32615.61,
"payment_made_by": "Cummerata-Kassulke",
"payment_date": {
"date": "2020-06-29 23:44:52.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Disapproved",
"payment_uploaded_by": "Dr. Dean Kessler",
"payment_approved_by": "Nishita",
"reference": 989752583,
"channel": "Paystack Online",
"amount_net": 392893.12,
"amount_gross": 5.52,
"fee": 237594519.37,
"paystack_subaccount_code": "ACCT_0q3t4m0g3",
"evidence_path": "https://via.placeholder.com/640x480.png/00cc55?text=culpa",
"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": 554119493,
"ussd_wallet_pay_id": 513446620,
"ussd_onboard_id": 488958109,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 547
}
],
"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 \
"http://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\": 14,
\"amount_paid\": 54520.1418,
\"s3_url\": \"aspernatur\",
\"velox_vendor_id\": 8,
\"velox_customer_id\": \"est\",
\"velox_customer_name\": \"necessitatibus\",
\"uploaded_by\": \"deleniti\",
\"payment_date\": \"2022-06-27\"
}"
const url = new URL(
"http://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": 14,
"amount_paid": 54520.1418,
"s3_url": "aspernatur",
"velox_vendor_id": 8,
"velox_customer_id": "est",
"velox_customer_name": "necessitatibus",
"uploaded_by": "deleniti",
"payment_date": "2022-06-27"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_id": 2,
"vendor_id": 22,
"company_id": 16,
"amount_paid": 62.56,
"start_company_balance": 75342.71,
"end_company_balance": 208522.96,
"current_credit_limit": 5373386.77,
"payment_made_by": "Cummerata-Kassulke",
"payment_date": {
"date": "2016-10-12 12:51:37.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Success",
"payment_uploaded_by": "Demond Ryan",
"payment_approved_by": "Gianni Hettinger",
"reference": 1271005092,
"channel": "Paystack Online",
"amount_net": 15.09,
"amount_gross": 38765301.09,
"fee": 3187598.29,
"paystack_subaccount_code": "ACCT_1j4a5c8z0",
"evidence_path": "https://via.placeholder.com/640x480.png/00aa00?text=perspiciatis",
"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": 285207935,
"ussd_wallet_pay_id": 684310051,
"ussd_onboard_id": 931325995,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 548
}
}
Received response:
Request failed with error:
Show a specified payment history
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/payment_histories/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_histories/11"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_id": 192,
"vendor_id": 43,
"company_id": 21,
"amount_paid": 20.01,
"start_company_balance": 2467682.05,
"end_company_balance": 7.64,
"current_credit_limit": 2586204.23,
"payment_made_by": "Ortiz-Frami",
"payment_date": {
"date": "2012-10-23 11:53:44.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Pending",
"payment_uploaded_by": "Trinity Upton DDS",
"payment_approved_by": "Nishita",
"reference": 583199980,
"channel": "Manual Upload",
"amount_net": 741341131.58,
"amount_gross": 1479063.34,
"fee": 180389.98,
"paystack_subaccount_code": "ACCT_9b6t0e1v0",
"evidence_path": "https://via.placeholder.com/640x480.png/007733?text=et",
"status_message": null,
"wallet_amount": null,
"app_label": null,
"auth_code": null,
"card_expire_date": null,
"card_holder_name": null,
"masked_pan": null,
"message": null,
"rrn": null,
"stan": null,
"status_code": null,
"terminal_id": null,
"payment_provider": null,
"payment_transaction_id": 1247962079,
"ussd_wallet_pay_id": 42263186,
"ussd_onboard_id": 272355480,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 549
}
}
Received response:
Request failed with error:
Update the specified payment history
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/payment_histories/17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"selected_customer\": \"qui\",
\"payment_status\": \"sint\",
\"amount_paid\": 735102209.18832,
\"payment_approved_by\": \"quos\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_histories/17"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"selected_customer": "qui",
"payment_status": "sint",
"amount_paid": 735102209.18832,
"payment_approved_by": "quos"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_id": 35,
"vendor_id": 37,
"company_id": 11,
"amount_paid": 599206.26,
"start_company_balance": 1.1,
"end_company_balance": 547826.65,
"current_credit_limit": 2415.22,
"payment_made_by": "Morissette, Lesch and Yost",
"payment_date": {
"date": "1971-03-27 13:00:34.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_status": "Pending",
"payment_uploaded_by": "Spencer Lind MD",
"payment_approved_by": "Pattie Howell",
"reference": 229463886,
"channel": "Paystack Online",
"amount_net": 25185.76,
"amount_gross": 1.69,
"fee": 537.24,
"paystack_subaccount_code": "ACCT_6i8l6c0u3",
"evidence_path": "https://via.placeholder.com/640x480.png/00bb55?text=est",
"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": 1094869127,
"ussd_wallet_pay_id": 973769622,
"ussd_onboard_id": 644907592,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 550
}
}
Received response:
Request failed with error:
Delete a payment history
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/payment_histories/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/payment_histories/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:
User Endpoints
Display a listing of the users or search by name, email, address, state, country.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/oauth/users?term=commodi&per_page=8" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/users"
);
const params = {
"term": "commodi",
"per_page": "8",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"title": "Miss",
"name": "Herminia Kautzer",
"email": "cfeeney@example.com",
"phone": "425.671.7910",
"avatar": "https://via.placeholder.com/200x200.png/0066dd?text=avatar+dicta",
"username": "ymorar",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "Visa",
"card_last_four": "2230",
"is_vendor": false,
"is_admin": false,
"updated_at": "2022-06-27T10:43:12.000000Z",
"created_at": "2022-06-27T10:43:12.000000Z",
"id": 104,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 6,
"name": "incidunt",
"key": "dolore"
},
{
"id": 9,
"name": "quaerat",
"key": "ea"
},
{
"id": 16,
"name": "consectetur",
"key": "quibusdam"
},
{
"id": 23,
"name": "tempore",
"key": "accusantium"
},
{
"id": 38,
"name": "atque",
"key": "vitae"
}
]
},
{
"title": "Mrs.",
"name": "Aubree Zemlak DVM",
"email": "lkeeling@example.com",
"phone": "+1-626-421-5152",
"avatar": "https://via.placeholder.com/200x200.png/0033dd?text=avatar+recusandae",
"username": "alvera39",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "Visa Retired",
"card_last_four": "4248",
"is_vendor": false,
"is_admin": false,
"updated_at": "2022-06-27T10:43:12.000000Z",
"created_at": "2022-06-27T10:43:12.000000Z",
"id": 105,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 15,
"name": "dolor",
"key": "fugit"
},
{
"id": 16,
"name": "consectetur",
"key": "quibusdam"
},
{
"id": 21,
"name": "nam",
"key": "saepe"
},
{
"id": 25,
"name": "aliquam",
"key": "sed"
},
{
"id": 50,
"name": "a",
"key": "labore"
}
]
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/oauth/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eum\",
\"phone\": 10911197.184185203,
\"email\": \"bud81@example.com\",
\"username\": \"facilis\",
\"gender\": \"female\",
\"newsletter\": true,
\"active\": false,
\"is_admin\": false,
\"is_vendor\": true,
\"vendors\": [
15
],
\"permissions\": [
6
],
\"companies\": [
9
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eum",
"phone": 10911197.184185203,
"email": "bud81@example.com",
"username": "facilis",
"gender": "female",
"newsletter": true,
"active": false,
"is_admin": false,
"is_vendor": true,
"vendors": [
15
],
"permissions": [
6
],
"companies": [
9
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Dr.",
"name": "Nina Herzog",
"email": "wendell29@example.net",
"phone": "(706) 707-3841",
"avatar": "https://via.placeholder.com/200x200.png/00dd99?text=avatar+eius",
"username": "selena51",
"gender": "Male",
"newsletter": true,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "0004",
"is_vendor": false,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 106,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 3,
"name": "velit",
"key": "aut"
},
{
"id": 18,
"name": "repudiandae",
"key": "ratione"
},
{
"id": 25,
"name": "aliquam",
"key": "sed"
},
{
"id": 27,
"name": "error",
"key": "ullam"
},
{
"id": 49,
"name": "totam",
"key": "nesciunt"
}
]
}
}
Received response:
Request failed with error:
Show a specified user.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/oauth/users/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/users/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": {
"title": "Prof.",
"name": "Claude McLaughlin",
"email": "brook69@example.org",
"phone": "+18547478942",
"avatar": "https://via.placeholder.com/200x200.png/002200?text=avatar+omnis",
"username": "ileuschke",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "MasterCard",
"card_last_four": "6750",
"is_vendor": true,
"is_admin": true,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 107,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 11,
"name": "quas",
"key": "qui"
},
{
"id": 26,
"name": "occaecati",
"key": "optio"
},
{
"id": 36,
"name": "voluptates",
"key": "beatae"
},
{
"id": 43,
"name": "iure",
"key": "unde"
},
{
"id": 49,
"name": "totam",
"key": "nesciunt"
}
]
}
}
Received response:
Request failed with error:
Update the specified user
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/oauth/users/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sed\",
\"phone\": 22643.46,
\"email\": \"crobel@example.org\",
\"username\": \"natus\",
\"gender\": \"male\",
\"newsletter\": false,
\"active\": false,
\"is_admin\": false,
\"is_vendor\": false,
\"vendors\": [
15
],
\"permissions\": [
11
],
\"companies\": [
16
]
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/users/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sed",
"phone": 22643.46,
"email": "crobel@example.org",
"username": "natus",
"gender": "male",
"newsletter": false,
"active": false,
"is_admin": false,
"is_vendor": false,
"vendors": [
15
],
"permissions": [
11
],
"companies": [
16
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"title": "Prof.",
"name": "Kirstin Orn DVM",
"email": "spencer.anahi@example.net",
"phone": "469.688.5643",
"avatar": "https://via.placeholder.com/200x200.png/004466?text=avatar+quo",
"username": "douglas.pat",
"gender": "Female",
"newsletter": true,
"active": true,
"card_brand": "Visa",
"card_last_four": "6737",
"is_vendor": false,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 108,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 10,
"name": "amet",
"key": "possimus"
},
{
"id": 18,
"name": "repudiandae",
"key": "ratione"
},
{
"id": 34,
"name": "architecto",
"key": "ducimus"
},
{
"id": 40,
"name": "odit",
"key": "vero"
},
{
"id": 45,
"name": "impedit",
"key": "porro"
}
]
}
}
Received response:
Request failed with error:
Delete a user
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/oauth/users/6" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/oauth/users/6"
);
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": "Prof.",
"name": "Sherwood Konopelski",
"email": "nikolas21@example.com",
"phone": "1-775-473-0480",
"avatar": "https://via.placeholder.com/200x200.png/007777?text=avatar+exercitationem",
"username": "eusebio.leannon",
"gender": "Male",
"newsletter": false,
"active": true,
"card_brand": "Visa",
"card_last_four": "0751",
"is_vendor": true,
"is_admin": false,
"updated_at": "2022-06-27T10:43:13.000000Z",
"created_at": "2022-06-27T10:43:13.000000Z",
"id": 109,
"companies": [],
"vendors": [],
"permissions": [
{
"id": 6,
"name": "incidunt",
"key": "dolore"
},
{
"id": 8,
"name": "modi",
"key": "autem"
},
{
"id": 39,
"name": "illo",
"key": "nihil"
},
{
"id": 42,
"name": "dicta",
"key": "quidem"
},
{
"id": 45,
"name": "impedit",
"key": "porro"
}
]
}
}
Received response:
Request failed with error:
User Wallet Endpoints
Display a listing of the user wallets or search by wallet ID.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/user_wallets?term=voluptatem&per_page=17" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallets"
);
const params = {
"term": "voluptatem",
"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": [
{
"user_id": 5,
"wallet_id": "089418066651",
"balance": 76024748.18058,
"active": true,
"created_by": 4,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 90
},
{
"user_id": 6,
"wallet_id": "091004896459",
"balance": 3244349.3774213,
"active": true,
"created_by": 11,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 91
}
],
"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 \
"http://cupidapiv2.smartflowtech.com/api/user_wallets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"otp\": 7,
\"user_id\": 17,
\"balance\": 149.42,
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"otp": 7,
"user_id": 17,
"balance": 149.42,
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 7,
"wallet_id": "185765454109",
"balance": 1.5,
"active": true,
"created_by": 4,
"updated_at": "2022-06-27T10:43:17.000000Z",
"created_at": "2022-06-27T10:43:17.000000Z",
"id": 92
}
}
Received response:
Request failed with error:
Show a specified user wallet.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/user_wallets/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallets/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": {
"user_id": 10,
"wallet_id": "164874842510",
"balance": 5974,
"active": true,
"created_by": 7,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 93
}
}
Received response:
Request failed with error:
Update the specified user wallet
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/user_wallets/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"otp\": 8,
\"user_id\": 12,
\"balance\": 2054.76463,
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallets/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"otp": 8,
"user_id": 12,
"balance": 2054.76463,
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 5,
"wallet_id": "470310951255",
"balance": 1.0307145,
"active": true,
"created_by": 11,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 94
}
}
Received response:
Request failed with error:
Delete a user wallet
requires authentication
Example request:
curl --request DELETE \
"http://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(
"http://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 "http://cupidapiv2.smartflowtech.com/api/user_wallet_histories?term=odit&per_page=13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallet_histories"
);
const params = {
"term": "odit",
"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": [
{
"user_id": 11,
"wallet_id": "117846177867",
"balance": 50182.0607332,
"active": true,
"created_by": 7,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 95
},
{
"user_id": 103,
"wallet_id": "631167857465",
"balance": 32812695,
"active": true,
"created_by": 4,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 96
}
],
"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 "http://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(
"http://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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 103,
"wallet_id": "933119281728",
"balance": 465,
"active": true,
"created_by": 7,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 97
}
}
Received response:
Request failed with error:
Delete a user wallet history
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/user_wallet_histories/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_wallet_histories/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the user wallet histories or search by status, payment reference.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/user_company_wallets?term=delectus&per_page=14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets"
);
const params = {
"term": "delectus",
"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": 7,
"wallet_id": "439041630057",
"balance": 1122.101755,
"active": true,
"created_by": 4,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 98
},
{
"user_id": 8,
"wallet_id": "190407896033",
"balance": 85.81,
"active": true,
"created_by": 103,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 99
}
],
"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 company wallet
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 1,
\"user_id\": 10,
\"balance\": 240667862.59253076,
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 1,
"user_id": 10,
"balance": 240667862.59253076,
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 4,
"wallet_id": "236602086446",
"balance": 133.78013,
"active": true,
"created_by": 103,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 100
}
}
Received response:
Request failed with error:
Show a specified user company wallet
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/user_company_wallets/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 9,
"user_wallet_id": 9,
"company_id": 38,
"membership_no": "6241842148",
"balance": 3727723.9158,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 51
}
}
Received response:
Request failed with error:
Update the specified user company wallet
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 5,
\"user_id\": 2,
\"balance\": 16078,
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets/11"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 5,
"user_id": 2,
"balance": 16078,
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"user_id": 9,
"user_wallet_id": 9,
"company_id": 23,
"membership_no": "2748375373",
"balance": 9297084.43,
"updated_at": "2022-06-27T10:43:18.000000Z",
"created_at": "2022-06-27T10:43:18.000000Z",
"id": 52
}
}
Received response:
Request failed with error:
Delete a user company wallet
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/user_company_wallets/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:
This endpoint allows users to create wallet(join loyalty program) themselves(if they don't already have one)
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/create_wallet" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/create_wallet"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=zTScgZRx3Uut0589xpwRWnf56nhiXgP5LV8764rn; expires=Mon, 27-Jun-2022 12:43:18 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
This endpoint allows users to create a sub-wallet account(join loyalty program) under a company themselves(if they don't already have one)
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/create_company_wallet/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/create_company_wallet/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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=p0iZz4zIjzvq8W7vyXgCB6052KLtAUMDKkA0i4Vv; expires=Mon, 27-Jun-2022 12:43:18 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Fund a users' wallet after verifying payment
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/fund_wallet/dicta/dolorum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/fund_wallet/dicta/dolorum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: cupid_v2_api_session=oYeNJRyyIBNsV9lNpR8eILvuBbcDqYdSDshsWLw6; expires=Mon, 27-Jun-2022 12:43:18 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Vendor Endpoints
Display a listing of the vendor companies or search by partnership code, status
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/company_vendors?per_page=17&term=eum" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_vendors"
);
const params = {
"per_page": "17",
"term": "eum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "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": 22,
"status": "Request Pending",
"partnership_code": "4924503",
"active": true,
"partnership_ppv_mode": "ON_SITE",
"pms_ppv": "36",
"ago_ppv": "25",
"discount_mode": null
},
{
"company_id": 36,
"status": "Request Pending",
"partnership_code": "9181925",
"active": false,
"partnership_ppv_mode": "CUSTOM",
"pms_ppv": "14",
"ago_ppv": "02",
"discount_mode": 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 \
"http://cupidapiv2.smartflowtech.com/api/company_vendors" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 13,
\"vendor_id\": 3,
\"status\": \"adipisci\",
\"partnership_code\": \"nobis\",
\"active\": true,
\"partnership_ppv_mode\": \"id\",
\"pms_ppv\": \"ut\",
\"ago_ppv\": \"mollitia\",
\"discount_mode\": \"ut\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_vendors"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 13,
"vendor_id": 3,
"status": "adipisci",
"partnership_code": "nobis",
"active": true,
"partnership_ppv_mode": "id",
"pms_ppv": "ut",
"ago_ppv": "mollitia",
"discount_mode": "ut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 45,
"status": "In Partnership",
"partnership_code": "4828334",
"active": false,
"partnership_ppv_mode": "CUSTOM",
"pms_ppv": "75",
"ago_ppv": "10",
"discount_mode": "MONETARY_VALUE_DISCOUNT"
}
}
Received response:
Request failed with error:
Show a specified vendor company.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/company_vendors/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_vendors/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": {
"company_id": 34,
"status": "In Partnership",
"partnership_code": "3588787",
"active": true,
"partnership_ppv_mode": null,
"pms_ppv": "36",
"ago_ppv": "42",
"discount_mode": "MONETARY_VALUE_DISCOUNT"
}
}
Received response:
Request failed with error:
Update the specified vendor company
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/company_vendors/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 3,
\"vendor_id\": 5,
\"status\": \"doloremque\",
\"partnership_code\": \"voluptatem\",
\"active\": false,
\"partnership_ppv_mode\": \"autem\",
\"pms_ppv\": \"exercitationem\",
\"ago_ppv\": \"nihil\",
\"discount_mode\": \"quis\"
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_vendors/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 3,
"vendor_id": 5,
"status": "doloremque",
"partnership_code": "voluptatem",
"active": false,
"partnership_ppv_mode": "autem",
"pms_ppv": "exercitationem",
"ago_ppv": "nihil",
"discount_mode": "quis"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 6,
"status": "Partnership Declined",
"partnership_code": "7930649",
"active": true,
"partnership_ppv_mode": null,
"pms_ppv": "72",
"ago_ppv": "90",
"discount_mode": "MONETARY_VALUE_DISCOUNT"
}
}
Received response:
Request failed with error:
Delete a vendor company
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/company_vendors/13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/company_vendors/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 application configurations or search by app name, hostname
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vendor_app_configs?per_page=3&term=non" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs"
);
const params = {
"per_page": "3",
"term": "non",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "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": 2,
"hostname": "ortiz.net",
"logo_path": "https://via.placeholder.com/640x480.png/0088dd?text=id",
"app_name": "Batz-Pagac",
"app_name_font_size": 22,
"app_header_color": "#002200",
"app_body_color": "#00aa88",
"menu_header_color": "#009977",
"menu_body_color": "#0055dd",
"status": null
},
{
"company_id": 33,
"hostname": "langworth.com",
"logo_path": "https://via.placeholder.com/640x480.png/0066ff?text=saepe",
"app_name": "Gaylord-Goldner",
"app_name_font_size": 43,
"app_header_color": "#000044",
"app_body_color": "#00dd44",
"menu_header_color": "#0000cc",
"menu_body_color": "#00dd33",
"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 \
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "company_id=19" \
--form "vendor_id=18" \
--form "hostname=http://www.gerlach.net/eius-veniam-soluta-ea-distinctio-mollitia-unde" \
--form "app_name=voluptatem" \
--form "app_name_font_size=2232.10620746" \
--form "app_header_color=reprehenderit" \
--form "app_body_color=quos" \
--form "menu_header_color=quis" \
--form "menu_body_color=nihil" \
--form "status=ut" \
--form "logo_path=@/tmp/phphMk70l"
const url = new URL(
"http://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('company_id', '19');
body.append('vendor_id', '18');
body.append('hostname', 'http://www.gerlach.net/eius-veniam-soluta-ea-distinctio-mollitia-unde');
body.append('app_name', 'voluptatem');
body.append('app_name_font_size', '2232.10620746');
body.append('app_header_color', 'reprehenderit');
body.append('app_body_color', 'quos');
body.append('menu_header_color', 'quis');
body.append('menu_body_color', 'nihil');
body.append('status', 'ut');
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": {
"company_id": 45,
"hostname": "raynor.com",
"logo_path": "https://via.placeholder.com/640x480.png/00aa33?text=quisquam",
"app_name": "Hodkiewicz-Becker",
"app_name_font_size": 30,
"app_header_color": "#00bb22",
"app_body_color": "#006600",
"menu_header_color": "#00bbdd",
"menu_body_color": "#001199",
"status": null
}
}
Received response:
Request failed with error:
Show a specified vendor application configuration.
requires authentication
Example request:
curl --request GET \
--get "http://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(
"http://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": {
"company_id": 15,
"hostname": "keeling.org",
"logo_path": "https://via.placeholder.com/640x480.png/00aaaa?text=neque",
"app_name": "Torphy, Krajcik and Murphy",
"app_name_font_size": 89,
"app_header_color": "#0000bb",
"app_body_color": "#004400",
"menu_header_color": "#00bbff",
"menu_body_color": "#00dddd",
"status": null
}
}
Received response:
Request failed with error:
Update the specified vendor application configuration
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "company_id=12" \
--form "vendor_id=11" \
--form "hostname=http://www.von.com/et-laborum-rerum-qui-sit-ut-molestias" \
--form "app_name=magni" \
--form "app_name_font_size=288172575.21134" \
--form "app_header_color=aut" \
--form "app_body_color=deserunt" \
--form "menu_header_color=animi" \
--form "menu_body_color=quis" \
--form "status=consequatur" \
--form "logo_path=@/tmp/phpyfakeq"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('company_id', '12');
body.append('vendor_id', '11');
body.append('hostname', 'http://www.von.com/et-laborum-rerum-qui-sit-ut-molestias');
body.append('app_name', 'magni');
body.append('app_name_font_size', '288172575.21134');
body.append('app_header_color', 'aut');
body.append('app_body_color', 'deserunt');
body.append('menu_header_color', 'animi');
body.append('menu_body_color', 'quis');
body.append('status', 'consequatur');
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": {
"company_id": 18,
"hostname": "konopelski.com",
"logo_path": "https://via.placeholder.com/640x480.png/009988?text=dolores",
"app_name": "Quitzon-Kling",
"app_name_font_size": 49,
"app_header_color": "#003344",
"app_body_color": "#00bbcc",
"menu_header_color": "#006688",
"menu_body_color": "#008899",
"status": null
}
}
Received response:
Request failed with error:
Delete a vendor application configuration
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_app_configs/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 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 "http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts?per_page=14&term=aliquam" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts"
);
const params = {
"per_page": "14",
"term": "aliquam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"data": [
{
"company_id": 11,
"account_number": "BR6201254798050651023227708H4",
"bank_name": "Kilback, Wolf and Nikolaus",
"account_name": "Bergstrom and Sons",
"paystack_id": 1,
"paystack_subaccount_code": "ACCT_319307243",
"payment_mode": null,
"merchantcodes": "671811963610",
"active": true
},
{
"company_id": 13,
"account_number": "RO56ZEWN6S9X42I86OG1NB78",
"bank_name": "Schoen, Runolfsdottir and Runte",
"account_name": "Lueilwitz PLC",
"paystack_id": 8,
"paystack_subaccount_code": "ACCT_863872777",
"payment_mode": "paystack",
"merchantcodes": "432441933995",
"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 banking details
requires authentication
Example request:
curl --request POST \
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 16,
\"vendor_id\": 11,
\"account_number\": 8743.1,
\"bank_name\": \"voluptas\",
\"account_name\": \"ut\",
\"paystack_id\": 0.68,
\"paystack_subaccount_code\": \"quos\",
\"payment_mode\": \"paga\",
\"merchantcodes\": \"aut\",
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 16,
"vendor_id": 11,
"account_number": 8743.1,
"bank_name": "voluptas",
"account_name": "ut",
"paystack_id": 0.68,
"paystack_subaccount_code": "quos",
"payment_mode": "paga",
"merchantcodes": "aut",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 45,
"account_number": "BR8305697264800469541224491U1",
"bank_name": "Cruickshank Group",
"account_name": "O'Kon, Jakubowski and Kris",
"paystack_id": 8,
"paystack_subaccount_code": "ACCT_253902851",
"payment_mode": null,
"merchantcodes": "451409626397",
"active": true
}
}
Received response:
Request failed with error:
Show a specified vendor banking details.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/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": 33,
"account_number": "FI5279746726460767",
"bank_name": "Ullrich-Douglas",
"account_name": "Cole Group",
"paystack_id": 6,
"paystack_subaccount_code": "ACCT_722301067",
"payment_mode": "paystack",
"merchantcodes": "717174078520",
"active": true
}
}
Received response:
Request failed with error:
Update the specified vendor banking details
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 17,
\"vendor_id\": 1,
\"account_number\": 3796686.84249,
\"bank_name\": \"dolores\",
\"account_name\": \"voluptatem\",
\"paystack_id\": 783.47424411,
\"paystack_subaccount_code\": \"tempora\",
\"payment_mode\": \"paystack\",
\"merchantcodes\": \"et\",
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/14"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 17,
"vendor_id": 1,
"account_number": 3796686.84249,
"bank_name": "dolores",
"account_name": "voluptatem",
"paystack_id": 783.47424411,
"paystack_subaccount_code": "tempora",
"payment_mode": "paystack",
"merchantcodes": "et",
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 31,
"account_number": "BE14438441805502",
"bank_name": "Reinger-Lemke",
"account_name": "Murray LLC",
"paystack_id": 9,
"paystack_subaccount_code": "ACCT_990196308",
"payment_mode": null,
"merchantcodes": "908748585529",
"active": true
}
}
Received response:
Request failed with error:
Delete a vendor banking details
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_bank_accounts/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:
Display a listing of the vendor Paga details
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials?per_page=3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials"
);
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": [
{
"company_id": 42,
"hmac": "fcbb4aaf-1fdc-3b69-856f-fff40b3efbfb",
"secret_key": "20b8884c-0dba-3db8-a768-868c00ab4bbc",
"public_key": "557b7dd1-8820-3c92-968c-2581680996af",
"active": true
},
{
"company_id": 24,
"hmac": "e89ec2a8-7d6d-3627-8c73-454941aa4266",
"secret_key": "a32ba716-e42a-3cc1-bcfd-8ccb26b635c6",
"public_key": "b0a688f7-2457-3bf1-9be6-60eb75f33e33",
"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 \
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 6,
\"vendor_id\": 4,
\"hmac\": \"dolorem\",
\"secret_key\": \"aut\",
\"public_key\": \"sed\",
\"active\": false
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 6,
"vendor_id": 4,
"hmac": "dolorem",
"secret_key": "aut",
"public_key": "sed",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 6,
"hmac": "f911bce4-933b-30ca-8d7e-c2770a2a365a",
"secret_key": "a133d6e7-9b9c-3cd4-8c54-0becf7eed52d",
"public_key": "f6158bd6-2435-3a19-8578-9532a4e5ec7c",
"active": true
}
}
Received response:
Request failed with error:
Show a specified vendor Paga credential.
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/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": 4,
"hmac": "219f9f78-d9dc-3796-93c2-b62892bd6b12",
"secret_key": "88c353cb-986f-3963-b369-e31c7a449afa",
"public_key": "3aa634bf-3e67-3b9a-a69b-0cebead4f901",
"active": true
}
}
Received response:
Request failed with error:
Update the specified vendor Paga credential
requires authentication
Example request:
curl --request PUT \
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_id\": 18,
\"vendor_id\": 15,
\"hmac\": \"similique\",
\"secret_key\": \"eum\",
\"public_key\": \"et\",
\"active\": true
}"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/15"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 18,
"vendor_id": 15,
"hmac": "similique",
"secret_key": "eum",
"public_key": "et",
"active": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"company_id": 14,
"hmac": "196bdcf4-8182-3b4f-ba43-74a502d4142b",
"secret_key": "4621616c-b334-3121-9b01-7c65125dfe45",
"public_key": "7598b348-be9f-31e4-9637-3ff947e83337",
"active": true
}
}
Received response:
Request failed with error:
Delete a vendor Paga credential
requires authentication
Example request:
curl --request DELETE \
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_paga_credentials/4"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the vendor assign delivery stations or search by station name
requires authentication
Example request:
curl --request GET \
--get "http://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations?per_page=12&term=sapiente" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://cupidapiv2.smartflowtech.com/api/vendor_assigned_delivery_stations"
);
const params = {
"per_page": "12",
"term": "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",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):