Update product
curl --request PATCH \
--url https://api.lojou.app/v1/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"price": 123,
"category": "<string>",
"sub_category": "<string>",
"image": "<string>",
"sale_page": "<string>",
"affiliate_status": "<string>",
"affiliate_comission": 123,
"number": "<string>",
"number_code": "<string>"
}
'import requests
url = "https://api.lojou.app/v1/products/{id}"
payload = {
"name": "<string>",
"price": 123,
"category": "<string>",
"sub_category": "<string>",
"image": "<string>",
"sale_page": "<string>",
"affiliate_status": "<string>",
"affiliate_comission": 123,
"number": "<string>",
"number_code": "<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({
name: '<string>',
price: 123,
category: '<string>',
sub_category: '<string>',
image: '<string>',
sale_page: '<string>',
affiliate_status: '<string>',
affiliate_comission: 123,
number: '<string>',
number_code: '<string>'
})
};
fetch('https://api.lojou.app/v1/products/{id}', 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://api.lojou.app/v1/products/{id}",
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([
'name' => '<string>',
'price' => 123,
'category' => '<string>',
'sub_category' => '<string>',
'image' => '<string>',
'sale_page' => '<string>',
'affiliate_status' => '<string>',
'affiliate_comission' => 123,
'number' => '<string>',
'number_code' => '<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://api.lojou.app/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\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://api.lojou.app/v1/products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lojou.app/v1/products/{id}")
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 \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Product updated successfully.",
"currency": "MZN",
"product": {
"id": 272,
"name": "Curso de Excel Avançado — Turma 2",
"type": "one_time",
"image": "https://cdn.lojou.app/lojou/stores/files/954/curso-excel.jpg",
"price": 1000,
"status": "approved",
"product_pid": "QUyMp",
"category": "Educação",
"sub_category": "Cursos online",
"mobile_number": "843264388",
"sale_page": "https://minhaloja.example.com/curso-excel",
"affiliate_status": "open",
"affiliate_comission": 30,
"created_at": "2026-06-02T10:00:00.000000Z",
"number_code": "+258",
"number": "843264388",
"affiliation": {
"status": "open",
"comission": 30
}
}
}{
"status": "error",
"message": "Unauthorized user."
}{
"status": "error",
"message": "Product cannot be modified while it is pending review or approved."
}{
"status": "error",
"message": "Resource not found."
}{
"status": "error",
"message": "Validation failed.",
"errors": {
"amount": [
"The amount field is required."
]
}
}Products
Update product
product_pid and type cannot be changed. Blocked while the product is pending review or already approved (see /publish//unpublish).
PATCH
/
v1
/
products
/
{id}
Update product
curl --request PATCH \
--url https://api.lojou.app/v1/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"price": 123,
"category": "<string>",
"sub_category": "<string>",
"image": "<string>",
"sale_page": "<string>",
"affiliate_status": "<string>",
"affiliate_comission": 123,
"number": "<string>",
"number_code": "<string>"
}
'import requests
url = "https://api.lojou.app/v1/products/{id}"
payload = {
"name": "<string>",
"price": 123,
"category": "<string>",
"sub_category": "<string>",
"image": "<string>",
"sale_page": "<string>",
"affiliate_status": "<string>",
"affiliate_comission": 123,
"number": "<string>",
"number_code": "<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({
name: '<string>',
price: 123,
category: '<string>',
sub_category: '<string>',
image: '<string>',
sale_page: '<string>',
affiliate_status: '<string>',
affiliate_comission: 123,
number: '<string>',
number_code: '<string>'
})
};
fetch('https://api.lojou.app/v1/products/{id}', 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://api.lojou.app/v1/products/{id}",
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([
'name' => '<string>',
'price' => 123,
'category' => '<string>',
'sub_category' => '<string>',
'image' => '<string>',
'sale_page' => '<string>',
'affiliate_status' => '<string>',
'affiliate_comission' => 123,
'number' => '<string>',
'number_code' => '<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://api.lojou.app/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\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://api.lojou.app/v1/products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lojou.app/v1/products/{id}")
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 \"name\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"sub_category\": \"<string>\",\n \"image\": \"<string>\",\n \"sale_page\": \"<string>\",\n \"affiliate_status\": \"<string>\",\n \"affiliate_comission\": 123,\n \"number\": \"<string>\",\n \"number_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Product updated successfully.",
"currency": "MZN",
"product": {
"id": 272,
"name": "Curso de Excel Avançado — Turma 2",
"type": "one_time",
"image": "https://cdn.lojou.app/lojou/stores/files/954/curso-excel.jpg",
"price": 1000,
"status": "approved",
"product_pid": "QUyMp",
"category": "Educação",
"sub_category": "Cursos online",
"mobile_number": "843264388",
"sale_page": "https://minhaloja.example.com/curso-excel",
"affiliate_status": "open",
"affiliate_comission": 30,
"created_at": "2026-06-02T10:00:00.000000Z",
"number_code": "+258",
"number": "843264388",
"affiliation": {
"status": "open",
"comission": 30
}
}
}{
"status": "error",
"message": "Unauthorized user."
}{
"status": "error",
"message": "Product cannot be modified while it is pending review or approved."
}{
"status": "error",
"message": "Resource not found."
}{
"status": "error",
"message": "Validation failed.",
"errors": {
"amount": [
"The amount field is required."
]
}
}Autorizações
Send an API key or an OAuth access token in the Authorization header
as a Bearer token. See Authentication for details.
Parâmetros de caminho
Product identifier (id or product_pid).
Corpo
application/json
Partial product update payload — product_pid and type cannot be changed here.
Contact/support number for the product (mapped to mobile_number).
Resposta
Success
The response is of type object.
