Get shipping zones
curl --request GET \
--url http://staging.qshop.ng/apiv2/{shopId}/shipping/zones \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Badmus Rasaq Adeyinka"
}
'import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/shipping/zones"
payload = { "full_name": "Badmus Rasaq Adeyinka" }
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Badmus Rasaq Adeyinka'})
};
fetch('http://staging.qshop.ng/apiv2/{shopId}/shipping/zones', 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/{shopId}/shipping/zones",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Badmus Rasaq Adeyinka'
]),
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/{shopId}/shipping/zones"
payload := strings.NewReader("{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}")
req, _ := http.NewRequest("GET", 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.get("http://staging.qshop.ng/apiv2/{shopId}/shipping/zones")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/shipping/zones")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"currentPage": 1,
"data": [
{
"__v": 0,
"_id": "63420576c267f66c26475611",
"cities": [],
"countries": [],
"created": "2022-10-08T23:19:18.543Z",
"label": "local",
"name": "East Africa",
"regions": [
{
"_id": "634eb61bd6812eb5e78113ca",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "634eb61bd6812eb5e78113cb",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "east-africa",
"states": [],
"updated": "2022-10-08T23:19:18.543Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "63421f6ecb408f5d7f284a12",
"cities": [],
"countries": [],
"created": "2022-10-09T01:10:06.359Z",
"label": "international",
"name": "North Africa",
"regions": [],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "north-africa",
"states": [],
"updated": "2022-10-09T01:10:06.359Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "63422140fe2badf66ea5bce1",
"cities": [],
"countries": [],
"created": "2022-10-09T01:17:52.410Z",
"label": "local",
"name": "North Africanas",
"regions": [],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "north-africanas",
"states": [],
"updated": "2022-10-09T01:17:52.410Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "634eb011c8fb556791be0743",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"countries": [
"628c8d3c21ce8313e6293c8e"
],
"created": "2022-10-18T13:54:25.394Z",
"name": "Test Africanas",
"regions": [
{
"_id": "634eb011c8fb556791be0744",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "634eb011c8fb556791be0745",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "test-africanas",
"states": [
"62c80815c9d738e14b8988ce"
],
"updated": "2022-10-18T13:54:25.394Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "635a98d76231f050e45949a9",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"countries": [
"628c8d3c21ce8313e6293c8e"
],
"created": "2022-10-27T14:42:31.425Z",
"name": "Test Africanaers",
"regions": [
{
"_id": "635a98d76231f050e45949aa",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "635a98d76231f050e45949ab",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "test-africanaers",
"states": [
"62c80815c9d738e14b8988ce"
],
"updated": "2022-10-27T14:42:31.425Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
}
],
"next": null,
"noOfPages": 1,
"prev": null,
"totalRecord": 5
},
"msg": "Zone fetched successfully",
"success": true
}Shops - Shipping zones
Get shipping zones
GET
/
{shopId}
/
shipping
/
zones
Get shipping zones
curl --request GET \
--url http://staging.qshop.ng/apiv2/{shopId}/shipping/zones \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Badmus Rasaq Adeyinka"
}
'import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/shipping/zones"
payload = { "full_name": "Badmus Rasaq Adeyinka" }
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Badmus Rasaq Adeyinka'})
};
fetch('http://staging.qshop.ng/apiv2/{shopId}/shipping/zones', 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/{shopId}/shipping/zones",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Badmus Rasaq Adeyinka'
]),
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/{shopId}/shipping/zones"
payload := strings.NewReader("{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}")
req, _ := http.NewRequest("GET", 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.get("http://staging.qshop.ng/apiv2/{shopId}/shipping/zones")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/shipping/zones")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Badmus Rasaq Adeyinka\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"currentPage": 1,
"data": [
{
"__v": 0,
"_id": "63420576c267f66c26475611",
"cities": [],
"countries": [],
"created": "2022-10-08T23:19:18.543Z",
"label": "local",
"name": "East Africa",
"regions": [
{
"_id": "634eb61bd6812eb5e78113ca",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "634eb61bd6812eb5e78113cb",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "east-africa",
"states": [],
"updated": "2022-10-08T23:19:18.543Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "63421f6ecb408f5d7f284a12",
"cities": [],
"countries": [],
"created": "2022-10-09T01:10:06.359Z",
"label": "international",
"name": "North Africa",
"regions": [],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "north-africa",
"states": [],
"updated": "2022-10-09T01:10:06.359Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "63422140fe2badf66ea5bce1",
"cities": [],
"countries": [],
"created": "2022-10-09T01:17:52.410Z",
"label": "local",
"name": "North Africanas",
"regions": [],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "north-africanas",
"states": [],
"updated": "2022-10-09T01:17:52.410Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "634eb011c8fb556791be0743",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"countries": [
"628c8d3c21ce8313e6293c8e"
],
"created": "2022-10-18T13:54:25.394Z",
"name": "Test Africanas",
"regions": [
{
"_id": "634eb011c8fb556791be0744",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "634eb011c8fb556791be0745",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "test-africanas",
"states": [
"62c80815c9d738e14b8988ce"
],
"updated": "2022-10-18T13:54:25.394Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
},
{
"__v": 0,
"_id": "635a98d76231f050e45949a9",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"countries": [
"628c8d3c21ce8313e6293c8e"
],
"created": "2022-10-27T14:42:31.425Z",
"name": "Test Africanaers",
"regions": [
{
"_id": "635a98d76231f050e45949aa",
"country": "628c8d3c21ce8313e6293c8e",
"regions": [
{
"_id": "635a98d76231f050e45949ab",
"cities": [
"62c8341dee498d69b64c64a0",
"62c8341dee498d69b64c64a1"
],
"state": "62c80815c9d738e14b8988ce"
}
]
}
],
"restOfTheWorld": false,
"shop": {
"_id": "61a956d91a113f7e13c45c15",
"domainActive": false,
"domainName": "staar.pre",
"email": "adeyinkabadmus@gmail.com",
"name": "Egoli",
"slug": "egoli"
},
"slug": "test-africanaers",
"states": [
"62c80815c9d738e14b8988ce"
],
"updated": "2022-10-27T14:42:31.425Z",
"updatedBy": {
"_id": "61a956551a113f7e13c45c10",
"email": "adeyinkabadmus@gmail.com",
"full_name": "Badmus Rasaq Adeyinkarer4"
}
}
],
"next": null,
"noOfPages": 1,
"prev": null,
"totalRecord": 5
},
"msg": "Zone fetched successfully",
"success": true
}Body
application/json
Example:
"Badmus Rasaq Adeyinka"
Was this page helpful?
⌘I