Skip to main content
POST
/
price
/
door-centre
Door - Centre
curl --request POST \
  --url https://api.mervii.com/beta/price/door-centre \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "destinations": [
    {
      "addresss": "",
      "centre_code": "",
      "country_code": "",
      "item_weight": 1,
      "state_code": ""
    }
  ],
  "pickup_origin": {
    "city": "",
    "country_code": "NG",
    "region": {
      "latitude": 7.427026700000001,
      "longitude": 3.8900142
    },
    "state_code": "LA"
  }
}
'
import requests

url = "https://api.mervii.com/beta/price/door-centre"

payload = {
"destinations": [
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
],
"pickup_origin": {
"city": "",
"country_code": "NG",
"region": {
"latitude": 7.427026700000001,
"longitude": 3.8900142
},
"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: [
{
addresss: '',
centre_code: '',
country_code: '',
item_weight: 1,
state_code: ''
}
],
pickup_origin: {
city: '',
country_code: 'NG',
region: {latitude: 7.427026700000001, longitude: 3.8900142},
state_code: 'LA'
}
})
};

fetch('https://api.mervii.com/beta/price/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/price/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' => [
[
'addresss' => '',
'centre_code' => '',
'country_code' => '',
'item_weight' => 1,
'state_code' => ''
]
],
'pickup_origin' => [
'city' => '',
'country_code' => 'NG',
'region' => [
'latitude' => 7.427026700000001,
'longitude' => 3.8900142
],
'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/price/door-centre"

payload := strings.NewReader("{\n \"destinations\": [\n {\n \"addresss\": \"\",\n \"centre_code\": \"\",\n \"country_code\": \"\",\n \"item_weight\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"\",\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\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/price/door-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\": 1,\n \"state_code\": \"\"\n }\n ],\n \"pickup_origin\": {\n \"city\": \"\",\n \"country_code\": \"NG\",\n \"region\": {\n \"latitude\": 7.427026700000001,\n \"longitude\": 3.8900142\n },\n \"state_code\": \"LA\"\n }\n}")
.asString();
{
  "data": {
    "destinations": [
      {
        "addresss": null,
        "centre_code": "ibadan-sango",
        "country_code": null,
        "dropoff_centre": {
          "centre_code": "ibadan-sango",
          "centre_name": "Sango Ibadan"
        },
        "item_weight": 1,
        "price": {
          "amount": 3000.98,
          "amount_payable": 3000.98,
          "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": {
      "city": null,
      "country_code": "NG",
      "pickup_centre": {
        "centre_code": "lagos-ojodu-berger",
        "centre_name": "Ojodu Berger Lagos"
      },
      "region": {
        "latitude": 7.427026700000001,
        "longitude": 3.8900142
      },
      "state_code": "LA"
    },
    "total_amount": 11192.940875080363,
    "total_amount_payable": 11192.940875080363,
    "total_discount_amount": 0
  },
  "message": "get price",
  "status": true
}
{
"message": "The destinations.0.centre_code field is required.",
"status": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
destinations
object[]
Example:
[
{
"addresss": "",
"centre_code": "",
"country_code": "",
"item_weight": 1,
"state_code": ""
}
]
pickup_origin
object

Response

success

data
object
message
string
Example:

"get price"

status
boolean
Example:

true