Create Delivery Rate
curl --request POST \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"stateData": "<string>",
"countryData": "<string>",
"cityData": "<string>",
"area": "<string>",
"geoLocation": {
"fullAddress": "<string>",
"zipCode": "<string>",
"coordinates": {
"lng": 123,
"lat": 123
},
"points": {
"type": "<string>",
"coordinates": [
123
],
"_id": "<string>"
},
"addressProximity": "<string>",
"geoNames": [
{
"lng": "<string>",
"geonameId": 123,
"name": "<string>",
"fclName": "<string>",
"toponymName": "<string>",
"fcodeName": "<string>",
"adminName1": "<string>",
"lat": "<string>",
"fcl": "<string>",
"fcode": "<string>",
"population": 123,
"adminCode1": "<string>",
"countryId": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
}
],
"google": {
"address_components": [
{
"long_name": "<string>",
"short_name": "<string>",
"types": [
"<string>"
]
}
],
"adr_address": "<string>",
"formatted_address": "<string>",
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"south": 123,
"west": 123,
"north": 123,
"east": 123
}
},
"name": "<string>",
"types": [
"<string>"
],
"utc_offset": 123,
"html_attributions": "<array>",
"utc_offset_minutes": 123
},
"_id": "<string>"
},
"isDefault": true,
"_id": "<string>",
"id": "<string>",
"fullName": "<string>",
"contact": {
"telephone": "<string>",
"email": "<string>"
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates"
payload = {
"address": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"stateData": "<string>",
"countryData": "<string>",
"cityData": "<string>",
"area": "<string>",
"geoLocation": {
"fullAddress": "<string>",
"zipCode": "<string>",
"coordinates": {
"lng": 123,
"lat": 123
},
"points": {
"type": "<string>",
"coordinates": [123],
"_id": "<string>"
},
"addressProximity": "<string>",
"geoNames": [
{
"lng": "<string>",
"geonameId": 123,
"name": "<string>",
"fclName": "<string>",
"toponymName": "<string>",
"fcodeName": "<string>",
"adminName1": "<string>",
"lat": "<string>",
"fcl": "<string>",
"fcode": "<string>",
"population": 123,
"adminCode1": "<string>",
"countryId": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
}
],
"google": {
"address_components": [
{
"long_name": "<string>",
"short_name": "<string>",
"types": ["<string>"]
}
],
"adr_address": "<string>",
"formatted_address": "<string>",
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"south": 123,
"west": 123,
"north": 123,
"east": 123
}
},
"name": "<string>",
"types": ["<string>"],
"utc_offset": 123,
"html_attributions": "<array>",
"utc_offset_minutes": 123
},
"_id": "<string>"
},
"isDefault": True,
"_id": "<string>",
"id": "<string>",
"fullName": "<string>",
"contact": {
"telephone": "<string>",
"email": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
line_1: '<string>',
line_2: '<string>',
stateData: '<string>',
countryData: '<string>',
cityData: '<string>',
area: '<string>',
geoLocation: {
fullAddress: '<string>',
zipCode: '<string>',
coordinates: {lng: 123, lat: 123},
points: {type: '<string>', coordinates: [123], _id: '<string>'},
addressProximity: '<string>',
geoNames: [
{
lng: '<string>',
geonameId: 123,
name: '<string>',
fclName: '<string>',
toponymName: '<string>',
fcodeName: '<string>',
adminName1: '<string>',
lat: '<string>',
fcl: '<string>',
fcode: '<string>',
population: 123,
adminCode1: '<string>',
countryId: '<string>',
countryCode: '<string>',
countryName: '<string>'
}
],
google: {
address_components: [{long_name: '<string>', short_name: '<string>', types: ['<string>']}],
adr_address: '<string>',
formatted_address: '<string>',
geometry: {
location: {lat: 123, lng: 123},
viewport: {south: 123, west: 123, north: 123, east: 123}
},
name: '<string>',
types: ['<string>'],
utc_offset: 123,
html_attributions: '<array>',
utc_offset_minutes: 123
},
_id: '<string>'
},
isDefault: true,
_id: '<string>',
id: '<string>',
fullName: '<string>',
contact: {telephone: '<string>', email: '<string>'}
})
};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates', 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 => "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates",
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([
'address' => '<string>',
'line_1' => '<string>',
'line_2' => '<string>',
'stateData' => '<string>',
'countryData' => '<string>',
'cityData' => '<string>',
'area' => '<string>',
'geoLocation' => [
'fullAddress' => '<string>',
'zipCode' => '<string>',
'coordinates' => [
'lng' => 123,
'lat' => 123
],
'points' => [
'type' => '<string>',
'coordinates' => [
123
],
'_id' => '<string>'
],
'addressProximity' => '<string>',
'geoNames' => [
[
'lng' => '<string>',
'geonameId' => 123,
'name' => '<string>',
'fclName' => '<string>',
'toponymName' => '<string>',
'fcodeName' => '<string>',
'adminName1' => '<string>',
'lat' => '<string>',
'fcl' => '<string>',
'fcode' => '<string>',
'population' => 123,
'adminCode1' => '<string>',
'countryId' => '<string>',
'countryCode' => '<string>',
'countryName' => '<string>'
]
],
'google' => [
'address_components' => [
[
'long_name' => '<string>',
'short_name' => '<string>',
'types' => [
'<string>'
]
]
],
'adr_address' => '<string>',
'formatted_address' => '<string>',
'geometry' => [
'location' => [
'lat' => 123,
'lng' => 123
],
'viewport' => [
'south' => 123,
'west' => 123,
'north' => 123,
'east' => 123
]
],
'name' => '<string>',
'types' => [
'<string>'
],
'utc_offset' => 123,
'html_attributions' => '<array>',
'utc_offset_minutes' => 123
],
'_id' => '<string>'
],
'isDefault' => true,
'_id' => '<string>',
'id' => '<string>',
'fullName' => '<string>',
'contact' => [
'telephone' => '<string>',
'email' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"recommended": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"media": "<string>",
"rateType": "<string>",
"amount": 123,
"serviceType": "<string>",
"currency": "<string>",
"estimatedDeliveryETA": "<string>",
"estimatedPickupETA": "<string>",
"estimatedDeliveryETADateTime": "<string>",
"estimatedPickupETADateTime": "<string>",
"description": "<string>",
"courier": "<string>",
"provider": "<string>",
"type": "<string>",
"platform": "<string>",
"ratings": 123,
"meta": {
"courier_id": "<string>",
"courier_name": "<string>",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": null,
"pickup_station": null,
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": [
"<string>"
],
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"token": "<string>"
},
"preferenceStatus": "<string>",
"actualAmount": 123,
"markup": 123,
"markupMeta": null
},
"providers": [
{
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"media": "<string>",
"rateType": "<string>",
"amount": 123,
"serviceType": "<string>",
"currency": "<string>",
"estimatedDeliveryETA": "<string>",
"estimatedPickupETA": "<string>",
"estimatedDeliveryETADateTime": "<string>",
"estimatedPickupETADateTime": "<string>",
"description": "<string>",
"courier": "<string>",
"provider": "<string>",
"type": "<string>",
"platform": "<string>",
"ratings": 123,
"meta": {
"courier_id": "<string>",
"courier_name": "<string>",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": null,
"pickup_station": null,
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": [
"<string>"
],
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"token": "<string>"
},
"preferenceStatus": "<string>",
"actualAmount": 123,
"markup": 123,
"markupMeta": null
}
]
},
"success": true
}Shops
Create Delivery Rate
Host: http://qshop.ng
POST
/
shops
/
{shopId}
/
delivery
/
rates
Create Delivery Rate
curl --request POST \
--url http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"stateData": "<string>",
"countryData": "<string>",
"cityData": "<string>",
"area": "<string>",
"geoLocation": {
"fullAddress": "<string>",
"zipCode": "<string>",
"coordinates": {
"lng": 123,
"lat": 123
},
"points": {
"type": "<string>",
"coordinates": [
123
],
"_id": "<string>"
},
"addressProximity": "<string>",
"geoNames": [
{
"lng": "<string>",
"geonameId": 123,
"name": "<string>",
"fclName": "<string>",
"toponymName": "<string>",
"fcodeName": "<string>",
"adminName1": "<string>",
"lat": "<string>",
"fcl": "<string>",
"fcode": "<string>",
"population": 123,
"adminCode1": "<string>",
"countryId": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
}
],
"google": {
"address_components": [
{
"long_name": "<string>",
"short_name": "<string>",
"types": [
"<string>"
]
}
],
"adr_address": "<string>",
"formatted_address": "<string>",
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"south": 123,
"west": 123,
"north": 123,
"east": 123
}
},
"name": "<string>",
"types": [
"<string>"
],
"utc_offset": 123,
"html_attributions": "<array>",
"utc_offset_minutes": 123
},
"_id": "<string>"
},
"isDefault": true,
"_id": "<string>",
"id": "<string>",
"fullName": "<string>",
"contact": {
"telephone": "<string>",
"email": "<string>"
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates"
payload = {
"address": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"stateData": "<string>",
"countryData": "<string>",
"cityData": "<string>",
"area": "<string>",
"geoLocation": {
"fullAddress": "<string>",
"zipCode": "<string>",
"coordinates": {
"lng": 123,
"lat": 123
},
"points": {
"type": "<string>",
"coordinates": [123],
"_id": "<string>"
},
"addressProximity": "<string>",
"geoNames": [
{
"lng": "<string>",
"geonameId": 123,
"name": "<string>",
"fclName": "<string>",
"toponymName": "<string>",
"fcodeName": "<string>",
"adminName1": "<string>",
"lat": "<string>",
"fcl": "<string>",
"fcode": "<string>",
"population": 123,
"adminCode1": "<string>",
"countryId": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
}
],
"google": {
"address_components": [
{
"long_name": "<string>",
"short_name": "<string>",
"types": ["<string>"]
}
],
"adr_address": "<string>",
"formatted_address": "<string>",
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"south": 123,
"west": 123,
"north": 123,
"east": 123
}
},
"name": "<string>",
"types": ["<string>"],
"utc_offset": 123,
"html_attributions": "<array>",
"utc_offset_minutes": 123
},
"_id": "<string>"
},
"isDefault": True,
"_id": "<string>",
"id": "<string>",
"fullName": "<string>",
"contact": {
"telephone": "<string>",
"email": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
line_1: '<string>',
line_2: '<string>',
stateData: '<string>',
countryData: '<string>',
cityData: '<string>',
area: '<string>',
geoLocation: {
fullAddress: '<string>',
zipCode: '<string>',
coordinates: {lng: 123, lat: 123},
points: {type: '<string>', coordinates: [123], _id: '<string>'},
addressProximity: '<string>',
geoNames: [
{
lng: '<string>',
geonameId: 123,
name: '<string>',
fclName: '<string>',
toponymName: '<string>',
fcodeName: '<string>',
adminName1: '<string>',
lat: '<string>',
fcl: '<string>',
fcode: '<string>',
population: 123,
adminCode1: '<string>',
countryId: '<string>',
countryCode: '<string>',
countryName: '<string>'
}
],
google: {
address_components: [{long_name: '<string>', short_name: '<string>', types: ['<string>']}],
adr_address: '<string>',
formatted_address: '<string>',
geometry: {
location: {lat: 123, lng: 123},
viewport: {south: 123, west: 123, north: 123, east: 123}
},
name: '<string>',
types: ['<string>'],
utc_offset: 123,
html_attributions: '<array>',
utc_offset_minutes: 123
},
_id: '<string>'
},
isDefault: true,
_id: '<string>',
id: '<string>',
fullName: '<string>',
contact: {telephone: '<string>', email: '<string>'}
})
};
fetch('http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates', 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 => "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates",
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([
'address' => '<string>',
'line_1' => '<string>',
'line_2' => '<string>',
'stateData' => '<string>',
'countryData' => '<string>',
'cityData' => '<string>',
'area' => '<string>',
'geoLocation' => [
'fullAddress' => '<string>',
'zipCode' => '<string>',
'coordinates' => [
'lng' => 123,
'lat' => 123
],
'points' => [
'type' => '<string>',
'coordinates' => [
123
],
'_id' => '<string>'
],
'addressProximity' => '<string>',
'geoNames' => [
[
'lng' => '<string>',
'geonameId' => 123,
'name' => '<string>',
'fclName' => '<string>',
'toponymName' => '<string>',
'fcodeName' => '<string>',
'adminName1' => '<string>',
'lat' => '<string>',
'fcl' => '<string>',
'fcode' => '<string>',
'population' => 123,
'adminCode1' => '<string>',
'countryId' => '<string>',
'countryCode' => '<string>',
'countryName' => '<string>'
]
],
'google' => [
'address_components' => [
[
'long_name' => '<string>',
'short_name' => '<string>',
'types' => [
'<string>'
]
]
],
'adr_address' => '<string>',
'formatted_address' => '<string>',
'geometry' => [
'location' => [
'lat' => 123,
'lng' => 123
],
'viewport' => [
'south' => 123,
'west' => 123,
'north' => 123,
'east' => 123
]
],
'name' => '<string>',
'types' => [
'<string>'
],
'utc_offset' => 123,
'html_attributions' => '<array>',
'utc_offset_minutes' => 123
],
'_id' => '<string>'
],
'isDefault' => true,
'_id' => '<string>',
'id' => '<string>',
'fullName' => '<string>',
'contact' => [
'telephone' => '<string>',
'email' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/shops/{shopId}/delivery/rates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"stateData\": \"<string>\",\n \"countryData\": \"<string>\",\n \"cityData\": \"<string>\",\n \"area\": \"<string>\",\n \"geoLocation\": {\n \"fullAddress\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"coordinates\": {\n \"lng\": 123,\n \"lat\": 123\n },\n \"points\": {\n \"type\": \"<string>\",\n \"coordinates\": [\n 123\n ],\n \"_id\": \"<string>\"\n },\n \"addressProximity\": \"<string>\",\n \"geoNames\": [\n {\n \"lng\": \"<string>\",\n \"geonameId\": 123,\n \"name\": \"<string>\",\n \"fclName\": \"<string>\",\n \"toponymName\": \"<string>\",\n \"fcodeName\": \"<string>\",\n \"adminName1\": \"<string>\",\n \"lat\": \"<string>\",\n \"fcl\": \"<string>\",\n \"fcode\": \"<string>\",\n \"population\": 123,\n \"adminCode1\": \"<string>\",\n \"countryId\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"countryName\": \"<string>\"\n }\n ],\n \"google\": {\n \"address_components\": [\n {\n \"long_name\": \"<string>\",\n \"short_name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ]\n }\n ],\n \"adr_address\": \"<string>\",\n \"formatted_address\": \"<string>\",\n \"geometry\": {\n \"location\": {\n \"lat\": 123,\n \"lng\": 123\n },\n \"viewport\": {\n \"south\": 123,\n \"west\": 123,\n \"north\": 123,\n \"east\": 123\n }\n },\n \"name\": \"<string>\",\n \"types\": [\n \"<string>\"\n ],\n \"utc_offset\": 123,\n \"html_attributions\": \"<array>\",\n \"utc_offset_minutes\": 123\n },\n \"_id\": \"<string>\"\n },\n \"isDefault\": true,\n \"_id\": \"<string>\",\n \"id\": \"<string>\",\n \"fullName\": \"<string>\",\n \"contact\": {\n \"telephone\": \"<string>\",\n \"email\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"recommended": {
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"media": "<string>",
"rateType": "<string>",
"amount": 123,
"serviceType": "<string>",
"currency": "<string>",
"estimatedDeliveryETA": "<string>",
"estimatedPickupETA": "<string>",
"estimatedDeliveryETADateTime": "<string>",
"estimatedPickupETADateTime": "<string>",
"description": "<string>",
"courier": "<string>",
"provider": "<string>",
"type": "<string>",
"platform": "<string>",
"ratings": 123,
"meta": {
"courier_id": "<string>",
"courier_name": "<string>",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": null,
"pickup_station": null,
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": [
"<string>"
],
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"token": "<string>"
},
"preferenceStatus": "<string>",
"actualAmount": 123,
"markup": 123,
"markupMeta": null
},
"providers": [
{
"id": "<string>",
"_id": "<string>",
"name": "<string>",
"media": "<string>",
"rateType": "<string>",
"amount": 123,
"serviceType": "<string>",
"currency": "<string>",
"estimatedDeliveryETA": "<string>",
"estimatedPickupETA": "<string>",
"estimatedDeliveryETADateTime": "<string>",
"estimatedPickupETADateTime": "<string>",
"description": "<string>",
"courier": "<string>",
"provider": "<string>",
"type": "<string>",
"platform": "<string>",
"ratings": 123,
"meta": {
"courier_id": "<string>",
"courier_name": "<string>",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": null,
"pickup_station": null,
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": [
"<string>"
],
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"token": "<string>"
},
"preferenceStatus": "<string>",
"actualAmount": 123,
"markup": 123,
"markupMeta": null
}
]
},
"success": true
}Path Parameters
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I