MENU navbar-image

Introduction

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

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

Base URL

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."
}
 

Request      

GET api/roles

Query Parameters

term  string optional  

Search query parameter

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"
    }
}
 

Request      

POST api/roles

Body Parameters

name  string  

Must be at least 3 characters.

permissions  integer[]  

status  boolean optional  

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"
    }
}
 

Request      

PUT api/roles/{id}

PATCH api/roles/{id}

URL Parameters

id  integer  

The ID of the role

Body Parameters

name  string  

Must be at least 3 characters.

permissions  integer[]  

status  boolean optional  

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"
    }
}
 

Request      

DELETE api/roles/{id}

URL Parameters

id  integer  

The ID of the role

Display a listing of the permission or filter by query

requires authentication

Example request:
curl --request GET \
    --get "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."
}
 

Request      

GET api/permissions

Query Parameters

term  string optional  

Search query parameter

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
    }
}
 

Request      

POST api/permissions

Body Parameters

name  string  

Must be at least 3 characters.

status  boolean optional  

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"
    }
}
 

Request      

PUT api/permissions/{id}

PATCH api/permissions/{id}

URL Parameters

id  integer  

The ID of the role

Body Parameters

name  string  

Must be at least 3 characters.

status  boolean optional  

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());

Request      

DELETE api/permissions/{id}

URL Parameters

id  integer  

The ID of the role

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"
}
]
}
}
 

Request      

POST api/oauth/login

Body Parameters

email  string  

The email of the user

password  string  

The password of the user

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."
}
 

Request      

GET api/oauth/user_active_vendor/{vendor_id}

URL Parameters

vendor_id  integer  

The ID of the vendor

Send OTP to a user

requires authentication

Example request:
curl --request GET \
    --get "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."
}
 

Request      

GET api/oauth/issue_otp

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
    }
}
 

Request      

GET api/companies

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

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": []
    }
}
 

Request      

GET api/companies/{id}

URL Parameters

id  integer  

The ID of the company

Update the specified company

requires authentication

Example request:
curl --request PUT \
    "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": []
    }
}
 

Request      

PUT api/companies/{id}

PATCH api/companies/{id}

URL Parameters

id  integer  

The ID of the company

Body Parameters

name  string  

phone_number  number  

tin  number  

email  string  

Must be a valid email address.

registration_number  string  

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

user_id  integer  

sector  string optional  

website  string optional  

Must be a valid URL.

logo  file optional  

Must be an image.

active  boolean optional  

on_loyalty_program  boolean optional  

contact_person_first_name  string optional  

contact_person_lastname  string optional  

app_uid  string optional  

permission_ids  string[]  

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());

Request      

DELETE api/companies/{id}

URL Parameters

id  integer  

The ID of the company

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": []
    }
}
 

Request      

POST api/companies

Body Parameters

name  string  

phone_number  number  

tin  number  

email  string  

Must be a valid email address.

registration_number  string  

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

user_id  integer  

sector  string optional  

website  string optional  

Must be a valid URL.

logo  file optional  

Must be an image.

active  boolean optional  

on_loyalty_program  boolean optional  

contact_person_first_name  string optional  

contact_person_lastname  string optional  

app_uid  string optional  

permission_ids  string[]  

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
    }
}
 

Request      

GET api/company_users

Query Parameters

company_id  integer  

The ID of the company

per_page  integer optional  

Items per page

term  string optional  

Search query parameter

Create a new company user

requires authentication

Example request:
curl --request POST \
    "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"
            }
        ]
    }
}
 

Request      

POST api/company_users

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

name  string  

phone  number  

email  string  

Must be a valid email address.

username  string  

gender  string  

Must be one of male or female.

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

vendors  integer[] optional  

permissions  integer[] optional  

companies  integer[] optional  

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"
            }
        ]
    }
}
 

Request      

GET api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

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

requires authentication

Example request:
curl --request PUT \
    "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": []
    }
}
 

Request      

PUT api/company_users/{user_id}

PATCH api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

name  string  

phone  number  

email  string  

Must be a valid email address.

username  string  

gender  string  

Must be one of male or female.

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

vendors  integer[] optional  

permissions  integer[] optional  

companies  integer[] optional  

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());

Request      

DELETE api/company_users/{user_id}

URL Parameters

user_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

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

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/company_permissions

Query Parameters

company_id  integer  

The ID of the company

per_page  integer optional  

Items per page

term  string optional  

Search query parameter

Synchronise company permissions

requires authentication

Example request:
curl --request PATCH \
    "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());

Request      

PATCH api/company_permissions

Query Parameters

company_id  integer  

The ID of the company

Body Parameters

permission_ids  string[]  

Array of permission IDs

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"
    }
}
 

Request      

GET api/company_permissions/{permission_id}

URL Parameters

permission_id  integer  

The ID of the permission

Query Parameters

company_id  integer  

The ID of the company

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());

Request      

DELETE api/company_permissions/{permission_id}

URL Parameters

permission_id  integer  

The ID of the user

Query Parameters

company_id  integer  

The ID of the company

Company Station Endpoints

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

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/stations

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new station

requires authentication

Example request:
curl --request POST \
    "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"
    }
}
 

Request      

POST api/stations

Body Parameters

name  string  

phone_number  number  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

company_id  integer optional  

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"
    }
}
 

Request      

GET api/stations/{id}

URL Parameters

id  integer  

The ID of the station

Update the specified station

requires authentication

Example request:
curl --request PUT \
    "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"
    }
}
 

Request      

PUT api/stations/{id}

PATCH api/stations/{id}

URL Parameters

id  integer  

The ID of the station

Body Parameters

name  string  

phone_number  number  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

address  string  

company_id  integer optional  

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"
    }
}
 

Request      

DELETE api/stations/{id}

URL Parameters

id  integer  

The ID of the station

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
    }
}
 

Request      

GET api/cost_centers

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new cost center

requires authentication

Example request:
curl --request POST \
    "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": []
        }
    }
}
 

Request      

POST api/cost_centers

Body Parameters

name  string  

address  string  

phone_number  number optional  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

region_id  integer optional  

company_id  integer optional  

daily_purchase_budget  number  

monthly_purchase_budget  number  

license_type  string optional  

active  boolean optional  

user_ids  string[] optional  

Show a specified cost center.

requires authentication

Example request:
curl --request GET \
    --get "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": []
        }
    }
}
 

Request      

GET api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

Update the specified cost center

requires authentication

Example request:
curl --request PUT \
    "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": []
        }
    }
}
 

Request      

PUT api/cost_centers/{id}

PATCH api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

Body Parameters

name  string  

address  string  

