> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.erp.olist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Listar ordem de serviço



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json get /ordem-servico
openapi: 3.0.0
info:
  title: Olist ERP API v3
  description: >-
    Documentação completa: <a href="https://api-docs.erp.olist.com"
    target="_blank">https://api-docs.erp.olist.com</a>
  version: '3.1'
servers:
  - url: https://api.tiny.com.br/public-api/v3
security: []
paths:
  /ordem-servico:
    get:
      tags:
        - Ordem de Serviço
      summary: Listar ordem de serviço
      operationId: ListarOrdemServicoAction
      parameters:
        - $ref: '#/components/parameters/nomeClienteOrdemServico'
        - $ref: '#/components/parameters/situacaoOrdemServico'
        - $ref: '#/components/parameters/dataInicialEmissaoOrdemServico'
        - $ref: '#/components/parameters/dataFinalEmissaoOrdemServico'
        - $ref: '#/components/parameters/numeroOrdemServico'
        - $ref: '#/components/parameters/marcadoresOrdemServico'
        - $ref: '#/components/parameters/idContatoOrdemServico'
        - $ref: '#/components/parameters/orderBy'
        - $ref: '#/components/parameters/get_ordem_servico_limit'
        - $ref: '#/components/parameters/get_ordem_servico_offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListagemOrdemServicoResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
      security:
        - bearerAuth: []
components:
  parameters:
    nomeClienteOrdemServico:
      name: nomeCliente
      in: query
      description: Pesquisa por nome do cliente de ordem de servico
      required: false
      schema:
        type: string
    situacaoOrdemServico:
      name: situacao
      in: query
      description: |-
        Pesquisa por situação de ordem de servico
        - 4 - Nao Aprovada
        - 3 - Finalizada
        - 0 - Em Aberto
        - 2 - Serv Concluido
        - 1 - Orcada
        - 5 - Aprovada
        - 6 - Em Andamento
        - 7 - Cancelada
      required: false
      schema:
        enum:
          - 4
          - 3
          - 0
          - 2
          - 1
          - 5
          - 6
          - 7
      x-enumDescriptions:
        - 4 - Nao Aprovada
        - 3 - Finalizada
        - 0 - Em Aberto
        - 2 - Serv Concluido
        - 1 - Orcada
        - 5 - Aprovada
        - 6 - Em Andamento
        - 7 - Cancelada
    dataInicialEmissaoOrdemServico:
      name: dataInicialEmissao
      in: query
      description: Pesquisa por data inicial da emissão de ordem de servico
      required: false
      schema:
        type: string
        example: '2024-01-01'
    dataFinalEmissaoOrdemServico:
      name: dataFinalEmissao
      in: query
      description: Pesquisa por data final da emissão de ordem de servico
      required: false
      schema:
        type: string
        example: '2024-01-01'
    numeroOrdemServico:
      name: numeroOrdemServico
      in: query
      description: Pesquisa por número de ordem de servico
      required: false
      schema:
        type: string
    marcadoresOrdemServico:
      name: marcadores
      in: query
      description: Pesquisa por marcadores
      required: false
      schema:
        type: array
        items:
          type: string
    idContatoOrdemServico:
      name: idContato
      in: query
      description: Pesquisa por ID do contato de ordem de servico
      required: false
      schema:
        type: integer
      example: 123
    orderBy:
      name: orderBy
      in: query
      description: |-
        Define a ordenação da listagem por ordem crescente ou decrescente
        - asc - Crescente
        - desc - Descrescente
      required: false
      schema:
        enum:
          - asc
          - desc
      x-enumDescriptions:
        - asc - Crescente
        - desc - Descrescente
    get_ordem_servico_limit:
      name: limit
      in: query
      description: Limite da paginação
      required: false
      schema:
        type: integer
        default: 100
    get_ordem_servico_offset:
      name: offset
      in: query
      description: Offset da paginação
      required: false
      schema:
        type: integer
        default: 0
  schemas:
    ListagemOrdemServicoResponseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
          nullable: true
        situacao:
          description: |-

            - 4 - Nao Aprovada
            - 3 - Finalizada
            - 0 - Em Aberto
            - 2 - Serv Concluido
            - 1 - Orcada
            - 5 - Aprovada
            - 6 - Em Andamento
            - 7 - Cancelada
          type: string
          enum:
            - 4
            - 3
            - 0
            - 2
            - 1
            - 5
            - 6
            - 7
          nullable: true
          x-enumDescriptions:
            - 4 - Nao Aprovada
            - 3 - Finalizada
            - 0 - Em Aberto
            - 2 - Serv Concluido
            - 1 - Orcada
            - 5 - Aprovada
            - 6 - Em Andamento
            - 7 - Cancelada
        data:
          type: string
          example: '2024-01-01'
          nullable: true
        dataPrevista:
          type: string
          example: '2024-01-01 00:00:00'
          nullable: true
        valor:
          type: number
          format: float
          nullable: true
        numeroOrdemServico:
          type: string
          nullable: true
        cliente:
          $ref: '#/components/schemas/ContatoModelResponse'
        marcadores: {}
      type: object
    ErrorDTO:
      title: ' '
      description: ' '
      properties:
        mensagem:
          description: Mensagem de erro geral
          type: string
          example: Ocorreram erros de validação
        detalhes:
          description: Detalhes específicos do erro
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
          example:
            - campo: codigo
              mensagem: O campo código é obrigatório
          nullable: true
      type: object
    ContatoModelResponse:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseContatoModel'
        - properties:
            id:
              type: integer
          type: object
    ErrorDetailDTO:
      title: ' '
      description: ' '
      properties:
        campo:
          description: Campo que gerou o erro
          type: string
          example: codigo
        mensagem:
          description: Mensagem de erro específica do campo
          type: string
          example: O campo código é obrigatório
      type: object
    BaseContatoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            nome:
              type: string
              nullable: true
            codigo:
              type: string
              nullable: true
            fantasia:
              type: string
              nullable: true
            tipoPessoa:
              description: |-

                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
              type: string
              enum:
                - J
                - F
                - E
                - X
              nullable: true
              x-enumDescriptions:
                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
            cpfCnpj:
              type: string
              nullable: true
            inscricaoEstadual:
              type: string
              nullable: true
            rg:
              type: string
              nullable: true
            telefone:
              type: string
              nullable: true
            celular:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            endereco:
              $ref: '#/components/schemas/EnderecoModel'
          type: object
    EnderecoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            endereco:
              type: string
              nullable: true
            numero:
              type: string
              nullable: true
            complemento:
              type: string
              nullable: true
            bairro:
              type: string
              nullable: true
            municipio:
              type: string
              nullable: true
            cep:
              type: string
              nullable: true
            uf:
              type: string
              nullable: true
            pais:
              type: string
              nullable: true
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````