reseller

PUT /v1/reseller/prices

Set your own price for one plan.

Todos os endpoints de reseller

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão reseller.manage; uma chave sem ela é recusada com 403, e não 404.

Onde vai o ID da sua organização

Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.

O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

curl -X PUT https://api.zinndigital.com/v1/reseller/prices \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "plan_id": <Uuid>, "interval": <string>, "currency": <string>, "amount_minor": <integer> }'

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

Upserts one row of your price list, keyed on (plan, interval, currency). Editing it never re-prices a client already sold — their subscription captured the price at purchase. Requires `reseller.manage`.

Parâmetros

NomeTipoObrigatórioO que é
org_id (query)UuidNãoWhich of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r…

Corpo da requisição

NomeTipoObrigatórioO que é
plan_idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
intervalstringSim
currencystringSim
amount_minorintegerSim
is_activebooleanNão

Resposta

NomeTipoObrigatórioO que é
idUuid | nullNãoNull when you have not authored this row yet.
plan_idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
plan_codestringSim
plan_namestringSim
intervalstringSim
currencystringSim
amount_minorintegerSimWhat YOUR client pays, in minor units.
is_activebooleanSim
list_amount_minorobjectNãoZinn®'s list price for the same plan.
wholesale_amount_minorobjectNãoWhat the plan costs YOU after your wholesale discount.
wholesale_discount_bpsintegerNão
price_sourcestring<price_list, markup, unpriced>SimWhether the price is one you set, one derived from list by your default markup, or absent because the catalogue holds no price in this currency.

Erros que este endpoint pode retornar

401 · 403 · 404 · 422 · 429