Update category
curl --request PUT \
--url https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Consumer Electronics' \
--form description=Updated \
--form imageUrl='@example-file'import requests
url = "https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}"
files = { "imageUrl": ("example-file", open("example-file", "rb")) }
payload = {
"name": "Consumer Electronics",
"description": "Updated"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Consumer Electronics');
form.append('description', 'Updated');
form.append('imageUrl', '<string>');
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}', 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://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Category updated successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c30",
"name": "Consumer Electronics"
}
}{
"status": 401,
"message": "Access denied",
"data": {}
}2. Catalog (optional)
Update category
PUT
/
v1
/
escrow
/
category
/
edit
/
{categoryId}
Update category
curl --request PUT \
--url https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Consumer Electronics' \
--form description=Updated \
--form imageUrl='@example-file'import requests
url = "https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}"
files = { "imageUrl": ("example-file", open("example-file", "rb")) }
payload = {
"name": "Consumer Electronics",
"description": "Updated"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Consumer Electronics');
form.append('description', 'Updated');
form.append('imageUrl', '<string>');
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}', 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://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.payluk.ng/v1/escrow/category/edit/{categoryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nConsumer Electronics\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nUpdated\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageUrl\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Category updated successfully",
"data": {
"id": "665f1b2c9a1e4d0012ab3c30",
"name": "Consumer Electronics"
}
}{
"status": 401,
"message": "Access denied",
"data": {}
}Authorizations
Your secret key as a Bearer token. The key prefix selects the environment: sk_test_... (test) or sk_live_... (live).
Path Parameters
The category's unique identifier.
Body
multipart/form-data
⌘I