Update User new
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/{user_id}/update \
--header 'Content-Type: application/json' \
--data '
{
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"telephone": "+2348137064736"
}
'import requests
url = "http://staging.qshop.ng/apiv2/{user_id}/update"
payload = {
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"telephone": "+2348137064736"
}
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({
email: 'vomofiv713@dilanfa.com',
full_name: 'Louief',
telephone: '+2348137064736'
})
};
fetch('http://staging.qshop.ng/apiv2/{user_id}/update', 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/{user_id}/update",
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([
'email' => 'vomofiv713@dilanfa.com',
'full_name' => 'Louief',
'telephone' => '+2348137064736'
]),
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/{user_id}/update"
payload := strings.NewReader("{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\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/{user_id}/update")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{user_id}/update")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"id": "629e06ac81da717af2ed2b98",
"isAdmin": true,
"last_access": "2022-06-06T13:53:37.800Z",
"reg_date": "2022-06-06T13:53:37.800Z",
"reset_pass": true,
"roles": [
{
"_id": "5e7e89bf872c2c0f8c1c3fb4",
"isAdmin": true,
"isSuperAdmin": false,
"name": "Shop Admin"
}
],
"shop": {
"__v": 2,
"_id": "5f3ef405c072de214d9d6703",
"billingNotice": "2020-08-27T08:00:00.364Z",
"bio": "Best uk used phone shop",
"call": true,
"created": "2020-08-20T22:07:01.725Z",
"currencies": [],
"email": "arinzeesomnofu@gmail.com",
"inventoryConfig": {
"displayOptionKeyId": "6c6f775f696e5f73746f636b",
"enableProductPageStockCount": false,
"isLowStockEnabled": false,
"isOutOfStockEnabled": false
},
"locations": [],
"logo": "5f3ef405c072de214d9d6702-inbound3469806257505107320.jpg",
"modified": "2020-08-20T22:07:01.725Z",
"name": "I sell phones and laptop",
"owner": {
"__v": 0,
"_id": "5f3ef3c8c072de214d9d6701",
"email": "arinzeesomnofu@gmail.com",
"full_name": "Arinze Esomnofu",
"last_access": "2021-08-11T09:14:41.759Z",
"pass": "$2b$10$dmOPpIxa7dlfCYCbiMYWiueO2JWfQ9VcqynlIYfTlRu5RWCD9hDre",
"profiles": [],
"referred_by": "5f3c62f4bc19938f1ad2e212",
"reg_date": "2020-08-20T22:06:00.935Z",
"reset_pass": false,
"roles": [
"5e7e89bf872c2c0f8c1c3fb4"
],
"shopCount": 1,
"social": [],
"telephone": "+2348031391676",
"username": "arinzeesomnofu@gmail.com"
},
"paymentError": [],
"paymentMethods": [],
"productWeightConfig": {
"unit": "kg"
},
"products": 1,
"shippingRates": [
{
"_id": "5ee6a2f6eea46308e8f84863",
"countryCode": "NG",
"disableShipping": false,
"enableShipping": true,
"name": "Rivers",
"rate": "4000"
}
],
"shopCategory": {
"_id": "5f3c62287fe78f559ccf7793",
"name": "Phones & Tablets",
"weight": 140
},
"shopPreview": "2020-08-28T11:42:09.730Z",
"slug": "i-sell-phones-and-laptop",
"status": "pending",
"telephone": "+2348031391676",
"theme": "MINIMAL",
"whatsApp": true
},
"shopCount": 0,
"telephone": "+2348137064736",
"test_user": false,
"username": "vomofiv713@dilanfa.com"
},
"message": "User updated successfully",
"status": 200,
"success": true
}Shops
Update user new
PATCH
/
{user_id}
/
update
Update User new
curl --request PATCH \
--url http://staging.qshop.ng/apiv2/{user_id}/update \
--header 'Content-Type: application/json' \
--data '
{
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"telephone": "+2348137064736"
}
'import requests
url = "http://staging.qshop.ng/apiv2/{user_id}/update"
payload = {
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"telephone": "+2348137064736"
}
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({
email: 'vomofiv713@dilanfa.com',
full_name: 'Louief',
telephone: '+2348137064736'
})
};
fetch('http://staging.qshop.ng/apiv2/{user_id}/update', 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/{user_id}/update",
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([
'email' => 'vomofiv713@dilanfa.com',
'full_name' => 'Louief',
'telephone' => '+2348137064736'
]),
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/{user_id}/update"
payload := strings.NewReader("{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\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/{user_id}/update")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://staging.qshop.ng/apiv2/{user_id}/update")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"vomofiv713@dilanfa.com\",\n \"full_name\": \"Louief\",\n \"telephone\": \"+2348137064736\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email": "vomofiv713@dilanfa.com",
"full_name": "Louief",
"id": "629e06ac81da717af2ed2b98",
"isAdmin": true,
"last_access": "2022-06-06T13:53:37.800Z",
"reg_date": "2022-06-06T13:53:37.800Z",
"reset_pass": true,
"roles": [
{
"_id": "5e7e89bf872c2c0f8c1c3fb4",
"isAdmin": true,
"isSuperAdmin": false,
"name": "Shop Admin"
}
],
"shop": {
"__v": 2,
"_id": "5f3ef405c072de214d9d6703",
"billingNotice": "2020-08-27T08:00:00.364Z",
"bio": "Best uk used phone shop",
"call": true,
"created": "2020-08-20T22:07:01.725Z",
"currencies": [],
"email": "arinzeesomnofu@gmail.com",
"inventoryConfig": {
"displayOptionKeyId": "6c6f775f696e5f73746f636b",
"enableProductPageStockCount": false,
"isLowStockEnabled": false,
"isOutOfStockEnabled": false
},
"locations": [],
"logo": "5f3ef405c072de214d9d6702-inbound3469806257505107320.jpg",
"modified": "2020-08-20T22:07:01.725Z",
"name": "I sell phones and laptop",
"owner": {
"__v": 0,
"_id": "5f3ef3c8c072de214d9d6701",
"email": "arinzeesomnofu@gmail.com",
"full_name": "Arinze Esomnofu",
"last_access": "2021-08-11T09:14:41.759Z",
"pass": "$2b$10$dmOPpIxa7dlfCYCbiMYWiueO2JWfQ9VcqynlIYfTlRu5RWCD9hDre",
"profiles": [],
"referred_by": "5f3c62f4bc19938f1ad2e212",
"reg_date": "2020-08-20T22:06:00.935Z",
"reset_pass": false,
"roles": [
"5e7e89bf872c2c0f8c1c3fb4"
],
"shopCount": 1,
"social": [],
"telephone": "+2348031391676",
"username": "arinzeesomnofu@gmail.com"
},
"paymentError": [],
"paymentMethods": [],
"productWeightConfig": {
"unit": "kg"
},
"products": 1,
"shippingRates": [
{
"_id": "5ee6a2f6eea46308e8f84863",
"countryCode": "NG",
"disableShipping": false,
"enableShipping": true,
"name": "Rivers",
"rate": "4000"
}
],
"shopCategory": {
"_id": "5f3c62287fe78f559ccf7793",
"name": "Phones & Tablets",
"weight": 140
},
"shopPreview": "2020-08-28T11:42:09.730Z",
"slug": "i-sell-phones-and-laptop",
"status": "pending",
"telephone": "+2348031391676",
"theme": "MINIMAL",
"whatsApp": true
},
"shopCount": 0,
"telephone": "+2348137064736",
"test_user": false,
"username": "vomofiv713@dilanfa.com"
},
"message": "User updated successfully",
"status": 200,
"success": true
}Path Parameters
Example:
"629e06ac81da717af2ed2b98"
Body
application/json
Was this page helpful?
⌘I