phone_number  number optional  

email  string optional  

Must be a valid email address.

country  string  

state  string  

city  string optional  

postcode  number optional  

region_id  integer optional  

company_id  integer optional  

daily_purchase_budget  number  

monthly_purchase_budget  number  

license_type  string optional  

active  boolean optional  

user_ids  string[] optional  

Delete a cost center

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/cost_centers/{id}

URL Parameters

id  integer  

The ID of the cost center

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
    }
}
 

Request      

GET api/drivers

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new driver

requires authentication

Example request:
curl --request POST \
    "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
        }
    }
}
 

Request      

POST api/drivers

Body Parameters

company_id  integer optional  

fullname  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

driver_speciality  string optional  

status  string  

pin  integer optional  

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
        }
    }
}
 

Request      

GET api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

Update the specified driver

requires authentication

Example request:
curl --request PUT \
    "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
        }
    }
}
 

Request      

PUT api/drivers/{id}

PATCH api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

Body Parameters

company_id  integer optional  

fullname  string  

address  string  

phone_number  number  

email  string  

Must be a valid email address.

driver_speciality  string optional  

status  string  

pin  integer optional  

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());

Request      

DELETE api/drivers/{id}

URL Parameters

id  integer  

The ID of the driver

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
    }
}
 

Request      

GET api/groups

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new group

requires authentication

Example request:
curl --request POST \
    "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
        }
    }
}
 

Request      

POST api/groups

Body Parameters

company_id  integer optional  

name  string  

description  string  

daily_volume_limit  integer optional  

weekly_volume_limit  integer optional  

monthly_volume_limit  integer optional  

status  string  

Must be one of Active or Inactive.

code  string optional  

active  boolean optional  

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
        }
    }
}
 

Request      

GET api/groups/{id}

URL Parameters

id  integer  

The ID of the group

Update the specified group

requires authentication

Example request:
curl --request PUT \
    "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
        }
    }
}
 

Request      

PUT api/groups/{id}

PATCH api/groups/{id}

URL Parameters

id  integer  

The ID of the group

Body Parameters

company_id  integer optional  

name  string  

description  string  

daily_volume_limit  integer optional  

weekly_volume_limit  integer optional  

monthly_volume_limit  integer optional  

status  string  

Must be one of Active or Inactive.

code  string optional  

active  boolean optional  

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());

Request      

DELETE api/groups/{id}

URL Parameters

id  integer  

The ID of the group

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
    }
}
 

Request      

GET api/vehicles

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new vehicle

requires authentication

Example request:
curl --request POST \
    "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"
    }
}
 

Request      

POST api/vehicles

Body Parameters

company_id  integer optional  

cost_center_id  integer optional  

group_id  integer optional  

driver_id  integer optional  

nfc_tag_id  integer optional  

registration_number  string  

tank_capacity  string optional  

auth_type  string optional  

tracker_id  string optional  

model  string optional  

engine_capacity  string optional  

fuel_type  string  

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

color  string optional  

brand  string optional  

reward_type  string optional  

active  boolean optional  

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"
    }
}
 

Request      

GET api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

Update the specified vehicle

requires authentication

Example request:
curl --request PUT \
    "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"
    }
}
 

Request      

PUT api/vehicles/{id}

PATCH api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

Body Parameters

company_id  integer optional  

cost_center_id  integer optional  

group_id  integer optional  

driver_id  integer optional  

nfc_tag_id  integer optional  

registration_number  string  

tank_capacity  string optional  

auth_type  string optional  

tracker_id  string optional  

model  string optional  

engine_capacity  string optional  

fuel_type  string  

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

color  string optional  

brand  string optional  

reward_type  string optional  

active  boolean optional  

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());

Request      

DELETE api/vehicles/{id}

URL Parameters

id  integer  

The ID of the vehicle

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

requires authentication

