MENU navbar-image

Introduction

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

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Authentication

API endpoints for user authentication and registration

Register a new user

Create a new user account in the platform.

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"+2348012345678\",
    \"password\": \"password123\",
    \"password_confirmation\": \"password123\",
    \"role\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/register"
);

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

let body = {
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+2348012345678",
    "password": "password123",
    "password_confirmation": "password123",
    "role": "architecto"
};

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

Example response (201):


{
    "message": "Registration successful",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "role": "resident"
    },
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The user's full name. Example: John Doe

email   string     

The user's email address. Example: john@example.com

phone   string     

The user's phone number. Example: +2348012345678

password   string     

Minimum 8 characters. Example: password123

password_confirmation   string     

Must match password. Example: password123

role   string  optional    

optional User role: resident, provider, or sme_admin. Default: resident Example: architecto

Login user

Authenticate a user and return an access token.

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john@example.com\",
    \"password\": \"password123\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/login"
);

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

let body = {
    "email": "john@example.com",
    "password": "password123"
};

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

Example response (200):


{
    "message": "Login successful",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "role": "resident"
    },
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
 

Example response (401):


{
    "message": "Invalid credentials",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The user's email address. Example: john@example.com

password   string     

The user's password. Example: password123

POST api/v1/auth/logout

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/logout"
);

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


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

Request      

POST api/v1/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/forgot-password

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/forgot-password"
);

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


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

Request      

POST api/v1/auth/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/reset-password

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/reset-password"
);

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


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

Request      

POST api/v1/auth/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/verify-email

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/verify-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/verify-email"
);

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


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

Request      

POST api/v1/auth/verify-email

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/resend-verification

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/resend-verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/resend-verification"
);

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


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

Request      

POST api/v1/auth/resend-verification

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/send-otp

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/send-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/send-otp"
);

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


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

Request      

POST api/v1/auth/send-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/verify-otp

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/auth/verify-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/auth/verify-otp"
);

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


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

Request      

POST api/v1/auth/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/enable

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/enable" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/enable"
);

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


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

Request      

POST api/v1/mfa/enable

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/disable

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/disable" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/disable"
);

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


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

Request      

POST api/v1/mfa/disable

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/verify

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/verify"
);

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


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

Request      

POST api/v1/mfa/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/send-code

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/send-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/send-code"
);

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


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

Request      

POST api/v1/mfa/send-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/mfa/status

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/mfa/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/status"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/mfa/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/backup-codes

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/backup-codes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/backup-codes"
);

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


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

Request      

POST api/v1/mfa/backup-codes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/mfa/verify-backup

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/verify-backup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/mfa/verify-backup"
);

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


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

Request      

POST api/v1/mfa/verify-backup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/social/{provider}/redirect

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/social/architecto/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/social/architecto/redirect"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/social/{provider}/redirect

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

Example: architecto

GET api/v1/social/{provider}/callback

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/social/architecto/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/social/architecto/callback"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/social/{provider}/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

Example: architecto

Endpoints

GET api/v1/health

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/health"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/health

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/register

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"phone\": \"architecto\",
    \"password\": \"]|{+-0pBNvYg\",
    \"role\": \"provider\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/register"
);

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

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "phone": "architecto",
    "password": "]|{+-0pBNvYg",
    "role": "provider"
};

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

Request      

POST api/v1/customer/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Example: zbailey@example.net

phone   string     

Example: architecto

password   string     

Must be at least 8 characters. Example: ]|{+-0pBNvYg

role   string  optional    

Example: provider

Must be one of:
  • resident
  • provider
  • sme_admin

POST api/v1/customer/otp-verify

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/otp-verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"architecto\",
    \"otp\": \"ngzmiy\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/otp-verify"
);

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

let body = {
    "phone": "architecto",
    "otp": "ngzmiy"
};

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

Request      

POST api/v1/customer/otp-verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Example: architecto

otp   string     

Must be 6 characters. Example: ngzmiy

POST api/v1/customer/otp-resend

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/otp-resend" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/otp-resend"
);

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

let body = {
    "phone": "architecto"
};

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

Request      

POST api/v1/customer/otp-resend

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Example: architecto

POST api/v1/customer/login

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/login"
);

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

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

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

Request      

POST api/v1/customer/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: |]|{+-

POST api/v1/fraud/analyze

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/fraud/analyze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/fraud/analyze"
);

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


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

Request      

POST api/v1/fraud/analyze

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/fraud/profile/{userId}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/fraud/profile/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/fraud/profile/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/fraud/profile/{userId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: architecto

POST api/v1/fraud/log-attempt

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/fraud/log-attempt" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/fraud/log-attempt"
);

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


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

Request      

POST api/v1/fraud/log-attempt

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/ai/match-providers

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/ai/match-providers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/ai/match-providers"
);

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


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

Request      

POST api/v1/ai/match-providers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/ai/recommendations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/ai/recommendations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/ai/recommendations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/ai/recommendations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/ai/price-suggestion

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/ai/price-suggestion" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/ai/price-suggestion"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/ai/price-suggestion

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get public PWA settings (for frontend manifest)

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/pwa/manifest" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/pwa/manifest"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/pwa/manifest

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/user

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/user

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user"
);

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


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

Request      

PUT api/v1/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/user/change-password

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/user/change-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user/change-password"
);

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


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

Request      

POST api/v1/user/change-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/user/avatar

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/user/avatar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user/avatar"
);

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


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

Request      

POST api/v1/user/avatar

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/user/verify-phone

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/user/verify-phone" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user/verify-phone"
);

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


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

Request      

POST api/v1/user/verify-phone

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/user/onboarding

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/user/onboarding" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"onboarding_step\": 1,
    \"role\": \"resident\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/user/onboarding"
);

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

let body = {
    "onboarding_step": 1,
    "role": "resident"
};

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

Request      

POST api/v1/user/onboarding

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

onboarding_step   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 1

role   string  optional    

Example: resident

Must be one of:
  • resident
  • provider
  • sme_admin

GET api/v1/customer/onboarding/status

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/status"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/onboarding/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/customer/onboarding/step

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/step" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"onboarding_step\": 1
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/step"
);

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

let body = {
    "onboarding_step": 1
};

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

Request      

PUT api/v1/customer/onboarding/step

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

onboarding_step   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 1

POST api/v1/customer/onboarding/data

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"display_name\": \"b\",
    \"location\": \"n\",
    \"preferences\": [
        16
    ],
    \"notifications\": {
        \"email\": true,
        \"push\": true,
        \"sms\": true
    }
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/data"
);

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

let body = {
    "display_name": "b",
    "location": "n",
    "preferences": [
        16
    ],
    "notifications": {
        "email": true,
        "push": true,
        "sms": true
    }
};

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

Request      

POST api/v1/customer/onboarding/data

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

display_name   string  optional    

Must not be greater than 255 characters. Example: b

location   string  optional    

Must not be greater than 255 characters. Example: n

preferences   integer[]  optional    
notifications   object  optional    
email   boolean  optional    

Example: true

push   boolean  optional    

Example: true

sms   boolean  optional    

Example: true

POST api/v1/customer/onboarding/complete

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/complete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/complete"
);

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


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

Request      

POST api/v1/customer/onboarding/complete

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/onboarding/skip

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/skip" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/skip"
);

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


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

Request      

POST api/v1/customer/onboarding/skip

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/onboarding/verify-phone

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/verify-phone" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"architecto\",
    \"otp\": \"ngzmiy\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/verify-phone"
);

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

let body = {
    "phone": "architecto",
    "otp": "ngzmiy"
};

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

Request      

POST api/v1/customer/onboarding/verify-phone

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Example: architecto

otp   string     

Must be 6 characters. Example: ngzmiy

POST api/v1/customer/onboarding/send-otp

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/send-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/onboarding/send-otp"
);

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

let body = {
    "phone": "architecto"
};

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

Request      

POST api/v1/customer/onboarding/send-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Example: architecto

GET api/v1/tenant

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/tenant" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/tenant"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/tenant

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/tenant

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/tenant" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"subdomain\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"phone\": \"dljnikhwaykcmyuw\",
    \"address\": \"p\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/tenant"
);

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

let body = {
    "business_name": "b",
    "subdomain": "n",
    "description": "Animi quos velit et fugiat.",
    "phone": "dljnikhwaykcmyuw",
    "address": "p"
};

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

Request      

POST api/v1/tenant

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string     

Must not be greater than 255 characters. Example: b

subdomain   string     

Must match the regex /^[a-z0-9-]+$/. Must not be greater than 50 characters. Example: n

description   string  optional    

Must not be greater than 1000 characters. Example: Animi quos velit et fugiat.

phone   string  optional    

Must not be greater than 20 characters. Example: dljnikhwaykcmyuw

address   string  optional    

Must not be greater than 500 characters. Example: p

PUT api/v1/tenant

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/tenant" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"phone\": \"dljnikhwaykcmyuw\",
    \"address\": \"p\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/tenant"
);

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

let body = {
    "business_name": "b",
    "description": "Et animi quos velit et fugiat.",
    "phone": "dljnikhwaykcmyuw",
    "address": "p"
};

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

Request      

PUT api/v1/tenant

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 1000 characters. Example: Et animi quos velit et fugiat.

phone   string  optional    

Must not be greater than 20 characters. Example: dljnikhwaykcmyuw

address   string  optional    

Must not be greater than 500 characters. Example: p

GET api/v1/tenant/check-subdomain

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/tenant/check-subdomain" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/tenant/check-subdomain"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/tenant/check-subdomain

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/marketplace/services

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/marketplace/services" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/marketplace/services"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/marketplace/services

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/marketplace/services/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/marketplace/services/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/marketplace/services/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/marketplace/services/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the service. Example: architecto

GET api/v1/jobs

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/jobs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/jobs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/jobs/available

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/jobs/available" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/available"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/jobs/available

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/jobs/count

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/jobs/count" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/count"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/jobs/count

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/jobs

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs"
);

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


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

Request      

POST api/v1/jobs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/jobs/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/jobs/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

GET api/v1/notifications/count

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/notifications/count" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/count"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/notifications/count

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/notifications

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/notifications

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 16,
    \"type\": \"n\",
    \"title\": \"g\",
    \"body\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications"
);

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

