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

# List orders

> The orders your app placed for the customer, newest first.



## OpenAPI

````yaml /openapi.json get /orders
openapi: 3.1.2
info:
  title: Robograding
  version: 1.0.0
servers:
  - url: https://app.agscard.com/api/partner/v1
security:
  - http: []
tags:
  - name: Profile
  - name: Card products
  - name: Orders
paths:
  /orders:
    get:
      tags:
        - Orders
      summary: List orders
      description: The orders your app placed for the customer, newest first.
      operationId: listOrders
      parameters:
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
        - name: X-Tenant
          in: header
          schema:
            type: string
            enum:
              - us
              - gb
              - br
      responses:
        '200':
          description: Paginated set of `OrderResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrderResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    OrderResource:
      type: object
      properties:
        id:
          type: integer
        order_number:
          type:
            - string
            - 'null'
        status:
          type: string
        payment_status:
          type: string
        payment_url:
          type:
            - string
            - 'null'
        payment_plan_id:
          type: integer
        price_per_card:
          type: number
        turnaround:
          type: string
        shipping_method:
          anyOf:
            - $ref: '#/components/schemas/ShippingMethodResource'
            - type: 'null'
        number_of_cards:
          type: integer
        upcharges:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              amount:
                type: number
            required:
              - code
              - amount
        service_fee:
          type:
            - number
            - 'null'
        shipping_fee:
          type:
            - number
            - 'null'
        upcharges_fee:
          type: number
        discounted_amount:
          type:
            - number
            - 'null'
        grand_total:
          type:
            - number
            - 'null'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemResource'
        created_at:
          type:
            - string
            - 'null'
      required:
        - id
        - order_number
        - status
        - payment_status
        - payment_url
        - payment_plan_id
        - price_per_card
        - turnaround
        - shipping_method
        - number_of_cards
        - upcharges
        - service_fee
        - shipping_fee
        - upcharges_fee
        - discounted_amount
        - grand_total
        - created_at
      title: OrderResource
    ShippingMethodResource:
      type: object
      properties:
        id:
          type: integer
        code:
          type: string
        name:
          type: string
      required:
        - id
        - code
        - name
      title: ShippingMethodResource
    OrderItemResource:
      type: object
      properties:
        id:
          type: integer
        card_product_id:
          type: integer
        card_name:
          type: string
        declared_value:
          type: number
      required:
        - id
        - card_product_id
        - card_name
        - declared_value
      title: OrderItemResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthenticated
                  message:
                    type: string
                required:
                  - code
                  - message
            required:
              - error
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - validation_failed
                  message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                required:
                  - code
                  - message
            required:
              - error
  securitySchemes:
    http:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.