Skip to main content
PUT
Substituir 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 PUT /v2/public/products/{id}. A PUT replaces the whole representation, so it accepts exactly what a create accepts, price included; the source api declared its update request the same way (SHA 70cd772).

The price is not part of the attribute write in the core (it moves through its own operation so the acquirer is re-synced), so the controller applies it separately when it differs from what is stored.

name
string
required
Maximum string length: 255
description
string
required
Maximum string length: 255
image
string
required

Either a base64 data URI (uploaded to storage) or an already stored path echoed back. Which one it is, is Catalog's decision.

category_id
integer
required
Required range: x >= 1
language_id
integer
required
Required range: x >= 1
payment_type
enum<string>
required
Available options:
unique,
recurring
price
number
required
Required range: x >= 0
currency
enum<string>
required
Available options:
brl,
usd,
eur
type
enum<string>
required
Available options:
physical,
digital
publish_status
enum<string>
required
Available options:
draft,
published
delivery
enum<string>
required
Available options:
nothing,
memberkit,
cademi,
rocketmember,
astronmembers,
download,
external
warranty_time
enum<integer>
required
Available options:
7,
14,
21,
30
recurrence_interval
enum<string> | null
Available options:
daily,
weekly,
fortnightly,
monthly,
twomonthly,
quarterly,
semiannual,
yearly,
null
is_free
boolean
convert_currency
boolean
is_encapsulated
boolean
has_speed_recovery
boolean
attachment_url
string<uri> | null
Maximum string length: 255
landing_page
string<uri> | null
Maximum string length: 255
support_email
string<email> | null
Maximum string length: 255
author
string | null
Maximum string length: 255
shipping_cost
number | null
Required range: x >= 0
sku
string | null

Three fields the source api never accepted, added because the read answers them: a product created here would otherwise come back with a sku, a trial and a deliverable the caller had no way to set.

Maximum string length: 255
trial_days
enum<integer> | null
Available options:
3,
7,
14,
30,
null
deliverable_content
string | null

Response

ApiProductResource

data
ApiProductResource · object
required