Example request:
curl --request GET \
    --get "http://cupidapiv2.smartflowtech.com/api/nfc_tags?term=dolorum&per_page=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/nfc_tags"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "company_id": 27,
            "vendor_id": 46,
            "user_id": 103,
            "station_id": 131,
            "pin": 7122,
            "nfctag_type": "Key Tag",
            "nfctag_code": "VLX-584",
            "nfctag_oem_id": 10426440,
            "nfctag_url_slug": null,
            "created_by": 3,
            "card_number": 190666744,
            "card_on_thankucash": null,
            "card_state": "OTA",
            "station_name": "Dare, Murazik and Reichel",
            "updated_at": "2022-06-27T10:43:16.000000Z",
            "created_at": "2022-06-27T10:43:16.000000Z",
            "id": 246,
            "vendor": {
                "id": 46,
                "company_id": 27,
                "sm_company_id": 8,
                "name": "Medhurst, Grady and Turcotte",
                "address": "431 Caleigh River",
                "email": "jeanette.hermiston@beier.com",
                "phone_number": "+1.325.493.5804",
                "country": "Falkland Islands (Malvinas)",
                "state": "West Virginia",
                "city": "Lake Julian",
                "postcode": "50295-2273",
                "products_sold": "nostrum temporibus sunt",
                "payment_type": "itaque",
                "status": 1,
                "has_active_paga_account": 1,
                "created_at": "2022-06-06T21:43:43.000000Z",
                "updated_at": "2022-06-06T21:43:43.000000Z",
                "deleted_at": null
            },
            "station": {
                "id": 131,
                "name": "Dare, Murazik and Reichel",
                "company_id": 27,
                "address": "925 Chelsea Forges",
                "postcode": "59343",
                "country": "United States of America",
                "state": "Illinois",
                "city": "Mosciskimouth",
                "email": "zschmitt@berge.com",
                "phone_number": "+1-959-912-1681",
                "created_at": "2022-06-06T21:43:41.000000Z",
                "updated_at": "2022-06-06T21:43:41.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 3,
                "title": null,
                "name": "Stephany Huels",
                "email": "jlehner@example.net",
                "phone": "(305) 766-2602",
                "avatar": "https://via.placeholder.com/200x200.png/003322?text=avatar+amet",
                "username": "dmertz",
                "gender": "Male",
                "newsletter": 1,
                "active": 1,
                "card_brand": "MasterCard",
                "card_last_four": 2138,
                "is_admin": 0,
                "is_vendor": 1,
                "active_company": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2022-06-06T21:43:38.000000Z",
                "updated_at": "2022-06-06T21:43:38.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 103,
                "title": null,
                "name": "Nishita",
                "email": "nishita@example.net",
                "phone": "9428889996",
                "avatar": null,
                "username": "Nishita28",
                "gender": "female",
                "newsletter": 1,
                "active": 1,
                "card_brand": null,
                "card_last_four": null,
                "is_admin": 1,
                "is_vendor": 1,
                "active_company": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2022-06-27T10:31:17.000000Z",
                "updated_at": "2022-06-27T10:31:17.000000Z",
                "deleted_at": null
            }
        },
        {
            "company_id": 34,
            "vendor_id": 171,
            "user_id": 4,
            "station_id": 166,
            "pin": 2962,
            "nfctag_type": "Card",
            "nfctag_code": "VLX-105",
            "nfctag_oem_id": 56769021,
            "nfctag_url_slug": null,
            "created_by": 4,
            "card_number": 698223610,
            "card_on_thankucash": null,
            "card_state": "OTA",
            "station_name": "Boyer, Beier and Wisozk",
            "updated_at": "2022-06-27T10:43:16.000000Z",
            "created_at": "2022-06-27T10:43:16.000000Z",
            "id": 247,
            "vendor": {
                "id": 171,
                "company_id": 34,
                "sm_company_id": 2,
                "name": "Bartell, Sanford and Kerluke",
                "address": "62178 Lavinia Dam",
                "email": "raynor.gaetano@harber.biz",
                "phone_number": "1-458-630-7471",
                "country": "French Southern Territories",
                "state": "Georgia",
                "city": "Port Caroline",
                "postcode": "52140",
                "products_sold": "consequatur corrupti nemo",
                "payment_type": "est",
                "status": 0,
                "has_active_paga_account": 0,
                "created_at": "2022-06-06T21:43:45.000000Z",
                "updated_at": "2022-06-06T21:43:45.000000Z",
                "deleted_at": null
            },
            "station": {
                "id": 166,
                "name": "Boyer, Beier and Wisozk",
                "company_id": 34,
                "address": "7209 Wuckert Terrace Apt. 691",
                "postcode": "16353",
                "country": "Palau",
                "state": "Kentucky",
                "city": "Hassanside",
                "email": "claudie.kovacek@ryan.biz",
                "phone_number": "256.713.9905",
                "created_at": "2022-06-06T21:43:42.000000Z",
                "updated_at": "2022-06-06T21:43:42.000000Z",
                "deleted_at": null
            },
            "createdBy": {
                "id": 4,
                "title": null,
                "name": "Gianni Hettinger",
                "email": "roberts.wilton@example.org",
                "phone": "+1 (304) 389-1655",
                "avatar": "https://via.placeholder.com/200x200.png/002255?text=avatar+est",
                "username": "esmeralda.rosenbaum",
                "gender": "Male",
                "newsletter": 0,
                "active": 1,
                "card_brand": "Visa Retired",
                "card_last_four": 1089,
                "is_admin": 1,
                "is_vendor": 1,
                "active_company": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2022-06-06T21:43:38.000000Z",
                "updated_at": "2022-06-06T21:43:38.000000Z",
                "deleted_at": null
            },
            "user": {
                "id": 4,
                "title": null,
                "name": "Gianni Hettinger",
                "email": "roberts.wilton@example.org",
                "phone": "+1 (304) 389-1655",
                "avatar": "https://via.placeholder.com/200x200.png/002255?text=avatar+est",
                "username": "esmeralda.rosenbaum",
                "gender": "Male",
                "newsletter": 0,
                "active": 1,
                "card_brand": "Visa Retired",
                "card_last_four": 1089,
                "is_admin": 1,
                "is_vendor": 1,
                "active_company": null,
                "active_vendor": null,
                "otp": null,
                "created_at": "2022-06-06T21:43:38.000000Z",
                "updated_at": "2022-06-06T21:43:38.000000Z",
                "deleted_at": null
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/nfc_tags

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new NFC tag

requires authentication

Example request:
curl --request POST \
    "http://cupidapiv2.smartflowtech.com/api/nfc_tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 9,
    \"vendor_id\": 12,
    \"user_id\": 10,
    \"station_id\": 16,
    \"pin\": 362.3,
    \"card_state\": \"Generic\",
    \"nfctag_type\": \"Card\",
    \"nfctag_code\": \"exercitationem\",
    \"nfctag_oem_id\": \"nostrum\",
    \"nfctag_url_slug\": \"illo\",
    \"card_number\": \"eius\",
    \"card_on_thankucash\": \"rerum\"
}"
const url = new URL(
    "http://cupidapiv2.smartflowtech.com/api/nfc_tags"
);

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

let body = {
    "company_id": 9,
    "vendor_id": 12,
    "user_id": 10,
    "station_id": 16,
    "pin": 362.3,
    "card_state": "Generic",
    "nfctag_type": "Card",
    "nfctag_code": "exercitationem",
    "nfctag_oem_id": "nostrum",
    "nfctag_url_slug": "illo",
    "card_number": "eius",
    "card_on_thankucash": "rerum"
};

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

Example response (200):


{
    "data": {
        "company_id": 26,
        "vendor_id": 172,
        "user_id": 11,
        "station_id": 126,
        "pin": 6462,
        "nfctag_type": "Key Tag",
        "nfctag_code": "VLX-754",
        "nfctag_oem_id": 96048045,
        "nfctag_url_slug": null,
        "created_by": 10,
        "card_number": 939181447,
        "card_on_thankucash": null,
        "card_state": "OTA",
        "station_name": "Kihn, Bogan and Bergnaum",
        "updated_at": "2022-06-27T10:43:16.000000Z",
        "created_at": "2022-06-27T10:43:16.000000Z",
        "id": 248,
        "vendor": {
            "id": 172,
            "company_id": 26,
            "sm_company_id": 6,
            "name": "Becker Inc",
            "address": "544 Champlin Estates Suite 097",
            "email": "gbarrows@lehner.com",
            "phone_number": "561-632-3708",
            "country": "Denmark",
            "state": "Tennessee",
            "city": "Spencerchester",
            "postcode": "71625-5578",
            "products_sold": "non placeat harum",
            "payment_type": "voluptatem",
            "status": 0,
            "has_active_paga_account": 0,
            "created_at": "2022-06-06T21:43:45.000000Z",
            "updated_at": "2022-06-06T21:43:45.000000Z",
            "deleted_at": null
        },
        "station": {
            "id": 126,
            "name": "Kihn, Bogan and Bergnaum",
            "company_id": 26,
            "address": "81205 Matilda Hill Suite 703",
            "postcode": "44363-1122",
            "country": "United Kingdom",
            "state": "Nevada",
            "city": "Robynview",
            "email": "nils10@pollich.biz",
            "phone_number": "740.360.7050",
            "created_at": "2022-06-06T21:43:41.000000Z",
            "updated_at": "2022-06-06T21:43:41.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 10,
            "title": null,
            "name": "Prof. Kassandra Hammes DDS",
            "email": "fmorissette@example.net",
            "phone": "+1-786-339-4398",
            "avatar": "https://via.placeholder.com/200x200.png/009988?text=avatar+qui",
            "username": "zachary72",
            "gender": "Female",
            "newsletter": 1,
            "active": 1,
            "card_brand": "MasterCard",
            "card_last_four": 1622,
            "is_admin": 0,
            "is_vendor": 1,
            "active_company": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-06T21:43:39.000000Z",
            "updated_at": "2022-06-06T21:43:39.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 11,
            "title": null,
            "name": "Super User",
            "email": "super_admin_0X0@smartflowtech.com",
            "phone": "+1-995-334-5759x98286",
            "avatar": null,
            "username": "super_admin",
            "gender": "Male",
            "newsletter": 1,
            "active": 1,
            "card_brand": null,
            "card_last_four": null,
            "is_admin": 1,
            "is_vendor": 0,
            "active_company": 49,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-07T12:00:18.000000Z",
            "updated_at": "2022-06-27T10:12:39.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/nfc_tags

Body Parameters

company_id  integer optional  

vendor_id  integer  

user_id  integer optional  

station_id  integer optional  

pin  number  

card_state  string  

Must be one of Generic or OTA.

nfctag_type  string  

Must be one of Card or Key Tag.

nfctag_code  string  

nfctag_oem_id  string  

nfctag_url_slug  string optional  

card_number  string  

card_on_thankucash  string optional  

Show a specified NFC tag.

requires authentication

Example request:
curl --request GET \
    --get "http://cupidapiv2.smartflowtech.com/api/nfc_tags/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/nfc_tags/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": 45,
        "vendor_id": 3,
        "user_id": 7,
        "station_id": 221,
        "pin": 5117,
        "nfctag_type": "Key Tag",
        "nfctag_code": "VLX-970",
        "nfctag_oem_id": 51137044,
        "nfctag_url_slug": null,
        "created_by": 2,
        "card_number": 241321725,
        "card_on_thankucash": null,
        "card_state": "OTA",
        "station_name": "Morar and Sons",
        "updated_at": "2022-06-27T10:43:17.000000Z",
        "created_at": "2022-06-27T10:43:17.000000Z",
        "id": 249,
        "vendor": {
            "id": 3,
            "company_id": 45,
            "sm_company_id": 9,
            "name": "Prohaska PLC",
            "address": "364 Mitchell Meadow Apt. 244",
            "email": "fern.waelchi@ankunding.com",
            "phone_number": "223.671.1255",
            "country": "Guinea",
            "state": "South Carolina",
            "city": "East Ena",
            "postcode": "40529-4525",
            "products_sold": "quibusdam tempora ad",
            "payment_type": "est",
            "status": 0,
            "has_active_paga_account": 0,
            "created_at": "2022-06-06T21:43:43.000000Z",
            "updated_at": "2022-06-06T21:43:43.000000Z",
            "deleted_at": null
        },
        "station": {
            "id": 221,
            "name": "Morar and Sons",
            "company_id": 45,
            "address": "99363 Lora Circle Apt. 247",
            "postcode": "54681-9020",
            "country": "Niue",
            "state": "New Jersey",
            "city": "Schummton",
            "email": "muller.emmie@mitchell.net",
            "phone_number": "+1 (864) 827-6474",
            "created_at": "2022-06-06T21:43:42.000000Z",
            "updated_at": "2022-06-06T21:43:42.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 2,
            "title": null,
            "name": "Dr. Bridgette Roob DVM",
            "email": "jfunk@example.org",
            "phone": "+1-330-363-1684",
            "avatar": "https://via.placeholder.com/200x200.png/0099dd?text=avatar+assumenda",
            "username": "schoen.syble",
            "gender": "Male",
            "newsletter": 1,
            "active": 1,
            "card_brand": "Visa Retired",
            "card_last_four": 9737,
            "is_admin": 0,
            "is_vendor": 0,
            "active_company": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-06T21:43:38.000000Z",
            "updated_at": "2022-06-06T21:43:38.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 7,
            "title": null,
            "name": "Pattie Howell",
            "email": "jbarton@example.com",
            "phone": "480-722-2220",
            "avatar": "https://via.placeholder.com/200x200.png/00aaaa?text=avatar+saepe",
            "username": "williamson.adelle",
            "gender": "Female",
            "newsletter": 0,
            "active": 1,
            "card_brand": "MasterCard",
            "card_last_four": 6972,
            "is_admin": 1,
            "is_vendor": 1,
            "active_company": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-06T21:43:39.000000Z",
            "updated_at": "2022-06-06T21:43:39.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

Update the specified NFC tag

requires authentication

Example request:
curl --request PUT \
    "http://cupidapiv2.smartflowtech.com/api/nfc_tags/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 4,
    \"vendor_id\": 3,
    \"user_id\": 9,
    \"station_id\": 3,
    \"pin\": 1383.65,
    \"card_state\": \"Generic\",
    \"nfctag_type\": \"Card\",
    \"nfctag_code\": \"voluptatem\",
    \"nfctag_oem_id\": \"et\",
    \"nfctag_url_slug\": \"id\",
    \"card_number\": \"sint\",
    \"card_on_thankucash\": \"accusamus\"
}"
const url = new URL(
    "http://cupidapiv2.smartflowtech.com/api/nfc_tags/14"
);

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

let body = {
    "company_id": 4,
    "vendor_id": 3,
    "user_id": 9,
    "station_id": 3,
    "pin": 1383.65,
    "card_state": "Generic",
    "nfctag_type": "Card",
    "nfctag_code": "voluptatem",
    "nfctag_oem_id": "et",
    "nfctag_url_slug": "id",
    "card_number": "sint",
    "card_on_thankucash": "accusamus"
};

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

Example response (200):


{
    "data": {
        "company_id": 22,
        "vendor_id": 23,
        "user_id": 3,
        "station_id": 106,
        "pin": 6056,
        "nfctag_type": "Key Tag",
        "nfctag_code": "VLX-622",
        "nfctag_oem_id": 33694023,
        "nfctag_url_slug": null,
        "created_by": 10,
        "card_number": 104725961,
        "card_on_thankucash": null,
        "card_state": "OTA",
        "station_name": "Rempel Group",
        "updated_at": "2022-06-27T10:43:17.000000Z",
        "created_at": "2022-06-27T10:43:17.000000Z",
        "id": 250,
        "vendor": {
            "id": 23,
            "company_id": 22,
            "sm_company_id": 2,
            "name": "Gleichner, Nienow and Bins",
            "address": "10749 Heath Freeway Apt. 584",
            "email": "vgibson@aufderhar.org",
            "phone_number": "+1-574-652-8105",
            "country": "Fiji",
            "state": "Oklahoma",
            "city": "Port Irwin",
            "postcode": "66395-7616",
            "products_sold": "commodi corrupti qui",
            "payment_type": "accusamus",
            "status": 1,
            "has_active_paga_account": 0,
            "created_at": "2022-06-06T21:43:43.000000Z",
            "updated_at": "2022-06-06T21:43:43.000000Z",
            "deleted_at": null
        },
        "station": {
            "id": 106,
            "name": "Rempel Group",
            "company_id": 22,
            "address": "99208 Bobby Keys Apt. 879",
            "postcode": "12670-1650",
            "country": "Lebanon",
            "state": "Alabama",
            "city": "Baumbachshire",
            "email": "ryan.tad@schoen.com",
            "phone_number": "619.286.3967",
            "created_at": "2022-06-06T21:43:41.000000Z",
            "updated_at": "2022-06-06T21:43:41.000000Z",
            "deleted_at": null
        },
        "createdBy": {
            "id": 10,
            "title": null,
            "name": "Prof. Kassandra Hammes DDS",
            "email": "fmorissette@example.net",
            "phone": "+1-786-339-4398",
            "avatar": "https://via.placeholder.com/200x200.png/009988?text=avatar+qui",
            "username": "zachary72",
            "gender": "Female",
            "newsletter": 1,
            "active": 1,
            "card_brand": "MasterCard",
            "card_last_four": 1622,
            "is_admin": 0,
            "is_vendor": 1,
            "active_company": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-06T21:43:39.000000Z",
            "updated_at": "2022-06-06T21:43:39.000000Z",
            "deleted_at": null
        },
        "user": {
            "id": 3,
            "title": null,
            "name": "Stephany Huels",
            "email": "jlehner@example.net",
            "phone": "(305) 766-2602",
            "avatar": "https://via.placeholder.com/200x200.png/003322?text=avatar+amet",
            "username": "dmertz",
            "gender": "Male",
            "newsletter": 1,
            "active": 1,
            "card_brand": "MasterCard",
            "card_last_four": 2138,
            "is_admin": 0,
            "is_vendor": 1,
            "active_company": null,
            "active_vendor": null,
            "otp": null,
            "created_at": "2022-06-06T21:43:38.000000Z",
            "updated_at": "2022-06-06T21:43:38.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/nfc_tags/{id}

PATCH api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

Body Parameters

company_id  integer optional  

vendor_id  integer  

user_id  integer optional  

station_id  integer optional  

pin  number  

card_state  string  

Must be one of Generic or OTA.

nfctag_type  string  

Must be one of Card or Key Tag.

nfctag_code  string  

nfctag_oem_id  string  

nfctag_url_slug  string optional  

card_number  string  

card_on_thankucash  string optional  

Delete a NFC tag

requires authentication

Example request:
curl --request DELETE \
    "http://cupidapiv2.smartflowtech.com/api/nfc_tags/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/nfc_tags/4"
);

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

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

Request      

DELETE api/nfc_tags/{id}

URL Parameters

id  integer  

The ID of the NFC tag

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."
}
 

Request      

GET api/generate_pin/{nfc_tag_id}

URL Parameters

nfc_tag_id  integer  

The ID of the NFC Tag

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."
}
 

Request      

GET api/user

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
    }
}
 

Request      

GET api/products

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

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
 

Request      

GET api/test_redis

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
    }
}
 

