Filter subscription

POST/subscriptions/filter

Returns a list of subscriptions.

Headers

  • x-api-keystringrequired

    Api key provided on integrations tab in Easyflow platform.

  • x-api-secretstringrequired

    Api Secret provided on integrations tab in Easyflow platform.

  • business-idstringrequired

    Business Identifier

Query parameters

  • pageintegerrequired

    Page number to access

    Example:1

  • limitintegerrequired

    Number of items to be loaded per page

    Example:10

Request body

Optional Fields for Subscription Filtering

Content typeapplication/jsonobject

  • emailstring
  • namestring
  • initialDatestring
  • endDatestring
  • statusstring

    Filter by the specified status, such as: active, inactive, canceled, expired

  • initialValueinteger
  • endValueinteger
  • typestring

    Filter by the specified types, such as: credit-card, pix, bank-billet, crypto, debit-card

  • productIdsarray of strings
  • fieldstring
  • orderByobject
    Show child attributesHide child attributes
    • orderByFieldstring

      Filter by the specified field, such as: email, product, createdAt, recurrenceValueInCents, expiration

    • orderDirectionstring

      ASC or DESC

Responses

200Returns a list of subscriptions.

Returns a list of subscriptions.

Content typeapplication/jsonobject

  • statusCodeinteger

    Example:200

  • dataobject
    Show child attributesHide child attributes
    • docsarray of objects
      Show child attributesHide child attributes
      • idstring
      • namestring
      • originstring

        How the subscription was created: offer (from an offer), payment-link (from a payment link) or api (directly through the API).

        Possible values:offerpayment-linkapi

      • periodicitystring

        Possible values:MonthlyQuarterlyBiannualyAnnualy

      • numberRecurrencesinteger
      • statusstring

        Status of the subscription.

        Possible values:activeinactivecanceledexpired

      • subscriptionPaymentStatusstring

        Payment status of the subscription.

        Possible values:pendingfaileddelayedpaidcanceled

      • customerobject
        Show child attributesHide child attributes
        • namestring
        • emailstring
        • phoneobject
          Show child attributesHide child attributes
          • areaCodestring
          • dddstring
          • numberstring
          • isMobileboolean
        • billingAddressobject
          Show child attributesHide child attributes
          • zipCodestring
          • streetstring
          • numberstring
          • complementstring
          • neighborhoodstring
          • citystring
          • statestring
        • deliveryAddressobject
          Show child attributesHide child attributes
          • zipCodestring
          • streetstring
          • numberstring
          • complementstring
          • neighborhoodstring
          • citystring
          • statestring
        • documentobject
          Show child attributesHide child attributes
          • typestring
          • numberstring
        • userIdstring
        • externalReferenceIdstring
      • recurrenceValueInCentsinteger
      • expirationstring
      • paymentMethodstring

        Possible values:credit-cardpixbank-billetcryptodebit-cardtransfer

      • creditCardobject
        Show child attributesHide child attributes
        • nicknamestring
        • last4Numbersstring
        • holderNamestring
        • expiresAtMonthinteger
        • expiresAtYearinteger
        • flagstring

          Possible values:visamastercardamerican-expressdiners-clubdiscoverjcbunionpaymaestromirelohiperhipercard

      • orderItemobject
        Show child attributesHide child attributes
        • idstring
        • productobjectnullable

          Product of the subscription. It is null when the subscription has no product.

          Show child attributesHide child attributes
          • idstring
          • namestring
        • unitValueInCentsinteger
        • quantityinteger
      • repeatIndefinitelyboolean
      • createdAtstring
      • subscribedAtstring
      • customValueobject
        Show child attributesHide child attributes
        • recurrenceFromintegernullable
        • recurrenceTointegernullable
        • valueInCentsintegernullable
      • nextPaymentstring
    • limitinteger
    • currentPageinteger
    • nextPageintegernullable
    • totalPagesinteger
    • totalDocsinteger
    • hasNextboolean
400If the provided parameter is invalid, the API will return the following error response:

If the provided parameter is invalid, the API will return the following error response:

Content typeapplication/jsonobject

  • messagestring

    Invalid param: []

    Example:Invalid param: []

  • errorstring

    Bad Request

    Example:Bad Request

  • statusCodeinteger

    400

    Example:400

  • errorCodestring

    Code that identifies the error. Present only on some errors.

401If the request is unauthorized, the API will return the following error response:

If the request is unauthorized, the API will return the following error response:

Content typeapplication/jsonobject

  • messagestring

    Invalid field

    Example:Unauthorized

  • errorstring

    Unauthorized

    Example:Unauthorized

  • statusCodeinteger

    401

    Example:401

403If the request is forbidden, the API will return the following error response:

If the request is forbidden, the API will return the following error response:

Content typeapplication/jsonobject

  • messagestring

    Forbidden resource

    Example:Forbidden resource

  • errorstring

    Forbidden

    Example:Forbidden

  • statusCodeinteger

    403

    Example:403

500If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.

If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.

Content typeapplication/jsonobject

  • statusCodeinteger

    HTTP status code.

    Example:500

  • messagestring

    Explanation of the error.

    Example:Internal Server Error