Update Store
curl --request PATCH \
--url https://nini.monieswitch.com/branch/store \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"agents": [
"<string>"
]
}
'import requests
url = "https://nini.monieswitch.com/branch/store"
payload = {
"storeId": "<string>",
"agents": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({storeId: '<string>', agents: ['<string>']})
};
fetch('https://nini.monieswitch.com/branch/store', 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 => "https://nini.monieswitch.com/branch/store",
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([
'storeId' => '<string>',
'agents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://nini.monieswitch.com/branch/store"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://nini.monieswitch.com/branch/store")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nini.monieswitch.com/branch/store")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Store successfully updated.",
"data": {
"id": "3d06119f-1a61-49a4-8be9-e0e7917a9340",
"mode": "SANDBOX",
"name": "Somulu Market",
"website": "www.somolu.market2.com",
"address": "No 12, Somolu market",
"phoneNumber": "2348123928344",
"merchantId": "bb80715c-dcbc-460c-a8e4-203b63b03fce",
"walletId": "849c0188-d645-46b6-ac2c-8840a9d4b08b",
"createdAt": "2024-12-24T01:06:54.052Z",
"updatedAt": "2024-12-24T01:15:47.692Z",
"deletedAt": null
}
}Branches
Update Store
PATCH
/
branch
/
store
Update Store
curl --request PATCH \
--url https://nini.monieswitch.com/branch/store \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"agents": [
"<string>"
]
}
'import requests
url = "https://nini.monieswitch.com/branch/store"
payload = {
"storeId": "<string>",
"agents": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({storeId: '<string>', agents: ['<string>']})
};
fetch('https://nini.monieswitch.com/branch/store', 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 => "https://nini.monieswitch.com/branch/store",
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([
'storeId' => '<string>',
'agents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://nini.monieswitch.com/branch/store"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://nini.monieswitch.com/branch/store")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nini.monieswitch.com/branch/store")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Store successfully updated.",
"data": {
"id": "3d06119f-1a61-49a4-8be9-e0e7917a9340",
"mode": "SANDBOX",
"name": "Somulu Market",
"website": "www.somolu.market2.com",
"address": "No 12, Somolu market",
"phoneNumber": "2348123928344",
"merchantId": "bb80715c-dcbc-460c-a8e4-203b63b03fce",
"walletId": "849c0188-d645-46b6-ac2c-8840a9d4b08b",
"createdAt": "2024-12-24T01:06:54.052Z",
"updatedAt": "2024-12-24T01:15:47.692Z",
"deletedAt": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
⌘I