Update currencies
curl --request PUT \
--url http://staging.qshop.ng/apiv2/{shopId}/currencies \
--header 'Content-Type: application/json' \
--data '
[
{
"currency": "60aa6cd79aed9f2aa1b677db",
"isDisabled": false,
"isRateAutomated": true
},
{
"currency": "6175de676882441e3ba71caa",
"isDisabled": true,
"isRateAutomated": true
},
{
"baseRate": 1,
"currency": "6177255c938e558bd43b218e",
"currencyRate": 10,
"isDisabled": true
}
]
'import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/currencies"
payload = [
{
"currency": "60aa6cd79aed9f2aa1b677db",
"isDisabled": False,
"isRateAutomated": True
},
{
"currency": "6175de676882441e3ba71caa",
"isDisabled": True,
"isRateAutomated": True
},
{
"baseRate": 1,
"currency": "6177255c938e558bd43b218e",
"currencyRate": 10,
"isDisabled": True
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{currency: '60aa6cd79aed9f2aa1b677db', isDisabled: false, isRateAutomated: true},
{currency: '6175de676882441e3ba71caa', isDisabled: true, isRateAutomated: true},
{
baseRate: 1,
currency: '6177255c938e558bd43b218e',
currencyRate: 10,
isDisabled: true
}
])
};
fetch('http://staging.qshop.ng/apiv2/{shopId}/currencies', 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}/currencies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'currency' => '60aa6cd79aed9f2aa1b677db',
'isDisabled' => false,
'isRateAutomated' => true
],
[
'currency' => '6175de676882441e3ba71caa',
'isDisabled' => true,
'isRateAutomated' => true
],
[
'baseRate' => 1,
'currency' => '6177255c938e558bd43b218e',
'currencyRate' => 10,
'isDisabled' => true
]
]),
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}/currencies"
payload := strings.NewReader("[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("http://staging.qshop.ng/apiv2/{shopId}/currencies")
.header("Content-Type", "application/json")
.body("[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/currencies")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]"
response = http.request(request)
puts response.read_bodyShops - Currency
Update currencies
PUT
/
{shopId}
/
currencies
Update currencies
curl --request PUT \
--url http://staging.qshop.ng/apiv2/{shopId}/currencies \
--header 'Content-Type: application/json' \
--data '
[
{
"currency": "60aa6cd79aed9f2aa1b677db",
"isDisabled": false,
"isRateAutomated": true
},
{
"currency": "6175de676882441e3ba71caa",
"isDisabled": true,
"isRateAutomated": true
},
{
"baseRate": 1,
"currency": "6177255c938e558bd43b218e",
"currencyRate": 10,
"isDisabled": true
}
]
'import requests
url = "http://staging.qshop.ng/apiv2/{shopId}/currencies"
payload = [
{
"currency": "60aa6cd79aed9f2aa1b677db",
"isDisabled": False,
"isRateAutomated": True
},
{
"currency": "6175de676882441e3ba71caa",
"isDisabled": True,
"isRateAutomated": True
},
{
"baseRate": 1,
"currency": "6177255c938e558bd43b218e",
"currencyRate": 10,
"isDisabled": True
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{currency: '60aa6cd79aed9f2aa1b677db', isDisabled: false, isRateAutomated: true},
{currency: '6175de676882441e3ba71caa', isDisabled: true, isRateAutomated: true},
{
baseRate: 1,
currency: '6177255c938e558bd43b218e',
currencyRate: 10,
isDisabled: true
}
])
};
fetch('http://staging.qshop.ng/apiv2/{shopId}/currencies', 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}/currencies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'currency' => '60aa6cd79aed9f2aa1b677db',
'isDisabled' => false,
'isRateAutomated' => true
],
[
'currency' => '6175de676882441e3ba71caa',
'isDisabled' => true,
'isRateAutomated' => true
],
[
'baseRate' => 1,
'currency' => '6177255c938e558bd43b218e',
'currencyRate' => 10,
'isDisabled' => true
]
]),
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}/currencies"
payload := strings.NewReader("[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("http://staging.qshop.ng/apiv2/{shopId}/currencies")
.header("Content-Type", "application/json")
.body("[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{shopId}/currencies")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"currency\": \"60aa6cd79aed9f2aa1b677db\",\n \"isDisabled\": false,\n \"isRateAutomated\": true\n },\n {\n \"currency\": \"6175de676882441e3ba71caa\",\n \"isDisabled\": true,\n \"isRateAutomated\": true\n },\n {\n \"baseRate\": 1,\n \"currency\": \"6177255c938e558bd43b218e\",\n \"currencyRate\": 10,\n \"isDisabled\": true\n }\n]"
response = http.request(request)
puts response.read_bodyBody
application/json
Example:
[
{
"currency": "60aa6cd79aed9f2aa1b677db",
"isDisabled": false,
"isRateAutomated": true
},
{
"currency": "6175de676882441e3ba71caa",
"isDisabled": true,
"isRateAutomated": true
},
{
"baseRate": 1,
"currency": "6177255c938e558bd43b218e",
"currencyRate": 10,
"isDisabled": true
}
]
Response
200 - undefined
Was this page helpful?
⌘I