let body = {
    "user_id": 16,
    "type": "n",
    "title": "g",
    "body": "architecto"
};

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

Request      

POST api/v1/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   integer     

Example: 16

type   string     

Must not be greater than 50 characters. Example: n

title   string     

Must not be greater than 255 characters. Example: g

body   string  optional    

Example: architecto

data   object  optional    

GET api/v1/notifications/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/notifications/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/notifications/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/notifications/{id}/read

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/architecto/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/architecto/read"
);

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


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

Request      

POST api/v1/notifications/{id}/read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the notification. Example: architecto

POST api/v1/notifications/read-all

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/read-all" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/read-all"
);

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


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

Request      

POST api/v1/notifications/read-all

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

DELETE api/v1/notifications/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications/architecto"
);

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


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

Request      

DELETE api/v1/notifications/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the notification. Example: architecto

DELETE api/v1/notifications

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/notifications"
);

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


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

Request      

DELETE api/v1/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/jobs/{id}/accept

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/accept" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/accept"
);

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


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

Request      

POST api/v1/jobs/{id}/accept

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/jobs/{id}/start

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/start" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/start"
);

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


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

Request      

POST api/v1/jobs/{id}/start

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/jobs/{id}/complete

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/complete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/complete"
);

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


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

Request      

POST api/v1/jobs/{id}/complete

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/jobs/{id}/confirm

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/confirm" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/confirm"
);

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


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

Request      

POST api/v1/jobs/{id}/confirm

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/jobs/{id}/cancel

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/cancel"
);

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


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

Request      

POST api/v1/jobs/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

GET api/v1/jobs/{id}/matches

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/matches" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/jobs/architecto/matches"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/jobs/{id}/matches

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

GET api/v1/wallet/verify-bank

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/wallet/verify-bank" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/verify-bank"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/wallet/verify-bank

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/wallet/fund

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/fund" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/fund"
);

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


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

Request      

POST api/v1/wallet/fund

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/wallet/withdraw

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/withdraw" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/withdraw"
);

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


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

Request      

POST api/v1/wallet/withdraw

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/wallet

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/wallet" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet"
);

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


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

Request      

POST api/v1/wallet

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/wallet/{userId}/balance

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto/balance" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto/balance"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/wallet/{userId}/balance

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: architecto

GET api/v1/wallet/{userId}/transactions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto/transactions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/wallet/{userId}/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: architecto

GET api/v1/wallet/{userId}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/wallet/{userId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: architecto

POST api/v1/wallet/escrow/hold

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/escrow/hold" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/escrow/hold"
);

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


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

Request      

POST api/v1/wallet/escrow/hold

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/wallet/escrow/release

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/escrow/release" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/wallet/escrow/release"
);

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


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

Request      

POST api/v1/wallet/escrow/release

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/smes

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/smes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/smes"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/smes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/smes

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/smes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"category\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"address\": \"architecto\",
    \"location\": \"architecto\",
    \"phone\": \"architecto\",
    \"email\": \"zbailey@example.net\",
    \"website\": \"https:\\/\\/www.gulgowski.com\\/nihil-accusantium-harum-mollitia-modi-deserunt\",
    \"working_hours\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/smes"
);

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

let body = {
    "business_name": "b",
    "category": "n",
    "description": "Eius et animi quos velit et.",
    "address": "architecto",
    "location": "architecto",
    "phone": "architecto",
    "email": "zbailey@example.net",
    "website": "https:\/\/www.gulgowski.com\/nihil-accusantium-harum-mollitia-modi-deserunt",
    "working_hours": "architecto"
};

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

Request      

POST api/v1/smes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string     

Must not be greater than 255 characters. Example: b

category   string  optional    

Must not be greater than 100 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

address   string  optional    

Example: architecto

location   string  optional    

Example: architecto

phone   string  optional    

Example: architecto

email   string  optional    

Must be a valid email address. Example: zbailey@example.net

website   string  optional    

Must be a valid URL. Example: https://www.gulgowski.com/nihil-accusantium-harum-mollitia-modi-deserunt

working_hours   string  optional    

Example: architecto

GET api/v1/smes/{slug}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/smes/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the sme. Example: architecto

POST api/v1/smes/{smeId}/products

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"price\": 60,
    \"stock\": 42
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto/products"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "price": 60,
    "stock": 42
};

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

Request      

POST api/v1/smes/{smeId}/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

smeId   string     

Example: architecto

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

price   number     

Must be at least 0. Example: 60

stock   integer  optional    

Must be at least 0. Example: 42

GET api/v1/smes/{smeId}/products

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/smes/architecto/products"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/smes/{smeId}/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

smeId   string     

Example: architecto

POST api/v1/cart

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/cart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": 16,
    \"quantity\": 22
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/cart"
);

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

let body = {
    "product_id": 16,
    "quantity": 22
};

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

Request      

POST api/v1/cart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   integer     

The id of an existing record in the sme_products table. Example: 16

quantity   integer  optional    

Must be at least 1. Example: 22

GET api/v1/cart

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/cart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/cart"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/cart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/cart/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/cart/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 27
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/cart/architecto"
);

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

let body = {
    "quantity": 27
};

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

Request      

PUT api/v1/cart/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the cart. Example: architecto

Body Parameters

quantity   integer     

Must be at least 0. Example: 27

DELETE api/v1/cart/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/cart/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/cart/architecto"
);

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


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

Request      

DELETE api/v1/cart/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the cart. Example: architecto

DELETE api/v1/cart

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/cart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/cart"
);

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


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

Request      

DELETE api/v1/cart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/orders

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_address\": \"architecto\",
    \"delivery_phone\": \"architecto\",
    \"notes\": \"architecto\",
    \"delivery_fee\": 39
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders"
);

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

let body = {
    "delivery_address": "architecto",
    "delivery_phone": "architecto",
    "notes": "architecto",
    "delivery_fee": 39
};

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

Request      

POST api/v1/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

delivery_address   string  optional    

Example: architecto

delivery_phone   string  optional    

Example: architecto

notes   string  optional    

Example: architecto

delivery_fee   number  optional    

Must be at least 0. Example: 39

GET api/v1/orders

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/orders/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/orders/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/orders/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/orders/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/orders/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

PUT api/v1/orders/{id}/status

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"returned\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/status"
);

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

let body = {
    "status": "returned"
};

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

Request      

PUT api/v1/orders/{id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

status   string     

Example: returned

Must be one of:
  • pending
  • paid
  • processing
  • ready
  • shipped
  • delivered
  • completed
  • cancelled
  • refunded
  • returned

POST api/v1/orders/{id}/cancel

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/cancel"
);

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

let body = {
    "reason": "architecto"
};

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

Request      

POST api/v1/orders/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

reason   string  optional    

Example: architecto

POST api/v1/orders/{id}/fulfill

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/fulfill" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/fulfill"
);

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


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

Request      

POST api/v1/orders/{id}/fulfill

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/orders/{id}/deliver

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/deliver" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/deliver"
);

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


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

Request      

POST api/v1/orders/{id}/deliver

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/orders/{id}/complete

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/complete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/orders/architecto/complete"
);

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


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

Request      

POST api/v1/orders/{id}/complete

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/webhooks/payment

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/webhooks/payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/webhooks/payment"
);

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


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

Request      

POST api/v1/webhooks/payment

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/webhooks/paystack

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/webhooks/paystack" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/webhooks/paystack"
);

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


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

Request      

POST api/v1/webhooks/paystack

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/chat/conversations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/chat/conversations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/conversations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/chat/conversations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/chat/conversations

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/chat/conversations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/conversations"
);

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

let body = {
    "user_id": 16
};

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

Request      

POST api/v1/chat/conversations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   integer     

The id of an existing record in the global_users table. Example: 16

GET api/v1/chat/{conversationId}/messages

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/messages"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/chat/{conversationId}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversationId   string     

Example: architecto

POST api/v1/chat/{conversationId}/messages

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"b\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/messages"
);

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

let body = {
    "message": "b"
};

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

Request      

POST api/v1/chat/{conversationId}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversationId   string     

Example: architecto

Body Parameters

message   string     

Must not be greater than 5000 characters. Example: b

POST api/v1/chat/{conversationId}/read

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/architecto/read"
);

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


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

Request      

POST api/v1/chat/{conversationId}/read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversationId   string     

Example: architecto

GET api/v1/chat/unread-count

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/chat/unread-count" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/chat/unread-count"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/chat/unread-count

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/overview

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/overview" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/overview"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/overview

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/revenue

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/revenue" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/revenue"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/revenue

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/jobs-by-status

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/jobs-by-status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/jobs-by-status"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/jobs-by-status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/top-categories

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/top-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/top-categories"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/top-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/top-providers

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/top-providers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/top-providers"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/top-providers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/user-growth

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/user-growth" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/user-growth"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/user-growth

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/orders

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/orders"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/disputes

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/disputes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/disputes"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/disputes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/wallets

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/wallets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/wallets"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/wallets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/chart

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/chart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/chart"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/chart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/analytics/dashboard

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/analytics/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/analytics/dashboard"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/analytics/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/advertisements

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/advertisements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/advertisements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/advertisements

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements"
);

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


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

Request      

POST api/v1/advertisements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/advertisements/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/advertisements/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

PUT api/v1/advertisements/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto"
);

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


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

Request      

PUT api/v1/advertisements/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

DELETE api/v1/advertisements/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto"
);

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


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

Request      

DELETE api/v1/advertisements/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

POST api/v1/advertisements/{id}/activate

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/activate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/activate"
);

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


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

Request      

POST api/v1/advertisements/{id}/activate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

POST api/v1/advertisements/{id}/pause

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/pause" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/pause"
);

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


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

Request      

POST api/v1/advertisements/{id}/pause

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

GET api/v1/advertisements/{id}/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/architecto/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/advertisements/{id}/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the advertisement. Example: architecto

GET api/v1/advertisements/active

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/advertisements/active" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/advertisements/active"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/advertisements/active

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/setup

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/setup"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/provider/setup

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/setup"
);

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


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

Request      

