MENU navbar-image

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

Request      

GET api/v1/address/regions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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: *
 

[]
 

Request      

GET api/v1/address/provinces/{regCode}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

regCode   string   

Example: nobis

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: *
 

[]
 

Request      

GET api/v1/address/cities/{provCode}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

provCode   string   

Example: sapiente

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: *
 

[]
 

Request      

GET api/v1/address/barangays/{citymunCode}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

citymunCode   string   

Example: officia

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

Request      

GET api/v1/admin/details

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/users

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: eveniet

email   string   

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

password   string   

Must be at least 6 characters. Example: m!C,e4dE\K*`

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

Request      

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

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the user. Example: facilis

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

Request      

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

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

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the user. Example: corporis

Body Parameters

name   string   

Example: velit

email   string  optional  

Must be a valid email address. Example: kirstin.ruecker@example.com

password   string  optional  

Must be at least 6 characters. Example: *Sx_C%f,Q|-

status   string   

Example: active

Must be one of:
  • active
  • inactive

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

Request      

POST api/v1/admin/role

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

role   string   

Must not be greater than 50 characters. Example: oyoznhcore

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

Request      

DELETE api/v1/admin/role

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

role   string   

Must not be greater than 50 characters. Example: sempnljv

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

Request      

GET api/v1/admin/role/permissions

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/role/permissions

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

permissions   object[]   
name   string   

Example: illum

role   string   

Example: laboriosam

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

Request      

DELETE api/v1/admin/role/permissions

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

permissions   object[]   
name   string   

Example: vel

role   string   

Example: placeat

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

Request      

POST api/v1/admin/role/permissions/sync

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

permissions   object[]   
name   string   

Example: aspernatur

role   string   

Example: amet

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

Request      

GET api/v1/admin/role

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/role/roles-permissions

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/role/user

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

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

role   string   

Example: in

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

Request      

GET api/v1/admin/riders

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[status.riderStatus]   string   

Search any. Example: active

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

Request      

POST api/v1/admin/update-riders-status

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

riders   object[]   
riderUsername   string   

Example: et

status   string   

Example: sick

Must be one of:
  • active
  • inactive
  • sick
  • vacation
  • terminated
  • suspended

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

Request      

GET api/v1/admin/deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[deliveryStatus.deliveryStatus]   string   

Search any. Example: 01 paid

filter[targetPickup]   string   

Search any. Example: 2024-09-23

filter[referenceId]   string   

Search any. Example: DLS1724406945

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

Request      

GET api/v1/admin/delivery/statuses

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/update-deliveries-status

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

deliveries   object[]   

Must not have more than 20 items.

transactionReferenceNumber   string   

Must not be greater than 100 characters. Example: rd

deliveryStatus   string   

Example: 09 received

Must be one of:
  • 09 received
  • 10 not received
  • 42 return to lto
  • 30 delivered

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

Request      

POST api/v1/admin/sequence-deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

date   string  optional  

Must be a valid date in the format Y-m-d. Example: 2025-07-10

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

Request      

GET api/v1/admin/unassign-deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/assigned-deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/assigns-riders

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

fromRiderUsername   string   

Example: qui

deliveryIds   string   

Example: culpa

toRiderUsername   string   

Example: sapiente

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

Request      

GET api/v1/admin/deliveries/count

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/riders/count

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/revenue/count

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/payment/count

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/status-sms

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/status-sms

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

statusValue   string   

Example: beatae

statusText   string   

Example: voluptatibus

status   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/status-sms/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the status sm. Example: voluptates

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

Request      

PUT api/v1/admin/status-sms/{id}

PATCH api/v1/admin/status-sms/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the status sm. Example: aut

Body Parameters

statusValue   string   

Example: architecto

statusText   string   

Ensure uniqueness excluding current record. Example: odit

status   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

DELETE api/v1/admin/status-sms/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the status sm. Example: voluptatem

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

Request      

POST api/v1/admin/reconciliation/settlement/upload_dayon_file

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

file   file   

Must be a file. Must not be greater than 10240 kilobytes. Example: /private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/phpLooMLO

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

Request      

POST api/v1/admin/reconciliation/manual-reconciliation

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/admin/reconciliation/report

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[referenceId]   string   

Search any. Example: 172551802425

filter[pickupBetween]   string   

Search any. Example: 2024-09-28,2024-10-17

filter[reconcileStatus]   string   

Search any. Example: Reconciled

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

Request      

GET api/v1/admin/reconciliation/export-report

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/auth/register-rider

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

username   string   

Example: sit

password   string   

Must be at least 8 characters. Example: pC[Wal[

nameFirst   string   

Example: nobis

nameLast   string   

Example: voluptatibus

phoneMobile   string   

Example: rerum

phoneOther   string  optional  

Example: sit

vehicleId   string   

Example: quos

riderImage   file   

Must be an image. Must not be greater than 2048 kilobytes. Example: /private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/php0rhDU5

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

Request      

POST api/v1/auth/login-rider

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

Example: sint

password   string   

Example: dxh?thr~\YMh

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

Request      

POST api/v1/auth/logout-rider

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/auth/login-admin

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: euna.cruickshank@example.org

password   string   

Example: architecto

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

Request      

POST api/v1/auth/login-dispatcher

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

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

password   string   

Example: aut

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

Request      

POST api/v1/auth/logout

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/partners/v1/oauth2/token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

grant_type   string   

client_credentials. Example: client_credentials

client_id   string   

Your client id. Example: 6j3mj13bmntioepd0o622ed2g4

client_secret   string   

Your client secret. Example: c915on174ls8dq9el5ljuqi696fckntqgqn0k4t1p753ursfrac

scope   string   

Your scope. Example: delivery

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

Request      

POST api/partners/v1/order-via-xendit

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

requestReferenceNumber   string   

Example: illum

valid_id1   file   

Must be an image. Must not be greater than 2048 kilobytes. Example: /private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/php3SCHnb

valid_id2   file   

Must be an image. Must not be greater than 2048 kilobytes. Example: /private/var/folders/0t/rqgdd9913pvcsnl5kqx554nc0000gn/T/phpFSH4MI

shippingDetail   object  optional  
nameLast   string   

Example: vitae

nameFirst   string   

Example: dicta

nameMiddle   string   

Example: culpa

nameSuffix   string  optional  

Example: et

phoneMobile   string   

Example: est

phoneOther   string  optional  

Example: et

emailAddress   string   

Must be a valid email address. Example: shana.shanahan@example.com

region   string   

Example: est

province   string   

Example: repellat

municity   string   

Example: adipisci

barangay   string   

Example: soluta

address1   string   

Example: delectus

address2   string  optional  

Example: cumque

postalCode   string   

Example: ad

latitude   string   

Example: earum

longitude   string   

Example: non

items   object[]   
name   string   

Example: excepturi

quantity   integer   

Example: 12

type   string   

Example: plate

Must be one of:
  • plate
  • license
code   string  optional  

Example: minima

description   string  optional  

Example: Dolorum quidem accusantium eos.

amount   number   

Example: 3649192

redirectUrl   object  optional  
success   string   

Example: et

failure   string   

Example: voluptatem

cancel   string   

Example: numquam

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

Request      

POST api/partners/v1/delivery/inquire

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sender   Sender Details   
latitude   number   

Must be between -90 and 90. Example: -90

longitude   number   

Must be between -180 and 180. Example: -180

full_address   string   

Must not be greater than 255 characters. Example: nlezlsosdukgb

receiver   Receiver Details   
latitude   number   

Must be between -90 and 90. Example: -90

longitude   number   

Must be between -180 and 180. Example: -179

full_address   string   

Must not be greater than 255 characters. Example: siki

transactable_type   Transactable Type   

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

Request      

POST api/partners/v1/delivery/create

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

client_reference_number   string   

The client reference number provided by the partner corresponds to this transaction. Must not be greater than 100 characters. Must not be greater than 100 characters. Example: P143-36EG-DY01

sender   Sender Details   
latitude   number   

Must be between -90 and 90. Example: -89

longitude   number   

Must be between -180 and 180. Example: -180

full_address   string   

Must not be greater than 255 characters. Example: bwuexmlxdltvalj

remarks   string  optional  

Must not be greater than 255 characters. Example: kmoabfhkzkeefstfyj

contact   Contact Details   
full_name   string   

Must not be greater than 255 characters. Example: xkweffywvqkovcaxp

number   string   

Must match the regex /^(09|+639)\d{9}$/. Example: 09503080939

details   Other Details  optional  
receiver   Receiver Details   
latitude   number   

Must be between -90 and 90. Example: -89

longitude   number   

Must be between -180 and 180. Example: -179

full_address   string   

Must not be greater than 255 characters. Example: lbyd

remarks   string  optional  

Must not be greater than 255 characters. Example: uzatvgwmitagauqf

contact   Contact Details   
full_name   string   

Must not be greater than 255 characters. Example: bklfauvdzpwbuvfflbbnrrkp

number   string   

Must match the regex /^(09|+639)\d{9}$/. Example: 09271293827

webhook_url   string   

The partner server's URL that is called for this webhook. Must not be greater than 255 characters. Example: https://partnersite.com/webhook/notify

price_reference   string   

Example: non

transactable_type   string   

Example: Driver's License

Must be one of:
  • Plate Number
  • Driver's License

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

Request      

GET api/partners/v1/delivery/status/{reference_number}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

reference_number   Tracking reference number, corresponding to the create order transaction.   

Example: DLS1724406945

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
 

Request      

POST api/partners/v1/delivery/notify

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

reference_numbers   string[]   

Each reference number within the array. Must be a string.

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):



 

Request      

POST api/partners/v1/delivery/test-webhook

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

webhook_url   string   

The partner server's URL that is called for this webhook. Must be a valid URL. Example: https://partnersite.com/webhook/notify

payload   object[]   

An array of objects, each containing details about a specific transaction or update.

client_reference_number   string   

A unique identifier provided by the client for each transaction. Must not be greater than 255 characters. Example: 12345

reference_number   string   

The internal reference number associated with the transaction. Must not be greater than 255 characters. Example: ABCDE12345

status   string   

The current status of the transaction. Example: 30 delivered

Must be one of:
  • 08 assigned
  • 09 received
  • 10 not received
  • 11 picked up
  • 12 not picked up
  • 20 out for delivery
  • 30 delivered
  • 40 not delivered
  • 41 return to dispatcher
  • 42 return to lto
tracking_url   string  optional  

The URL where the client can track the shipment. Example: https://tracking.com/track/ABCDE12345

waybill_url   string  optional  

The URL to access the waybill associated with the shipment. Example: https://waybill.com/waybill/ABCDE12345.pdf

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

Request      

GET api/v1/dispatcher/details

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/v1/dispatcher/deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[deliveryStatus.deliveryStatus]   string   

Search any. Example: 01 paid

filter[targetPickup]   string   

Search any. Example: 2024-09-23

filter[referenceId]   string   

Search any. Example: DLS1724406945

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

Request      

GET api/v1/dispatcher/delivery/statuses

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/dispatcher/update-deliveries-status

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

deliveries   object[]   

Must not have more than 20 items.

transactionReferenceNumber   string   

Must not be greater than 100 characters. Example: piobkwndjhfuaxakuxxzoxy

deliveryStatus   string   

Example: 30 delivered

Must be one of:
  • 09 received
  • 10 not received
  • 42 return to lto
  • 30 delivered

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

Request      

GET api/v1/rider/details

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/rider/accept-delivery

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

requestReferenceNumber   string   

Example: autem

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

Request      

POST api/v1/rider/update-deliveries-status

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

deliveries   object[]   

Must not have more than 20 items.

transactionReferenceNumber   string   

Must not be greater than 100 characters. Example: lexreanqrhmuov

deliveryStatus   string   

Example: 41 return to dispatcher

Must be one of:
  • 11 picked up
  • 12 not picked up
  • 20 out for delivery
  • 30 delivered
  • 40 not delivered
  • 41 return to dispatcher

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

Request      

POST api/v1/rider/sequence-deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

latitude   string   

Current Latitude. Example: 14.5352

longitude   string   

Current Longitude. Example: 120.9830

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

Request      

GET api/v1/rider/queue-deliveries

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/rider/switch-availability

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

availability   string   

Example: online

Must be one of:
  • online
  • offline

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

Request      

GET api/v1/admin/territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/v1/admin/territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

territoryName   string   

Must not be greater than 255 characters. Example: hkziwrm

territoryStatus   string   

Example: active

Must be one of:
  • active
  • inactive

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

Request      

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

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the territory. Example: explicabo

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

Request      

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

PATCH api/v1/admin/territories/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the territory. Example: nulla

Body Parameters

territoryName   string   

Must not be greater than 255 characters. Example: eftxrjrfooytynccr

territoryStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/territories/{territory_id}/rider-territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

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

Request      

POST api/v1/admin/territories/{territory_id}/rider-territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

Body Parameters

riderId   string   

Example: voluptatem

areaStatus   string   

Example: active

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/territories/{territory_id}/rider-territories/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the rider territory. Example: molestias

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

Request      

PUT api/v1/admin/territories/{territory_id}/rider-territories/{id}

PATCH api/v1/admin/territories/{territory_id}/rider-territories/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the rider territory. Example: repellendus

Body Parameters

riderId   string   

Example: deserunt

areaStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/territories/{territory_id}/user-territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

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

Request      

POST api/v1/admin/territories/{territory_id}/user-territories

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

Body Parameters

userId   string   

Example: aut

areaStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/territories/{territory_id}/user-territories/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the user territory. Example: non

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

Request      

PUT api/v1/admin/territories/{territory_id}/user-territories/{id}

PATCH api/v1/admin/territories/{territory_id}/user-territories/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the user territory. Example: voluptatem

Body Parameters

userId   string   

Example: similique

areaStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive

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

Request      

GET api/v1/admin/territories/{territory_id}/territory-areas

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

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

Request      

POST api/v1/admin/territories/{territory_id}/territory-areas

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

Body Parameters

areaType   string   

Example: postcode

Must be one of:
  • county
  • city
  • district
  • postcode
areaStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive
areaValue   string   

Must not be greater than 255 characters. Example: bbytqbmgapgtqvrjs

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

Request      

GET api/v1/admin/territories/{territory_id}/territory-areas/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the territory area. Example: ut

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

Request      

PUT api/v1/admin/territories/{territory_id}/territory-areas/{id}

PATCH api/v1/admin/territories/{territory_id}/territory-areas/{id}

Headers

Authorization      

Example: Bearer {YOUR_ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

territory_id   integer   

The ID of the territory. Example: 1

id   string   

The ID of the territory area. Example: nam

Body Parameters

areaType   string   

Example: county

Must be one of:
  • county
  • city
  • district
  • postcode
areaStatus   string   

Example: inactive

Must be one of:
  • active
  • inactive
areaValue   string   

Must not be greater than 255 characters. Example: ibpwbeadjhqehsyjnwrjpibyo

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

Request      

GET api/partners/v1/track/{trackingReferenceNumber}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

trackingReferenceNumber   Tracking reference number, corresponding to the create order transaction.   

Example: DLS1724406945

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

Request      

GET api/partners/v1/order

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

expires   number   

Expires. Example: 1716111060

requestReferenceNumber   string   

Request Id. Example: LTO-000000000001

signature   string   

Signature. Example: ac8d06273b7340ce69cd97963aa637d914240376a8dbf269dbe6f7c776c31a60

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

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.