Update config
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/ \
--header 'Content-Type: application/json' \
--data '
{
"order": {
"abandoned": {
"deleteAfter": {
"duration": 1,
"durationType": "month"
},
"statusesToUpdate": [
"initiated"
],
"updateAfter": {
"duration": 1,
"durationType": "day"
}
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 0
},
"payout.providus": {
"delayFreeAccount": {
"length": 13,
"type": "h"
},
"delayPaidAccount": {
"length": 0,
"type": "h"
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 1.3
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/"
payload = {
"order": {
"abandoned": {
"deleteAfter": {
"duration": 1,
"durationType": "month"
},
"statusesToUpdate": ["initiated"],
"updateAfter": {
"duration": 1,
"durationType": "day"
}
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 0
},
"payout.providus": {
"delayFreeAccount": {
"length": 13,
"type": "h"
},
"delayPaidAccount": {
"length": 0,
"type": "h"
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 1.3
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order: {
abandoned: {
deleteAfter: {duration: 1, durationType: 'month'},
statusesToUpdate: ['initiated'],
updateAfter: {duration: 1, durationType: 'day'}
},
freeShopPercentageCharge: 4,
paidShopPercentageCharge: 0
},
'payout.providus': {
delayFreeAccount: {length: 13, type: 'h'},
delayPaidAccount: {length: 0, type: 'h'},
freeShopPercentageCharge: 4,
paidShopPercentageCharge: 1.3
}
})
};
fetch('http://staging.qshop.ng/apiv2/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'order' => [
'abandoned' => [
'deleteAfter' => [
'duration' => 1,
'durationType' => 'month'
],
'statusesToUpdate' => [
'initiated'
],
'updateAfter' => [
'duration' => 1,
'durationType' => 'day'
]
],
'freeShopPercentageCharge' => 4,
'paidShopPercentageCharge' => 0
],
'payout.providus' => [
'delayFreeAccount' => [
'length' => 13,
'type' => 'h'
],
'delayPaidAccount' => [
'length' => 0,
'type' => 'h'
],
'freeShopPercentageCharge' => 4,
'paidShopPercentageCharge' => 1.3
]
]),
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/"
payload := strings.NewReader("{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://staging.qshop.ng/apiv2/")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}"
response = http.request(request)
puts response.read_bodyConfig
Update config
PATCH
/
Update config
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/ \
--header 'Content-Type: application/json' \
--data '
{
"order": {
"abandoned": {
"deleteAfter": {
"duration": 1,
"durationType": "month"
},
"statusesToUpdate": [
"initiated"
],
"updateAfter": {
"duration": 1,
"durationType": "day"
}
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 0
},
"payout.providus": {
"delayFreeAccount": {
"length": 13,
"type": "h"
},
"delayPaidAccount": {
"length": 0,
"type": "h"
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 1.3
}
}
'import requests
url = "http://staging.qshop.ng/apiv2/"
payload = {
"order": {
"abandoned": {
"deleteAfter": {
"duration": 1,
"durationType": "month"
},
"statusesToUpdate": ["initiated"],
"updateAfter": {
"duration": 1,
"durationType": "day"
}
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 0
},
"payout.providus": {
"delayFreeAccount": {
"length": 13,
"type": "h"
},
"delayPaidAccount": {
"length": 0,
"type": "h"
},
"freeShopPercentageCharge": 4,
"paidShopPercentageCharge": 1.3
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order: {
abandoned: {
deleteAfter: {duration: 1, durationType: 'month'},
statusesToUpdate: ['initiated'],
updateAfter: {duration: 1, durationType: 'day'}
},
freeShopPercentageCharge: 4,
paidShopPercentageCharge: 0
},
'payout.providus': {
delayFreeAccount: {length: 13, type: 'h'},
delayPaidAccount: {length: 0, type: 'h'},
freeShopPercentageCharge: 4,
paidShopPercentageCharge: 1.3
}
})
};
fetch('http://staging.qshop.ng/apiv2/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'order' => [
'abandoned' => [
'deleteAfter' => [
'duration' => 1,
'durationType' => 'month'
],
'statusesToUpdate' => [
'initiated'
],
'updateAfter' => [
'duration' => 1,
'durationType' => 'day'
]
],
'freeShopPercentageCharge' => 4,
'paidShopPercentageCharge' => 0
],
'payout.providus' => [
'delayFreeAccount' => [
'length' => 13,
'type' => 'h'
],
'delayPaidAccount' => [
'length' => 0,
'type' => 'h'
],
'freeShopPercentageCharge' => 4,
'paidShopPercentageCharge' => 1.3
]
]),
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/"
payload := strings.NewReader("{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://staging.qshop.ng/apiv2/")
.header("Content-Type", "application/json")
.body("{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": {\n \"abandoned\": {\n \"deleteAfter\": {\n \"duration\": 1,\n \"durationType\": \"month\"\n },\n \"statusesToUpdate\": [\n \"initiated\"\n ],\n \"updateAfter\": {\n \"duration\": 1,\n \"durationType\": \"day\"\n }\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 0\n },\n \"payout.providus\": {\n \"delayFreeAccount\": {\n \"length\": 13,\n \"type\": \"h\"\n },\n \"delayPaidAccount\": {\n \"length\": 0,\n \"type\": \"h\"\n },\n \"freeShopPercentageCharge\": 4,\n \"paidShopPercentageCharge\": 1.3\n }\n}"
response = http.request(request)
puts response.read_bodyWas this page helpful?
⌘I