POST api/v1/provider/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/provider/setup

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"category\": \"architecto\",
    \"subcategory\": \"architecto\",
    \"hourly_rate\": 39,
    \"location\": \"architecto\",
    \"phone\": \"architecto\",
    \"email\": \"zbailey@example.net\",
    \"website\": \"https:\\/\\/www.gulgowski.com\\/nihil-accusantium-harum-mollitia-modi-deserunt\",
    \"working_hours\": \"architecto\",
    \"availability_status\": \"offline\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/setup"
);

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

let body = {
    "business_name": "b",
    "description": "Eius et animi quos velit et.",
    "category": "architecto",
    "subcategory": "architecto",
    "hourly_rate": 39,
    "location": "architecto",
    "phone": "architecto",
    "email": "zbailey@example.net",
    "website": "https:\/\/www.gulgowski.com\/nihil-accusantium-harum-mollitia-modi-deserunt",
    "working_hours": "architecto",
    "availability_status": "offline"
};

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

Request      

PUT api/v1/provider/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

category   string  optional    

Example: architecto

subcategory   string  optional    

Example: architecto

services   object  optional    
hourly_rate   number  optional    

Must be at least 0. Example: 39

location   string  optional    

Example: architecto

phone   string  optional    

Example: architecto

email   string  optional    

Must be a valid email address. Example: zbailey@example.net

website   string  optional    

Must be a valid URL. Example: https://www.gulgowski.com/nihil-accusantium-harum-mollitia-modi-deserunt

working_hours   string  optional    

Example: architecto

availability_status   string  optional    

Example: offline

Must be one of:
  • available
  • busy
  • offline

POST api/v1/provider/portfolio

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/portfolio" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpVP2aPV" 
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/portfolio"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Request      

POST api/v1/provider/portfolio

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

file   file     

Must be a file. Must not be greater than 10240 kilobytes. Example: /tmp/phpVP2aPV

GET api/v1/provider/dashboard

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/dashboard"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/jobs

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/jobs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/provider/jobs/{id}/accept

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/accept" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/accept"
);

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


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

Request      

POST api/v1/provider/jobs/{id}/accept

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/provider/jobs/{id}/start

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/start" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/start"
);

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


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

Request      

POST api/v1/provider/jobs/{id}/start

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

POST api/v1/provider/jobs/{id}/complete

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/complete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/jobs/architecto/complete"
);

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


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

Request      

POST api/v1/provider/jobs/{id}/complete

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the job. Example: architecto

GET api/v1/provider/wallet

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/wallet" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/wallet"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/wallet

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/analytics

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/analytics" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/analytics"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/analytics

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/ai/recommendations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/recommendations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/recommendations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/ai/recommendations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/ai/pricing

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/pricing" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/pricing"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/ai/pricing

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/ai/insights

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/insights" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/ai/insights"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/ai/insights

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/profile

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/profile"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/provider/profile

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/profile"
);

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


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

Request      

PUT api/v1/provider/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/provider/payouts

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/payouts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/provider/payouts

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 95,
    \"bank_code\": \"architecto\",
    \"account_number\": \"8225697751\",
    \"account_name\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts"
);

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

let body = {
    "amount": 95,
    "bank_code": "architecto",
    "account_number": "8225697751",
    "account_name": "architecto"
};

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

Request      

POST api/v1/provider/payouts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

amount   number     

Must be at least 100. Example: 95

bank_code   string     

Example: architecto

account_number   string     

Must be 10 digits. Example: 8225697751

account_name   string     

Example: architecto

GET api/v1/provider/payouts/banks

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts/banks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts/banks"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/provider/payouts/banks

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/provider/payouts/verify

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_number\": \"8225697751\",
    \"bank_code\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/provider/payouts/verify"
);

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

let body = {
    "account_number": "8225697751",
    "bank_code": "architecto"
};

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

Request      

POST api/v1/provider/payouts/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

account_number   string     

Must be 10 digits. Example: 8225697751

bank_code   string     

Example: architecto

GET api/v1/sme/setup

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/setup"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/sme/setup

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/setup"
);

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


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

Request      

POST api/v1/sme/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/sme/setup

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"category\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"phone\": \"vdljnikhwaykcmyu\",
    \"address\": \"w\",
    \"location\": \"p\",
    \"email\": \"dare.emelie@example.com\",
    \"website\": \"https:\\/\\/mclaughlin.com\\/ipsum-nostrum-omnis-autem-et-consequatur-aut-dolores-enim.html\",
    \"logo\": \"architecto\",
    \"banner\": \"architecto\",
    \"working_hours\": \"architecto\",
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/setup"
);

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

let body = {
    "business_name": "b",
    "category": "n",
    "description": "Eius et animi quos velit et.",
    "phone": "vdljnikhwaykcmyu",
    "address": "w",
    "location": "p",
    "email": "dare.emelie@example.com",
    "website": "https:\/\/mclaughlin.com\/ipsum-nostrum-omnis-autem-et-consequatur-aut-dolores-enim.html",
    "logo": "architecto",
    "banner": "architecto",
    "working_hours": "architecto",
    "is_active": true
};

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

Request      

PUT api/v1/sme/setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

category   string  optional    

Must not be greater than 100 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

phone   string  optional    

Must not be greater than 20 characters. Example: vdljnikhwaykcmyu

address   string  optional    

Must not be greater than 500 characters. Example: w

location   string  optional    

Must not be greater than 255 characters. Example: p

email   string  optional    

Must be a valid email address. Example: dare.emelie@example.com

website   string  optional    

Must be a valid URL. Example: https://mclaughlin.com/ipsum-nostrum-omnis-autem-et-consequatur-aut-dolores-enim.html

logo   string  optional    

Example: architecto

banner   string  optional    

Example: architecto

working_hours   string  optional    

Example: architecto

is_active   boolean  optional    

Example: true

POST api/v1/sme/photos

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/photos" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpYhzkWj" 
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/photos"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Request      

POST api/v1/sme/photos

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

file   file     

Must be a file. Must not be greater than 5120 kilobytes. Example: /tmp/phpYhzkWj

GET api/v1/customer/dashboard

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/dashboard"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/bookings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/bookings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/bookings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/bookings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/bookings/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/bookings/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/bookings/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/bookings/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the booking. Example: architecto

GET api/v1/customer/orders

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/orders"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/orders/{id}/cancel

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/orders/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/orders/architecto/cancel"
);

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


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

Request      

POST api/v1/customer/orders/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

GET api/v1/customer/wallet

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/wallet" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/wallet"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/wallet

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/wallet/transactions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/wallet/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/wallet/transactions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/wallet/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/notifications

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/customer/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/notifications"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/customer/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/notifications/{id}/read

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/customer/notifications/architecto/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/customer/notifications/architecto/read"
);

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


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

Request      

POST api/v1/customer/notifications/{id}/read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the notification. Example: architecto

GET api/v1/sme/dashboard

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/dashboard"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/sme/store

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/store" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/store"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/store

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/sme/store

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/store" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"address\": \"architecto\",
    \"phone\": \"architecto\",
    \"email\": \"zbailey@example.net\",
    \"working_hours\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/store"
);

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

let body = {
    "business_name": "b",
    "description": "Eius et animi quos velit et.",
    "address": "architecto",
    "phone": "architecto",
    "email": "zbailey@example.net",
    "working_hours": "architecto"
};

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

Request      

PUT api/v1/sme/store

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

address   string  optional    

Example: architecto

phone   string  optional    

Example: architecto

email   string  optional    

Must be a valid email address. Example: zbailey@example.net

working_hours   string  optional    

Example: architecto

GET api/v1/sme/products

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/sme/products

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"price\": 60,
    \"stock\": 42,
    \"category\": \"architecto\",
    \"image\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "price": 60,
    "stock": 42,
    "category": "architecto",
    "image": "architecto"
};

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

Request      

POST api/v1/sme/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string     

Example: Eius et animi quos velit et.

price   number     

Must be at least 0. Example: 60

stock   integer     

Must be at least 0. Example: 42

category   string     

Example: architecto

image   string  optional    

Example: architecto

GET api/v1/sme/products/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/products/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the product. Example: architecto

PUT api/v1/sme/products/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"price\": 60,
    \"stock\": 42,
    \"category\": \"architecto\",
    \"image\": \"architecto\",
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "price": 60,
    "stock": 42,
    "category": "architecto",
    "image": "architecto",
    "is_active": true
};

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

Request      

PUT api/v1/sme/products/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the product. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

price   number  optional    

Must be at least 0. Example: 60

stock   integer  optional    

Must be at least 0. Example: 42

category   string  optional    

Example: architecto

image   string  optional    

Example: architecto

is_active   boolean  optional    

Example: true

DELETE api/v1/sme/products/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/products/architecto"
);

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


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

Request      

DELETE api/v1/sme/products/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the product. Example: architecto

GET api/v1/sme/orders

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/orders"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/sme/orders/{id}/status

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/sme/orders/architecto/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"cancelled\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/orders/architecto/status"
);

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

let body = {
    "status": "cancelled"
};

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

Request      

PUT api/v1/sme/orders/{id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

status   string     

Example: cancelled

Must be one of:
  • pending
  • confirmed
  • processing
  • shipped
  • delivered
  • cancelled

GET api/v1/sme/analytics

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/sme/analytics" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/sme/analytics"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/sme/analytics

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get all settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/platform/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/platform/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Create new setting

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"architecto\",
    \"value\": \"architecto\",
    \"type\": \"integer\",
    \"group\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings"
);

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

let body = {
    "key": "architecto",
    "value": "architecto",
    "type": "integer",
    "group": "architecto",
    "description": "Eius et animi quos velit et."
};

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

Request      

POST api/v1/platform/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

Example: architecto

value   string     

Example: architecto

type   string     

Example: integer

Must be one of:
  • string
  • boolean
  • integer
  • json
  • array
group   string     

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

Bulk update settings

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/bulk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"settings\": [
        {
            \"id\": \"architecto\",
            \"value\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/bulk"
);

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

let body = {
    "settings": [
        {
            "id": "architecto",
            "value": "architecto"
        }
    ]
};

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

Request      

