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

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

# Editar item do pedido

`PUT` `/orders/{order_id}/items/{item_id}`

Operation ID: `editar-item-do-pedido`

Quando um pedido está **aberto**, você pode editar os itens dele.

## Path parameters

- `order_id` (string, required) - Código do pedido
- `item_id` (string, required) - Código do item do pedido

## Request body

Content types: `application/json`

## 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:
  /orders/{order_id}/items/{item_id}:
    put:
      summary: Editar item do pedido
      description: Quando um pedido está **aberto**, você pode editar os itens dele.
      operationId: editar-item-do-pedido
      parameters:
        - name: order_id
          in: path
          description: Código do pedido
          schema:
            type: string
          required: true
        - name: item_id
          in: path
          description: Código do item do pedido
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - description
                - quantity
              properties:
                amount:
                  type: integer
                  description: Valor do item.
                  format: int32
                description:
                  type: string
                  description: "Descrição do item. Max: 256 caracteres."
                quantity:
                  type: integer
                  description: Quantidade de itens.
                  format: int32
                category:
                  type: string
                  description: "Categoria do item. Max: 64 caracteres."
            examples:
              Request Example:
                value:
                  amount: 1090
                  description: Água com gás
                  quantity: 2
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "oi_AQKqAnGhQGsYd1b6",
                      "description": "Água com gás",
                      "amount": 1090,
                      "quantity": 2,
                      "status": "active",
                      "created_at": "2017-04-05T03:55:48",
                      "updated_at": "2017-04-05T05:05:14",
                      "order": {
                        "id": "or_5OKyl9fNwIKDzjWJ",
                        "code": "7P03S0FOQN",
                        "amount": 6260,
                        "currency": "BRL",
                        "closed": false,
                        "status": "pending",
                        "created_at": "2017-04-05T03:54:42",
                        "updated_at": "2017-04-05T03:54:42"
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: oi_AQKqAnGhQGsYd1b6
                  description:
                    type: string
                    example: Água com gás
                  amount:
                    type: integer
                    example: 1090
                    default: 0
                  quantity:
                    type: integer
                    example: 2
                    default: 0
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: 2017-04-05T03:55:48
                  updated_at:
                    type: string
                    example: 2017-04-05T05:05:14
                  order:
                    type: object
                    properties:
                      id:
                        type: string
                        example: or_5OKyl9fNwIKDzjWJ
                      code:
                        type: string
                        example: 7P03S0FOQN
                      amount:
                        type: integer
                        example: 6260
                        default: 0
                      currency:
                        type: string
                        example: BRL
                      closed:
                        type: boolean
                        example: false
                        default: true
                      status:
                        type: string
                        example: pending
                      created_at:
                        type: string
                        example: 2017-04-05T03:54:42
                      updated_at:
                        type: string
                        example: 2017-04-05T03:54:42
        "400":
          description: "400"
          content:
            application/json:
              examples:
                Result:
                  value: "{}"
              schema:
                type: object
                properties: {}
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