Request      

POST api/products

Body Parameters

name  string  

code  string  

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
    }
}
 

Request      

GET api/products/{id}

URL Parameters

id  integer  

The ID of the product

Update the specified product

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/products/{id}

PATCH api/products/{id}

URL Parameters

id  integer  

The ID of the product

Body Parameters

name  string  

code  string  

Delete a product

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/products/{id}

URL Parameters

id  integer  

The ID of the product

Display a listing of the payment methods or search by name, key, merchant code.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/payment_methods

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new payment method

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/payment_methods

Body Parameters

name  string  

key  string  

pay_percent  number  

cap_fee  number  

max_commission  number  

verification_url  string  

Must be a valid URL.

public_key  string  

secret_key  string  

merchant_no  string  

active  boolean  

Show a specified payment method.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

Update the specified payment method

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/payment_methods/{id}

PATCH api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

Body Parameters

name  string  

key  string  

pay_percent  number  

cap_fee  number  

max_commission  number  

verification_url  string  

Must be a valid URL.

public_key  string  

secret_key  string  

merchant_no  string  

active  boolean  

Delete a payment method

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/payment_methods/{id}

URL Parameters

id  integer  

The ID of the payment method

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
    }
}
 

Request      

GET api/pos/fuel_purchase_history

Query Parameters

