API Documentation
Introduction
Welcome to the YourAPI documentation. This API provides programmatic access to our platform's core functionality.
Base URL: https://whatsapp.chovtech.com
All API responses are returned in JSON format with UTF-8 encoding.
Vendors Endpoints
POST /vendors/register
Register a new vendor account.
Request
POST https://whatsapp.chovtech.com/api/vendors/register
{ "name": "John Doe", "company_name": "Doe Enterprises", "email": "john@example111.com", "phone_number": "+2348012345678", "password": "securepassword123" }
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Vendor's full name |
company_name | string | Yes | Vendor's company name |
string | Yes | Valid email address | |
phone_number | string | Yes | Phone number with country code |
password | string | Yes | Minimum 8 characters |
Response
HTTP 201 Created { "status": "success", "data": { "id": 1, "name": "John Doe", "company_name": "Doe Enterprises", "email": "john@example111.com", "phone_number": "+2348012345678", "created_at": "2023-07-15T14:30:00Z" } }
fetch('https://whatsapp.chovtech.com/api/vendors/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'John Doe', company_name: 'Doe Enterprises', email: 'john@example111.com', phone_number: '+2348012345678', password: 'securepassword123' }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$data = [ 'name' => 'John Doe', 'company_name' => 'Doe Enterprises', 'email' => 'john@example111.com', 'phone_number' => '+2348012345678', 'password' => 'securepassword123' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/vendors/register'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/vendors/register" headers = { "Content-Type": "application/json" } data = { "name": "John Doe", "company_name": "Doe Enterprises", "email": "john@example111.com", "phone_number": "+2348012345678", "password": "securepassword123" } response = requests.post(url, headers=headers, json=data) print(response.json())
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "name": "John Doe", "company_name": "Doe Enterprises", "email": "john@example111.com", "phone_number": "+2348012345678", "password": "securepassword123" }' \ "https://whatsapp.chovtech.com/api/vendors/register"
PUT /vendors/update
Update a vendor's details. Requires authentication.
Request
PUT https://whatsapp.chovtech.com/api/vendors/update
{ "id": 1, "name": "Chike Okoli", "company_name": "Chov", "phone_number": "+2348011122233" }
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Vendor ID |
name | string | No | Updated name |
company_name | string | No | Updated company name |
phone_number | string | No | Updated phone number |
Response
HTTP 200 OK { "status": "success", "data": { "id": 1, "name": "Chike Okoli", "company_name": "Chov", "email": "john@example111.com", "phone_number": "+2348011122233", "updated_at": "2023-07-16T10:15:00Z" } }
fetch('https://whatsapp.chovtech.com/api/vendors/update', { method: 'PUT', headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' }, body: JSON.stringify({ id: 1, name: 'Chike Okoli', company_name: 'Chov', phone_number: '+2348011122233' }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$data = [ 'id' => 1, 'name' => 'Chike Okoli', 'company_name' => 'Chov', 'phone_number' => '+2348011122233' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/vendors/update'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/vendors/update" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } data = { "id": 1, "name": "Chike Okoli", "company_name": "Chov", "phone_number": "+2348011122233" } response = requests.put(url, headers=headers, json=data) print(response.json())
curl -X PUT \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ -d '{ "id": 1, "name": "Chike Okoli", "company_name": "Chov", "phone_number": "+2348011122233" }' \ "https://whatsapp.chovtech.com/api/vendors/update"
POST /vendors/login
Authenticate a vendor and receive an access token.
Request
POST https://whatsapp.chovtech.com/api/vendors/login
{ "email": "john@example.com", "password": "securepassword123" }
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
string | Yes | Registered email address | |
password | string | Yes | Account password |
Response
HTTP 200 OK { "status": "success", "data": { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "vendor": { "id": 1, "name": "John Doe", "company_name": "Doe Enterprises", "email": "john@example.com" } } }
fetch('https://whatsapp.chovtech.com/api/vendors/login', { method: 'POST', headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'john@example.com', password: 'securepassword123' }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$data = [ 'email' => 'john@example.com', 'password' => 'securepassword123' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/vendors/login'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/vendors/login" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } data = { "email": "john@example.com", "password": "securepassword123" } response = requests.post(url, headers=headers, json=data) print(response.json())
curl -X POST \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ -d '{ "email": "john@example.com", "password": "securepassword123" }' \ "https://whatsapp.chovtech.com/api/vendors/login"
Users Endpoints
POST /users/register
Register a new user account.
Request
POST https://whatsapp.chovtech.com/api/users/register
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
Request Body
{ "name": "Chike", "company_name": "Triominds", "email": "chikeokoliofficial@gmail.com" }
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | User's full name |
company_name | string | Yes | User's company name |
string | Yes | Valid email address |
Response
HTTP 201 Created { "status": "success", "data": { "id": 1, "name": "Chike", "company_name": "Triominds", "email": "chikeokoliofficial@gmail.com", "created_at": "2023-07-20T10:30:00Z" } }
fetch('https://whatsapp.chovtech.com/api/users/register', { method: 'POST', headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Chike', company_name: 'Triominds', email: 'chikeokoliofficial@gmail.com' }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$data = [ 'name' => 'Chike', 'company_name' => 'Triominds', 'email' => 'chikeokoliofficial@gmail.com' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/users/register'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/users/register" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } data = { "name": "Chike", "company_name": "Triominds", "email": "chikeokoliofficial@gmail.com" } response = requests.post(url, headers=headers, json=data) print(response.json())
curl -X POST \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ -d '{ "name": "Chike", "company_name": "Triominds", "email": "chikeokoliofficial@gmail.com" }' \ "https://whatsapp.chovtech.com/api/users/register"
GET /users/list
Retrieve a list of all users.
Request
GET https://whatsapp.chovtech.com/api/users/list
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
Response
HTTP 200 OK { "status": "success", "data": [ { "id": 1, "name": "Chike", "company_name": "Triominds", "email": "chikeokoliofficial@gmail.com", "created_at": "2023-07-20T10:30:00Z" }, { "id": 2, "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com", "created_at": "2023-07-21T11:45:00Z" } ] }
fetch('https://whatsapp.chovtech.com/api/users/list', { headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/users/list'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); print_r($data);
import requests url = "https://whatsapp.chovtech.com/api/users/list" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } response = requests.get(url, headers=headers) data = response.json() print(data)
curl -X GET \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ "https://whatsapp.chovtech.com/api/users/list"
GET /users/{id}
Retrieve details for a specific user.
Request
GET https://whatsapp.chovtech.com/api/users/2
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | User ID to retrieve |
Response
HTTP 200 OK { "status": "success", "data": { "id": 2, "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com", "created_at": "2023-07-21T11:45:00Z", "updated_at": "2023-07-22T09:15:00Z" } }
fetch('https://whatsapp.chovtech.com/api/users/2', { headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/users/2'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); print_r($data);
import requests url = "https://whatsapp.chovtech.com/api/users/2" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } response = requests.get(url, headers=headers) data = response.json() print(data)
curl -X GET \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ "https://whatsapp.chovtech.com/api/users/2"
PATCH /users/{id}
Update a user's details.
Request
PATCH https://whatsapp.chovtech.com/api/users/2
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
Content-Type | application/json | Yes |
Request Body
{ "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com" }
URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | User ID to update |
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | No | Updated name |
company_name | string | No | Updated company name |
string | No | Updated email address |
Response
HTTP 200 OK { "status": "success", "data": { "id": 2, "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com", "updated_at": "2023-07-22T14:30:00Z" } }
fetch('https://whatsapp.chovtech.com/api/users/2', { method: 'PATCH', headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Matt Johnson', company_name: 'Hybrid Tech Ltd', email: 'matt2@matt.com' }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$data = [ 'name' => 'Matt Johnson', 'company_name' => 'Hybrid Tech Ltd', 'email' => 'matt2@matt.com' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/users/2'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a', 'Content-Type: application/json' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/users/2" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a", "Content-Type": "application/json" } data = { "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com" } response = requests.patch(url, headers=headers, json=data) print(response.json())
curl -X PATCH \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ -H "Content-Type: application/json" \ -d '{ "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com" }' \ "https://whatsapp.chovtech.com/api/users/2"
DELETE /users/{id}
Delete a user record.
Request
DELETE https://whatsapp.chovtech.com/api/users/2
Request Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API Key | Yes |
URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | User ID to delete |
Response
HTTP 200 OK { "status": "success", "message": "User deleted successfully", "data": { "id": 2, "name": "Matt Johnson", "company_name": "Hybrid Tech Ltd", "email": "matt2@matt.com" } }
fetch('https://whatsapp.chovtech.com/api/users/2', { method: 'DELETE', headers: { 'x-api-key': '05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://whatsapp.chovtech.com/api/users/2'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a' ]); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests url = "https://whatsapp.chovtech.com/api/users/2" headers = { "x-api-key": "05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" } response = requests.delete(url, headers=headers) print(response.json())
curl -X DELETE \ -H "x-api-key: 05d46c4a0b7fe98c105482c7615d79b74d9a301f58bd454ac03e7ad58a17337a" \ "https://whatsapp.chovtech.com/api/users/2"