POST api/v1/platform/settings/bulk

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

settings   object[]     
id   string     

The id of an existing record in the platform_settings table. Example: architecto

value   string     

Example: architecto

Update a setting

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"value\": \"architecto\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/architecto"
);

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

let body = {
    "value": "architecto",
    "is_active": false
};

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

Request      

PUT api/v1/platform/settings/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the setting. Example: architecto

Body Parameters

value   string     

Example: architecto

is_active   boolean  optional    

Example: false

Delete setting

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/architecto"
);

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


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

Request      

DELETE api/v1/platform/settings/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the setting. Example: architecto

Initialize default settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/pwa/initialize" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/pwa/initialize"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/platform/settings/pwa/initialize

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Initialize default settings

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/initialize" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/platform/settings/initialize"
);

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


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

Request      

POST api/v1/platform/settings/initialize

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get PWA settings specifically

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/pwa/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Toggle PWA enabled status

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enabled\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/toggle"
);

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

let body = {
    "enabled": true
};

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

Request      

POST api/v1/admin/pwa/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

enabled   boolean     

Example: true

Get PWA statistics

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/pwa/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get PWA Install Modal settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/pwa/install-modal

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Toggle Install Modal enabled status

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enabled\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal/toggle"
);

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

let body = {
    "enabled": true
};

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

Request      

POST api/v1/admin/pwa/install-modal/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

enabled   boolean     

Example: true

Update Install Modal setting

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"value\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/pwa/install-modal/architecto"
);

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

let body = {
    "value": "architecto"
};

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

Request      

PUT api/v1/admin/pwa/install-modal/{key}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: architecto

Body Parameters

value   string     

Example: architecto

Get platform statistics GET /api/v1/admin/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get all users (customers, providers, SMEs) GET /api/v1/admin/users

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get specific user by ID GET /api/v1/admin/users/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: architecto

Create new user (customer, provider, or SME admin) POST /api/v1/admin/users

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"phone\": \"iyvdljnikhwaykcm\",
    \"password\": \"\\/kXaz<m5L[)~=NG5a:\",
    \"role\": \"admin\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users"
);

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

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "phone": "iyvdljnikhwaykcm",
    "password": "\/kXaz<m5L[)~=NG5a:",
    "role": "admin"
};

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

Request      

POST api/v1/admin/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Example: zbailey@example.net

phone   string  optional    

Must not be greater than 20 characters. Example: iyvdljnikhwaykcm

password   string     

Must be at least 6 characters. Example: /kXaz<m5L[)~=NG5a:

role   string     

Example: admin

Must be one of:
  • resident
  • provider
  • sme_admin
  • admin
tenant_id   string  optional    

The id of an existing record in the tenants table.

Update user PUT /api/v1/admin/users/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"phone\": \"ngzmiyvdljnikhwa\",
    \"role\": \"super_admin\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto"
);

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

let body = {
    "name": "b",
    "phone": "ngzmiyvdljnikhwa",
    "role": "super_admin",
    "is_active": false
};

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

Request      

PUT api/v1/admin/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

email   string  optional    
phone   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

role   string  optional    

Example: super_admin

Must be one of:
  • resident
  • provider
  • sme_admin
  • admin
  • super_admin
tenant_id   string  optional    

The id of an existing record in the tenants table.

is_active   boolean  optional    

Example: false

Delete (deactivate) user DELETE /api/v1/admin/users/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto"
);

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


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

Request      

DELETE api/v1/admin/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: architecto

Activate user POST /api/v1/admin/users/{id}/activate

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto/activate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/users/architecto/activate"
);

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


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

Request      

POST api/v1/admin/users/{id}/activate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: architecto

Get all SMEs GET /api/v1/admin/servicemart_smes

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/smes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/smes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get specific SME GET /api/v1/admin/servicemart_smes/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/smes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sme. Example: architecto

Update SME PUT /api/v1/admin/servicemart_smes/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"category\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"phone\": \"vdljnikhwaykcmyu\",
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto"
);

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

let body = {
    "business_name": "b",
    "category": "n",
    "description": "Eius et animi quos velit et.",
    "phone": "vdljnikhwaykcmyu",
    "is_active": true
};

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

Request      

PUT api/v1/admin/smes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sme. Example: architecto

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

category   string  optional    

Must not be greater than 100 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

phone   string  optional    

Must not be greater than 20 characters. Example: vdljnikhwaykcmyu

is_active   boolean  optional    

Example: true

Delete (deactivate) SME DELETE /api/v1/admin/servicemart_smes/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto"
);

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


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

Request      

DELETE api/v1/admin/smes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sme. Example: architecto

Get SME sales data GET /api/v1/admin/smes/{id}/sales

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto/sales" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto/sales"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/smes/{id}/sales

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sme. Example: architecto

Get SME orders GET /api/v1/admin/smes/{id}/orders

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/smes/architecto/orders"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/smes/{id}/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sme. Example: architecto

Get all service providers GET /api/v1/admin/providers

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/providers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/providers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get specific provider GET /api/v1/admin/providers/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/providers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Update provider PUT /api/v1/admin/providers/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"phone\": \"vdljnikhwaykcmyu\",
    \"is_verified\": false,
    \"availability_status\": \"available\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto"
);

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

let body = {
    "business_name": "b",
    "description": "Eius et animi quos velit et.",
    "phone": "vdljnikhwaykcmyu",
    "is_verified": false,
    "availability_status": "available"
};

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

Request      

PUT api/v1/admin/providers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

phone   string  optional    

Must not be greater than 20 characters. Example: vdljnikhwaykcmyu

is_verified   boolean  optional    

Example: false

availability_status   string  optional    

Example: available

Must be one of:
  • available
  • busy
  • offline

Verify provider POST /api/v1/admin/providers/{id}/verify

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/verify"
);

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


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

Request      

POST api/v1/admin/providers/{id}/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Delete (deactivate) provider DELETE /api/v1/admin/providers/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto"
);

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


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

Request      

DELETE api/v1/admin/providers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Get provider earnings GET /api/v1/admin/providers/{id}/earnings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/earnings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/earnings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/providers/{id}/earnings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Get provider jobs GET /api/v1/admin/providers/{id}/jobs

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/jobs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/providers/architecto/jobs"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/providers/{id}/jobs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

Get all customers GET /api/v1/admin/customers

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/customers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/customers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get customer details GET /api/v1/admin/customers/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/customers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Update customer PUT /api/v1/admin/customers/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto"
);

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


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

Request      

PUT api/v1/admin/customers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Get customer bookings GET /api/v1/admin/customers/{id}/bookings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto/bookings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto/bookings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/customers/{id}/bookings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Get customer wallet GET /api/v1/admin/customers/{id}/wallet

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto/wallet" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/customers/architecto/wallet"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/customers/{id}/wallet

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Get tenant list GET /api/v1/admin/tenants

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tenants

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Create tenant POST /api/v1/admin/tenants

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"area\": \"g\",
    \"db_name\": \"z\",
    \"plan\": \"enterprise\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants"
);

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

let body = {
    "name": "b",
    "slug": "n",
    "area": "g",
    "db_name": "z",
    "plan": "enterprise"
};

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

Request      

POST api/v1/admin/tenants

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must not be greater than 255 characters. Example: n

area   string  optional    

Must not be greater than 255 characters. Example: g

db_name   string     

Must not be greater than 255 characters. Example: z

plan   string  optional    

Example: enterprise

Must be one of:
  • basic
  • premium
  • enterprise

Update tenant PUT /api/v1/admin/tenants/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"area\": \"n\",
    \"status\": \"active\",
    \"plan\": \"basic\",
    \"subscription_expires_at\": \"2026-05-03T20:45:39\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1"
);

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

let body = {
    "name": "b",
    "area": "n",
    "status": "active",
    "plan": "basic",
    "subscription_expires_at": "2026-05-03T20:45:39"
};

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

Request      

PUT api/v1/admin/tenants/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tenant. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

area   string  optional    

Must not be greater than 255 characters. Example: n

status   string  optional    

Example: active

Must be one of:
  • active
  • suspended
  • pending
plan   string  optional    

Example: basic

Must be one of:
  • basic
  • premium
  • enterprise
subscription_expires_at   string  optional    

Must be a valid date. Example: 2026-05-03T20:45:39

Delete (deactivate) tenant DELETE /api/v1/admin/tenants/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1"
);

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


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

Request      

DELETE api/v1/admin/tenants/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tenant. Example: 1

Get tenant admin users GET /api/v1/admin/tenants/{id}/users

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/users"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tenants/{id}/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tenant. Example: 1

Create tenant admin POST /api/v1/admin/tenants/{id}/admin

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/admin" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"phone\": \"iyvdljnikhwaykcm\",
    \"password\": \"\\/kXaz<m5L[)~=NG5a:\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/admin"
);

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

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "phone": "iyvdljnikhwaykcm",
    "password": "\/kXaz<m5L[)~=NG5a:"
};

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

Request      

POST api/v1/admin/tenants/{id}/admin

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tenant. Example: 1

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

email   string     

Must be a valid email address. Example: zbailey@example.net

phone   string  optional    

Must not be greater than 20 characters. Example: iyvdljnikhwaykcm

password   string     

Must be at least 6 characters. Example: /kXaz<m5L[)~=NG5a:

Get tenant admin stats GET /api/v1/admin/tenants/{id}/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tenants/1/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tenants/{id}/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the tenant. Example: 1

Get recent platform activity GET /api/v1/admin/activity

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/activity" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/activity"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/activity

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get admin alerts GET /api/v1/admin/alerts

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/alerts"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/alerts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/chat/conversations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/chat/conversations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/chat/conversations/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/chat/conversations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the conversation. Example: architecto

GET api/v1/admin/chat/conversations/{id}/messages

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto/messages"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/chat/conversations/{id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the conversation. Example: architecto

DELETE api/v1/admin/chat/conversations/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/conversations/architecto"
);

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


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

Request      

DELETE api/v1/admin/chat/conversations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the conversation. Example: architecto

DELETE api/v1/admin/chat/messages/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/messages/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/messages/architecto"
);

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


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

Request      

DELETE api/v1/admin/chat/messages/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the message. Example: architecto

