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

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

# Remover todos os itens

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

Operation ID: `remover-todos-os-itens`

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

## Path parameters

- `order_id` (string, required) - Código 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:
    delete:
      summary: Remover todos os itens
      description: Quando um pedido está **aberto**, você pode remover todos os itens dele.
      operationId: remover-todos-os-itens
      parameters:
        - name: order_id
          in: path
          description: Código do pedido.
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                      "id": "or_5OKyl9fNwIKDzjWJ",
                      "code": "7P03S0FOQN",
                      "currency": "BRL",
                      "closed": false,
                      "customer": {
                        "id": "cus_oWQOPg5tJF8ml0ny",
                        "name": "Tony Stark",
                        "email": "9fb571fc-79c3-4293-aafd-61fd8afa6c38@avengers.com",
                        "delinquent": false,
                        "created_at": "2017-04-05T03:54:42",
                        "updated_at": "2017-04-05T03:54:42"
                      },
                      "status": "pending",
                      "created_at": "2017-04-05T03:54:42",
                      "updated_at": "2017-04-05T03:54:42"
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: or_5OKyl9fNwIKDzjWJ
                  code:
                    type: string
                    example: 7P03S0FOQN
                  currency:
                    type: string
                    example: BRL
                  closed:
                    type: boolean
                    example: false
                    default: true
                  customer:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cus_oWQOPg5tJF8ml0ny
                      name:
                        type: string
                        example: Tony Stark
                      email:
                        type: string
                        example: 9fb571fc-79c3-4293-aafd-61fd8afa6c38@avengers.com
                      delinquent:
                        type: boolean
                        example: false
                        default: true
                      created_at:
                        type: string
                        example: 2017-04-05T03:54:42
                      updated_at:
                        type: string
                        example: 2017-04-05T03:54:42
                  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: |-
                    {
                        "message": "Order not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Order not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
