Atualizar produto
curl --request PATCH \
--url https://api.upag.io/v1/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"image": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', image: '<string>'})
};
fetch('https://api.upag.io/v1/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/products/{productId}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', image: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Produtos
Atualizar produto
Atualiza nome, descrição ou imagem do produto
PATCH
https://api.upag.io
/
v1
/
products
/
{productId}
Atualizar produto
curl --request PATCH \
--url https://api.upag.io/v1/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"image": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', image: '<string>'})
};
fetch('https://api.upag.io/v1/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/products/{productId}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', image: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Atualização parcial: campos omitidos permanecem como estão.
Permissão:
product.write (chave secreta).
Endpoint
curl -X PATCH https://api.upag.dev/v1/products/0b9c1f3e-6a4d-4c1e-9d55-3f1f6a7c2e10 \
-H "Authorization: Bearer sk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Plano Pro+",
"description": "Acesso completo e suporte prioritário"
}'
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const product = await upag.products.update('0b9c1f3e-6a4d-4c1e-9d55-3f1f6a7c2e10', {
name: 'Plano Pro+',
description: 'Acesso completo e suporte prioritário',
});
Em produção use
https://api.upag.io/v1 com sk_live_....Parâmetros
string (uuid)
required
ID do produto.
string
Novo nome (mínimo 1 caractere).
string
Nova descrição (mínimo 1 caractere).
string
Nova URL de imagem.
Resposta
200 OK
Response
{
"id": "0b9c1f3e-6a4d-4c1e-9d55-3f1f6a7c2e10",
"name": "Plano Pro+",
"description": "Acesso completo e suporte prioritário",
"image": "https://example.com/plano-pro.png",
"createdAt": "2026-03-18T11:00:00.000Z",
"updatedAt": "2026-03-18T12:30:00.000Z"
}
404 (PRODUCT_NOT_FOUND) se o produto não existir.