Skip to main content
GET
/
organizations
/
{organizationId}
/
subscriptions
Buscar Assinatura
curl --request GET \
  --url https://api.example.com/organizations/{organizationId}/subscriptions \
  --header 'Authorization: <authorization>'
{
  "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f",
  "planIntervalId": "019525fd-7e40-7c5a-b2d8-4e6f8a0c2e4a",
  "externalPlanRef": "sub_1Oy2pL2eZvKYlo2C0vIqMZ8y",
  "externalFeeRef": null,
  "currency": "BRL",
  "status": "ACTIVE",
  "pastDueReason": null,
  "pastDueAt": null,
  "pausedBy": null,
  "pausedAt": null,
  "cancelledBy": null,
  "cancelledAt": null,
  "coupons": [
    {
      "id": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
      "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
      "couponId": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
      "status": "ACTIVE",
      "externalRef": "di_1Oy2pL2eZvKYlo2C0vIqMZ8y",
      "createdAt": "2026-02-01T12:00:00.000Z",
      "updatedAt": "2026-02-01T12:00:00.000Z"
    }
  ],
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-02-01T12:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-02-01T12:00:00.000Z"
}
Retorna a assinatura ativa da organizacao.
Requer permissao subscription:read.

Headers

Authorization
string
required
Bearer token.

Parametros de Path

organizationId
string
required
O UUID da organizacao.

Resposta

subscriptionId
string
O ID da assinatura.
organizationId
string
O UUID da organizacao.
planId
string
O ID do plano.
planIntervalId
string
O ID do intervalo do plano.
externalPlanRef
string|null
A referencia externa do plano.
externalFeeRef
string|null
The external reference for the fee.
currency
string
O codigo da moeda.
status
string
O status da assinatura.
pastDueReason
string|null
The reason the subscription is past due.
pastDueAt
string|null
Timestamp when the subscription became past due (ISO 8601).
pausedBy
string|null
The actor who paused the subscription.
pausedAt
string|null
Timestamp when the subscription was paused (ISO 8601).
cancelledBy
string|null
The actor who cancelled the subscription.
cancelledAt
string|null
Timestamp when the subscription was cancelled (ISO 8601).
coupons
array
The coupons applied to this subscription.
createdBy
string
The actor who created the subscription.
createdAt
string
Timestamp de criacao (ISO 8601).
updatedBy
string
The actor who last updated the subscription.
updatedAt
string
Timestamp da ultima atualizacao (ISO 8601).
{
  "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f",
  "planIntervalId": "019525fd-7e40-7c5a-b2d8-4e6f8a0c2e4a",
  "externalPlanRef": "sub_1Oy2pL2eZvKYlo2C0vIqMZ8y",
  "externalFeeRef": null,
  "currency": "BRL",
  "status": "ACTIVE",
  "pastDueReason": null,
  "pastDueAt": null,
  "pausedBy": null,
  "pausedAt": null,
  "cancelledBy": null,
  "cancelledAt": null,
  "coupons": [
    {
      "id": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
      "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
      "couponId": "019525fd-d3a4-7baf-a7c3-9d1e3f5b7c9f",
      "status": "ACTIVE",
      "externalRef": "di_1Oy2pL2eZvKYlo2C0vIqMZ8y",
      "createdAt": "2026-02-01T12:00:00.000Z",
      "updatedAt": "2026-02-01T12:00:00.000Z"
    }
  ],
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-02-01T12:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-02-01T12:00:00.000Z"
}

Exemplos de Codigo

curl https://api.awsales.io/admin/organizations/019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2/subscriptions \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
404organization.not_foundOrganizacao nao encontrada
404subscription.not_foundAssinatura nao encontrada
500internal_server_errorOcorreu um erro inesperado