Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
| Environment | Base URL |
|---|---|
| Development | https://api-dev.abyan.ph |
| Staging | https://api-staging.abyan.ph |
| UAT | https://api-uat.abyan.ph |
| Sandbox | https://api-sandbox.abyan.ph |
| Production | https://api-prod.abyan.ph |
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_ACCESS_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your Authentication dashboard.
Address
Get Regions
Use this endpoint to get regions
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/address/regions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/address/regions';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
[
{
"id": 1,
"psgcCode": "010000000",
"regDesc": "REGION I (ILOCOS REGION)",
"regCode": "01"
},
{
"id": 2,
"psgcCode": "020000000",
"regDesc": "REGION II (CAGAYAN VALLEY)",
"regCode": "02"
},
{
"id": 3,
"psgcCode": "030000000",
"regDesc": "REGION III (CENTRAL LUZON)",
"regCode": "03"
},
{
"id": 4,
"psgcCode": "040000000",
"regDesc": "REGION IV-A (CALABARZON)",
"regCode": "04"
},
{
"id": 5,
"psgcCode": "170000000",
"regDesc": "REGION IV-B (MIMAROPA)",
"regCode": "17"
},
{
"id": 6,
"psgcCode": "050000000",
"regDesc": "REGION V (BICOL REGION)",
"regCode": "05"
},
{
"id": 7,
"psgcCode": "060000000",
"regDesc": "REGION VI (WESTERN VISAYAS)",
"regCode": "06"
},
{
"id": 8,
"psgcCode": "070000000",
"regDesc": "REGION VII (CENTRAL VISAYAS)",
"regCode": "07"
},
{
"id": 9,
"psgcCode": "080000000",
"regDesc": "REGION VIII (EASTERN VISAYAS)",
"regCode": "08"
},
{
"id": 10,
"psgcCode": "090000000",
"regDesc": "REGION IX (ZAMBOANGA PENINSULA)",
"regCode": "09"
},
{
"id": 11,
"psgcCode": "100000000",
"regDesc": "REGION X (NORTHERN MINDANAO)",
"regCode": "10"
},
{
"id": 12,
"psgcCode": "110000000",
"regDesc": "REGION XI (DAVAO REGION)",
"regCode": "11"
},
{
"id": 13,
"psgcCode": "120000000",
"regDesc": "REGION XII (SOCCSKSARGEN)",
"regCode": "12"
},
{
"id": 14,
"psgcCode": "130000000",
"regDesc": "NATIONAL CAPITAL REGION (NCR)",
"regCode": "13"
},
{
"id": 15,
"psgcCode": "140000000",
"regDesc": "CORDILLERA ADMINISTRATIVE REGION (CAR)",
"regCode": "14"
},
{
"id": 16,
"psgcCode": "150000000",
"regDesc": "AUTONOMOUS REGION IN MUSLIM MINDANAO (ARMM)",
"regCode": "15"
},
{
"id": 17,
"psgcCode": "160000000",
"regDesc": "REGION XIII (Caraga)",
"regCode": "16"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Provinces
Use this endpoint to get provinces
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/address/provinces/nobis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/address/provinces/nobis';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
[]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Cities
Use this endpoint to get cities
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/address/cities/sapiente"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/address/cities/sapiente';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
[]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Barangays
Use this endpoint to get barangays
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/address/barangays/officia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/address/barangays/officia';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
[]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Administrator
Users
Admin details
requires authentication
Use this endpoint to get admin details
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/details"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Users
requires authentication
Use this endpoint to get list of users
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/users"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/users';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create User
Use this endpoint to create new user.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "eveniet",
"email": "gorczany.alexane@example.net",
"password": "m!C,e4dE`\\K*"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/users';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'eveniet',
'email' => 'gorczany.alexane@example.net',
'password' => 'm!C,e4dE`\\K*',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show admin details
requires authentication
Use this endpoint to get admin details
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/users/facilis"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/users/facilis';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update User
requires authentication
Use this endpoint to update user information
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/users/corporis"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "velit",
"email": "kirstin.ruecker@example.com",
"password": "*Sx_C%f,Q|-",
"status": "active"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/users/corporis';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'velit',
'email' => 'kirstin.ruecker@example.com',
'password' => '*Sx_C%f,Q|-',
'status' => 'active',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Roles
Create Role
requires authentication
Super Administrator only!
Use this endpoint to create a role
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"role": "oyoznhcore"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'role' => 'oyoznhcore',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Role
requires authentication
Super Administrator only!
Use this endpoint to remove a role
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"role": "sempnljv"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'role' => 'sempnljv',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Permissions
requires authentication
Super Administrator only!
Use this endpoint to get all permissions
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/permissions';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign a Permissions to a Role
requires authentication
Super Administrator only!
Grant the given permission(s) to a role.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
{
"name": "illum"
}
],
"role": "laboriosam"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/permissions';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'permissions' => [
[
'name' => 'illum',
],
],
'role' => 'laboriosam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Permissions from a Role
requires authentication
Super Administrator only!
Revoke the given permission(s).
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
{
"name": "vel"
}
],
"role": "placeat"
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/permissions';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'permissions' => [
[
'name' => 'vel',
],
],
'role' => 'placeat',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sync Permissions to a Role
requires authentication
Super Administrator only!
Remove all current permissions and set the given ones.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/permissions/sync"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"permissions": [
{
"name": "aspernatur"
}
],
"role": "amet"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/permissions/sync';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'permissions' => [
[
'name' => 'aspernatur',
],
],
'role' => 'amet',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Roles
requires authentication
Super Administrator only!
Use this endpoint to get all roles
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Roles with Permission
requires authentication
Super Administrator only!
Use this endpoint to get all roles and permissions
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/roles-permissions"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/roles-permissions';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign a Role to a User
requires authentication
Super Administrator only!
Use this endpoint to assigns roles to users
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/role/user"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "lbogan@example.com",
"role": "in"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/role/user';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'lbogan@example.com',
'role' => 'in',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Riders
requires authentication
Use this endpoint to get list of riders
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/riders"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/riders';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Riders Status
requires authentication
Use this endpoint to update riders status
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/update-riders-status"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"riders": [
{
"riderUsername": "et"
}
],
"status": "sick"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/update-riders-status';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'riders' => [
[
'riderUsername' => 'et',
],
],
'status' => 'sick',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deliveries
requires authentication
Use this endpoint to get list of deliveries
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/deliveries"
);
const params = {
"filter[targetPickup]": "2024-09-23",
"filter[referenceId]": "DLS1724406945",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/deliveries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[targetPickup]' => '2024-09-23',
'filter[referenceId]' => 'DLS1724406945',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Delivery Status Codes
requires authentication
Use this endpoint to get the list of delivery status codes
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/delivery/statuses"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/delivery/statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Deliveries Status
requires authentication
Use this endpoint to update deliveries status
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/update-deliveries-status"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"deliveries": [
{
"transactionReferenceNumber": "rd"
}
],
"deliveryStatus": "09 received"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/update-deliveries-status';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'deliveries' => [
[
'transactionReferenceNumber' => 'rd',
],
],
'deliveryStatus' => '09 received',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Execute the Batch and Sequence Deliveries Job
requires authentication
Use this endpoint to batch and sequence the deliveries.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/sequence-deliveries"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2025-07-10"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/sequence-deliveries';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'date' => '2025-07-10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unassign Deliveries
requires authentication
Use this endpoint to get list of unassign deliveries
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/unassign-deliveries"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/unassign-deliveries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assigned Deliveries
requires authentication
Use this endpoint to get list of assigned deliveries
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/assigned-deliveries"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/assigned-deliveries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assigns Deliveries to a Rider
requires authentication
Use this endpoint to assigns deliveries to a rider
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/assigns-riders"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fromRiderUsername": "qui",
"deliveryIds": "culpa",
"toRiderUsername": "sapiente"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/assigns-riders';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'fromRiderUsername' => 'qui',
'deliveryIds' => 'culpa',
'toRiderUsername' => 'sapiente',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deliveries Count
requires authentication
Use this endpoint to get the deliveries count.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/deliveries/count"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/deliveries/count';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Riders Count
requires authentication
Use this endpoint to get the riders count.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/riders/count"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/riders/count';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revenue Count
requires authentication
Use this endpoint to get the revenue count.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/revenue/count"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/revenue/count';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment Count
requires authentication
Use this endpoint to get the payment count.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/payment/count"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/payment/count';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SMS Statuses
Display a listing of the status SMS.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/status-sms"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/status-sms';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created status SMS.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/status-sms"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"statusValue": "beatae",
"statusText": "voluptatibus",
"status": "inactive"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/status-sms';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'statusValue' => 'beatae',
'statusText' => 'voluptatibus',
'status' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified status SMS.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/status-sms/voluptates"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/status-sms/voluptates';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified status SMS.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/status-sms/aut"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"statusValue": "architecto",
"statusText": "odit",
"status": "inactive"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/status-sms/aut';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'statusValue' => 'architecto',
'statusText' => 'odit',
'status' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified status SMS.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/status-sms/voluptatem"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/status-sms/voluptatem';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment
Dayon Settlement
requires authentication
Use this endpoint to upload a file for the dayon settlement
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/reconciliation/settlement/upload_dayon_file"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"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());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/reconciliation/settlement/upload_dayon_file';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/phpLooMLO', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Manual Reconciliation
requires authentication
Use this endpoint to manual reconciliation
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/reconciliation/manual-reconciliation"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/reconciliation/manual-reconciliation';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reconciliation Report
requires authentication
Use this endpoint to get the reconciliation report
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/reconciliation/report"
);
const params = {
"filter[referenceId]": "172551802425",
"filter[pickupBetween]": "2024-09-28,2024-10-17",
"filter[reconcileStatus]": "Reconciled",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/reconciliation/report';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[referenceId]' => '172551802425',
'filter[pickupBetween]' => '2024-09-28,2024-10-17',
'filter[reconcileStatus]' => 'Reconciled',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Reconciliation Report
requires authentication
Use this endpoint to export the reconciliation report
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/reconciliation/export-report"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/reconciliation/export-report';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authentication
Register Rider
Use this endpoint to register rider.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/register-rider"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('username', 'sit');
body.append('password', 'pC[Wal[');
body.append('nameFirst', 'nobis');
body.append('nameLast', 'voluptatibus');
body.append('phoneMobile', 'rerum');
body.append('phoneOther', 'sit');
body.append('vehicleId', 'quos');
body.append('riderImage', document.querySelector('input[name="riderImage"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/register-rider';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'username',
'contents' => 'sit'
],
[
'name' => 'password',
'contents' => 'pC[Wal['
],
[
'name' => 'nameFirst',
'contents' => 'nobis'
],
[
'name' => 'nameLast',
'contents' => 'voluptatibus'
],
[
'name' => 'phoneMobile',
'contents' => 'rerum'
],
[
'name' => 'phoneOther',
'contents' => 'sit'
],
[
'name' => 'vehicleId',
'contents' => 'quos'
],
[
'name' => 'riderImage',
'contents' => fopen('/private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/php0rhDU5', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Login Rider
Use this endpoint to login rider.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/login-rider"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "sint",
"password": "dxh?thr~\\YMh"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/login-rider';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'username' => 'sint',
'password' => 'dxh?thr~\\YMh',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rider Logout
requires authentication
Use this endpoint to logout rider.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/logout-rider"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/logout-rider';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Login
Use this endpoint to login admin.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/login-admin"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "euna.cruickshank@example.org",
"password": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/login-admin';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'euna.cruickshank@example.org',
'password' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dispatcher Login
Use this endpoint to login dispatcher.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/login-dispatcher"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "judy36@example.net",
"password": "aut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/login-dispatcher';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'judy36@example.net',
'password' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout
requires authentication
Use this endpoint to logout.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate access token
Use this endpoint to generate access token using your client id and client secret
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/oauth2/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"grant_type": "client_credentials",
"client_id": "6j3mj13bmntioepd0o622ed2g4",
"client_secret": "c915on174ls8dq9el5ljuqi696fckntqgqn0k4t1p753ursfrac",
"scope": "delivery"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/oauth2/token';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'grant_type' => 'client_credentials',
'client_id' => '6j3mj13bmntioepd0o622ed2g4',
'client_secret' => 'c915on174ls8dq9el5ljuqi696fckntqgqn0k4t1p753ursfrac',
'scope' => 'delivery',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"message": "Request was successful.",
"details": {
"access_token": "eyJraWQiOiJJNnYxOTZKVUFncVl...",
"expires_in": 3600,
"token_type": "Bearer"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Checkout
Xendit Checkout delivery order. Use this endpoint to checkout delivery order with xendit payment gateway.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/order-via-xendit"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('requestReferenceNumber', 'illum');
body.append('shippingDetail[nameLast]', 'vitae');
body.append('shippingDetail[nameFirst]', 'dicta');
body.append('shippingDetail[nameMiddle]', 'culpa');
body.append('shippingDetail[nameSuffix]', 'et');
body.append('shippingDetail[phoneMobile]', 'est');
body.append('shippingDetail[phoneOther]', 'et');
body.append('shippingDetail[emailAddress]', 'shana.shanahan@example.com');
body.append('shippingDetail[region]', 'est');
body.append('shippingDetail[province]', 'repellat');
body.append('shippingDetail[municity]', 'adipisci');
body.append('shippingDetail[barangay]', 'soluta');
body.append('shippingDetail[address1]', 'delectus');
body.append('shippingDetail[address2]', 'cumque');
body.append('shippingDetail[postalCode]', 'ad');
body.append('shippingDetail[latitude]', 'earum');
body.append('shippingDetail[longitude]', 'non');
body.append('items[][name]', 'excepturi');
body.append('items[][quantity]', '12');
body.append('items[][type]', 'plate');
body.append('items[][code]', 'minima');
body.append('items[][description]', 'Dolorum quidem accusantium eos.');
body.append('items[][amount]', '3649192');
body.append('redirectUrl[success]', 'et');
body.append('redirectUrl[failure]', 'voluptatem');
body.append('redirectUrl[cancel]', 'numquam');
body.append('valid_id1', document.querySelector('input[name="valid_id1"]').files[0]);
body.append('valid_id2', document.querySelector('input[name="valid_id2"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/order-via-xendit';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'requestReferenceNumber',
'contents' => 'illum'
],
[
'name' => 'shippingDetail[nameLast]',
'contents' => 'vitae'
],
[
'name' => 'shippingDetail[nameFirst]',
'contents' => 'dicta'
],
[
'name' => 'shippingDetail[nameMiddle]',
'contents' => 'culpa'
],
[
'name' => 'shippingDetail[nameSuffix]',
'contents' => 'et'
],
[
'name' => 'shippingDetail[phoneMobile]',
'contents' => 'est'
],
[
'name' => 'shippingDetail[phoneOther]',
'contents' => 'et'
],
[
'name' => 'shippingDetail[emailAddress]',
'contents' => 'shana.shanahan@example.com'
],
[
'name' => 'shippingDetail[region]',
'contents' => 'est'
],
[
'name' => 'shippingDetail[province]',
'contents' => 'repellat'
],
[
'name' => 'shippingDetail[municity]',
'contents' => 'adipisci'
],
[
'name' => 'shippingDetail[barangay]',
'contents' => 'soluta'
],
[
'name' => 'shippingDetail[address1]',
'contents' => 'delectus'
],
[
'name' => 'shippingDetail[address2]',
'contents' => 'cumque'
],
[
'name' => 'shippingDetail[postalCode]',
'contents' => 'ad'
],
[
'name' => 'shippingDetail[latitude]',
'contents' => 'earum'
],
[
'name' => 'shippingDetail[longitude]',
'contents' => 'non'
],
[
'name' => 'items[][name]',
'contents' => 'excepturi'
],
[
'name' => 'items[][quantity]',
'contents' => '12'
],
[
'name' => 'items[][type]',
'contents' => 'plate'
],
[
'name' => 'items[][code]',
'contents' => 'minima'
],
[
'name' => 'items[][description]',
'contents' => 'Dolorum quidem accusantium eos.'
],
[
'name' => 'items[][amount]',
'contents' => '3649192'
],
[
'name' => 'redirectUrl[success]',
'contents' => 'et'
],
[
'name' => 'redirectUrl[failure]',
'contents' => 'voluptatem'
],
[
'name' => 'redirectUrl[cancel]',
'contents' => 'numquam'
],
[
'name' => 'valid_id1',
'contents' => fopen('/private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/php3SCHnb', 'r')
],
[
'name' => 'valid_id2',
'contents' => fopen('/private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/phpFSH4MI', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delivery
Inquire delivery order
requires authentication
Use this endpoint to inquire deliver order
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/delivery/inquire"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sender": "",
"receiver": "",
"transactable_type": ""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/delivery/inquire';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'sender' => '',
'receiver' => '',
'transactable_type' => '',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"message": "Request was successful.",
"details": {
"courier_fee": 150,
"price_reference": P1234567789
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create delivery order
requires authentication
Use this endpoint to create deliver order
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/delivery/create"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_reference_number": "P143-36EG-DY01",
"sender": "",
"receiver": "",
"webhook_url": "https:\/\/partnersite.com\/webhook\/notify",
"price_reference": "non",
"transactable_type": "Driver's License"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/delivery/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_reference_number' => 'P143-36EG-DY01',
'sender' => '',
'receiver' => '',
'webhook_url' => 'https://partnersite.com/webhook/notify',
'price_reference' => 'non',
'transactable_type' => 'Driver\'s License',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"message": "Request was successful.",
"details": {
"client_reference_number": "P143-36EG-DY11",
"reference_number": "DLS1724406945",
"status": "02 booked",
"tracking_url": "https://delivery.dev.abyan.ph/track/DLS1724406945",
"waybill_url": "https://sls-laravel-lto-delivery-api-dev-storage-private.s3.ap-southeast-1.amazonaws.com/waybill/P143-36EG-DY11.pdf"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check delivery order
requires authentication
Use this endpoint to check the status of a transaction given a reference number.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/delivery/status/DLS1724406945"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/delivery/status/DLS1724406945';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"message": "Request was successful.",
"details": {
"client_reference_number": "P143-36EG-DY11",
"reference_number": "DLS1724406945",
"status": "02 booked",
"tracking_url": "https://delivery.dev.abyan.ph/track/DLS1724406945",
"waybill_url": "https://sls-laravel-lto-delivery-api-dev-storage-private.s3.ap-southeast-1.amazonaws.com/waybill/P143-36EG-DY11.pdf"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
For Pickup Notification
requires authentication
Allows partner to notify the system when an item is ready for pickup.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/delivery/notify"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reference_numbers": [
"animi"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/delivery/notify';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'reference_numbers' => [
'animi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Test Webhook Call
requires authentication
Allows partner to test the webhook call
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/delivery/test-webhook"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"webhook_url": "https:\/\/partnersite.com\/webhook\/notify",
"payload": [
{
"client_reference_number": "12345",
"reference_number": "ABCDE12345",
"status": "30 delivered",
"tracking_url": "https:\/\/tracking.com\/track\/ABCDE12345",
"waybill_url": "https:\/\/waybill.com\/waybill\/ABCDE12345.pdf"
},
{
"client_reference_number": "67890",
"reference_number": "FGHIJ67890",
"status": "30 delivered",
"tracking_url": "https:\/\/tracking.com\/track\/FGHIJ67890",
"waybill_url": "https:\/\/waybill.com\/waybill\/FGHIJ67890.pdf"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/delivery/test-webhook';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'webhook_url' => 'https://partnersite.com/webhook/notify',
'payload' => [
[
'client_reference_number' => '12345',
'reference_number' => 'ABCDE12345',
'status' => '30 delivered',
'tracking_url' => 'https://tracking.com/track/ABCDE12345',
'waybill_url' => 'https://waybill.com/waybill/ABCDE12345.pdf',
],
[
'client_reference_number' => '67890',
'reference_number' => 'FGHIJ67890',
'status' => '30 delivered',
'tracking_url' => 'https://tracking.com/track/FGHIJ67890',
'waybill_url' => 'https://waybill.com/waybill/FGHIJ67890.pdf',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dispatcher
Dispatcher details
requires authentication
Use this endpoint to get dispatcher details
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/dispatcher/details"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/dispatcher/details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deliveries
requires authentication
Use this endpoint to get list of deliveries
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/dispatcher/deliveries"
);
const params = {
"filter[targetPickup]": "2024-09-23",
"filter[referenceId]": "DLS1724406945",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/dispatcher/deliveries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[targetPickup]' => '2024-09-23',
'filter[referenceId]' => 'DLS1724406945',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Delivery Status Codes
requires authentication
Use this endpoint to get the list of delivery status codes
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/dispatcher/delivery/statuses"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/dispatcher/delivery/statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Deliveries Status
requires authentication
Use this endpoint to update deliveries status
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/dispatcher/update-deliveries-status"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"deliveries": [
{
"transactionReferenceNumber": "piobkwndjhfuaxakuxxzoxy"
}
],
"deliveryStatus": "30 delivered"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/dispatcher/update-deliveries-status';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'deliveries' => [
[
'transactionReferenceNumber' => 'piobkwndjhfuaxakuxxzoxy',
],
],
'deliveryStatus' => '30 delivered',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Riders
Rider details
requires authentication
Use this endpoint to get rider details
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/details"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accept Delivery
requires authentication
Use this endpoint to accept the delivery request
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/accept-delivery"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"requestReferenceNumber": "autem"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/accept-delivery';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'requestReferenceNumber' => 'autem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Deliveries
requires authentication
Use this endpoint to update the riders' deliveries status.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/update-deliveries-status"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"deliveries": [
{
"transactionReferenceNumber": "lexreanqrhmuov"
}
],
"deliveryStatus": "41 return to dispatcher"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/update-deliveries-status';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'deliveries' => [
[
'transactionReferenceNumber' => 'lexreanqrhmuov',
],
],
'deliveryStatus' => '41 return to dispatcher',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sequence Deliveries
requires authentication
Use this endpoint to sequence the riders' deliveries.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/sequence-deliveries"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"latitude": "14.5352",
"longitude": "120.9830"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/sequence-deliveries';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'latitude' => '14.5352',
'longitude' => '120.9830',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Queue Deliveries
requires authentication
Use this endpoint to get the riders' deliveries.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/queue-deliveries"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/queue-deliveries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rider Online Switch
requires authentication
Use this endpoint to update the riders' availability status.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/rider/switch-availability"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"availability": "online"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/rider/switch-availability';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'availability' => 'online',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Territory
Get Territories
requires authentication
Use this endpoint to get list of territories
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Territory
requires authentication
Use this endpoint to create new territory
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"territoryName": "hkziwrm",
"territoryStatus": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'territoryName' => 'hkziwrm',
'territoryStatus' => 'active',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Territory details
requires authentication
Use this endpoint to get the territory details
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/explicabo"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/explicabo';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Territory
requires authentication
Use this endpoint to update the territory
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/nulla"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"territoryName": "eftxrjrfooytynccr",
"territoryStatus": "inactive"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/nulla';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'territoryName' => 'eftxrjrfooytynccr',
'territoryStatus' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rider Territory
Display a listing of rider territories for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created rider territory in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"riderId": "voluptatem",
"areaStatus": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'riderId' => 'voluptatem',
'areaStatus' => 'active',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified rider territory for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories/molestias"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories/molestias';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified rider territory in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories/repellendus"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"riderId": "deserunt",
"areaStatus": "inactive"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/rider-territories/repellendus';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'riderId' => 'deserunt',
'areaStatus' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Territory
Display a listing of user territories for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created user territory in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"userId": "aut",
"areaStatus": "inactive"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'userId' => 'aut',
'areaStatus' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified user territory for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories/non"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories/non';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified user territory in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories/voluptatem"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"userId": "similique",
"areaStatus": "inactive"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/user-territories/voluptatem';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'userId' => 'similique',
'areaStatus' => 'inactive',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Territory Area
Display a listing of territory areas for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created territory area in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"areaType": "postcode",
"areaStatus": "inactive",
"areaValue": "bbytqbmgapgtqvrjs"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'areaType' => 'postcode',
'areaStatus' => 'inactive',
'areaValue' => 'bbytqbmgapgtqvrjs',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified territory area for a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas/ut"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas/ut';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified territory area in a specific territory.
requires authentication
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas/nam"
);
const headers = {
"Authorization": "Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"areaType": "county",
"areaStatus": "inactive",
"areaValue": "ibpwbeadjhqehsyjnwrjpibyo"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/v1/admin/territories/1/territory-areas/nam';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_ACCESS_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'areaType' => 'county',
'areaStatus' => 'inactive',
'areaValue' => 'ibpwbeadjhqehsyjnwrjpibyo',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Transactions
GET api/partners/v1/track/{trackingReferenceNumber}
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/track/DLS1724406945"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/track/DLS1724406945';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"message": "Request was successful.",
"details": [
{
"status": "00 pending",
"statusDate": "2024-08-07 05:03:52",
"statusNotes": null,
"statusImage": null
},
{
"status": "07 ready for pickup",
"statusDate": "2024-08-07 05:10:11",
"statusNotes": null,
"statusImage": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get transaction details for the delivery order. Use this endpoint to get transaction details for the delivery.
Example request:
const url = new URL(
"https://api-dev.abyan.ph/api/partners/v1/order"
);
const params = {
"expires": "1716111060",
"requestReferenceNumber": "LTO-000000000001",
"signature": "ac8d06273b7340ce69cd97963aa637d914240376a8dbf269dbe6f7c776c31a60",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api-dev.abyan.ph/api/partners/v1/order';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'expires' => '1716111060',
'requestReferenceNumber' => 'LTO-000000000001',
'signature' => 'ac8d06273b7340ce69cd97963aa637d914240376a8dbf269dbe6f7c776c31a60',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200, success):
{
"message": "Request was successful."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Order Status Codes Documentation
This document outlines the various status codes used in the order processing system. Each status is associated with a unique code and a description of what the status represents.
Status Codes
-
Pending (
00 pending)- The order is pending and has not yet been processed.
-
Paid (
01 paid)- The user has successfully paid for the order.
-
Booked (
02 booked)- The order has been booked and is awaiting further processing.
-
Ready For Pickup (
07 ready for pickup)- The order is ready to be picked up by the dispatcher.
-
Assigned (
08 assigned)- The order has been assigned to a delivery rider.
-
Received By Dispatcher (
09 received)- The order has been received by the dispatcher.
-
Not Received By Dispatcher (
10 not received)- The order was not received by the dispatcher.
-
Picked Up By Rider (
11 picked up)- The order has been picked up by the delivery rider.
-
Not Picked Up By Rider (
12 not picked up)- The order was not picked up by the delivery rider.
-
Out For Delivery (
20 out for delivery)- The order is currently out for delivery to the customer.
-
Delivered (
30 delivered)- The order has been successfully delivered to the customer.
-
Not Delivered (
40 not delivered)- The order was not delivered to the customer.
-
Returned To Dispatcher (
41 return to dispatcher)- The order was not delivered and has been returned to the dispatcher.
-
Returned To LTO (
42 return to lto)- The order was not delivered and has been returned to the LTO.
-
Complete (
50 complete)- The order process is complete, and no further action is required.
Common Response Codes
Our API provides detailed delivery status updates for orders. Below are the status codes and their descriptions:
| Status | Description |
|---|---|
| 200 OK | The request was successful. |
| 201 Created | A new resource has been successfully created. |
| 400 Bad Request | The request could not be understood or was missing required parameters. |
| 401 Unauthorized | Authentication failed or user does not have permissions for the requested operation. |
| 403 Forbidden | You do not have permission to access the requested resource. |
| 404 Not Found | The requested resource could not be found. |
| 429 Too Many Requests | You have exceeded the allowed number of requests. Please try again later. |
| 500 Internal Server Error | An error occurred on the server. |