---
title: "Obter ciclo"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/obter-ciclo-1"
---

> Full API specification: https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5.md

# Obter ciclo

`GET` `/subscriptions/{subscription_id}/cycles/{cycle_id}`

Operation ID: `obter-ciclo-1`

Através do identificador do ciclo (`cycle_id`) é possível recuperar as informação do ciclo de uma assinatura.

## Path parameters

- `subscription_id` (string, required) - Código da assinatura.
- `cycle_id` (string, required) - _Código do ciclo_. Formato: `cycle_XXXXXXXXXXXXXXXX`.

## Responses

- `200` - 200
- `400` - 400

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Pagar.me v5 API (Legado)
  version: 5.0.0
servers:
  - url: https://api.stone.com.br/core/v5
paths:
  /subscriptions/{subscription_id}/cycles/{cycle_id}:
    get:
      summary: Obter ciclo
      description: Através do identificador do ciclo (`cycle_id`) é possível recuperar
        as informação do ciclo de uma assinatura.
      operationId: obter-ciclo-1
      parameters:
        - name: subscription_id
          in: path
          description: Código da assinatura.
          schema:
            type: string
          required: true
        - name: cycle_id
          in: path
          description: "_Código do ciclo_. Formato: `cycle_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "id": "cycle_Qal5a0LCpphoDpnR",
                        "billing_at": "2019-04-30T00:00:00Z",
                        "cycle": 1,
                        "start_at": "2019-04-30T00:00:00Z",
                        "end_at": "2019-07-29T23:59:59Z",
                        "duration": 7862399,
                        "created_at": "2019-04-30T18:09:32Z",
                        "updated_at": "2019-04-30T18:09:33Z",
                        "status": "billed"
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: cycle_Qal5a0LCpphoDpnR
                  billing_at:
                    type: string
                    example: 2019-04-30T00:00:00Z
                  cycle:
                    type: integer
                    example: 1
                    default: 0
                  start_at:
                    type: string
                    example: 2019-04-30T00:00:00Z
                  end_at:
                    type: string
                    example: 2019-07-29T23:59:59Z
                  duration:
                    type: integer
                    example: 7862399
                    default: 0
                  created_at:
                    type: string
                    example: 2019-04-30T18:09:32Z
                  updated_at:
                    type: string
                    example: 2019-04-30T18:09:33Z
                  status:
                    type: string
                    example: billed
        "400":
          description: "400"
          content:
            application/json:
              examples:
                Result:
                  value: "{}"
              schema:
                type: object
                properties: {}
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
