Saltar al contenido principal
Esta página es la referencia completa del esquema GraphQL de la API de Reval: cada consulta, acción, objeto, input y enum, con la misma descripción que ves al introspeccionar el endpoint desde GraphiQL, Insomnia o Postman. La guía explica cómo autenticarte, paginar y manejar errores; esta página responde «qué campos tiene X».
El esquema es un contrato: Reval agrega campos y tipos, pero no renombra ni elimina los publicados. Las descripciones están en inglés porque son las mismas que devuelve la introspección.
Cómo leer los tipos. String! es obligatorio, String puede ser null. [Plan!]! es una lista obligatoria de elementos obligatorios. Los listados terminan en Connection y se paginan con first y after (ver Paginación).

Consultas (Query)

shop

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

subscription(id)

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

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

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

order(id)

Devuelve: SubscriptionOrder One subscription order by Reval id.

orders(first, after, filter, reverse)

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

customer(email)

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

customers(first, after, filter)

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

planGroup(id)

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

planGroups(first, after, filter)

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

plan(id)

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

plans(first, after, filter)

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

box(id)

Devuelve: Box One box (bundle) by id.

boxes(first, after, filter)

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

Acciones (Mutation)

subscriptionPause(id, overrideMinCycles)

Devuelve: 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)

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

subscriptionCancel(id, reason, note, overrideMinCycles)

Devuelve: 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)

Devuelve: 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)

Devuelve: 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)

Devuelve: 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. Devuelve: 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)

Devuelve: 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