Centre-Centre
curl --request POST \
--url https://api.mervii.com/beta/price/centre-centre \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 0.5,
"state_code": ""
},
{
"addresss": "",
"centre_code": "lagos-adeniji-adele",
"country_code": "",
"item_weight": 1,
"state_code": ""
},
{
"addresss": "",
"centre_code": "ibadan-agodi-gate",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
],
"pickup_origin": {
"addresss": "",
"centre_code": "ibadan-sango",
"country_code": "",
"state_code": ""
}
}
'import requests
url = "https://api.mervii.com/beta/price/centre-centre"
payload = {
"destinations": [
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 0.5,
"state_code": ""
},
{
"addresss": "",
"centre_code": "lagos-adeniji-adele",
"country_code": "",
"item_weight": 1,
"state_code": ""
},
{
"addresss": "",
"centre_code": "ibadan-agodi-gate",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
],
"pickup_origin": {
"addresss": "",
"centre_code": "ibadan-sango",
"country_code": "",
"state_code": ""
}
}
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: [
{
addresss: '',
centre_code: '',
country_code: '',
item_weight: 0.5,
state_code: ''
},
{
addresss: '',
centre_code: 'lagos-adeniji-adele',
country_code: '',
item_weight: 1,
state_code: ''
},
{
addresss: '',
centre_code: 'ibadan-agodi-gate',
country_code: '',
item_weight: 1,
state_code: ''
}
],
pickup_origin: {addresss: '', centre_code: 'ibadan-sango', country_code: '', state_code: ''}
})
};
fetch('https://api.mervii.com/beta/price/centre-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/price/centre-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' => [
[
'addresss' => '',
'centre_code' => '',
'country_code' => '',
'item_weight' => 0.5,
'state_code' => ''
],
[
'addresss' => '',
'centre_code' => 'lagos-adeniji-adele',
'country_code' => '',
'item_weight' => 1,
'state_code' => ''
],
[
'addresss' => '',
'centre_code' => 'ibadan-agodi-gate',
'country_code' => '',
'item_weight' => 1,
'state_code' => ''
]
],
'pickup_origin' => [
'addresss' => '',
'centre_code' => 'ibadan-sango',
'country_code' => '',
'state_code' => ''
]
]),
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/price/centre-centre"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"addresss\": \"\",\n \"centre_code\": \"\",\n \"country_code\": \"\",\n \"item_weight\": 0.5,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"lagos-adeniji-adele\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-agodi-gate\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-sango\",\n \"country_code\": \"\",\n \"state_code\": \"\"\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/price/centre-centre")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"addresss\": \"\",\n \"centre_code\": \"\",\n \"country_code\": \"\",\n \"item_weight\": 0.5,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"lagos-adeniji-adele\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-agodi-gate\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-sango\",\n \"country_code\": \"\",\n \"state_code\": \"\"\n }\n}")
.asString();{
"data": {
"destinations": [
{
"addresss": null,
"centre_code": "lagos-ojodu-berger",
"country_code": null,
"dropoff_centre": {
"centre_code": "lagos-ojodu-berger",
"centre_name": "Ojodu Berger Lagos"
},
"item_weight": 0.5,
"price": {
"amount": 3000.67,
"amount_payable": 3000.67,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "0.5"
},
{
"addresss": null,
"centre_code": "lagos-adeniji-adele",
"country_code": null,
"dropoff_centre": {
"centre_code": "lagos-adeniji-adele",
"centre_name": "Adeniji Adele Lagos"
},
"item_weight": 1,
"price": {
"amount": 3500.56,
"amount_payable": 3500.56,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "1"
},
{
"addresss": null,
"centre_code": "ibadan-agodi-gate",
"country_code": null,
"dropoff_centre": {
"centre_code": "ibadan-agodi-gate",
"centre_name": "Agodi Gate Ibadan"
},
"item_weight": 1,
"price": {
"amount": 2500.25,
"amount_payable": 2500.25,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "1"
}
],
"discount_description": "0% discount",
"discount_type": "Percetage",
"pickup_origin": {
"addresss": null,
"centre_code": "ibadan-sango",
"country_code": null,
"pickup_centre": {
"centre_code": "ibadan-sango",
"centre_name": "Sango Ibadan"
},
"state_code": null
},
"total_amount": 9001.48,
"total_amount_payable": 9001.48,
"total_discount_amount": 0
},
"message": "get price",
"status": true
}{
"message": "The destinations.0.centre_code field is required.",
"status": false
}Centre-Centre
Centre (Hub) to Centre (Hub) Price
This endpoint is used to calculate the price for a delivery from a pickup centre to one or more destination centres.
POST
/
price
/
centre-centre
Centre-Centre
curl --request POST \
--url https://api.mervii.com/beta/price/centre-centre \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinations": [
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 0.5,
"state_code": ""
},
{
"addresss": "",
"centre_code": "lagos-adeniji-adele",
"country_code": "",
"item_weight": 1,
"state_code": ""
},
{
"addresss": "",
"centre_code": "ibadan-agodi-gate",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
],
"pickup_origin": {
"addresss": "",
"centre_code": "ibadan-sango",
"country_code": "",
"state_code": ""
}
}
'import requests
url = "https://api.mervii.com/beta/price/centre-centre"
payload = {
"destinations": [
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 0.5,
"state_code": ""
},
{
"addresss": "",
"centre_code": "lagos-adeniji-adele",
"country_code": "",
"item_weight": 1,
"state_code": ""
},
{
"addresss": "",
"centre_code": "ibadan-agodi-gate",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
],
"pickup_origin": {
"addresss": "",
"centre_code": "ibadan-sango",
"country_code": "",
"state_code": ""
}
}
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: [
{
addresss: '',
centre_code: '',
country_code: '',
item_weight: 0.5,
state_code: ''
},
{
addresss: '',
centre_code: 'lagos-adeniji-adele',
country_code: '',
item_weight: 1,
state_code: ''
},
{
addresss: '',
centre_code: 'ibadan-agodi-gate',
country_code: '',
item_weight: 1,
state_code: ''
}
],
pickup_origin: {addresss: '', centre_code: 'ibadan-sango', country_code: '', state_code: ''}
})
};
fetch('https://api.mervii.com/beta/price/centre-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/price/centre-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' => [
[
'addresss' => '',
'centre_code' => '',
'country_code' => '',
'item_weight' => 0.5,
'state_code' => ''
],
[
'addresss' => '',
'centre_code' => 'lagos-adeniji-adele',
'country_code' => '',
'item_weight' => 1,
'state_code' => ''
],
[
'addresss' => '',
'centre_code' => 'ibadan-agodi-gate',
'country_code' => '',
'item_weight' => 1,
'state_code' => ''
]
],
'pickup_origin' => [
'addresss' => '',
'centre_code' => 'ibadan-sango',
'country_code' => '',
'state_code' => ''
]
]),
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/price/centre-centre"
payload := strings.NewReader("{\n \"destinations\": [\n {\n \"addresss\": \"\",\n \"centre_code\": \"\",\n \"country_code\": \"\",\n \"item_weight\": 0.5,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"lagos-adeniji-adele\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-agodi-gate\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-sango\",\n \"country_code\": \"\",\n \"state_code\": \"\"\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/price/centre-centre")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": [\n {\n \"addresss\": \"\",\n \"centre_code\": \"\",\n \"country_code\": \"\",\n \"item_weight\": 0.5,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"lagos-adeniji-adele\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n },\n {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-agodi-gate\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"addresss\": \"\",\n \"centre_code\": \"ibadan-sango\",\n \"country_code\": \"\",\n \"state_code\": \"\"\n }\n}")
.asString();{
"data": {
"destinations": [
{
"addresss": null,
"centre_code": "lagos-ojodu-berger",
"country_code": null,
"dropoff_centre": {
"centre_code": "lagos-ojodu-berger",
"centre_name": "Ojodu Berger Lagos"
},
"item_weight": 0.5,
"price": {
"amount": 3000.67,
"amount_payable": 3000.67,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "0.5"
},
{
"addresss": null,
"centre_code": "lagos-adeniji-adele",
"country_code": null,
"dropoff_centre": {
"centre_code": "lagos-adeniji-adele",
"centre_name": "Adeniji Adele Lagos"
},
"item_weight": 1,
"price": {
"amount": 3500.56,
"amount_payable": 3500.56,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "1"
},
{
"addresss": null,
"centre_code": "ibadan-agodi-gate",
"country_code": null,
"dropoff_centre": {
"centre_code": "ibadan-agodi-gate",
"centre_name": "Agodi Gate Ibadan"
},
"item_weight": 1,
"price": {
"amount": 2500.25,
"amount_payable": 2500.25,
"discount_amount": 0,
"discount_description": "0% discount",
"discount_type": "Percetage",
"distance": " Kilometres to the drop off center ",
"duration": "1-4 days"
},
"state_code": null,
"weight": "1"
}
],
"discount_description": "0% discount",
"discount_type": "Percetage",
"pickup_origin": {
"addresss": null,
"centre_code": "ibadan-sango",
"country_code": null,
"pickup_centre": {
"centre_code": "ibadan-sango",
"centre_name": "Sango Ibadan"
},
"state_code": null
},
"total_amount": 9001.48,
"total_amount_payable": 9001.48,
"total_discount_amount": 0
},
"message": "get price",
"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
application/json
Show child attributes
Show child attributes
Example:
[
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 0.5,
"state_code": ""
},
{
"addresss": "",
"centre_code": "lagos-adeniji-adele",
"country_code": "",
"item_weight": 1,
"state_code": ""
},
{
"addresss": "",
"centre_code": "ibadan-agodi-gate",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
]Show child attributes
Show child attributes
Was this page helpful?
⌘I
