curl --request POST \
--url https://api.mervii.com/beta/parcel/logistics/door-centre \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"centre_code": "",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"delivery_note": "",
"item_weight": 1,
"items": [
{
"height": "",
"length": "",
"name": "Book",
"width": ""
}
],
"state_code": "LA"
}
],
"pickup_origin": {
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"pickup_date": "",
"pickup_note": "",
"pickup_time": "",
"region": {
"latitude": 7.427026700000001,
"longitude": 3.8900142
},
"state_code": "LA",
"vehicle": ""
}
}
'import requests
url = "https://api.mervii.com/beta/parcel/logistics/door-centre"
payload = {
"destinations": [
{
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"centre_code": "",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"delivery_note": "",
"item_weight": 1,
"items": [
{
"height": "",
"length": "",
"name": "Book",
"width": ""
}
],
"state_code": "LA"
}
],
"pickup_origin": {
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"pickup_date": "",
"pickup_note": "",
"pickup_time": "",
"region": {
"latitude": 7.427026700000001,
"longitude": 3.8900142
},
"state_code": "LA",
"vehicle": ""
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destinations: [
{
address: 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
centre_code: '',
city: 'Lagos',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: ''
},
country_code: 'NG',
delivery_note: '',
item_weight: 1,
items: [{height: '', length: '', name: 'Book', width: ''}],
state_code: 'LA'
}
],
pickup_origin: {
address: 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
city: 'Lagos',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: ''
},
country_code: 'NG',
pickup_date: '',
pickup_note: '',
pickup_time: '',
region: {latitude: 7.427026700000001, longitude: 3.8900142},
state_code: 'LA',
vehicle: ''
}
})
};
fetch('https://api.mervii.com/beta/parcel/logistics/door-centre', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mervii.com/beta/parcel/logistics/door-centre",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destinations' => [
[
'address' => 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
'centre_code' => '',
'city' => 'Lagos',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => ''
],
'country_code' => 'NG',
'delivery_note' => '',
'item_weight' => 1,
'items' => [
[
'height' => '',
'length' => '',
'name' => 'Book',
'width' => ''
]
],
'state_code' => 'LA'
]
],
'pickup_origin' => [
'address' => 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
'city' => 'Lagos',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => ''
],
'country_code' => 'NG',
'pickup_date' => '',
'pickup_note' => '',
'pickup_time' => '',
'region' => [
'latitude' => 7.427026700000001,
'longitude' => 3.8900142
],
'state_code' => 'LA',
'vehicle' => ''
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mervii.com/beta/parcel/logistics/door-centre"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"centre_code\": \"\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"delivery_note\": \"\",\n \"item_weight\": 1,\n \"items\": [\n {\n \"height\": \"\",\n \"length\": \"\",\n \"name\": \"Book\",\n \"width\": \"\"\n }\n ],\n \"state_code\": \"LA\"\n }\n ],\n \"pickup_origin\": {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"pickup_date\": \"\",\n \"pickup_note\": \"\",\n \"pickup_time\": \"\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\n },\n \"state_code\": \"LA\",\n \"vehicle\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mervii.com/beta/parcel/logistics/door-centre")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"centre_code\": \"\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"delivery_note\": \"\",\n \"item_weight\": 1,\n \"items\": [\n {\n \"height\": \"\",\n \"length\": \"\",\n \"name\": \"Book\",\n \"width\": \"\"\n }\n ],\n \"state_code\": \"LA\"\n }\n ],\n \"pickup_origin\": {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"pickup_date\": \"\",\n \"pickup_note\": \"\",\n \"pickup_time\": \"\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\n },\n \"state_code\": \"LA\",\n \"vehicle\": \"\"\n }\n}")
.asString();{
"data": {
"discount_description": "0% discount",
"discount_type": "Percetage",
"status": "Pending",
"total_amount": 11192.940875080363,
"total_amount_payable": 11192.940875080363,
"total_discount_amount": 0,
"tracking_number": "202410086789949"
},
"message": "Parcel is successful",
"status": true
}{
"message": "The destinations.0.centre_code field is required.",
"status": false
}Door-centre
This API endpoint allows you to create a new logistics order for door-to-centre parcel delivery. The request should be sent as an HTTP POST to /parcel/logistics/door-centre.
Request Body
The request body should be sent in raw format and should include the following parameters:
-
pickup_origin: Details of the pickup location including region, state code, country code, city, address, contacts, pickup note, pickup date, pickup time, and vehicle. -
destinations: An array containing details of the destination centre, including centre code, state code, country code, city, address, contacts, delivery note, items, and item weight.
Response
Upon successful creation of the logistics order, the API will respond with the following parameters:
-
status: A boolean indicating the status of the request. -
message: An optional message related to the request. -
data: An object containing details of the created order, including tracking number, status, total amount, total discount amount, total amount payable, discount type, and discount description.
Example Response:
{
"status": true,
"message": "",
"data": {
"tracking_number": "",
"status": "",
"total_amount": 0,
"total_discount_amount": 0,
"total_amount_payable": 0,
"discount_type": "",
"discount_description": ""
}
}
curl --request POST \
--url https://api.mervii.com/beta/parcel/logistics/door-centre \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"centre_code": "",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"delivery_note": "",
"item_weight": 1,
"items": [
{
"height": "",
"length": "",
"name": "Book",
"width": ""
}
],
"state_code": "LA"
}
],
"pickup_origin": {
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"pickup_date": "",
"pickup_note": "",
"pickup_time": "",
"region": {
"latitude": 7.427026700000001,
"longitude": 3.8900142
},
"state_code": "LA",
"vehicle": ""
}
}
'import requests
url = "https://api.mervii.com/beta/parcel/logistics/door-centre"
payload = {
"destinations": [
{
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"centre_code": "",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"delivery_note": "",
"item_weight": 1,
"items": [
{
"height": "",
"length": "",
"name": "Book",
"width": ""
}
],
"state_code": "LA"
}
],
"pickup_origin": {
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"pickup_date": "",
"pickup_note": "",
"pickup_time": "",
"region": {
"latitude": 7.427026700000001,
"longitude": 3.8900142
},
"state_code": "LA",
"vehicle": ""
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destinations: [
{
address: 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
centre_code: '',
city: 'Lagos',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: ''
},
country_code: 'NG',
delivery_note: '',
item_weight: 1,
items: [{height: '', length: '', name: 'Book', width: ''}],
state_code: 'LA'
}
],
pickup_origin: {
address: 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
city: 'Lagos',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: ''
},
country_code: 'NG',
pickup_date: '',
pickup_note: '',
pickup_time: '',
region: {latitude: 7.427026700000001, longitude: 3.8900142},
state_code: 'LA',
vehicle: ''
}
})
};
fetch('https://api.mervii.com/beta/parcel/logistics/door-centre', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mervii.com/beta/parcel/logistics/door-centre",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destinations' => [
[
'address' => 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
'centre_code' => '',
'city' => 'Lagos',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => ''
],
'country_code' => 'NG',
'delivery_note' => '',
'item_weight' => 1,
'items' => [
[
'height' => '',
'length' => '',
'name' => 'Book',
'width' => ''
]
],
'state_code' => 'LA'
]
],
'pickup_origin' => [
'address' => 'Ikolaba Rd, Ibadan 200285, Oyo, Nigeria',
'city' => 'Lagos',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => ''
],
'country_code' => 'NG',
'pickup_date' => '',
'pickup_note' => '',
'pickup_time' => '',
'region' => [
'latitude' => 7.427026700000001,
'longitude' => 3.8900142
],
'state_code' => 'LA',
'vehicle' => ''
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mervii.com/beta/parcel/logistics/door-centre"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"centre_code\": \"\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"delivery_note\": \"\",\n \"item_weight\": 1,\n \"items\": [\n {\n \"height\": \"\",\n \"length\": \"\",\n \"name\": \"Book\",\n \"width\": \"\"\n }\n ],\n \"state_code\": \"LA\"\n }\n ],\n \"pickup_origin\": {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"pickup_date\": \"\",\n \"pickup_note\": \"\",\n \"pickup_time\": \"\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\n },\n \"state_code\": \"LA\",\n \"vehicle\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mervii.com/beta/parcel/logistics/door-centre")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"centre_code\": \"\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"delivery_note\": \"\",\n \"item_weight\": 1,\n \"items\": [\n {\n \"height\": \"\",\n \"length\": \"\",\n \"name\": \"Book\",\n \"width\": \"\"\n }\n ],\n \"state_code\": \"LA\"\n }\n ],\n \"pickup_origin\": {\n \"address\": \"Ikolaba Rd, Ibadan 200285, Oyo, Nigeria\",\n \"city\": \"Lagos\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"\"\n },\n \"country_code\": \"NG\",\n \"pickup_date\": \"\",\n \"pickup_note\": \"\",\n \"pickup_time\": \"\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\n },\n \"state_code\": \"LA\",\n \"vehicle\": \"\"\n }\n}")
.asString();{
"data": {
"discount_description": "0% discount",
"discount_type": "Percetage",
"status": "Pending",
"total_amount": 11192.940875080363,
"total_amount_payable": 11192.940875080363,
"total_discount_amount": 0,
"tracking_number": "202410086789949"
},
"message": "Parcel is successful",
"status": true
}{
"message": "The destinations.0.centre_code field is required.",
"status": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
[
{
"address": "Ikolaba Rd, Ibadan 200285, Oyo, Nigeria",
"centre_code": "",
"city": "Lagos",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": ""
},
"country_code": "NG",
"delivery_note": "",
"item_weight": 1,
"items": [
{
"height": "",
"length": "",
"name": "Book",
"width": ""
}
],
"state_code": "LA"
}
]Show child attributes
Show child attributes
Was this page helpful?