GET api/v1/admin/chat/messages

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/messages"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/chat/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"bngz\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/search"
);

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

let body = {
    "q": "bngz"
};

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

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "message": "Server Error"
}
 

GET api/v1/admin/chat/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/chat/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/chat/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Mark alert as read POST /api/v1/admin/alerts/{id}/read

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/alerts/architecto/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/alerts/architecto/read"
);

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


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

Request      

POST api/v1/admin/alerts/{id}/read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the alert. Example: architecto

GET api/v1/admin/payment/gateways

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payment/gateways

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/payment/gateways/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payment/gateways/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the gateway. Example: architecto

PUT api/v1/admin/payment/gateways/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_active\": true,
    \"is_default\": true,
    \"public_key\": \"architecto\",
    \"secret_key\": \"architecto\",
    \"webhook_secret\": \"architecto\",
    \"api_url\": \"http:\\/\\/bailey.com\\/\",
    \"api_version\": \"architecto\",
    \"initialize_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"verify_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"bank_list_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"account_resolve_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"transfer_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"transfer_recipient_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"virtual_account_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto"
);

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

let body = {
    "is_active": true,
    "is_default": true,
    "public_key": "architecto",
    "secret_key": "architecto",
    "webhook_secret": "architecto",
    "api_url": "http:\/\/bailey.com\/",
    "api_version": "architecto",
    "initialize_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "verify_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "bank_list_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "account_resolve_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "transfer_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "transfer_recipient_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "virtual_account_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html"
};

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

Request      

PUT api/v1/admin/payment/gateways/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the gateway. Example: architecto

Body Parameters

is_active   boolean  optional    

Example: true

is_default   boolean  optional    

Example: true

public_key   string  optional    

Example: architecto

secret_key   string  optional    

Example: architecto

webhook_secret   string  optional    

Example: architecto

api_url   string  optional    

Must be a valid URL. Example: http://bailey.com/

api_version   string  optional    

Example: architecto

initialize_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

verify_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

bank_list_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

account_resolve_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

transfer_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

transfer_recipient_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

virtual_account_url   string  optional    

Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

POST api/v1/admin/payment/gateways/{id}/test

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto/test" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gateway\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/gateways/architecto/test"
);

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

let body = {
    "gateway": "architecto"
};

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

Request      

POST api/v1/admin/payment/gateways/{id}/test

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the gateway. Example: architecto

Body Parameters

gateway   string     

Example: architecto

PUT api/v1/admin/payment/default

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/default" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gateway\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/default"
);

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

let body = {
    "gateway": "architecto"
};

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

Request      

PUT api/v1/admin/payment/default

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

gateway   string     

The gateway_id of an existing record in the payment_gateway_settings table. Example: architecto

GET api/v1/admin/payment/banks

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/banks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/banks"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payment/banks

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/payment/resolve

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/resolve" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_code\": \"architecto\",
    \"account_number\": \"architecto\",
    \"gateway\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/resolve"
);

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

let body = {
    "bank_code": "architecto",
    "account_number": "architecto",
    "gateway": "architecto"
};

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

Request      

POST api/v1/admin/payment/resolve

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

bank_code   string     

Example: architecto

account_number   string     

Example: architecto

gateway   string  optional    

Example: architecto

GET api/v1/admin/payment/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payment/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/payment/transactions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payment/transactions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payment/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get permissions for current user GET /api/v1/admin/permissions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/permissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/permissions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/permissions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get all roles and their permissions (Super Admin only) GET /api/v1/admin/roles

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Create new role POST /api/v1/admin/roles

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"color\": \"architecto\",
    \"baseRole\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "color": "architecto",
    "baseRole": "architecto"
};

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

Request      

POST api/v1/admin/roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

color   string  optional    

Example: architecto

baseRole   string  optional    

The role of an existing record in the role_permissions table. Example: architecto

Update role PUT /api/v1/admin/roles/{role}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

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

Request      

PUT api/v1/admin/roles/{role}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   string     

The role. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

permissions   object  optional    

Delete role DELETE /api/v1/admin/roles/{role}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto"
);

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


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

Request      

DELETE api/v1/admin/roles/{role}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   string     

The role. Example: architecto

Assign role to users POST /api/v1/admin/roles/{role}/assign

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto/assign" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_ids\": [
        16
    ]
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto/assign"
);

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

let body = {
    "user_ids": [
        16
    ]
};

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

Request      

POST api/v1/admin/roles/{role}/assign

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   string     

The role. Example: architecto

Body Parameters

user_ids   integer[]  optional    

The id of an existing record in the global_users table.

Update role permissions (Super Admin only) PUT /api/v1/admin/roles/{role}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto/permissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [],
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/roles/architecto/permissions"
);

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

let body = {
    "permissions": [],
    "description": "Eius et animi quos velit et."
};

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

Request      

PUT api/v1/admin/roles/{role}/permissions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

role   string     

The role. Example: architecto

Body Parameters

permissions   object     
description   string  optional    

Example: Eius et animi quos velit et.

Initialize default permissions POST /api/v1/admin/permissions/init

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/permissions/init" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/permissions/init"
);

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


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

Request      

POST api/v1/admin/permissions/init

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/payout-settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payout-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/payout-settings

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gateway\": \"stripe\",
    \"name\": \"b\",
    \"is_active\": true,
    \"is_default\": false,
    \"min_amount\": 39,
    \"max_amount\": 84,
    \"fee_percentage\": 16,
    \"fee_fixed\": 77,
    \"daily_limit\": 8,
    \"monthly_limit\": 76,
    \"priority\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings"
);

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

let body = {
    "gateway": "stripe",
    "name": "b",
    "is_active": true,
    "is_default": false,
    "min_amount": 39,
    "max_amount": 84,
    "fee_percentage": 16,
    "fee_fixed": 77,
    "daily_limit": 8,
    "monthly_limit": 76,
    "priority": 16
};

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

Request      

POST api/v1/admin/payout-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

gateway   string     

Example: stripe

Must be one of:
  • paystack
  • flutterwave
  • stripe
  • manual
name   string     

Must not be greater than 100 characters. Example: b

is_active   boolean  optional    

Example: true

is_default   boolean  optional    

Example: false

min_amount   number  optional    

Must be at least 0. Example: 39

max_amount   number  optional    

Must be at least 0. Example: 84

fee_percentage   number  optional    

Must be at least 0. Must not be greater than 100. Example: 16

fee_fixed   number  optional    

Must be at least 0. Example: 77

daily_limit   number  optional    

Must be at least 0. Example: 8

monthly_limit   number  optional    

Must be at least 0. Example: 76

priority   integer  optional    

Must be at least 1. Example: 16

config   object  optional    

PUT api/v1/admin/payout-settings/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gateway\": \"paystack\",
    \"name\": \"b\",
    \"is_active\": true,
    \"is_default\": false,
    \"min_amount\": 39,
    \"max_amount\": 84,
    \"fee_percentage\": 16,
    \"fee_fixed\": 77,
    \"daily_limit\": 8,
    \"monthly_limit\": 76,
    \"priority\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto"
);

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

let body = {
    "gateway": "paystack",
    "name": "b",
    "is_active": true,
    "is_default": false,
    "min_amount": 39,
    "max_amount": 84,
    "fee_percentage": 16,
    "fee_fixed": 77,
    "daily_limit": 8,
    "monthly_limit": 76,
    "priority": 16
};

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

Request      

PUT api/v1/admin/payout-settings/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout setting. Example: architecto

Body Parameters

gateway   string  optional    

Example: paystack

Must be one of:
  • paystack
  • flutterwave
  • stripe
  • manual
name   string  optional    

Must not be greater than 100 characters. Example: b

is_active   boolean  optional    

Example: true

is_default   boolean  optional    

Example: false

min_amount   number  optional    

Must be at least 0. Example: 39

max_amount   number  optional    

Must be at least 0. Example: 84

fee_percentage   number  optional    

Must be at least 0. Must not be greater than 100. Example: 16

fee_fixed   number  optional    

Must be at least 0. Example: 77

daily_limit   number  optional    

Must be at least 0. Example: 8

monthly_limit   number  optional    

Must be at least 0. Example: 76

priority   integer  optional    

Must be at least 1. Example: 16

config   object  optional    

DELETE api/v1/admin/payout-settings/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto"
);

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


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

Request      

DELETE api/v1/admin/payout-settings/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout setting. Example: architecto

POST api/v1/admin/payout-settings/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/payout-settings/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout setting. Example: architecto

POST api/v1/admin/payout-settings/{id}/default

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto/default" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/architecto/default"
);

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


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

Request      

POST api/v1/admin/payout-settings/{id}/default

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout setting. Example: architecto

GET api/v1/admin/payout-settings/active

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/active" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/active"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payout-settings/active

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/payout-settings/gateways

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/gateways" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/payout-settings/gateways"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/payout-settings/gateways

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/tickets

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tickets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/tickets

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"priority\": \"low\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets"
);

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

let body = {
    "subject": "b",
    "description": "Eius et animi quos velit et.",
    "priority": "low"
};

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

Request      

POST api/v1/admin/tickets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

subject   string     

Must not be greater than 255 characters. Example: b

description   string     

Example: Eius et animi quos velit et.

priority   string  optional    

Example: low

Must be one of:
  • low
  • medium
  • high
  • urgent
category_id   string  optional    

The id of an existing record in the ticket_categories table.

GET api/v1/admin/tickets/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tickets/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

PUT api/v1/admin/tickets/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"priority\": \"low\",
    \"status\": \"open\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto"
);

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

let body = {
    "subject": "b",
    "description": "Eius et animi quos velit et.",
    "priority": "low",
    "status": "open"
};

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

Request      

PUT api/v1/admin/tickets/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

Body Parameters

subject   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

priority   string  optional    

Example: low

Must be one of:
  • low
  • medium
  • high
  • urgent
status   string  optional    

Example: open

Must be one of:
  • open
  • in_progress
  • pending
  • resolved
  • closed
category_id   string  optional    

The id of an existing record in the ticket_categories table.

DELETE api/v1/admin/tickets/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto"
);

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


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

Request      

