Introduction
This documentation provides all the information you will need to work with for this API. The application is built with Laravel 9 PHP framework & is systematically versioned (SEMVER).
Base URL
https://idmapi.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 retrieve your access_token by logging in using the Login a user using personal access token endpoint. Remember to append Bearer to the access_token
Endpoints
Login a user using personal access token
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"error\",
\"password\": \"quo\"
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "error",
"password": "quo"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Issue access & refresh tokens using oauth password grant type
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/auth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"considine.iva@example.net\",
\"password\": \"inventore\",
\"client_id\": \"distinctio\",
\"client_secret\": \"unde\",
\"grant_type\": \"aut\",
\"username\": \"voluptatibus\"
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/auth/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "considine.iva@example.net",
"password": "inventore",
"client_id": "distinctio",
"client_secret": "unde",
"grant_type": "aut",
"username": "voluptatibus"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Get the logged-in user
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/user" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/user"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid key supplied"
}
Received response:
Request failed with error:
Display a listing of the oauth client resource.
requires authentication
Can also filter/search by name, vendor or client application
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/oauth/clients?term=qui&per_page=7" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/clients"
);
const params = {
"term": "qui",
"per_page": "7",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/oauth/clients" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dolor\",
\"redirect\": \"adipisci\",
\"vendor_id\": 3,
\"vendor_name\": \"maxime\",
\"client_app\": \"dolore\"
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/clients"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dolor",
"redirect": "adipisci",
"vendor_id": 3,
"vendor_name": "maxime",
"client_app": "dolore"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Display the oauth client resource.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/oauth/clients/nisi" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/clients/nisi"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://api.idm.smartflowtech.org/api/oauth/clients/aliquam" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/clients/aliquam"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Delete the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/oauth/clients/facilis" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/clients/facilis"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Revoke oauth client access to the authentication server
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/oauth/revoke_client/voluptas" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/revoke_client/voluptas"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Show the unencrypted secret key if the user provides the correct password to the account
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/oauth/display_secret/eum" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"password\": \"pariatur\"
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/display_secret/eum"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "pariatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Display a list of all oauth tokens issued to users. Can also filter/search by users' name, email, vendor & client app
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/oauth/token_access_logs" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/token_access_logs"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Get application metrics for dashboard
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/dashboard" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/dashboard"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Blacklist a users' IP address
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/oauth/blacklist_ip/18/ut" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/blacklist_ip/18/ut"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Logout a user
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/auth/logout" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/auth/logout"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid key supplied"
}
Received response:
Request failed with error:
Delete a token
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/oauth/delete_token/quod" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/oauth/delete_token/quod"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Display a listing of vendor groups or search by name.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/cupid/groups?term=possimus&per_page=11" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/groups"
);
const params = {
"term": "possimus",
"per_page": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"vendors": []
},
{
"vendors": []
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new vendor group
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/cupid/groups" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"pariatur\",
\"description\": \"aut\",
\"active\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/groups"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "pariatur",
"description": "aut",
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"vendors": []
}
}
Received response:
Request failed with error:
Display a vendor group resource.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/cupid/groups/quis" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/groups/quis"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"vendors": []
}
}
Received response:
Request failed with error:
Update a vendor group.
requires authentication
Example request:
curl --request PUT \
"http://api.idm.smartflowtech.org/api/cupid/groups/4" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"sint\",
\"description\": \"quia\",
\"active\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/groups/4"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "sint",
"description": "quia",
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"vendors": []
}
}
Received response:
Request failed with error:
Delete a vendor group
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/cupid/groups/17" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/groups/17"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Display a listing of the vendors or search by name, phone number, email, address, city, state, country.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/cupid/vendors?term=et&per_page=10" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/vendors"
);
const params = {
"term": "et",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"sm_company_id": 42,
"name": "BHN Logistics",
"address": "Sagamu",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "08028268504",
"country": "Nigeria",
"state": "Ogun State",
"city": "Sagamu",
"postcode": null,
"products_sold": "PMS,AGO",
"payment_type": "neque",
"contact_person": "Sourabh sanganeria",
"registration_number": "1005",
"status": 1,
"has_active_paga_account": 0,
"on_loyalty_program": 0,
"created_at": "2023-02-16T11:23:28.000000Z",
"updated_at": "2023-09-22T11:49:33.000000Z",
"deleted_at": null
},
{
"id": 1,
"sm_company_id": 42,
"name": "BHN Logistics",
"address": "Sagamu",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "08028268504",
"country": "Nigeria",
"state": "Ogun State",
"city": "Sagamu",
"postcode": null,
"products_sold": "PMS,AGO",
"payment_type": "neque",
"contact_person": "Sourabh sanganeria",
"registration_number": "1005",
"status": 1,
"has_active_paga_account": 0,
"on_loyalty_program": 0,
"created_at": "2023-02-16T11:23:28.000000Z",
"updated_at": "2023-09-22T11:49:33.000000Z",
"deleted_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new vendor
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/cupid/vendors" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quod\",
\"sm_company_id\": 15,
\"address\": \"qui\",
\"phone_number\": \"sed\",
\"email\": \"dolorem\",
\"country\": \"est\",
\"state\": \"ducimus\",
\"city\": \"in\",
\"products_sold\": \"quia\",
\"payment_type\": \"et\",
\"has_active_paga_account\": true,
\"status\": true,
\"on_loyalty_program\": false,
\"create_wallet\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/vendors"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quod",
"sm_company_id": 15,
"address": "qui",
"phone_number": "sed",
"email": "dolorem",
"country": "est",
"state": "ducimus",
"city": "in",
"products_sold": "quia",
"payment_type": "et",
"has_active_paga_account": true,
"status": true,
"on_loyalty_program": false,
"create_wallet": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"sm_company_id": 42,
"name": "BHN Logistics",
"address": "Sagamu",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "08028268504",
"country": "Nigeria",
"state": "Ogun State",
"city": "Sagamu",
"postcode": null,
"products_sold": "PMS,AGO",
"payment_type": "neque",
"contact_person": "Sourabh sanganeria",
"registration_number": "1005",
"status": 1,
"has_active_paga_account": 0,
"on_loyalty_program": 0,
"created_at": "2023-02-16T11:23:28.000000Z",
"updated_at": "2023-09-22T11:49:33.000000Z",
"deleted_at": null
}
}
Received response:
Request failed with error:
Display a vendor resource.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/cupid/vendors/dolore" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/vendors/dolore"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"sm_company_id": 42,
"name": "BHN Logistics",
"address": "Sagamu",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "08028268504",
"country": "Nigeria",
"state": "Ogun State",
"city": "Sagamu",
"postcode": null,
"products_sold": "PMS,AGO",
"payment_type": "neque",
"contact_person": "Sourabh sanganeria",
"registration_number": "1005",
"status": 1,
"has_active_paga_account": 0,
"on_loyalty_program": 0,
"created_at": "2023-02-16T11:23:28.000000Z",
"updated_at": "2023-09-22T11:49:33.000000Z",
"deleted_at": null
}
}
Received response:
Request failed with error:
Update a vendor.
requires authentication
Example request:
curl --request PUT \
"http://api.idm.smartflowtech.org/api/cupid/vendors/13" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"labore\",
\"sm_company_id\": 8,
\"address\": \"et\",
\"phone_number\": \"nulla\",
\"email\": \"non\",
\"country\": \"fugit\",
\"state\": \"consequatur\",
\"city\": \"aut\",
\"products_sold\": \"laborum\",
\"payment_type\": \"ut\",
\"has_active_paga_account\": true,
\"status\": true,
\"on_loyalty_program\": false,
\"create_wallet\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/vendors/13"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "labore",
"sm_company_id": 8,
"address": "et",
"phone_number": "nulla",
"email": "non",
"country": "fugit",
"state": "consequatur",
"city": "aut",
"products_sold": "laborum",
"payment_type": "ut",
"has_active_paga_account": true,
"status": true,
"on_loyalty_program": false,
"create_wallet": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"sm_company_id": 42,
"name": "BHN Logistics",
"address": "Sagamu",
"email": "Sourabh.sanganeria@tolaram.com",
"phone_number": "08028268504",
"country": "Nigeria",
"state": "Ogun State",
"city": "Sagamu",
"postcode": null,
"products_sold": "PMS,AGO",
"payment_type": "neque",
"contact_person": "Sourabh sanganeria",
"registration_number": "1005",
"status": 1,
"has_active_paga_account": 0,
"on_loyalty_program": 0,
"created_at": "2023-02-16T11:23:28.000000Z",
"updated_at": "2023-09-22T11:49:33.000000Z",
"deleted_at": null
}
}
Received response:
Request failed with error:
Delete a vendor
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/cupid/vendors/18" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/vendors/18"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Get all the vendors(from CUPID DB)
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/cupid/get-all-vendors" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/cupid/get-all-vendors"
);
const headers = {
"Authorization": "{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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update user profile & password
requires authentication
Example request:
curl --request PATCH \
"http://api.idm.smartflowtech.org/api/profile/update-profile/2" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eos\",
\"email\": \"langworth.emilie@example.com\",
\"username\": \"ipsa\",
\"gender\": \"Male\",
\"phone\": \"molestiae\",
\"current_password\": \"nemo\",
\"password\": \"necessitatibus\"
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/profile/update-profile/2"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eos",
"email": "langworth.emilie@example.com",
"username": "ipsa",
"gender": "Male",
"phone": "molestiae",
"current_password": "nemo",
"password": "necessitatibus"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"title": "Dr.",
"name": "Dr. Cristal Schuppe PhD",
"email": "jeffery17@example.org",
"username": "zemlak.joanny",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "1-219-436-7041",
"avatar": "https://via.placeholder.com/640x480.png/00ffcc?text=illo",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 145
}
}
Received response:
Request failed with error:
Reset user password
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/reset-password?email=accusamus" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/reset-password"
);
const params = {
"email": "accusamus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Register a user to SSO
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"qui\",
\"name\": \"quas\",
\"phone\": \"ratione\",
\"email\": \"noemi86@example.org\",
\"username\": \"esse\",
\"gender\": \"Female\",
\"newsletter\": false,
\"active\": true,
\"suspended\": false,
\"is_admin\": false,
\"is_vendor\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "qui",
"name": "quas",
"phone": "ratione",
"email": "noemi86@example.org",
"username": "esse",
"gender": "Female",
"newsletter": false,
"active": true,
"suspended": false,
"is_admin": false,
"is_vendor": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
User Endpoints
Display a listing of the users or search by name, email, address, state, country.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/users?term=officia&per_page=9" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/users"
);
const params = {
"term": "officia",
"per_page": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "{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": "Enola Cartwright",
"email": "derick47@example.net",
"username": "mack.kling",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "(602) 655-0415",
"avatar": "https://via.placeholder.com/640x480.png/006622?text=iure",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 146
},
{
"title": "Mr.",
"name": "Carmel Brekke",
"email": "keith.watsica@example.org",
"username": "demarco.upton",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "+19108517534",
"avatar": "https://via.placeholder.com/640x480.png/0055bb?text=dicta",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 147
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/",
"per_page": 20,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create a new user
requires authentication
Example request:
curl --request POST \
"http://api.idm.smartflowtech.org/api/users" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"iure\",
\"name\": \"neque\",
\"phone\": \"aut\",
\"email\": \"rossie.lesch@example.com\",
\"username\": \"consequatur\",
\"gender\": \"Female\",
\"newsletter\": true,
\"active\": true,
\"suspended\": true,
\"is_admin\": true,
\"is_vendor\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/users"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "iure",
"name": "neque",
"phone": "aut",
"email": "rossie.lesch@example.com",
"username": "consequatur",
"gender": "Female",
"newsletter": true,
"active": true,
"suspended": true,
"is_admin": true,
"is_vendor": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"title": "Miss",
"name": "Ewell Macejkovic Sr.",
"email": "graham.desiree@example.net",
"username": "hdoyle",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "(706) 618-1130",
"avatar": "https://via.placeholder.com/640x480.png/00ee22?text=enim",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 148
}
}
Received response:
Request failed with error:
Show a specified user.
requires authentication
Example request:
curl --request GET \
--get "http://api.idm.smartflowtech.org/api/users/13" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/users/13"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"title": "Dr.",
"name": "Arianna Pfeffer",
"email": "anabelle90@example.org",
"username": "alessia.pacocha",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "(762) 461-7237",
"avatar": "https://via.placeholder.com/640x480.png/00bb55?text=quo",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 149
}
}
Received response:
Request failed with error:
Update the specified user
requires authentication
Example request:
curl --request PUT \
"http://api.idm.smartflowtech.org/api/users/14" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"necessitatibus\",
\"name\": \"ab\",
\"phone\": \"velit\",
\"email\": \"brittany81@example.org\",
\"username\": \"dolores\",
\"gender\": \"Female\",
\"newsletter\": false,
\"active\": true,
\"suspended\": false,
\"is_admin\": true,
\"is_vendor\": false
}"
const url = new URL(
"http://api.idm.smartflowtech.org/api/users/14"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "necessitatibus",
"name": "ab",
"phone": "velit",
"email": "brittany81@example.org",
"username": "dolores",
"gender": "Female",
"newsletter": false,
"active": true,
"suspended": false,
"is_admin": true,
"is_vendor": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"title": "Prof.",
"name": "Scarlett Watsica",
"email": "abe49@example.net",
"username": "sawayn.isobel",
"email_verified_at": "2023-10-06T09:57:06.000000Z",
"phone": "+1-901-914-8850",
"avatar": "https://via.placeholder.com/640x480.png/008811?text=voluptas",
"is_admin": false,
"is_vendor": false,
"updated_at": "2023-10-06T09:57:06.000000Z",
"created_at": "2023-10-06T09:57:06.000000Z",
"id": 150
}
}
Received response:
Request failed with error:
Delete a user
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/users/9" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/users/9"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Permanently delete a user
requires authentication
Example request:
curl --request DELETE \
"http://api.idm.smartflowtech.org/api/users/f_del_user/13" \
--header "Authorization: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://api.idm.smartflowtech.org/api/users/f_del_user/13"
);
const headers = {
"Authorization": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error: