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

# Get List of Orders

> Gets a list of orders in reverse chronological order up to the provided `limit` number of orders per call.
Pagination is supported by passing the first order `id` from a previous call into `ending_before` to retrieve the
previous page, or the last order `id` from a previous call into `starting_after` to retrieve the next page.




## OpenAPI

````yaml api-reference/openapi.yaml get /orders
openapi: 3.1.0
info:
  title: CNaught Carbon Credits API Documentation
  contact:
    email: support@cnaught.com
    name: CNaught
    url: https://cnaught.com/
  version: v1
  description: |
    Carbon Credits API Documentation
  termsOfService: https://cnaught.com/terms
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT.html
servers:
  - url: https://api.cnaught.com/v1
    description: CNaught API
security:
  - ApiKey: []
tags:
  - name: Orders
    description: Endpoints for placing orders and retrieving information about orders
  - name: Quotes
    description: Endpoints for obtaining price quotes for orders
  - name: Climate Impact
    description: >-
      Endpoints for retrieving climate impact data and hosted public impact page
      configuration
  - name: Subaccounts
    description: Endpoints for creating and retrieving information about subaccounts
paths:
  /orders:
    get:
      tags:
        - Orders
      summary: Get List of Orders
      description: >
        Gets a list of orders in reverse chronological order up to the provided
        `limit` number of orders per call.

        Pagination is supported by passing the first order `id` from a previous
        call into `ending_before` to retrieve the

        previous page, or the last order `id` from a previous call into
        `starting_after` to retrieve the next page.
      operationId: GetListOfOrder
      parameters:
        - $ref: '#/components/parameters/SubaccountId'
          description: >-
            If present, only returns orders belonging to the subaccount with
            given id.
        - name: limit
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 20
            maximum: 100
            minimum: 1
          required: false
          description: Limits the number of orders returned, default is 20, max is 100
        - name: starting_after
          in: query
          schema:
            type:
              - string
              - 'null'
          required: false
          description: >-
            If specified, returns orders submitted before (earlier than) the
            order with this id, exclusive (order with this id is not included).
            Only one of starting_after and ending_before can be specified.
        - name: ending_before
          in: query
          schema:
            type:
              - string
              - 'null'
          required: false
          description: >-
            If specified, returns orders submitted after (later than) the order
            with this id, exclusive (order with this id is not included). Only
            one of starting_after and ending_before can be specified.
      responses:
        '200':
          description: List of orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOfOrders'
              example:
                data:
                  - id: Gre28Fc35bt3
                    order_number: 47726-53238-46633-33562-7433
                    created_on: '2022-08-01T18:00:00.000000Z'
                    metadata: Customer metadata
                    description: On behalf of Jane Smith
                    amount_kg: 10.5
                    state: fulfilled
                    price_usd_cents: 2350
                    certificate_public_url: https://registry.cnaught.com/orders/Gre28Fc35bt3
                    certificate_download_public_url: >-
                      https://registry.cnaught.com/api/certificates/Gre28Fc35bt3/pdf
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestProblemDetails'
              examples:
                Invalid starting_after Order Id:
                  value:
                    status: 400
                    type: https://api.cnaught.com/v1/errors/invalid-parameters
                    title: Invalid value for parameter starting_after was specified
                    detail: The order id specified by starting_after does not exist.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    SubaccountId:
      name: X-Subaccount-Id
      in: header
      required: false
      description: >-
        If present, scopes the operation to the subaccount with given id. See
        [Subaccounts](/api/reference/#tag/Subaccounts) for more info.
      schema:
        type: string
  schemas:
    ListOfOrders:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Order'
    BadRequestProblemDetails:
      allOf:
        - $ref: '#/components/schemas/BaseProblemDetails'
        - type: object
          properties:
            errors:
              description: >-
                Invalid properties object where each property is the key, mapped
                to a list of reasons why the property is invalid
              type:
                - object
                - 'null'
              additionalProperties:
                type: array
                items:
                  type: string
    Order:
      type: object
      properties:
        id:
          type: string
          description: Identifier that can be used to retrieve the order details
          examples:
            - Gre28Fc35bt3
        order_number:
          type: string
          description: >-
            Hex representation derived from the order id that will be shown on
            the certificate
          examples:
            - 47726-53238-46633-33562-7433
        created_on:
          type: string
          description: Timestamp of when the order was created (in UTC)
        metadata:
          type:
            - string
            - 'null'
          description: Optional metadata that was provided with the order
          maxLength: 512
          examples:
            - internal_order_id=12345
        description:
          type:
            - string
            - 'null'
          description: >-
            Optional public description for the order that will be shown on the
            certificate, as provided when order was placed
          maxLength: 512
          examples:
            - on behalf of Jane Smith
        amount_kg:
          type: number
          description: Amount of credits purchased, in kg of CO₂e
          examples:
            - 10.5
        state:
          type: string
          enum:
            - placed
            - fulfilled
            - cancelled
          description: >
            The current state of the order.

            * `placed` - the order has been placed, and is waiting to be matched
            against available credits in our system.

            * `fulfilled` - the order has been fulfilled by matching it against
            available credits in our system, which have been retired.

            * `canceled` - the order has been canceled
        price_usd_cents:
          type: number
          description: Amount charged for the credits purchased, in USD cents
          examples:
            - 2350
        callback_url:
          type: string
          description: >-
            Callback URL to invoke when status of the order changes, if
            specified in the order
        certificate_public_url:
          type:
            - string
            - 'null'
          description: >-
            URL for the publicly accessible page showing order details and the
            certificate. This will be null if the order state is cancelled
          examples:
            - https://registry.cnaught.com/orders/ABCDE
        certificate_download_public_url:
          type:
            - string
            - 'null'
          description: >-
            URL for downloading the certificate PDF. This will be null if the
            order state is cancelled
          examples:
            - https://registry.cnaught.com/api/certificates/ABCDE/pdf
        project_allocations:
          type: array
          items:
            $ref: '#/components/schemas/ProjectAllocation'
          description: >-
            For fulfilled orders, a list of the projects that were used to
            fulfill the order
        checkout_session_id:
          type:
            - string
            - 'null'
          description: >
            Id of the checkout session whose completion resulted in the creation
            of this order.

            Null if the order did not originate from a checkout session.
          examples:
            - zpQ6QSNRQh
    BaseProblemDetails:
      type: object
      description: Problem details object returned on errors
      properties:
        title:
          type: string
          description: Short, human-readable summary of the problem
        details:
          type: string
          description: Longer, human-readable description of the problem
        type:
          type: string
          description: URI that identifies the problem type
        status:
          type: integer
          description: HTTP status code of the error
    ProjectAllocation:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/Project'
          description: Details of the project for this allocation
        amount_kg:
          type: number
          description: Amount (in kg CO₂e) of the order fulfilled from this project
          examples:
            - 1000
        retirements:
          type: array
          items:
            $ref: '#/components/schemas/Retirement'
          description: List of retirement records for this project allocation
    Project:
      type: object
      description: Details about a project
      properties:
        id:
          type: string
          description: Identifier that can be used to retrieve the project details
          examples:
            - Fc35bt3
        name:
          type: string
          description: Name of the project
          examples:
            - Liling Landfill Gas Project
        summary:
          type:
            - string
            - 'null'
          description: A short summary of the project
          examples:
            - Lorem Ipsum
        description:
          type:
            - string
            - 'null'
          description: A longer description of the project
          examples:
            - Lorem Ipsum Shmipsum
        type:
          type: string
          description: Type of project, eg Afforrestation, Renewable Energy, etc
          examples:
            - REDD
        activity_types:
          type: array
          description: List of activity types for the project
          items:
            type: string
          examples:
            - - Landfill Gas
              - Renewable Energy
        developer:
          type:
            - string
            - 'null'
          description: The name of the company or organization sponsoring the project
          examples:
            - Charm Industrial
        registry_name:
          type:
            - string
            - 'null'
          description: >-
            The name of the registry on which the project's credits are
            registered
          examples:
            - Verra
        registry_id:
          type:
            - string
            - 'null'
          description: The id of the project within the registry
          examples:
            - 824
        registry_url:
          type:
            - string
            - 'null'
          description: The full url to the project's documentation on the registry website
          examples:
            - https://registry.verra.org/app/projectDetail/VCS/824
        location_name:
          type:
            - string
            - 'null'
          description: Location of the project
          examples:
            - Fujian Province, China
        location_latitude:
          type:
            - number
            - 'null'
          description: Latitude for the location of the project
          examples:
            - 26.0833
        location_longitude:
          type:
            - number
            - 'null'
          description: Longitude for the location of the project
          examples:
            - 119.3
        primary_image_url:
          type:
            - string
            - 'null'
          description: URL for the primary image of the project
          examples:
            - >-
              https://assets.cnaught.com/63a4ad4c853f90fd4c455107/64122d1dcf47f3840933826a_charm-industrial.jpg
        un_sdg_goals:
          type: array
          description: >-
            list of UN Sustainable Development Goals supported by this project;
            see https://sdgs.un.org/goals
          items:
            type: number
          examples:
            - - 1
              - 4
              - 6
        methodology:
          type:
            - string
            - 'null'
          description: The methodology used for the project
          examples:
            - VM0010
        verifier:
          type:
            - string
            - 'null'
          description: The verifier of the project
          examples:
            - DNV GL
        permanence:
          type:
            - string
            - 'null'
          description: Information about the permanence of the carbon removal
          examples:
            - 100+ years
        lifetime:
          type: object
          description: The lifetime of the project
          properties:
            start_year:
              type:
                - integer
                - 'null'
              description: The start year of the project
              examples:
                - 2020
            end_year:
              type:
                - integer
                - 'null'
              description: The end year of the project
              examples:
                - 2040
        impact_type:
          type:
            - string
            - 'null'
          description: >-
            The type of impact the project has (avoided emissions, removal, or
            mix of both)
          examples:
            - Avoided Emissions
        due_diligence:
          type:
            - string
            - 'null'
          description: Information about the due diligence performed on the project
          examples:
            - Extensive verification process was conducted...
        beyond_carbon:
          type:
            - string
            - 'null'
          description: Information about benefits beyond carbon reduction
          examples:
            - This project also supports local communities...
        risk_of_reversal:
          type:
            - string
            - 'null'
          description: Information about the risk of carbon reversal
          examples:
            - Low risk due to long-term conservation agreements...
        third_party_labels:
          type:
            - array
            - 'null'
          description: List of third-party labels or certifications
          items:
            type: string
          examples:
            - - Gold Standard
              - Climate Action Reserve
        notable_buyers:
          type:
            - array
            - 'null'
          description: List of notable buyers of credits from this project
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the buyer
                examples:
                  - Microsoft
              logo_url:
                type: string
                description: URL to the buyer's logo
                examples:
                  - https://assets.cnaught.com/logos/microsoft.png
              logo_alt_text:
                type:
                  - string
                  - 'null'
                description: Alt text for the buyer's logo
                examples:
                  - Microsoft logo
        due_diligence_figure:
          type:
            - object
            - 'null'
          description: Figure illustrating due diligence information
          properties:
            description:
              type: string
              description: Description of the due diligence figure
              examples:
                - This chart shows the verification process...
            image_url:
              type: string
              description: URL to the due diligence figure image
              examples:
                - https://assets.cnaught.com/figures/due-diligence.png
            image_alt_text:
              type:
                - string
                - 'null'
              description: Alt text for the due diligence figure image
              examples:
                - Due diligence verification process diagram
        news_articles:
          type:
            - array
            - 'null'
          description: List of news articles related to the project
          items:
            type: object
            properties:
              title:
                type: string
                description: Title of the news article
                examples:
                  - New Carbon Capture Project Launched
              url:
                type: string
                description: URL to the news article
                examples:
                  - https://example.com/news/carbon-capture
              author:
                type: string
                description: Author of the news article
                examples:
                  - John Smith
              published_on:
                type: string
                format: date-time
                description: Publication date of the news article
                examples:
                  - '2023-01-15T00:00:00Z'
              cnaught_take:
                type:
                  - string
                  - 'null'
                description: CNaught's perspective on the news article
                examples:
                  - This article highlights the importance of...
    Retirement:
      type: object
      properties:
        serial_number_range:
          type:
            - string
            - 'null'
          description: >-
            The serial number range of the retired tranche block(s) from which
            an order's project allocation is taken. The format differs depending
            on the registry
          examples:
            - GS1-1-KE-GS5642-16-2018-20671-12345-12350
        url:
          type:
            - string
            - 'null'
          description: >-
            The url to the retired tranche block(s) record on the project's
            registry
  responses:
    Unauthorized:
      description: Request Unauthorized
      content:
        application/problem+json:
          schema:
            properties:
              title:
                type: string
                description: Short, human-readable summary of the problem type
              status:
                type: integer
                description: HTTP status code of the error
          example:
            title: Authorization has been denied for this request
            status: 401
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````