DELETE api/v1/admin/tickets/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

POST api/v1/admin/tickets/{id}/comment

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/comment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment\": \"architecto\",
    \"is_internal\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/comment"
);

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

let body = {
    "comment": "architecto",
    "is_internal": false
};

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

Request      

POST api/v1/admin/tickets/{id}/comment

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

Body Parameters

comment   string     

Example: architecto

is_internal   boolean  optional    

Example: false

POST api/v1/admin/tickets/{id}/assign

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/assign" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"assigned_to\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/assign"
);

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

let body = {
    "assigned_to": "architecto"
};

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

Request      

POST api/v1/admin/tickets/{id}/assign

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

Body Parameters

assigned_to   string     

The id of an existing record in the users table. Example: architecto

POST api/v1/admin/tickets/{id}/escalate

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/escalate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/escalate"
);

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


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

Request      

POST api/v1/admin/tickets/{id}/escalate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

POST api/v1/admin/tickets/{id}/resolve

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/resolve" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/resolve"
);

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


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

Request      

POST api/v1/admin/tickets/{id}/resolve

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

POST api/v1/admin/tickets/{id}/close

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/close" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/close"
);

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


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

Request      

POST api/v1/admin/tickets/{id}/close

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

POST api/v1/admin/tickets/{id}/reopen

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/reopen" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/architecto/reopen"
);

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


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

Request      

POST api/v1/admin/tickets/{id}/reopen

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the ticket. Example: architecto

GET api/v1/admin/tickets/categories

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/categories"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tickets/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/tickets/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/tickets/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/tickets/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/invoices

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/invoices

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/invoices

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"product\",
    \"issue_date\": \"2026-05-03T20:45:40\",
    \"due_date\": \"2052-05-26\",
    \"notes\": \"architecto\",
    \"terms\": \"architecto\",
    \"items\": [
        {
            \"description\": \"Eius et animi quos velit et.\",
            \"quantity\": 16,
            \"unit_price\": 42,
            \"tax_rate\": 5,
            \"discount_rate\": 19
        }
    ]
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices"
);

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

let body = {
    "type": "product",
    "issue_date": "2026-05-03T20:45:40",
    "due_date": "2052-05-26",
    "notes": "architecto",
    "terms": "architecto",
    "items": [
        {
            "description": "Eius et animi quos velit et.",
            "quantity": 16,
            "unit_price": 42,
            "tax_rate": 5,
            "discount_rate": 19
        }
    ]
};

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

Request      

POST api/v1/admin/invoices

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   string  optional    

The id of an existing record in the users table.

type   string  optional    

Example: product

Must be one of:
  • service
  • product
  • subscription
  • other
issue_date   string  optional    

Must be a valid date. Example: 2026-05-03T20:45:40

due_date   string  optional    

Must be a valid date. Must be a date after issue_date. Example: 2052-05-26

notes   string  optional    

Example: architecto

terms   string  optional    

Example: architecto

items   object[]     

Must have at least 1 items.

description   string     

Example: Eius et animi quos velit et.

quantity   integer     

Must be at least 1. Example: 16

unit_price   number     

Must be at least 0. Example: 42

tax_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 5

discount_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 19

GET api/v1/admin/invoices/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/invoices/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

PUT api/v1/admin/invoices/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"issue_date\": \"2026-05-03T20:45:40\",
    \"due_date\": \"2026-05-03T20:45:40\",
    \"notes\": \"architecto\",
    \"terms\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto"
);

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

let body = {
    "issue_date": "2026-05-03T20:45:40",
    "due_date": "2026-05-03T20:45:40",
    "notes": "architecto",
    "terms": "architecto"
};

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

Request      

PUT api/v1/admin/invoices/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

Body Parameters

issue_date   string  optional    

Must be a valid date. Example: 2026-05-03T20:45:40

due_date   string  optional    

Must be a valid date. Example: 2026-05-03T20:45:40

notes   string  optional    

Example: architecto

terms   string  optional    

Example: architecto

items   object  optional    

Must have at least 1 items.

DELETE api/v1/admin/invoices/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto"
);

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


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

Request      

DELETE api/v1/admin/invoices/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

POST api/v1/admin/invoices/{id}/send

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/send" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/send"
);

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


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

Request      

POST api/v1/admin/invoices/{id}/send

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

POST api/v1/admin/invoices/{id}/mark-paid

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/mark-paid" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/mark-paid"
);

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


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

Request      

POST api/v1/admin/invoices/{id}/mark-paid

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

POST api/v1/admin/invoices/{id}/cancel

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/cancel"
);

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


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

Request      

POST api/v1/admin/invoices/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

POST api/v1/admin/invoices/{id}/reopen

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/reopen" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/reopen"
);

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


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

Request      

POST api/v1/admin/invoices/{id}/reopen

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

POST api/v1/admin/invoices/{id}/payment

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 27,
    \"payment_method\": \"architecto\",
    \"gateway\": \"architecto\",
    \"notes\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/payment"
);

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

let body = {
    "amount": 27,
    "payment_method": "architecto",
    "gateway": "architecto",
    "notes": "architecto"
};

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

Request      

POST api/v1/admin/invoices/{id}/payment

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

Body Parameters

amount   number     

Must be at least 0. Example: 27

payment_method   string  optional    

Example: architecto

gateway   string  optional    

Example: architecto

notes   string  optional    

Example: architecto

GET api/v1/admin/invoices/{id}/download

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/architecto/download"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/invoices/{id}/download

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

GET api/v1/admin/invoices/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/invoices/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/invoices/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/categories

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/billers

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/billers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/data-variations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/data-variations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/data-variations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/data-variations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/tv-variations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/tv-variations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/tv-variations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/tv-variations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/verify-customer

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/verify-customer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/verify-customer"
);

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


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

Request      

POST api/v1/admin/bills/verify-customer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/airtime

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/airtime" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/airtime"
);

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


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

Request      

POST api/v1/admin/bills/airtime

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/data

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/data"
);

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


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

Request      

POST api/v1/admin/bills/data

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/electricity

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/electricity" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/electricity"
);

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


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

Request      

POST api/v1/admin/bills/electricity

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/tv

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/tv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/tv"
);

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


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

Request      

POST api/v1/admin/bills/tv

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/epins

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/epins" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/epins"
);

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


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

Request      

POST api/v1/admin/bills/epins

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/betting

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/betting" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/betting"
);

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


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

Request      

POST api/v1/admin/bills/betting

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/my-payments

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/my-payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/my-payments"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/my-payments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/categories

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"icon\": \"architecto\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "icon": "architecto",
    "is_active": false
};

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

Request      

POST api/v1/admin/bills/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

icon   string  optional    

Example: architecto

is_active   boolean  optional    

Example: false

PUT api/v1/admin/bills/categories/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"icon\": \"architecto\",
    \"is_active\": true,
    \"sort_order\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories/architecto"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "icon": "architecto",
    "is_active": true,
    "sort_order": 16
};

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

Request      

PUT api/v1/admin/bills/categories/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the category. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

icon   string  optional    

Example: architecto

is_active   boolean  optional    

Example: true

sort_order   integer  optional    

Example: 16

DELETE api/v1/admin/bills/categories/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/categories/architecto"
);

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


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

Request      

DELETE api/v1/admin/bills/categories/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the category. Example: architecto

POST api/v1/admin/bills/billers

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"category_id\": \"architecto\",
    \"name\": \"n\",
    \"service_id\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers"
);

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

let body = {
    "category_id": "architecto",
    "name": "n",
    "service_id": "architecto",
    "description": "Eius et animi quos velit et.",
    "is_active": true
};

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

Request      

POST api/v1/admin/bills/billers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

category_id   string     

The id of an existing record in the biller_categories table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

service_id   string  optional    

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

is_active   boolean  optional    

Example: true

metadata   object  optional    

PUT api/v1/admin/bills/billers/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"service_id\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers/architecto"
);

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

let body = {
    "name": "b",
    "service_id": "architecto",
    "description": "Eius et animi quos velit et.",
    "is_active": false
};

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

Request      

PUT api/v1/admin/bills/billers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the biller. Example: architecto

Body Parameters

category_id   string  optional    

The id of an existing record in the biller_categories table.

name   string  optional    

Must not be greater than 255 characters. Example: b

service_id   string  optional    

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

is_active   boolean  optional    

Example: false

metadata   object  optional    

DELETE api/v1/admin/bills/billers/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/billers/architecto"
);

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


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

Request      

DELETE api/v1/admin/bills/billers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the biller. Example: architecto

GET api/v1/admin/bills/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/bills/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"biller_id\": \"architecto\",
    \"api_url\": \"http:\\/\\/bailey.com\\/\",
    \"api_key\": \"architecto\",
    \"username\": \"architecto\",
    \"password\": \"|]|{+-\",
    \"is_active\": false,
    \"markup_percentage\": 1
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/settings"
);

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

let body = {
    "biller_id": "architecto",
    "api_url": "http:\/\/bailey.com\/",
    "api_key": "architecto",
    "username": "architecto",
    "password": "|]|{+-",
    "is_active": false,
    "markup_percentage": 1
};

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

Request      

PUT api/v1/admin/bills/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

biller_id   string     

Example: architecto

api_url   string  optional    

Must be a valid URL. Example: http://bailey.com/

api_key   string  optional    

Example: architecto

username   string  optional    

Example: architecto

password   string  optional    

Example: |]|{+-

is_active   boolean  optional    

Example: false

markup_percentage   number  optional    

Must be at least 0. Must not be greater than 100. Example: 1

GET api/v1/admin/bills/payments

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/payments"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/payments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/balance

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/balance" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/balance"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/balance

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/bills/banks

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/banks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/banks"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/banks

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/resolve-account

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/resolve-account" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_code\": \"architecto\",
    \"account_number\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/resolve-account"
);

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

let body = {
    "bank_code": "architecto",
    "account_number": "architecto"
};

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

Request      

POST api/v1/admin/bills/resolve-account

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

bank_code   string     

Example: architecto

account_number   string     

Example: architecto

POST api/v1/admin/bills/fund-wallet

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/fund-wallet" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 95
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/fund-wallet"
);

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

