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

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

# Deletar item

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

Operation ID: `deletar-item`

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

## Path parameters

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

## 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}:
    delete:
      summary: Deletar item
      description: Quando um pedido está **aberto**, você pode excluir itens dele.
      operationId: deletar-item
      parameters:
        - name: order_id
          in: path
          description: Códido do pedido.
          schema:
            type: string
          required: true
        - name: item_id
          in: path
          description: Código do item do pedido.
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "oi_AQKqAnGhQGsYd1b6",
                      "description": "Caneca Zero Grau",
                      "amount": 1090,
                      "quantity": 2,
                      "status": "deleted",
                      "created_at": "2017-04-05T03:55:48",
                      "updated_at": "2017-04-05T05:05:14",
                      "deleted_at": "2017-04-05T05:30:34",
                      "order": {
                        "id": "or_5OKyl9fNwIKDzjWJ",
                        "code": "7P03S0FOQN",
                        "amount": 4080,
                        "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: Caneca Zero Grau
                  amount:
                    type: integer
                    example: 1090
                    default: 0
                  quantity:
                    type: integer
                    example: 2
                    default: 0
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: 2017-04-05T03:55:48
                  updated_at:
                    type: string
                    example: 2017-04-05T05:05:14
                  deleted_at:
                    type: string
                    example: 2017-04-05T05:30:34
                  order:
                    type: object
                    properties:
                      id:
                        type: string
                        example: or_5OKyl9fNwIKDzjWJ
                      code:
                        type: string
                        example: 7P03S0FOQN
                      amount:
                        type: integer
                        example: 4080
                        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: |-
                    {
                      "id": "oi_ZR3AjrjFwsg2A7bz",
                      "description": "Caneca Zero Grau",
                      "amount": 1090,
                      "quantity": 1,
                      "status": "deleted",
                      "created_at": "2017-04-05T05:33:29",
                      "updated_at": "2017-04-05T05:33:29",
                      "deleted_at": "2017-04-05T05:33:38",
                      "order": {
                        "id": "or_5OKyl9fNwIKDzjWJ",
                        "code": "7P03S0FOQN",
                        "amount": 4080,
                        "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_ZR3AjrjFwsg2A7bz
                  description:
                    type: string
                    example: Caneca Zero Grau
                  amount:
                    type: integer
                    example: 1090
                    default: 0
                  quantity:
                    type: integer
                    example: 1
                    default: 0
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: 2017-04-05T05:33:29
                  updated_at:
                    type: string
                    example: 2017-04-05T05:33:29
                  deleted_at:
                    type: string
                    example: 2017-04-05T05:33:38
                  order:
                    type: object
                    properties:
                      id:
                        type: string
                        example: or_5OKyl9fNwIKDzjWJ
                      code:
                        type: string
                        example: 7P03S0FOQN
                      amount:
                        type: integer
                        example: 4080
                        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
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
