Skip to main content
PATCH
Alterar preço do produto

Authorizations

Authorization
string
header
required

A chave de API da conta, no formato sk_{modo}_{prefixo}.{segredo}.

Headers

Idempotency-Key
string
required

Chave única da operação. Obrigatória em toda requisição que altera dados; sem ela a resposta é 422 idempotency_key_required. Um reenvio com a mesma chave e o mesmo corpo repete a resposta guardada.

Maximum string length: 255

Path Parameters

id
integer
required

Body

application/json

Body of PATCH /v2/public/products/{id}/price: a new amount, and optionally the currency to state it in.

The currency is optional because the source api made it optional (SHA 70cd772): a caller repricing in the currency the product already carries should not have to repeat it. The controller supplies the stored currency when this one is absent, which is why the Money is not built here.

price
number
required
Required range: x >= 0
currency
enum<string> | null
Available options:
brl,
usd,
eur,
null

Response

ApiProductResource

data
ApiProductResource · object
required