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

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

# Remover uso

`DELETE` `/subscriptions/{subscription_id}/items/{item_id}/usages/{usage_id}`

Operation ID: `remover-uso`

Com o verbo HTTP DELETE, através dos identificadores do uso (`usage_id`), do item (`subscription_item_id`) a da assinatura associada (`subscription_id`), é possível excluir o uso do item de uma assinatura.

## 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`.
- `usage_id` (string, required) - Código do uso.<br>Formato: `usage_XXXXXXXXXXXXXXXX`.

## 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/{usage_id}:
    delete:
      summary: Remover uso
      description: Com o verbo HTTP DELETE, através dos identificadores do uso
        (`usage_id`), do item (`subscription_item_id`) a da assinatura associada
        (`subscription_id`), é possível excluir o uso do item de uma assinatura.
      operationId: remover-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
        - name: usage_id
          in: path
          description: "Código do uso.<br>Formato: `usage_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "usage_QV1gBLhalU35RNbx",
                      "quantity": 1,
                      "status": "deleted",
                      "used_at": "2017-04-04T18:21:50Z",
                      "created_at": "2017-04-04T18:21:50Z",
                      "deleted_at": "2017-04-04T18:24:57Z",
                      "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: deleted
                  used_at:
                    type: string
                    example: 2017-04-04T18:21:50Z
                  created_at:
                    type: string
                    example: 2017-04-04T18:21:50Z
                  deleted_at:
                    type: string
                    example: 2017-04-04T18:24:57Z
                  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": "Usage not found."
                    }
              schema:
                oneOf:
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Item not found.
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Subscription not found.
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Usage not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
