curl --request POST \
--url https://api.mervii.com/beta/parcel/intral/intral-city \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"city": "Ojodu Berger",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country": "Nigeria",
"country_code": "NG",
"formattedAddress": "Olowora, Ojodu Berger 105102, Lagos, Nigeria",
"lat": 6.6395189,
"lng": 3.3710171,
"local": "Kosofe",
"neighborhood": "Olowora",
"postal_code": "105102",
"region": {
"latitude": 6.6395189,
"longitude": 3.3710171
},
"state": "Lagos",
"state_code": "LA",
"ward": "Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II"
}
],
"pickup_origin": {
"city": "Ikeja",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country_code": "NG",
"region": {
"latitude": 6.594019599999999,
"longitude": 3.336365099999999
},
"state_code": "LA"
}
}
'import requests
url = "https://api.mervii.com/beta/parcel/intral/intral-city"
payload = {
"destinations": [
{
"city": "Ojodu Berger",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country": "Nigeria",
"country_code": "NG",
"formattedAddress": "Olowora, Ojodu Berger 105102, Lagos, Nigeria",
"lat": 6.6395189,
"lng": 3.3710171,
"local": "Kosofe",
"neighborhood": "Olowora",
"postal_code": "105102",
"region": {
"latitude": 6.6395189,
"longitude": 3.3710171
},
"state": "Lagos",
"state_code": "LA",
"ward": "Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II"
}
],
"pickup_origin": {
"city": "Ikeja",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country_code": "NG",
"region": {
"latitude": 6.594019599999999,
"longitude": 3.336365099999999
},
"state_code": "LA"
}
}
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: [
{
city: 'Ojodu Berger',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: '09020500177'
},
country: 'Nigeria',
country_code: 'NG',
formattedAddress: 'Olowora, Ojodu Berger 105102, Lagos, Nigeria',
lat: 6.6395189,
lng: 3.3710171,
local: 'Kosofe',
neighborhood: 'Olowora',
postal_code: '105102',
region: {latitude: 6.6395189, longitude: 3.3710171},
state: 'Lagos',
state_code: 'LA',
ward: 'Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II'
}
],
pickup_origin: {
city: 'Ikeja',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: '09020500177'
},
country_code: 'NG',
region: {latitude: 6.594019599999999, longitude: 3.336365099999999},
state_code: 'LA'
}
})
};
fetch('https://api.mervii.com/beta/parcel/intral/intral-city', 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/intral/intral-city",
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' => [
[
'city' => 'Ojodu Berger',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => '09020500177'
],
'country' => 'Nigeria',
'country_code' => 'NG',
'formattedAddress' => 'Olowora, Ojodu Berger 105102, Lagos, Nigeria',
'lat' => 6.6395189,
'lng' => 3.3710171,
'local' => 'Kosofe',
'neighborhood' => 'Olowora',
'postal_code' => '105102',
'region' => [
'latitude' => 6.6395189,
'longitude' => 3.3710171
],
'state' => 'Lagos',
'state_code' => 'LA',
'ward' => 'Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II'
]
],
'pickup_origin' => [
'city' => 'Ikeja',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => '09020500177'
],
'country_code' => 'NG',
'region' => [
'latitude' => 6.594019599999999,
'longitude' => 3.336365099999999
],
'state_code' => 'LA'
]
]),
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/intral/intral-city"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"city\": \"Ojodu Berger\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country\": \"Nigeria\",\n \"country_code\": \"NG\",\n \"formattedAddress\": \"Olowora, Ojodu Berger 105102, Lagos, Nigeria\",\n \"lat\": 6.6395189,\n \"lng\": 3.3710171,\n \"local\": \"Kosofe\",\n \"neighborhood\": \"Olowora\",\n \"postal_code\": \"105102\",\n \"region\": {\n \"latitude\": 6.6395189,\n \"longitude\": 3.3710171\n },\n \"state\": \"Lagos\",\n \"state_code\": \"LA\",\n \"ward\": \"Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"Ikeja\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 6.594019599999999,\n \"longitude\": 3.336365099999999\n },\n \"state_code\": \"LA\"\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/intral/intral-city")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"city\": \"Ojodu Berger\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country\": \"Nigeria\",\n \"country_code\": \"NG\",\n \"formattedAddress\": \"Olowora, Ojodu Berger 105102, Lagos, Nigeria\",\n \"lat\": 6.6395189,\n \"lng\": 3.3710171,\n \"local\": \"Kosofe\",\n \"neighborhood\": \"Olowora\",\n \"postal_code\": \"105102\",\n \"region\": {\n \"latitude\": 6.6395189,\n \"longitude\": 3.3710171\n },\n \"state\": \"Lagos\",\n \"state_code\": \"LA\",\n \"ward\": \"Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"Ikeja\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 6.594019599999999,\n \"longitude\": 3.336365099999999\n },\n \"state_code\": \"LA\"\n }\n}")
.asString();{
"data": {
"discount_description": "See the destination parcel details",
"discount_type": "percentage",
"status": "Pending",
"total_amount": 1427,
"total_amount_payable": 1427,
"total_discount_amount": 0,
"tracking_number": "202410082201832"
},
"message": "Parcel is successful",
"status": true
}{
"message": "The pickup origin.contacts.name field is required.",
"status": false
}intral-city
This endpoint allows you to create a new CitySwiift (intral city) parcel delivery order. The request should be sent as an HTTP POST to /parcel/intral/intral-city.
Request Body
The request should include a JSON payload with the following structure:
-
pickup_origin: Details of the pickup location including region, city, state code, country code, and contact information. -
destinations: An array containing details of the delivery destinations including region, formatted address, city, neighborhood, ward, local, state, state code, country, country code, postal code, and contact information.
Response
The response will be in JSON format and will include the following fields:
-
status: Indicates the status of the request (true/false). -
message: Additional information or error message. -
data: Contains the details of the created parcel order including tracking number, status, total amount, total discount amount, total amount payable, discount type, and discount description.
curl --request POST \
--url https://api.mervii.com/beta/parcel/intral/intral-city \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"city": "Ojodu Berger",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country": "Nigeria",
"country_code": "NG",
"formattedAddress": "Olowora, Ojodu Berger 105102, Lagos, Nigeria",
"lat": 6.6395189,
"lng": 3.3710171,
"local": "Kosofe",
"neighborhood": "Olowora",
"postal_code": "105102",
"region": {
"latitude": 6.6395189,
"longitude": 3.3710171
},
"state": "Lagos",
"state_code": "LA",
"ward": "Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II"
}
],
"pickup_origin": {
"city": "Ikeja",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country_code": "NG",
"region": {
"latitude": 6.594019599999999,
"longitude": 3.336365099999999
},
"state_code": "LA"
}
}
'import requests
url = "https://api.mervii.com/beta/parcel/intral/intral-city"
payload = {
"destinations": [
{
"city": "Ojodu Berger",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country": "Nigeria",
"country_code": "NG",
"formattedAddress": "Olowora, Ojodu Berger 105102, Lagos, Nigeria",
"lat": 6.6395189,
"lng": 3.3710171,
"local": "Kosofe",
"neighborhood": "Olowora",
"postal_code": "105102",
"region": {
"latitude": 6.6395189,
"longitude": 3.3710171
},
"state": "Lagos",
"state_code": "LA",
"ward": "Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II"
}
],
"pickup_origin": {
"city": "Ikeja",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country_code": "NG",
"region": {
"latitude": 6.594019599999999,
"longitude": 3.336365099999999
},
"state_code": "LA"
}
}
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: [
{
city: 'Ojodu Berger',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: '09020500177'
},
country: 'Nigeria',
country_code: 'NG',
formattedAddress: 'Olowora, Ojodu Berger 105102, Lagos, Nigeria',
lat: 6.6395189,
lng: 3.3710171,
local: 'Kosofe',
neighborhood: 'Olowora',
postal_code: '105102',
region: {latitude: 6.6395189, longitude: 3.3710171},
state: 'Lagos',
state_code: 'LA',
ward: 'Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II'
}
],
pickup_origin: {
city: 'Ikeja',
contacts: {
email: 'abdul@gmail.com',
name: 'Olakunle Olayemi',
phone_number: '09020500177',
phone_number_2: '09020500177'
},
country_code: 'NG',
region: {latitude: 6.594019599999999, longitude: 3.336365099999999},
state_code: 'LA'
}
})
};
fetch('https://api.mervii.com/beta/parcel/intral/intral-city', 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/intral/intral-city",
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' => [
[
'city' => 'Ojodu Berger',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => '09020500177'
],
'country' => 'Nigeria',
'country_code' => 'NG',
'formattedAddress' => 'Olowora, Ojodu Berger 105102, Lagos, Nigeria',
'lat' => 6.6395189,
'lng' => 3.3710171,
'local' => 'Kosofe',
'neighborhood' => 'Olowora',
'postal_code' => '105102',
'region' => [
'latitude' => 6.6395189,
'longitude' => 3.3710171
],
'state' => 'Lagos',
'state_code' => 'LA',
'ward' => 'Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II'
]
],
'pickup_origin' => [
'city' => 'Ikeja',
'contacts' => [
'email' => 'abdul@gmail.com',
'name' => 'Olakunle Olayemi',
'phone_number' => '09020500177',
'phone_number_2' => '09020500177'
],
'country_code' => 'NG',
'region' => [
'latitude' => 6.594019599999999,
'longitude' => 3.336365099999999
],
'state_code' => 'LA'
]
]),
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/intral/intral-city"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"city\": \"Ojodu Berger\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country\": \"Nigeria\",\n \"country_code\": \"NG\",\n \"formattedAddress\": \"Olowora, Ojodu Berger 105102, Lagos, Nigeria\",\n \"lat\": 6.6395189,\n \"lng\": 3.3710171,\n \"local\": \"Kosofe\",\n \"neighborhood\": \"Olowora\",\n \"postal_code\": \"105102\",\n \"region\": {\n \"latitude\": 6.6395189,\n \"longitude\": 3.3710171\n },\n \"state\": \"Lagos\",\n \"state_code\": \"LA\",\n \"ward\": \"Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"Ikeja\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 6.594019599999999,\n \"longitude\": 3.336365099999999\n },\n \"state_code\": \"LA\"\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/intral/intral-city")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"city\": \"Ojodu Berger\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country\": \"Nigeria\",\n \"country_code\": \"NG\",\n \"formattedAddress\": \"Olowora, Ojodu Berger 105102, Lagos, Nigeria\",\n \"lat\": 6.6395189,\n \"lng\": 3.3710171,\n \"local\": \"Kosofe\",\n \"neighborhood\": \"Olowora\",\n \"postal_code\": \"105102\",\n \"region\": {\n \"latitude\": 6.6395189,\n \"longitude\": 3.3710171\n },\n \"state\": \"Lagos\",\n \"state_code\": \"LA\",\n \"ward\": \"Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"Ikeja\",\n \"contacts\": {\n \"email\": \"abdul@gmail.com\",\n \"name\": \"Olakunle Olayemi\",\n \"phone_number\": \"09020500177\",\n \"phone_number_2\": \"09020500177\"\n },\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 6.594019599999999,\n \"longitude\": 3.336365099999999\n },\n \"state_code\": \"LA\"\n }\n}")
.asString();{
"data": {
"discount_description": "See the destination parcel details",
"discount_type": "percentage",
"status": "Pending",
"total_amount": 1427,
"total_amount_payable": 1427,
"total_discount_amount": 0,
"tracking_number": "202410082201832"
},
"message": "Parcel is successful",
"status": true
}{
"message": "The pickup origin.contacts.name 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
[
{
"city": "Ojodu Berger",
"contacts": {
"email": "abdul@gmail.com",
"name": "Olakunle Olayemi",
"phone_number": "09020500177",
"phone_number_2": "09020500177"
},
"country": "Nigeria",
"country_code": "NG",
"formattedAddress": "Olowora, Ojodu Berger 105102, Lagos, Nigeria",
"lat": 6.6395189,
"lng": 3.3710171,
"local": "Kosofe",
"neighborhood": "Olowora",
"postal_code": "105102",
"region": {
"latitude": 6.6395189,
"longitude": 3.3710171
},
"state": "Lagos",
"state_code": "LA",
"ward": "Isheri-Olowo-Ira/Shangisha/Magodo Phase I & II"
}
]
Show child attributes
Show child attributes
Was this page helpful?
