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

# Get All Orders

> Get All Orders



## OpenAPI

````yaml GET /offset-gateway/orders
openapi: 3.0.1
info:
  title: Offset Gateway API
  description: API specification for carbon credit purchases and offsets
  version: 1.0.0
servers:
  - url: https://api.sandbox.external.bnznow.com
    description: Sandbox server for marketplace APIs
  - url: https://api.external.bnznow.com
    description: Production server for marketplace APIs
security: []
paths:
  /offset-gateway/orders:
    get:
      tags:
        - Offset
      summary: List All Offset Orders
      description: >-
        Retrieve a list of all offset orders with optional filtering and
        pagination
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: API key for authentication
        - name: email
          in: query
          description: Email of user to get orders for
          schema:
            type: string
        - name: tax_id
          in: query
          description: Tax ID of user to get orders for
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of results to return
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 20
        - name: page
          in: query
          description: The page number to return
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
            default: 1
        - name: sort
          in: query
          description: The sort order of the results
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: status
          in: query
          description: Filter orders by status
          schema:
            type: string
            enum:
              - pending
              - completed
              - failed
      responses:
        '200':
          description: Successfully retrieved list of orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        description: Current page number
                      total_records:
                        type: integer
                        description: Total number of records
                      limit:
                        type: integer
                        description: Number of records per page
                  overview:
                    type: object
                    properties:
                      total_orders:
                        type: integer
                        description: Total number of orders
                      total_amount_paid:
                        type: number
                        description: Total amount paid in INR
                      total_users:
                        type: integer
                        description: Total number of users
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrderDetails'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderDetails:
      type: object
      properties:
        order_id:
          type: string
          description: Unique identifier for the order
        emission_amount:
          type: number
          description: Amount of emissions to offset
        emission_unit:
          type: string
          description: Unit of emission measurement
        user:
          type: object
          properties:
            name:
              type: string
              description: Full name of the user
            email:
              type: string
              description: Email address of the user
            tax_id:
              type: string
              description: Tax identification number of the user
        callback_url:
          type: string
          format: uri
          description: URL to receive webhook notifications about order status changes
        payment_url:
          type: string
          format: uri
          description: URL to complete the payment
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: Current status of the order
        payment_status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: Status of the payment
        created_at:
          type: string
          format: date-time
          description: Order creation timestamp
        project:
          type: object
          properties:
            name:
              type: string
              description: Name of the carbon offset project
            registry:
              type: string
              description: Registry where the project is listed
            project_id:
              type: string
              description: Unique identifier of the project in the registry
            category:
              type: string
              description: Category of the carbon offset project
            type:
              type: string
              description: Type of the carbon offset project
            public_url:
              type: string
              format: uri
              description: Public URL of the project
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string

````