per_page  integer optional  

Items per page

company_id  integer optional  

Filter items by company ID

vendor_id  integer optional  

Filter items by vendor ID

cost_center_id  integer optional  

Filter items by cost center ID

sm_station_id  integer optional  

Filter items by station manager station ID

mac_address  string optional  

Filter items by mac address

date  string optional  

datetime Filter items by date

Create a new Fuel purchase history

requires authentication

Example request:
curl --request POST \
    "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
        }
    }
}
 

Request      

POST api/pos/fuel_purchase_history

Body Parameters

company_id  integer  

vendor_id  integer  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

vendor_station_name  string  

vehicle_plate_number  string  

auth_type  string  

Must be one of Card or Key Tag.

barcode_id  string optional  

amount_paid  number  

volume  number  

odometer_reading  number optional  

product  string  

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

pump  integer  

selling_price  number  

current_credit_limit  number  

attendant  string optional  

last_volume_dispensed  number optional  

last_amount_paid  number optional  

transaction_seq_no  integer optional  

is_balanced  boolean optional  

oem_station_id  integer optional  

sm_station_id  integer optional  

balance_refunded  number optional  

tapnet_amount  number optional  

tapnet_volume  number optional  

tapnet_transaction_time  string optional  

Must be a valid date in the format Y-m-d H:i:s.

thankucash_reward_applied  string optional  

thankucash_reward_value  string optional  

app_mode  string  

Must be one of NO FCC MODE or FCC MODE.

mac_address  string optional  

release_token  string optional  

Must not be greater than 2 characters.

is_fdc_value_fill  boolean optional  

fdc_volume  number optional  

fdc_amount  number optional  

last_tsn_source  string optional  

verified_volume  number optional  

