---
title: "Incluir uso"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/incluir-uso"
---

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

# Incluir uso

`POST` `/subscriptions/{subscription_id}/items/{item_id}/usages`

Operation ID: `incluir-uso`

Este recurso permite incluir um `usage` de um `items` associado a uma `subscription`.

## Path parameters

- `subscription_id` (string, required) - Código da assinatura.<br>Formato: `sub_XXXXXXXXXXXXXXXX`.
- `item_id` (string, required) - Código do item da assinatura.<br>Formato: `si_XXXXXXXXXXXXXXXX`.

## Request body

Content types: `application/json`

## Responses

- `200` - 200
- `404` - 404

## 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}/items/{item_id}/usages:
    post:
      summary: Incluir uso
      description: Este recurso permite incluir um `usage` de um `items` associado a
        uma `subscription`.
      operationId: incluir-uso
      parameters:
        - name: subscription_id
          in: path
          description: "Código da assinatura.<br>Formato: `sub_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
        - name: item_id
          in: path
          description: "Código do item da assinatura.<br>Formato: `si_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                  description: Quantidade de usos a serem incluídos.
                  default: 1
                  format: int32
                description:
                  type: string
                  description: Descrição do uso.
                code:
                  type: string
                  description: Código de identificação no sistema do cliente
                group:
                  type: string
                  description: Código de identificação do grupo no sistema do cliente
            examples:
              Request Example:
                value:
                  quantity: 50
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "usage_QV1gBLhalU35RNbx",
                      "quantity": 1,
                      "status": "active",
                      "used_at": "2017-04-04T18:21:50Z",
                      "created_at": "2017-04-04T18:21:50Z",
                      "subscription_item": {
                        "id": "si_EJ8lP61Cotbyz9jx",
                        "description": "Bola",
                        "quantity": 1,
                        "status": "active",
                        "created_at": "2017-04-04T18:21:18Z",
                        "updated_at": "2017-04-04T18:21:18Z",
                        "subscription": {
                          "id": "sub_o0Jw4WYCMuPNqzGr",
                          "code": "09NFPLBZY0",
                          "start_at": "2017-04-04T00:00:00Z",
                          "interval": "month",
                          "interval_count": 1,
                          "billing_type": "postpaid",
                          "next_billing_at": "2017-05-04T00:00:00Z",
                          "payment_method": "credit_card",
                          "currency": "BRL",
                          "statement_descriptor": "Spotify",
                          "installments": 1,
                          "status": "active",
                          "created_at": "2017-04-04T18:21:17Z",
                          "updated_at": "2017-04-04T18:21:17Z"
                        }
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: usage_QV1gBLhalU35RNbx
                  quantity:
                    type: integer
                    example: 1
                    default: 0
                  status:
                    type: string
                    example: active
                  used_at:
                    type: string
                    example: 2017-04-04T18:21:50Z
                  created_at:
                    type: string
                    example: 2017-04-04T18:21:50Z
                  subscription_item:
                    type: object
                    properties:
                      id:
                        type: string
                        example: si_EJ8lP61Cotbyz9jx
                      description:
                        type: string
                        example: Bola
                      quantity:
                        type: integer
                        example: 1
                        default: 0
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2017-04-04T18:21:18Z
                      updated_at:
                        type: string
                        example: 2017-04-04T18:21:18Z
                      subscription:
                        type: object
                        properties:
                          id:
                            type: string
                            example: sub_o0Jw4WYCMuPNqzGr
                          code:
                            type: string
                            example: 09NFPLBZY0
                          start_at:
                            type: string
                            example: 2017-04-04T00:00:00Z
                          interval:
                            type: string
                            example: month
                          interval_count:
                            type: integer
                            example: 1
                            default: 0
                          billing_type:
                            type: string
                            example: postpaid
                          next_billing_at:
                            type: string
                            example: 2017-05-04T00:00:00Z
                          payment_method:
                            type: string
                            example: credit_card
                          currency:
                            type: string
                            example: BRL
                          statement_descriptor:
                            type: string
                            example: Spotify
                          installments:
                            type: integer
                            example: 1
                            default: 0
                          status:
                            type: string
                            example: active
                          created_at:
                            type: string
                            example: 2017-04-04T18:21:17Z
                          updated_at:
                            type: string
                            example: 2017-04-04T18:21:17Z
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Item not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Item not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
