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

# Find purchase order by ID

> For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/dasdk/openapi.documented.yml get /store/order/{orderId}
openapi: 3.0.3
info:
  title: OpenAPI 3.0 Pet Store
  description: This is a sample Pet Store Server based on the OpenAPI 3.0 specification.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.11
servers:
  - url: https://petstore3.swagger.io/api/v3
security:
  - api_key: []
tags:
  - name: pet
    description: Everything about your Pets
  - name: store
    description: Access to Petstore orders
  - name: user
    description: Operations about user
paths:
  /store/order/{orderId}:
    get:
      tags:
        - store
      summary: Find purchase order by ID
      description: >-
        For valid response try integer IDs with value <= 5 or > 10. Other values
        will generate exceptions.
      operationId: getOrderById
      parameters:
        - name: orderId
          in: path
          description: ID of order that needs to be fetched
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
            application/xml:
              schema:
                $ref: '#/components/schemas/Order'
        '400':
          description: Invalid ID supplied
        '404':
          description: Order not found
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dasdk from 'dasdk';

            const client = new Dasdk({
              apiKey: 'My API Key',
            });

            const order = await client.store.order.retrieve(0);

            console.log(order.id);
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 10
        petId:
          type: integer
          format: int64
          example: 198772
        quantity:
          type: integer
          format: int32
          example: 7
        shipDate:
          type: string
          format: date-time
        status:
          type: string
          description: Order Status
          example: approved
          enum:
            - placed
            - approved
            - delivered
        complete:
          type: boolean
      xml:
        name: order
  securitySchemes:
    api_key:
      type: apiKey
      name: api_key
      in: header

````