verified_amount  number optional  

reconciliation_source  string optional  

Must be one of MANUAL, FDC, or TAPNET.

one_time_auth_id  integer optional  

recon_balance_refunded  boolean optional  

Show a specified Fuel purchase history.

requires authentication

Example request:
curl --request GET \
    --get "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
        }
    }
}
 

Request      

GET api/pos/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Update the specified Fuel purchase history

requires authentication

Example request:
curl --request PUT \
    "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
        }
    }
}
 

Request      

PUT api/pos/fuel_purchase_history/{id}

PATCH api/pos/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Body Parameters

company_id  integer  

vendor_id  integer  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

vendor_station_name  string  

vehicle_plate_number  string  

auth_type  string  

Must be one of Card or Key Tag.

barcode_id  string optional  

amount_paid  number  

volume  number  

odometer_reading  number optional  

product  string  

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

pump  integer  

selling_price  number  

current_credit_limit  number  

attendant  string optional  

last_volume_dispensed  number optional  

last_amount_paid  number optional  

transaction_seq_no  integer optional  

is_balanced  boolean optional  

oem_station_id  integer optional  

sm_station_id  integer optional  

balance_refunded  number optional  

tapnet_amount  number optional  

tapnet_volume  number optional  

tapnet_transaction_time  string optional  

Must be a valid date in the format Y-m-d H:i:s.

thankucash_reward_applied  string optional  

thankucash_reward_value  string optional  

app_mode  string  

Must be one of NO FCC MODE or FCC MODE.

mac_address  string optional  

release_token  string optional  

Must not be greater than 2 characters.

is_fdc_value_fill  boolean optional  

fdc_volume  number optional  

fdc_amount  number optional  

last_tsn_source  string optional  

verified_volume  number optional  

verified_amount  number optional  

reconciliation_source  string optional  

Must be one of MANUAL, FDC, or TAPNET.

one_time_auth_id  integer optional  

recon_balance_refunded  boolean optional  

Display a listing of the one time authorizations or search by status, registration number, product.

requires authentication

Example request:
curl --request GET \
    --get "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization?term=omnis&per_page=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/pos/one_time_authorization"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "company_id": 44,
            "fuel_purchase_history_id": null,
            "cost_center_id": 26,
            "nfctag_id": 9,
            "driver_id": 96,
            "volume": 0.554,
            "product": "AGO",
            "valid_till": null,
            "status": "INACTIVE, AUTHORISED",
            "registration_number": "wx-507-vp",
            "ext_request_id": 2,
            "updated_at": "2022-06-27T10:43:17.000000Z",
            "created_at": "2022-06-27T10:43:17.000000Z",
            "id": 46,
            "driver": {
                "id": 96,
                "company_id": 30,
                "fullname": "Sylvan McCullough",
                "address": "80711 Valentina Track Suite 904",
                "phone_number": "283.360.7538",
                "email": "lfarrell@koss.org",
                "driver_speciality": "Motorbike",
                "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": 44,
                "name": "O'Connell, Wisozk and Baumbach",
                "email": "raphaelle.rodriguez@jacobi.com",
                "phone_number": "1-908-660-4536",
                "registration_number": "RC-513168853",
                "country": "Syrian Arab Republic",
                "state": "District of Columbia",
                "city": "East Glenniemouth",
                "postcode": "13106-8294",
                "address": "574 Frederique Route Apt. 337",
                "sector": "repellat",
                "tin": 377704,
                "website": "kilback.com",
                "logo": "https://via.placeholder.com/200x200.png/00ccee?text=logo+et",
                "active": 0,
                "on_loyalty_program": 1,
                "loyalty_reward_percentage": null,
                "loyalty_min_purchase_amount": null,
                "loyalty_points_by_group": 0,
                "contact_person_first_name": "Abel",
                "contact_person_lastname": "Koss",
                "app_uid": "703c28f91ef62da30f56d25a3731ca7c",
                "created_at": "2022-06-06T21:43:40.000000Z",
                "updated_at": "2022-06-06T21:43:40.000000Z",
                "deleted_at": null
            },
            "fuelPurchaseHistory": null
        },
        {
            "company_id": 46,
            "fuel_purchase_history_id": null,
            "cost_center_id": 12,
            "nfctag_id": 48,
            "driver_id": 27,
            "volume": 152856.9635,
            "product": "LPG",
            "valid_till": null,
            "status": "INACTIVE, AUTHORISED",
            "registration_number": "xh-426-hr",
            "ext_request_id": 4,
            "updated_at": "2022-06-27T10:43:17.000000Z",
            "created_at": "2022-06-27T10:43:17.000000Z",
            "id": 47,
            "driver": {
                "id": 27,
                "company_id": 46,
                "fullname": "Amira Haag IV",
                "address": "890 Johns Views Apt. 101",
                "phone_number": "520.966.5402",
                "email": "walker.fannie@rodriguez.com",
                "driver_speciality": "Saloon Car",
                "status": "Inactive",
                "pin": 6,
                "created_at": "2022-06-06T21:44:31.000000Z",
                "updated_at": "2022-06-06T21:44:31.000000Z",
                "deleted_at": null
            },
            "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
            },
            "fuelPurchaseHistory": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/pos/one_time_authorization

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

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());

Request      

DELETE api/pos/fuel_purchase_history/{id}

URL Parameters

id  integer  

The ID of the Fuel purchase history

Create a new one time authorization

requires authentication

Example request:
curl --request POST \
    "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 20,
    \"fuel_purchase_history_id\": 8,
    \"cost_center_id\": 4,
    \"nfctag_id\": 15,
    \"driver_id\": 18,
    \"valid_till\": \"2022-06-27 10:43:17\",
    \"status\": \"Inactive\",
    \"registration_number\": \"molestias\",
    \"ext_request_id\": 0,
    \"volume\": 247.3,
    \"product\": \"ATK\"
}"
const url = new URL(
    "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization"
);

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

let body = {
    "company_id": 20,
    "fuel_purchase_history_id": 8,
    "cost_center_id": 4,
    "nfctag_id": 15,
    "driver_id": 18,
    "valid_till": "2022-06-27 10:43:17",
    "status": "Inactive",
    "registration_number": "molestias",
    "ext_request_id": 0,
    "volume": 247.3,
    "product": "ATK"
};

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

Example response (200):


