Saltar para o conteúdo principal
Esta página é a referência completa do esquema GraphQL da API da Reval: cada consulta, ação, objeto, input e enum, com a mesma descrição que você vê ao introspectar o endpoint pelo GraphiQL, Insomnia ou Postman. O guia explica como autenticar, paginar e tratar erros; esta página responde «quais campos X tem».
O esquema é um contrato: a Reval adiciona campos e tipos, mas não renomeia nem remove os publicados. As descrições estão em inglês porque são as mesmas que a introspecção devolve.
Como ler os tipos. String! é obrigatório, String pode ser null. [Plan!]! é uma lista obrigatória de itens obrigatórios. As listagens terminam em Connection e são paginadas com first e after (veja Paginação).

Consultas (Query)

shop

Devolve: Shop! The store this API key belongs to.

subscription(id)

Devolve: Subscription One subscription by Reval id. Null when it does not exist in this store.

subscriptions(first, after, filter, sortKey, reverse)

Devolve: SubscriptionConnection! Subscriptions of the store, newest first by default.

order(id)

Devolve: SubscriptionOrder One subscription order by Reval id.

orders(first, after, filter, reverse)

Devolve: SubscriptionOrderConnection! Orders generated by subscriptions (one per charged cycle), newest first by default.

customer(email)

Devolve: Customer One customer by email (the identity Reval subscriptions are keyed by).

customers(first, after, filter)

Devolve: CustomerConnection! Every customer with at least one subscription, by email.

planGroup(id)

Devolve: PlanGroup One plan (a set of terms many products can sell on) by id.

planGroups(first, after, filter)

Devolve: PlanGroupConnection! Plans of the store — what the admin calls «Planes».

plan(id)

Devolve: Plan One product offering (plan × variant) by id.

plans(first, after, filter)

Devolve: PlanConnection! Product offerings: one row per variant attached to a plan.

box(id)

Devolve: Box One box (bundle) by id.

boxes(first, after, filter)

Devolve: BoxConnection! Boxes of the store — what the admin calls «Cajas».

Ações (Mutation)

subscriptionPause(id, overrideMinCycles)

Devolve: SubscriptionPayload! Pause an ACTIVE subscription: Mercado Pago stops charging until it is resumed. Applies the plan’s minimum commitment like the portal does; overrideMinCycles: true acts as the merchant and skips that gate.

subscriptionResume(id)

Devolve: SubscriptionPayload! Resume a PAUSED subscription; Mercado Pago picks up the schedule and sets the next charge date.

subscriptionCancel(id, reason, note, overrideMinCycles)

Devolve: SubscriptionPayload! Cancel a subscription with a reason (the same list the portal offers) and an optional free-text note. Applies the minimum commitment like the portal unless overrideMinCycles: true.

subscriptionSkipNextCycle(id)

Devolve: SubscriptionPayload! Skip the next cycle of an ACTIVE subscription: that cycle is neither charged nor shipped; the mandate resumes on its own on the following one. Honours the store’s skip settings and the minimum commitment.

subscriptionSetItems(id, items)

Devolve: SubscriptionPayload! Replace the product lines with the given set (one line per plan; the same plan twice sums the quantities). Every plan must be active in this store and bill on the subscription’s cadence — Mercado Pago mandates keep their frequency. The total is recomputed from plan prices, shipping is re-quoted and Mercado Pago is updated for the next cycle. Box subscriptions are edited by the subscriber in the portal, not here.

subscriptionUpdateShippingAddress(id, address)

Devolve: SubscriptionPayload! Replace the shipping address used for the next orders. address1, city and zip are required; the country stays unless given. The shipping rate is not re-quoted. Devolve: PortalLinkPayload! A signed, time-limited link that opens this subscriber’s self-service portal on the store’s primary domain — what the admin’s «Copiar Portal Link» does. Treat it as a credential: it logs the subscriber in.

checkoutLinkCreate(lines, customer, externalRef)

Devolve: CheckoutLinkPayload! Create a checkout link. Every line names a planId — a subscription link that opens Reval’s checkout: several products, several cadences, one card entry, one subscription per cadence — or every line a bare variantId — a one-time link, a Shopify cart permalink. Customer prefill (editable by the shopper; never in the URL) and externalRef (stamped on the subscriptions the link creates, echoed in the API and the subscription webhooks as external_ref) need a subscription link. A link carrying customer data expires 30 days after creation and is single-use; without it the URL is permanent. Send an Idempotency-Key so a retry returns the same link.

Objetos

UserError

SubscriptionPayload

PortalLinkPayload

CheckoutLinkPayload

Shop

Subscription

SubscriptionItem

Address

ShippingLine

TaxLine

PaymentCard

StatusChange

PriceChange

SubscriptionEdge

SubscriptionConnection

SubscriptionOrder

SubscriptionOrderEdge

SubscriptionOrderConnection

Customer

A subscriber. Reval identifies customers by email; the Shopify customer is attached when it matched.

CustomerEdge

CustomerConnection

PlanGroup

A plan as the merchant defines it: cadence and pricing that many products sell on (the admin «Plan»).

PlanGroupEdge

PlanGroupConnection

Plan

One product variant sold on one plan: the row a subscription is billed on.

PlanEdge

PlanConnection

Box

A bundle the shopper composes (the admin «Caja»).

BoxSize

BoxOption

BoxTier

BoxEdge

BoxConnection

PageInfo


Inputs

SubscriptionItemInput

AddressInput

SubscriptionFilter

OrderFilter

CustomerFilter

PlanGroupFilter

PlanFilter

BoxFilter


Enums

CancelReason

The cancellation reasons the portal offers; stored with the subscription and shown in the churn analysis.

UserErrorCode

SubscriptionStatus

SubscriptionSortKey

SubscriptionItemRole

StatusChangeSource

PriceChangeSource

OrderType

FrequencyType

PlanPriceType

PlanStatus

PlanGroupType

BoxType

BoxSizeMode

BoxOptionKind


Escalares