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

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

# Listar pedidos

`GET` `/orders`

Operation ID: `listar-pedidos`

## Query parameters

- `code` (string, optional) - Código de referência do pedido no sistema da loja.
- `status` (string, optional) - Status do pedido. Valores possíveis: **pending**, **paid**, **canceled** ou **failed**
- `customer_id` (string, optional) - Código do cliente.
- `created_since` (string, date, optional) - Data de início do período de criação a ser listado.
- `created_until` (string, date, optional) - Data de final do período de criação a ser listado.
- `page` (integer, int32, optional) - Página atual.
- `size` (integer, int32, optional) - Quantidade de itens.

## 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:
    get:
      summary: Listar pedidos
      description: ""
      operationId: listar-pedidos
      parameters:
        - name: code
          in: query
          description: Código de referência do pedido no sistema da loja.
          schema:
            type: string
        - name: status
          in: query
          description: "Status do pedido.  Valores possíveis: **pending**, **paid**,
            **canceled** ou **failed**"
          schema:
            type: string
        - name: customer_id
          in: query
          description: Código do cliente.
          schema:
            type: string
        - name: created_since
          in: query
          description: Data de início do período de criação a ser listado.
          schema:
            type: string
            format: date
        - name: created_until
          in: query
          description: Data de final do período de criação a ser listado.
          schema:
            type: string
            format: date
        - name: page
          in: query
          description: Página atual.
          schema:
            type: integer
            format: int32
            default: 1
        - name: size
          in: query
          description: Quantidade de itens.
          schema:
            type: integer
            format: int32
            default: 10
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                      "data": [
                        {
                          "id": "or_28dN9w7CLU79kDjL",
                          "code": "62LVFN7I4R",
                          "amount": 2990,
                          "currency": "BRL",
                          "closed": true,
                          "items": [
                            {
                              "id": "oi_d478RMAS3bC74PrL",
                              "description": "Chaveiro do Tesseract",
                              "amount": 2990,
                              "quantity": 1,
                              "status": "active",
                              "created_at": "2017-04-19T16:01:09Z",
                              "updated_at": "2017-04-19T16:01:09Z"
                            }
                          ],
                          "customer": {
                            "id": "cus_eaEXlZvhBfeGlDOm",
                            "name": "Tony Stark",
                            "email": "f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com",
                            "delinquent": false,
                            "created_at": "2017-04-19T16:01:09Z",
                            "updated_at": "2017-04-19T16:01:09Z"
                          },
                          "status": "paid",
                          "created_at": "2017-04-19T16:01:09Z",
                          "updated_at": "2017-04-19T16:01:11Z",
                          "closed_at": "2017-04-19T16:01:11Z",
                          "charges": [
                            {
                              "id": "ch_gmnW101c9YTvQVLB",
                              "code": "62LVFN7I4R",
                              "gateway_id": "ef5e977b-93d2-485a-b15d-36e5eb3d8cf5",
                              "amount": 2990,
                              "status": "paid",
                              "currency": "BRL",
                              "payment_method": "credit_card",
                              "paid_at": "2017-04-19T16:01:11Z",
                              "created_at": "2017-04-19T16:01:09Z",
                              "updated_at": "2017-04-19T16:01:09Z",
                              "customer": {
                                "id": "cus_eaEXlZvhBfeGlDOm",
                                "name": "Tony Stark",
                                "email": "f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com",
                                "delinquent": false,
                                "created_at": "2017-04-19T16:01:09Z",
                                "updated_at": "2017-04-19T16:01:09Z"
                              }
                            }
                          ]
                        },
                        {
                          "id": "or_dW6vZoJfLhw3Rb10",
                          "code": "65JGU05FX0",
                          "amount": 2990,
                          "currency": "BRL",
                          "closed": true,
                          "items": [
                            {
                              "id": "oi_zYGxV8rU36HPWQMg",
                              "description": "Chaveiro do Tesseract",
                              "amount": 2990,
                              "quantity": 1,
                              "status": "active",
                              "created_at": "2017-04-19T15:58:23Z",
                              "updated_at": "2017-04-19T15:58:23Z"
                            }
                          ],
                          "customer": {
                            "id": "cus_rG3592i17uQgxK2Q",
                            "name": "Tony Stark",
                            "email": "5d76b138-2963-40f7-ba71-c9ae2cc65518@avengers.com",
                            "delinquent": false,
                            "created_at": "2017-04-19T15:58:23Z",
                            "updated_at": "2017-04-19T15:58:23Z"
                          },
                          "status": "failed",
                          "created_at": "2017-04-19T15:58:23Z",
                          "updated_at": "2017-04-19T15:58:24Z",
                          "closed_at": "2017-04-19T15:58:24Z",
                          "charges": [
                            {
                              "id": "ch_nM5PkjcyLUa6Nr1w",
                              "code": "65JGU05FX0",
                              "amount": 2990,
                              "status": "failed",
                              "currency": "BRL",
                              "payment_method": "credit_card",
                              "created_at": "2017-04-19T15:58:23Z",
                              "updated_at": "2017-04-19T15:58:24Z",
                              "customer": {
                                "id": "cus_rG3592i17uQgxK2Q",
                                "name": "Tony Stark",
                                "email": "5d76b138-2963-40f7-ba71-c9ae2cc65518@avengers.com",
                                "delinquent": false,
                                "created_at": "2017-04-19T15:58:23Z",
                                "updated_at": "2017-04-19T15:58:23Z"
                              }
                            }
                          ]
                        }
                      ],
                      "paging": {
                        "total": 406,
                        "next": "https://api.stone.com.br/core/v1/orders?page=2&size=2"
                      }
                    }
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: or_28dN9w7CLU79kDjL
                        code:
                          type: string
                          example: 62LVFN7I4R
                        amount:
                          type: integer
                          example: 2990
                          default: 0
                        currency:
                          type: string
                          example: BRL
                        closed:
                          type: boolean
                          example: true
                          default: true
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                example: oi_d478RMAS3bC74PrL
                              description:
                                type: string
                                example: Chaveiro do Tesseract
                              amount:
                                type: integer
                                example: 2990
                                default: 0
                              quantity:
                                type: integer
                                example: 1
                                default: 0
                              status:
                                type: string
                                example: active
                              created_at:
                                type: string
                                example: 2017-04-19T16:01:09Z
                              updated_at:
                                type: string
                                example: 2017-04-19T16:01:09Z
                        customer:
                          type: object
                          properties:
                            id:
                              type: string
                              example: cus_eaEXlZvhBfeGlDOm
                            name:
                              type: string
                              example: Tony Stark
                            email:
                              type: string
                              example: f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com
                            delinquent:
                              type: boolean
                              example: false
                              default: true
                            created_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                            updated_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                        status:
                          type: string
                          example: paid
                        created_at:
                          type: string
                          example: 2017-04-19T16:01:09Z
                        updated_at:
                          type: string
                          example: 2017-04-19T16:01:11Z
                        closed_at:
                          type: string
                          example: 2017-04-19T16:01:11Z
                        charges:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                example: ch_gmnW101c9YTvQVLB
                              code:
                                type: string
                                example: 62LVFN7I4R
                              gateway_id:
                                type: string
                                example: ef5e977b-93d2-485a-b15d-36e5eb3d8cf5
                              amount:
                                type: integer
                                example: 2990
                                default: 0
                              status:
                                type: string
                                example: paid
                              currency:
                                type: string
                                example: BRL
                              payment_method:
                                type: string
                                example: credit_card
                              paid_at:
                                type: string
                                example: 2017-04-19T16:01:11Z
                              created_at:
                                type: string
                                example: 2017-04-19T16:01:09Z
                              updated_at:
                                type: string
                                example: 2017-04-19T16:01:09Z
                              customer:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: cus_eaEXlZvhBfeGlDOm
                                  name:
                                    type: string
                                    example: Tony Stark
                                  email:
                                    type: string
                                    example: f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com
                                  delinquent:
                                    type: boolean
                                    example: false
                                    default: true
                                  created_at:
                                    type: string
                                    example: 2017-04-19T16:01:09Z
                                  updated_at:
                                    type: string
                                    example: 2017-04-19T16:01:09Z
                  paging:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 406
                        default: 0
                      next:
                        type: string
                        example: https://api.stone.com.br/core/v1/orders?page=2&size=2
        "400":
          description: "400"
          content:
            application/json:
              examples:
                Result:
                  value: "{}"
              schema:
                type: object
                properties: {}
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