{
    "data": {
        "company_id": 31,
        "fuel_purchase_history_id": null,
        "cost_center_id": 15,
        "nfctag_id": 63,
        "driver_id": 17,
        "volume": 8569.0054,
        "product": "AGO",
        "valid_till": null,
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "hh-686-os",
        "ext_request_id": 5,
        "updated_at": "2022-06-27T10:43:17.000000Z",
        "created_at": "2022-06-27T10:43:17.000000Z",
        "id": 48,
        "driver": {
            "id": 17,
            "company_id": 31,
            "fullname": "Nyah Reinger",
            "address": "89145 Prosacco Meadows Suite 745",
            "phone_number": "+1-364-896-2967",
            "email": "cgrady@kertzmann.org",
            "driver_speciality": "Tricycle",
            "status": "Inactive",
            "pin": 9,
            "created_at": "2022-06-06T21:44:31.000000Z",
            "updated_at": "2022-06-06T21:44:31.000000Z",
            "deleted_at": null
        },
        "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
        },
        "fuelPurchaseHistory": null
    }
}
 

Request      

POST api/pos/one_time_authorization

Body Parameters

company_id  integer optional  

fuel_purchase_history_id  integer optional  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

valid_till  string optional  

Must be a valid date in the format Y-m-d H:i:s.

status  string  

Must be one of Active or Inactive.

registration_number  string optional  

ext_request_id  number optional  

volume  number  

product  string  

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

Show a specified one time authorization.

requires authentication

Example request:
curl --request GET \
    --get "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization/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/pos/one_time_authorization/15"
);

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

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

Example response (200):


{
    "data": {
        "company_id": 30,
        "fuel_purchase_history_id": null,
        "cost_center_id": 16,
        "nfctag_id": 44,
        "driver_id": 4,
        "volume": 27420.8165,
        "product": "LPFO",
        "valid_till": null,
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "hs-951-jg",
        "ext_request_id": 8,
        "updated_at": "2022-06-27T10:43:17.000000Z",
        "created_at": "2022-06-27T10:43:17.000000Z",
        "id": 49,
        "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
        },
        "fuelPurchaseHistory": null
    }
}
 

Request      

GET api/pos/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

Update the specified one time authorization

requires authentication

Example request:
curl --request PUT \
    "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"company_id\": 5,
    \"fuel_purchase_history_id\": 6,
    \"cost_center_id\": 4,
    \"nfctag_id\": 19,
    \"driver_id\": 10,
    \"valid_till\": \"2022-06-27 10:43:17\",
    \"status\": \"Inactive\",
    \"registration_number\": \"quis\",
    \"ext_request_id\": 447088.138695,
    \"volume\": 1402.387633,
    \"product\": \"LPG\"
}"
const url = new URL(
    "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization/20"
);

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

let body = {
    "company_id": 5,
    "fuel_purchase_history_id": 6,
    "cost_center_id": 4,
    "nfctag_id": 19,
    "driver_id": 10,
    "valid_till": "2022-06-27 10:43:17",
    "status": "Inactive",
    "registration_number": "quis",
    "ext_request_id": 447088.138695,
    "volume": 1402.387633,
    "product": "LPG"
};

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

Example response (200):


{
    "data": {
        "company_id": 11,
        "fuel_purchase_history_id": null,
        "cost_center_id": 5,
        "nfctag_id": 111,
        "driver_id": 90,
        "volume": 42501.1192,
        "product": "PMS",
        "valid_till": null,
        "status": "INACTIVE, AUTHORISED",
        "registration_number": "jz-411-ab",
        "ext_request_id": 5,
        "updated_at": "2022-06-27T10:43:17.000000Z",
        "created_at": "2022-06-27T10:43:17.000000Z",
        "id": 50,
        "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
        },
        "fuelPurchaseHistory": null
    }
}
 

Request      

PUT api/pos/one_time_authorization/{id}

PATCH api/pos/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

Body Parameters

company_id  integer optional  

fuel_purchase_history_id  integer optional  

cost_center_id  integer  

nfctag_id  integer  

driver_id  integer  

valid_till  string optional  

Must be a valid date in the format Y-m-d H:i:s.

status  string  

Must be one of Active or Inactive.

registration_number  string optional  

ext_request_id  number optional  

volume  number  

product  string  

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

Delete a one time authorization

requires authentication

Example request:
curl --request DELETE \
    "http://cupidapiv2.smartflowtech.com/api/pos/one_time_authorization/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/pos/one_time_authorization/14"
);

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

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

Request      

DELETE api/pos/one_time_authorization/{id}

URL Parameters

id  integer  

The ID of the one time authorization

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
    }
}
 

Request      

POST api/payments/initiate/paystack

Body Parameters

payment_mode_id  integer  

company_id  integer  

amount_to_pay  integer  

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());

Request      

POST api/payments/paystack

Body Parameters

reference  string  

company_id  integer  

payment_uploaded_by  string optional  

Display a listing of the payment histories or search by amount paid, payment made by, payment status, payment uploaded by, payment approved by, reference, channel, amount paid, payment cause, verification means.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/payment_histories

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new payment history

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/payment_histories

Body Parameters

customer_vendor_wallet_id  integer  

amount_paid  number  

s3_url  string optional  

velox_vendor_id  integer  

velox_customer_id  string  

velox_customer_name  string optional  

uploaded_by  string  

payment_date  string  

Must be a valid date in the format Y-m-d.

Show a specified payment history

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

Update the specified payment history

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/payment_histories/{id}

PATCH api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

Body Parameters

selected_customer  string  

payment_status  string  

amount_paid  number  

payment_approved_by  string  

Delete a payment history

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/payment_histories/{id}

URL Parameters

id  integer  

The ID of the payment history

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
    }
}
 

Request      

GET api/oauth/users

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user

requires authentication

Example request:
curl --request POST \
    "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"
            }
        ]
    }
}
 

Request      

POST api/oauth/users

Body Parameters

name  string  

phone  number  

email  string  

Must be a valid email address.

username  string  

gender  string  

Must be one of male or female.

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

vendors  integer[] optional  

permissions  integer[] optional  

companies  integer[] optional  

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"
            }
        ]
    }
}
 

Request      

GET api/oauth/users/{id}

URL Parameters

id  integer  

The ID of the user

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"
            }
        ]
    }
}
 

Request      

PUT api/oauth/users/{id}

PATCH api/oauth/users/{id}

URL Parameters

id  integer  

The ID of the user

Body Parameters

name  string  

phone  number  

email  string  

Must be a valid email address.

username  string  

gender  string  

Must be one of male or female.

newsletter  boolean optional  

active  boolean  

is_admin  boolean  

is_vendor  boolean  

vendors  integer[] optional  

permissions  integer[] optional  

companies  integer[] optional  

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"
            }
        ]
    }
}
 

Request      

DELETE api/oauth/users/{id}

URL Parameters

id  integer  

