Atualizar layout de checkout
curl --request PATCH \
--url https://api.upag.io/v1/checkout/layouts/{layoutId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"theme": {},
"favicon": {},
"desktop": {},
"mobile": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', theme: {}, favicon: {}, desktop: {}, mobile: {}})
};
fetch('https://api.upag.io/v1/checkout/layouts/{layoutId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/checkout/layouts/{layoutId}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', theme: {}, favicon: {}, desktop: {}, mobile: {}})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Layouts de checkout
Atualizar layout de checkout
Atualiza nome, tema, favicon ou blocos do layout
PATCH
https://api.upag.io
/
v1
/
checkout
/
layouts
/
{layoutId}
Atualizar layout de checkout
curl --request PATCH \
--url https://api.upag.io/v1/checkout/layouts/{layoutId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"theme": {},
"favicon": {},
"desktop": {},
"mobile": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', theme: {}, favicon: {}, desktop: {}, mobile: {}})
};
fetch('https://api.upag.io/v1/checkout/layouts/{layoutId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/checkout/layouts/{layoutId}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', theme: {}, favicon: {}, desktop: {}, mobile: {}})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Atualização parcial. Envie
null em favicon, desktop ou mobile para limpar. Ao enviar theme, ele substitui o tema inteiro (todas as chaves obrigatórias são exigidas).
Permissão: checkout_layout.write (chave secreta).
Endpoint
curl -X PATCH https://api.upag.dev/v1/checkout/layouts/c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f \
-H "Authorization: Bearer sk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Tema escuro v2",
"favicon": null
}'
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const layout = await upag.checkoutLayouts.update('c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f', {
name: 'Tema escuro v2',
favicon: null,
});
Em produção use
https://api.upag.io/v1 com sk_live_....Parâmetros
string (uuid)
required
ID do layout.
string
Novo nome (1 a 255 caracteres).
object
Tema completo (veja a referência).
string | null
Até 255 caracteres, ou
null.object | null
Configuração de blocos para desktop.
object | null
Configuração de blocos para mobile.
Resposta
200 OK
Response
{
"id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"name": "Tema escuro v2",
"theme": { "radius": "0.65rem", "background": "oklch(0.985 0 0)", "...": "demais chaves do tema" },
"favicon": null,
"desktop": null,
"mobile": null,
"createdAt": "2026-03-18T11:15:00.000Z",
"updatedAt": "2026-03-18T12:30:00.000Z"
}
404 (CHECKOUT_LAYOUT_NOT_FOUND) se o layout não existir.