let body = {
    "amount": 95
};

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

Request      

POST api/v1/admin/bills/fund-wallet

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

amount   number     

Must be at least 100. Example: 95

POST api/v1/admin/bills/withdraw

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/withdraw" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 95,
    \"bank_code\": \"architecto\",
    \"account_number\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/withdraw"
);

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

let body = {
    "amount": 95,
    "bank_code": "architecto",
    "account_number": "architecto"
};

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

Request      

POST api/v1/admin/bills/withdraw

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

amount   number     

Must be at least 100. Example: 95

bank_code   string     

Example: architecto

account_number   string     

Example: architecto

GET api/v1/admin/bills/transactions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/transactions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/bills/requery

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/requery" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"request_id\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/requery"
);

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

let body = {
    "request_id": "architecto"
};

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

Request      

POST api/v1/admin/bills/requery

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

request_id   string     

Example: architecto

GET api/v1/admin/bills/fund-stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/fund-stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/bills/fund-stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/bills/fund-stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/services/categories

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/services/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/categories"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/services/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/services/configurations

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/services/configurations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/services/configurations/{slug}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/services/configurations/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the configuration. Example: architecto

POST api/v1/admin/services/configurations

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"service_name\": \"b\",
    \"service_slug\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"provider\": \"architecto\",
    \"api_url\": \"http:\\/\\/bailey.com\\/\",
    \"api_key\": \"architecto\",
    \"api_secret\": \"architecto\",
    \"public_key\": \"architecto\",
    \"private_key\": \"architecto\",
    \"environment\": \"production\",
    \"is_active\": false,
    \"is_default\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations"
);

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

let body = {
    "service_name": "b",
    "service_slug": "n",
    "description": "Eius et animi quos velit et.",
    "provider": "architecto",
    "api_url": "http:\/\/bailey.com\/",
    "api_key": "architecto",
    "api_secret": "architecto",
    "public_key": "architecto",
    "private_key": "architecto",
    "environment": "production",
    "is_active": false,
    "is_default": false
};

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

Request      

POST api/v1/admin/services/configurations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

service_name   string     

Must not be greater than 255 characters. Example: b

service_slug   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

provider   string  optional    

Example: architecto

api_url   string  optional    

Must be a valid URL. Example: http://bailey.com/

api_key   string  optional    

Example: architecto

api_secret   string  optional    

Example: architecto

public_key   string  optional    

Example: architecto

private_key   string  optional    

Example: architecto

environment   string  optional    

Example: production

Must be one of:
  • sandbox
  • production
is_active   boolean  optional    

Example: false

is_default   boolean  optional    

Example: false

settings   object  optional    
metadata   object  optional    

PUT api/v1/admin/services/configurations/{slug}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"service_name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"provider\": \"architecto\",
    \"api_url\": \"http:\\/\\/bailey.com\\/\",
    \"api_key\": \"architecto\",
    \"api_secret\": \"architecto\",
    \"public_key\": \"architecto\",
    \"private_key\": \"architecto\",
    \"environment\": \"sandbox\",
    \"is_active\": true,
    \"is_default\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto"
);

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

let body = {
    "service_name": "b",
    "description": "Eius et animi quos velit et.",
    "provider": "architecto",
    "api_url": "http:\/\/bailey.com\/",
    "api_key": "architecto",
    "api_secret": "architecto",
    "public_key": "architecto",
    "private_key": "architecto",
    "environment": "sandbox",
    "is_active": true,
    "is_default": true
};

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

Request      

PUT api/v1/admin/services/configurations/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the configuration. Example: architecto

Body Parameters

service_name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

provider   string  optional    

Example: architecto

api_url   string  optional    

Must be a valid URL. Example: http://bailey.com/

api_key   string  optional    

Example: architecto

api_secret   string  optional    

Example: architecto

public_key   string  optional    

Example: architecto

private_key   string  optional    

Example: architecto

environment   string  optional    

Example: sandbox

Must be one of:
  • sandbox
  • production
is_active   boolean  optional    

Example: true

is_default   boolean  optional    

Example: true

settings   object  optional    
metadata   object  optional    

DELETE api/v1/admin/services/configurations/{slug}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto"
);

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


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

Request      

DELETE api/v1/admin/services/configurations/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the configuration. Example: architecto

POST api/v1/admin/services/configurations/{slug}/test

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto/test" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/configurations/architecto/test"
);

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


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

Request      

POST api/v1/admin/services/configurations/{slug}/test

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the configuration. Example: architecto

GET api/v1/admin/services/providers

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/services/providers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/services/providers

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"category_id\": \"architecto\",
    \"name\": \"n\",
    \"slug\": \"g\",
    \"service_id\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"website\": \"http:\\/\\/www.ernser.org\\/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html\",
    \"support_email\": \"antonio24@example.net\",
    \"support_phone\": \"architecto\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers"
);

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

let body = {
    "category_id": "architecto",
    "name": "n",
    "slug": "g",
    "service_id": "architecto",
    "description": "Eius et animi quos velit et.",
    "website": "http:\/\/www.ernser.org\/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html",
    "support_email": "antonio24@example.net",
    "support_phone": "architecto",
    "is_active": false
};

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

Request      

POST api/v1/admin/services/providers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

category_id   string     

The id of an existing record in the service_categories table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

slug   string     

Must not be greater than 255 characters. Example: g

service_id   string  optional    

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

website   string  optional    

Must be a valid URL. Example: http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

support_email   string  optional    

Must be a valid email address. Example: antonio24@example.net

support_phone   string  optional    

Example: architecto

is_active   boolean  optional    

Example: false

metadata   object  optional    

PUT api/v1/admin/services/providers/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers/architecto"
);

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


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

Request      

PUT api/v1/admin/services/providers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

DELETE api/v1/admin/services/providers/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/services/providers/architecto"
);

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


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

Request      

DELETE api/v1/admin/services/providers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the provider. Example: architecto

GET api/v1/admin/fraud/rules

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/fraud/rules

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"rule_type\": \"frequency\",
    \"conditions\": [],
    \"risk_score\": 1,
    \"action\": \"block\",
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules"
);

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

let body = {
    "name": "b",
    "slug": "n",
    "description": "Eius et animi quos velit et.",
    "rule_type": "frequency",
    "conditions": [],
    "risk_score": 1,
    "action": "block",
    "is_active": true
};

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

Request      

POST api/v1/admin/fraud/rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

rule_type   string     

Example: frequency

Must be one of:
  • amount
  • frequency
  • pattern
  • location
  • device
conditions   object     
risk_score   integer     

Must be at least 1. Must not be greater than 100. Example: 1

action   string     

Example: block

Must be one of:
  • block
  • review
  • warn
is_active   boolean  optional    

Example: true

PUT api/v1/admin/fraud/rules/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto"
);

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


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

Request      

PUT api/v1/admin/fraud/rules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

DELETE api/v1/admin/fraud/rules/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto"
);

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


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

Request      

DELETE api/v1/admin/fraud/rules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

POST api/v1/admin/fraud/rules/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/rules/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/fraud/rules/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

GET api/v1/admin/fraud/alerts

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/alerts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/fraud/alerts/{id}

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts/architecto"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/alerts/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the alert. Example: architecto

POST api/v1/admin/fraud/alerts/{id}/review

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts/architecto/review" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"reviewed\",
    \"review_notes\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/alerts/architecto/review"
);

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

let body = {
    "status": "reviewed",
    "review_notes": "architecto"
};

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

Request      

POST api/v1/admin/fraud/alerts/{id}/review

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the alert. Example: architecto

Body Parameters

status   string     

Example: reviewed

Must be one of:
  • reviewed
  • resolved
  • false_positive
review_notes   string  optional    

Example: architecto

GET api/v1/admin/fraud/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/fraud/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"architecto\",
    \"value\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/settings"
);

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

let body = {
    "key": "architecto",
    "value": "architecto"
};

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

Request      

PUT api/v1/admin/fraud/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

The key of an existing record in the fraud_settings table. Example: architecto

value   string     

Example: architecto

GET api/v1/admin/fraud/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/fraud/analyze

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/analyze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 4326.41688,
    \"user_id\": 16,
    \"transaction_type\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/analyze"
);

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

let body = {
    "amount": 4326.41688,
    "user_id": 16,
    "transaction_type": "architecto"
};

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

Request      

POST api/v1/admin/fraud/analyze

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

amount   number     

Example: 4326.41688

user_id   integer  optional    

Example: 16

transaction_type   string  optional    

Example: architecto

GET api/v1/admin/fraud/user/{userId}/profile

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/user/architecto/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/fraud/user/architecto/profile"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/fraud/user/{userId}/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: architecto

GET api/v1/admin/ai-ml/models

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/models

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/ai-ml/models

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"provider\": \"n\",
    \"model_id\": \"g\",
    \"description\": \"Eius et animi quos velit et.\",
    \"model_type\": \"speech\",
    \"price_per_1k_input\": 4326.41688,
    \"price_per_1k_output\": 4326.41688,
    \"max_tokens\": 16,
    \"is_active\": true
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models"
);

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

let body = {
    "name": "b",
    "provider": "n",
    "model_id": "g",
    "description": "Eius et animi quos velit et.",
    "model_type": "speech",
    "price_per_1k_input": 4326.41688,
    "price_per_1k_output": 4326.41688,
    "max_tokens": 16,
    "is_active": true
};

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

Request      

POST api/v1/admin/ai-ml/models

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

provider   string     

Must not be greater than 255 characters. Example: n

model_id   string     

Must not be greater than 255 characters. Example: g

description   string  optional    

Example: Eius et animi quos velit et.

model_type   string     

Example: speech

Must be one of:
  • chat
  • completion
  • embedding
  • image
  • speech
capabilities   object  optional    
price_per_1k_input   number  optional    

Example: 4326.41688

price_per_1k_output   number  optional    

Example: 4326.41688

max_tokens   integer  optional    

Example: 16

is_active   boolean  optional    

Example: true

PUT api/v1/admin/ai-ml/models/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto"
);

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


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

Request      

PUT api/v1/admin/ai-ml/models/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

DELETE api/v1/admin/ai-ml/models/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto"
);

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


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

