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

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

# Editar item

`PUT` `/subscriptions/{subscription_id}/items/{item_id}`

Operation ID: `editar-item`

Com o verbo _HTTP PUT_, através dos identificadores do item (`subscription_item_id`) e da assinatura (`subscription_id`) associada é possível atualizar os dados do item da 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`.

## 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}:
    put:
      summary: Editar item
      description: Com o verbo _HTTP PUT_, através dos identificadores do item
        (`subscription_item_id`) e da assinatura (`subscription_id`) associada é
        possível atualizar os dados do item da assinatura.
      operationId: editar-item
      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
              required:
                - quantity
              properties:
                name:
                  type: string
                  description: Nome do item da assinatura.
                description:
                  type: string
                  description: "Descrição do item.<br>Max: 256 caracteres.<br>**Obrigatório** caso
                    o  `plan_item_id` não seja informado."
                cycle:
                  type: integer
                  description: Indica quantas vezes o item será cobrado. <br>Caso não seja
                    informado, o item será cobrado até que seja excluído o
                    desativado.
                  format: int32
                page:
                  type: integer
                  description: Página atual
                  default: 1
                  format: int32
                size:
                  type: integer
                  description: Quantidade de itens por página.
                  default: 10
                  format: int32
                quantity:
                  type: integer
                  description: Quantidade de itens.<br>**Obrigatório**
                    caso  **pricing_scheme.scheme_type** seja **unit**.
                  format: int32
                pricing_scheme:
                  type: object
                  description: Esquema de precificação.<br>[Saiba mais sobre
                    precificação](https://docs.pagar.me/reference/precifica%C3%A7%C3%A3o)
                  required:
                    - scheme_type
                  properties:
                    scheme_type:
                      type: string
                      description: "Esquema de precificação do item. Valores possíveis: **unit**,
                        **package**, **volume** e **tier**. Valor default: unit"
                      default: Unit
                    price:
                      type: integer
                      description: "Valor do item. Este atributo está disponível para o scheme_type :
                        **Unit**"
                      format: int32
                    mininum_price:
                      type: integer
                      description: Valor mínimo a ser cobrado.
                      format: int32
                    price_brackets:
                      type: array
                      description: "Intervalo de preços. Este atributo está disponível para os
                        scheme_type : **package**, **volume** e **tier**."
                      items:
                        properties:
                          start_quantity:
                            type: integer
                            description: Valor que define a quantidade inicial de unidades do intervalo.
                            format: int32
                          end_quantity:
                            type: integer
                            description: Valor que define a quantidade final de unidades do intervalo.
                            format: int32
                          overage_price:
                            type: integer
                            description: Valor para cálculo do preço por unidade que exceder o intervalo.
                            format: int32
                          price:
                            type: integer
                            description: "Valor para cálculo do preço dentro do intervalo. OBS: o preço a
                              ser cobrado do cliente será calculado de acordo
                              com a quantidade e o scheme_type"
                            format: int32
                        type: object
            examples:
              Request Example:
                value:
                  name: Nome - teste
                  description: Telefone
                  cycles: 3
                  quantity: 1
                  pricing_scheme:
                    price: 99
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "si_mARl1OvTYcA3pG49",
                      "description": "Telefone",
                      "cycles": 3,
                      "quantity": 1,
                      "status": "active",
                      "created_at": "2017-04-04T18:56:44Z",
                      "updated_at": "2017-04-04T18:57:48Z",
                      "pricing_scheme": {
                        "price": 99,
                        "scheme_type": "unit"
                      },
                      "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:17",
                        "updated_at": "2017-04-04T18:21:17"
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: si_mARl1OvTYcA3pG49
                  description:
                    type: string
                    example: Telefone
                  cycles:
                    type: integer
                    example: 3
                    default: 0
                  quantity:
                    type: integer
                    example: 1
                    default: 0
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: 2017-04-04T18:56:44Z
                  updated_at:
                    type: string
                    example: 2017-04-04T18:57:48Z
                  pricing_scheme:
                    type: object
                    properties:
                      price:
                        type: integer
                        example: 99
                        default: 0
                      scheme_type:
                        type: string
                        example: unit
                  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:17
                      updated_at:
                        type: string
                        example: 2017-04-04T18:21:17
        "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
```