The ID of the user

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
    }
}
 

Request      

GET api/user_wallets

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user wallet

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/user_wallets

Body Parameters

otp  integer  

user_id  integer  

balance  number  

active  boolean optional  

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
    }
}
 

Request      

GET api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Update the specified user wallet

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/user_wallets/{id}

PATCH api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Body Parameters

otp  integer  

user_id  integer  

balance  number  

active  boolean optional  

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());

Request      

DELETE api/user_wallets/{id}

URL Parameters

id  integer  

The ID of the user wallet

Display a listing of the user wallet histories or search by status, payment reference.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/user_wallet_histories

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Show a specified user wallet history

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/user_wallet_histories/{id}

URL Parameters

id  integer  

The ID of the user wallet history

Delete a user wallet history

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/user_wallet_histories/{id}

URL Parameters

id  integer  

The ID of the user wallet history

Display a listing of the user wallet 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
    }
}
 

Request      

GET api/user_company_wallets

Query Parameters

term  string optional  

Search query parameter

per_page  integer optional  

Items per page

Create a new user 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
    }
}
 

Request      

POST api/user_company_wallets

Body Parameters

company_id  integer  

user_id  integer  

balance  number  

active  boolean optional  

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
    }
}
 

Request      

GET api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user company wallet

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
    }
}
 

Request      

PUT api/user_company_wallets/{id}

PATCH api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user company wallet

Body Parameters

company_id  integer  

user_id  integer  

balance  number  

active  boolean optional  

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());

Request      

DELETE api/user_company_wallets/{id}

URL Parameters

id  integer  

The ID of the user company wallet

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."
}
 

Request      

GET api/create_wallet

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."
}
 

Request      

GET api/create_company_wallet/{company_id}

URL Parameters

company_id  integer  

The ID of the company

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."
}
 

Request      

GET api/fund_wallet/{payment_method}/{payment_ref}

URL Parameters

payment_method  string  

Name of the payment provider (paystack)

payment_ref  string  

Payment reference/nonce

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
    }
}
 

Request      

GET api/company_vendors

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

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"
    }
}
 

Request      

POST api/company_vendors

Body Parameters

company_id  integer  

vendor_id  integer optional  

status  string  

partnership_code  string optional  

active  boolean optional  

partnership_ppv_mode  string  

pms_ppv  string optional  

ago_ppv  string optional  

discount_mode  string optional  

Show a specified vendor company.

requires authentication

Example request:
curl --request GET \
    --get "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"
    }
}
 

Request      

GET api/company_vendors/{id}

URL Parameters

id  integer  

The ID of the vendor company

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"
    }
}
 

Request      

PUT api/company_vendors/{id}

PATCH api/company_vendors/{id}

URL Parameters

id  integer  

The ID of the vendor company

Body Parameters

company_id  integer  

vendor_id  integer optional  

status  string  

partnership_code  string optional  

active  boolean optional  

partnership_ppv_mode  string  

pms_ppv  string optional  

ago_ppv  string optional  

discount_mode  string optional  

Delete a vendor company

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/company_vendors/{id}

URL Parameters

id  integer  

The ID of the vendor company

Display a listing of the vendor application configurations or search by app name, hostname

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/vendor_app_configs

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

Create a new vendor application configuration

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/vendor_app_configs

Body Parameters

company_id  integer  

vendor_id  integer optional  

hostname  string  

Must be a valid URL.

logo_path  file optional  

Must be an image.

app_name  string  

app_name_font_size  number optional  

app_header_color  string optional  

app_body_color  string optional  

menu_header_color  string optional  

menu_body_color  string optional  

status  string optional  

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
    }
}
 

Request      

GET api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Update the specified vendor application configuration

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/vendor_app_configs/{id}

PATCH api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Body Parameters

company_id  integer  

vendor_id  integer optional  

hostname  string  

Must be a valid URL.

logo_path  file optional  

Must be an image.

app_name  string  

app_name_font_size  number optional  

app_header_color  string optional  

app_body_color  string optional  

menu_header_color  string optional  

menu_body_color  string optional  

status  string optional  

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());

Request      

DELETE api/vendor_app_configs/{id}

URL Parameters

id  integer  

The ID of the vendor application configuration

Display a list of the vendor banking details or search by account number, bank name, account name, paystack ID, paystack sub-account code

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/vendor_bank_accounts

Query Parameters

per_page  integer optional  

items per page

term  string optional  

Search query parameter

Create a new vendor banking details

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/vendor_bank_accounts

Body Parameters

company_id  integer  

vendor_id  integer optional  

account_number  number  

bank_name  string  

account_name  string  

paystack_id  number optional  

paystack_subaccount_code  string optional  

payment_mode  string optional  

Must be one of paystack, paga, or others.

merchantcodes  string optional  

active  boolean optional  

Show a specified vendor banking details.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

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
    }
}
 

Request      

PUT api/vendor_bank_accounts/{id}

PATCH api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

Body Parameters

company_id  integer  

vendor_id  integer optional  

account_number  number  

bank_name  string  

account_name  string  

paystack_id  number optional  

paystack_subaccount_code  string optional  

payment_mode  string optional  

Must be one of paystack, paga, or others.

merchantcodes  string optional  

active  boolean optional  

Delete a vendor banking details

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/vendor_bank_accounts/{id}

URL Parameters

id  integer  

The ID of the vendor banking details

Display a listing of the vendor Paga details

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/vendor_paga_credentials

Query Parameters

per_page  integer optional  

items per page

Create a new vendor Paga credential

requires authentication

Example request:
curl --request POST \
    "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
    }
}
 

Request      

POST api/vendor_paga_credentials

Body Parameters

company_id  integer  

vendor_id  integer optional  

hmac  string optional  

secret_key  string  

public_key  string  

active  boolean optional  

Show a specified vendor Paga credential.

requires authentication

Example request:
curl --request GET \
    --get "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
    }
}
 

Request      

GET api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor Paga credential

Update the specified vendor Paga credential

requires authentication

Example request:
curl --request PUT \
    "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
    }
}
 

Request      

PUT api/vendor_paga_credentials/{id}

PATCH api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor Paga credential

Body Parameters

company_id  integer  

vendor_id  integer optional  

hmac  string optional  

secret_key  string  

public_key  string  

active  boolean optional  

Delete a vendor Paga credential

requires authentication

Example request:
curl --request DELETE \
    "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());

Request      

DELETE api/vendor_paga_credentials/{id}

URL Parameters

id  integer  

The ID of the vendor paga credential

Display a listing of the vendor assign delivery stations or search by station name

requires authentication

Example request:
curl --request GET \
    --get "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):