Request      

DELETE api/v1/admin/ai-ml/models/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

POST api/v1/admin/ai-ml/models/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/models/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/ai-ml/models/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

GET api/v1/admin/ai-ml/prompts

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/prompts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/ai-ml/prompts

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"prompt_template\": \"architecto\",
    \"category\": \"generation\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts"
);

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

let body = {
    "name": "b",
    "slug": "n",
    "prompt_template": "architecto",
    "category": "generation"
};

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

Request      

POST api/v1/admin/ai-ml/prompts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must not be greater than 255 characters. Example: n

prompt_template   string     

Example: architecto

category   string     

Example: generation

Must be one of:
  • recommendation
  • classification
  • generation
  • analysis
variables   object  optional    

PUT api/v1/admin/ai-ml/prompts/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts/architecto"
);

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


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

Request      

PUT api/v1/admin/ai-ml/prompts/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the prompt. Example: architecto

DELETE api/v1/admin/ai-ml/prompts/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/prompts/architecto"
);

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


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

Request      

DELETE api/v1/admin/ai-ml/prompts/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the prompt. Example: architecto

GET api/v1/admin/ai-ml/indicators

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/indicators

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/ai-ml/indicators

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"indicator_type\": \"unemployment\",
    \"country_code\": \"gzm\",
    \"current_value\": 4326.41688,
    \"previous_value\": 4326.41688,
    \"period\": \"monthly\",
    \"data_date\": \"2026-05-03T20:45:41\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators"
);

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

let body = {
    "name": "b",
    "slug": "n",
    "indicator_type": "unemployment",
    "country_code": "gzm",
    "current_value": 4326.41688,
    "previous_value": 4326.41688,
    "period": "monthly",
    "data_date": "2026-05-03T20:45:41"
};

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

Request      

POST api/v1/admin/ai-ml/indicators

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must not be greater than 255 characters. Example: n

indicator_type   string     

Example: unemployment

Must be one of:
  • inflation
  • gdp
  • exchange_rate
  • interest_rate
  • unemployment
country_code   string  optional    

Must be 3 characters. Example: gzm

current_value   number     

Example: 4326.41688

previous_value   number  optional    

Example: 4326.41688

period   string     

Example: monthly

Must be one of:
  • daily
  • monthly
  • quarterly
  • yearly
data_date   string  optional    

Must be a valid date. Example: 2026-05-03T20:45:41

PUT api/v1/admin/ai-ml/indicators/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators/architecto"
);

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


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

Request      

PUT api/v1/admin/ai-ml/indicators/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the indicator. Example: architecto

DELETE api/v1/admin/ai-ml/indicators/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/indicators/architecto"
);

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


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

Request      

DELETE api/v1/admin/ai-ml/indicators/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the indicator. Example: architecto

GET api/v1/admin/ai-ml/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/ai-ml/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"architecto\",
    \"value\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/settings"
);

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

let body = {
    "key": "architecto",
    "value": "architecto"
};

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

Request      

PUT api/v1/admin/ai-ml/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

The key of an existing record in the economic_settings table. Example: architecto

value   string     

Example: architecto

GET api/v1/admin/ai-ml/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/ai-ml/analyze

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/analyze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/analyze"
);

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


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

Request      

POST api/v1/admin/ai-ml/analyze

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/ai-ml/insights

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/insights" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/ai-ml/insights"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/ai-ml/insights

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/recommendations/models

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/recommendations/models

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/recommendations/models

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"model_type\": \"content\",
    \"algorithm\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"is_active\": true,
    \"priority\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models"
);

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

let body = {
    "name": "b",
    "model_type": "content",
    "algorithm": "n",
    "description": "Eius et animi quos velit et.",
    "is_active": true,
    "priority": 16
};

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

Request      

POST api/v1/admin/recommendations/models

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

model_type   string     

Example: content

Must be one of:
  • collaborative
  • content
  • hybrid
  • popular
algorithm   string  optional    

Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

config   object  optional    
is_active   boolean  optional    

Example: true

priority   integer  optional    

Example: 16

PUT api/v1/admin/recommendations/models/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto"
);

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


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

Request      

PUT api/v1/admin/recommendations/models/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

DELETE api/v1/admin/recommendations/models/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto"
);

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


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

Request      

DELETE api/v1/admin/recommendations/models/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

POST api/v1/admin/recommendations/models/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/models/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/recommendations/models/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the model. Example: architecto

GET api/v1/admin/recommendations/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/recommendations/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/recommendations/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/settings"
);

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


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

Request      

PUT api/v1/admin/recommendations/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/recommendations/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/recommendations/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/recommendations/feedback

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/feedback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/feedback"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/recommendations/feedback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/recommendations/feedback

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/feedback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"item_id\": 16,
    \"item_type\": \"product\",
    \"feedback_type\": \"like\",
    \"rating\": 2,
    \"comment\": \"architecto\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/feedback"
);

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

let body = {
    "item_id": 16,
    "item_type": "product",
    "feedback_type": "like",
    "rating": 2,
    "comment": "architecto"
};

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

Request      

POST api/v1/admin/recommendations/feedback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

item_id   integer     

Example: 16

item_type   string     

Example: product

Must be one of:
  • service
  • product
  • provider
feedback_type   string     

Example: like

Must be one of:
  • like
  • dislike
  • view
  • click
  • purchase
rating   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 2

comment   string  optional    

Example: architecto

POST api/v1/admin/recommendations/cache/clear

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/cache/clear" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/cache/clear"
);

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


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

Request      

POST api/v1/admin/recommendations/cache/clear

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/recommendations/cache/regenerate

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/cache/regenerate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/recommendations/cache/regenerate"
);

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


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

Request      

POST api/v1/admin/recommendations/cache/regenerate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/escrow/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/escrow/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/optimization/escrow/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/settings"
);

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


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

Request      

PUT api/v1/admin/optimization/escrow/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/escrow/transactions

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/transactions"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/escrow/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/escrow/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/escrow/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/escrow/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/pricing/rules

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/pricing/rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/optimization/pricing/rules

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"rule_type\": \"surge\",
    \"multiplier\": 2,
    \"service_type_id\": 16,
    \"is_active\": false,
    \"priority\": 16
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules"
);

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

let body = {
    "name": "b",
    "rule_type": "surge",
    "multiplier": 2,
    "service_type_id": 16,
    "is_active": false,
    "priority": 16
};

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

Request      

POST api/v1/admin/optimization/pricing/rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

rule_type   string     

Example: surge

Must be one of:
  • base
  • surge
  • time
  • demand
  • location
multiplier   number     

Must be at least 0.1. Must not be greater than 10. Example: 2

service_type_id   integer  optional    

Example: 16

is_active   boolean  optional    

Example: false

priority   integer  optional    

Example: 16

PUT api/v1/admin/optimization/pricing/rules/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto"
);

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


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

Request      

PUT api/v1/admin/optimization/pricing/rules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

DELETE api/v1/admin/optimization/pricing/rules/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto"
);

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


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

Request      

DELETE api/v1/admin/optimization/pricing/rules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

POST api/v1/admin/optimization/pricing/rules/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/rules/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/optimization/pricing/rules/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the rule. Example: architecto

GET api/v1/admin/optimization/pricing/history

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/history"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/pricing/history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/pricing/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/pricing/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/pricing/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/matching/settings

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/settings"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/matching/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/optimization/matching/settings

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/settings"
);

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


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

Request      

PUT api/v1/admin/optimization/matching/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/matching/weights

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/weights" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/weights"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/matching/weights

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/optimization/matching/weights

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/weights" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/weights"
);

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


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

Request      

PUT api/v1/admin/optimization/matching/weights

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/matching/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/matching/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/optimization/matching/scores

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/scores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/optimization/matching/scores"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/optimization/matching/scores

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/social/platforms

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/social/platforms

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/social/platforms/{platform}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms/architecto"
);

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


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

Request      

PUT api/v1/admin/social/platforms/{platform}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

platform   string     

The platform. Example: architecto

POST api/v1/admin/social/platforms/{platform}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/platforms/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/social/platforms/{platform}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

platform   string     

The platform. Example: architecto

GET api/v1/admin/social/campaigns

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/social/campaigns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/social/campaigns

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"shareable_type\": \"architecto\",
    \"title\": \"n\",
    \"message\": \"architecto\",
    \"is_active\": false
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns"
);

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

let body = {
    "name": "b",
    "shareable_type": "architecto",
    "title": "n",
    "message": "architecto",
    "is_active": false
};

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

Request      

POST api/v1/admin/social/campaigns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

shareable_type   string     

Example: architecto

title   string  optional    

Must not be greater than 255 characters. Example: n

message   string  optional    

Example: architecto

is_active   boolean  optional    

Example: false

PUT api/v1/admin/social/campaigns/{id}

Example request:
curl --request PUT \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto"
);

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


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

Request      

PUT api/v1/admin/social/campaigns/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the campaign. Example: architecto

DELETE api/v1/admin/social/campaigns/{id}

Example request:
curl --request DELETE \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto"
);

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


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

Request      

DELETE api/v1/admin/social/campaigns/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the campaign. Example: architecto

POST api/v1/admin/social/campaigns/{id}/toggle

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto/toggle" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/campaigns/architecto/toggle"
);

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


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

Request      

POST api/v1/admin/social/campaigns/{id}/toggle

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the campaign. Example: architecto

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/links" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/links"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Example request:
curl --request POST \
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/links" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"campaign_id\": 16,
    \"platform\": \"architecto\",
    \"original_url\": \"http:\\/\\/bailey.com\\/\"
}"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/links"
);

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

let body = {
    "campaign_id": 16,
    "platform": "architecto",
    "original_url": "http:\/\/bailey.com\/"
};

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

GET api/v1/admin/social/history

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/history"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/social/history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/social/analytics

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/analytics" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/analytics"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/social/analytics

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/social/stats

Example request:
curl --request GET \
    --get "http://api.staging.servicemart.ng:8000/api/v1/admin/social/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.staging.servicemart.ng:8000/api/v1/admin/social/stats"
);

const headers = {
    "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
vary: Origin
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/admin/social/stats

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json