Patch Orders API

Place, retrieve, place, and cancel carbon credit and removal orders.

Operations 7

GET /v1/orders List Orders #
POST /v1/orders Create An Order #
GET /v1/orders/{id} Retrieve An Order #
DELETE /v1/orders/{id} Deletes a draft order #
DELETE /v1/orders/{uid} Delete An Order #
PATCH /v1/orders/{id}/place Place An Order #
PATCH /v1/orders/{id}/cancel Cancel An Order #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/patch-io-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

patch-io-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Patch Io Orders API
  version: '2'
  x-refined-note:
  - x-api-id differs across the merged source definitions and was not carried
  description: 'Operations tagged Orders across 2 of this provider''s published API definitions: patch-io-carbon-api-openapi.yml, patch-io-patch-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.patch.io
  description: Production API
tags:
- name: Orders
  description: Place, retrieve, place, and cancel carbon credit and removal orders.
paths:
  /v1/orders:
    get:
      tags:
      - Orders
      operationId: retrieveOrders
      summary: List Orders
      description: Returns a paginated list of carbon credit and removal orders for the authenticated organization.
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - name: metadata
        in: query
        schema:
          type: object
          additionalProperties:
            type: string
        description: Filter orders by metadata key/value pairs set when the order was created.
      - name: state
        in: query
        schema:
          type: string
          enum:
          - draft
          - placed
          - processing
          - complete
          - cancelled
      responses:
        '200':
          description: Order list response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
    post:
      tags:
      - Orders
      operationId: createOrder
      summary: Create An Order
      description: Creates a new carbon credit or removal order. Orders may be created in draft and placed later, or placed inline.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '200':
          description: Order response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.patch.io
      description: Production API
  /v1/orders/{id}:
    get:
      tags:
      - Orders
      operationId: retrieveOrder
      summary: Retrieve An Order
      description: Returns a single carbon credit or removal order by ID.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Order response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
    delete:
      summary: Deletes a draft order
      description: Deletes an order that is in the `draft` state.
      operationId: delete_order
      tags:
      - Orders
      parameters:
      - name: uid
        in: path
        required: true
        schema:
          type: string
        description: The order UID
      - name: Patch-Version
        in: header
        schema:
          type: integer
          default: 2
      responses:
        '200':
          description: The deleted order confirmation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteOrderResponse_2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse_2'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse_2'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.patch.io
      description: Production API
  /v1/orders/{uid}:
    delete:
      tags:
      - Orders
      operationId: deleteOrder
      summary: Delete An Order
      description: Deletes a draft order. Placed and completed orders cannot be deleted; use the cancel endpoint instead.
      parameters:
      - name: uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Delete order response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteOrderResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.patch.io
      description: Production API
  /v1/orders/{id}/place:
    patch:
      tags:
      - Orders
      operationId: placeOrder
      summary: Place An Order
      description: Transitions a draft order to placed, committing the credits to the buyer.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Order response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.patch.io
      description: Production API
  /v1/orders/{id}/cancel:
    patch:
      tags:
      - Orders
      operationId: cancelOrder
      summary: Cancel An Order
      description: Cancels a previously placed order where the project allows cancellation.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Order response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.patch.io
      description: Production API
components:
  schemas:
    Meta:
      type: object
      description: Pagination and response metadata block returned on list endpoints.
      properties:
        prev_page:
          type:
          - integer
          - 'null'
        next_page:
          type:
          - integer
          - 'null'
    DeleteOrderResponse:
      type: object
      properties:
        success:
          type: boolean
        error: {}
        data: {}
        meta:
          $ref: '#/components/schemas/Meta'
    OrderIssuedTo:
      type: object
      description: End beneficiary that credits should be issued and attributed to.
      properties:
        name:
          type: string
        email:
          type: string
          format: email
    CreateOrderRequest:
      type: object
      properties:
        project_id:
          type: string
        metadata:
          type: object
          additionalProperties: true
        state:
          type: string
          enum:
          - draft
          - placed
        vintage_year:
          type: integer
        vintage_start_year:
          type: integer
        vintage_end_year:
          type: integer
        total_price:
          type: integer
        currency:
          type: string
          example: USD
        amount:
          type: integer
        unit:
          type: string
          example: g
        issued_to:
          $ref: '#/components/schemas/OrderIssuedTo'
    OrderLineItem:
      type: object
      properties:
        id:
          type: string
        project:
          $ref: '#/components/schemas/OrderLineItemProject'
        vintage_year:
          type:
          - integer
          - 'null'
        vintage_start_year:
          type:
          - integer
          - 'null'
        vintage_end_year:
          type:
          - integer
          - 'null'
        amount:
          type: integer
          description: Mass in grams.
        unit:
          type: string
          example: g
        price:
          type: integer
        currency:
          type: string
          example: USD
    Order:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        production:
          type: boolean
        state:
          type: string
          enum:
          - draft
          - placed
          - processing
          - complete
          - cancelled
        amount:
          type: integer
          description: Total mass in grams.
        unit:
          type: string
          example: g
        price:
          type: integer
          description: Subtotal in minor currency units.
        patch_fee:
          type: integer
        currency:
          type: string
          example: USD
        registry_url:
          type:
          - string
          - 'null'
          format: uri
        metadata:
          type: object
          additionalProperties: true
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem'
        issued_to:
          $ref: '#/components/schemas/OrderIssuedTo'
    OrderListResponse:
      type: object
      properties:
        success:
          type: boolean
        error: {}
        data:
          type: array
          items:
            $ref: '#/components/schemas/Order'
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
        data: {}
        meta:
          type: object
          properties:
            patch_version:
              type: integer
    OrderLineItemProject:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    OrderResponse:
      type: object
      properties:
        success:
          type: boolean
        error: {}
        data:
          $ref: '#/components/schemas/Order'
        meta:
          $ref: '#/components/schemas/Meta'
    DeleteOrderResponse_2:
      type: object
      description: API response confirming order deletion
      properties:
        success:
          type: boolean
          description: Whether the deletion was successful
        error:
          type:
          - string
          - 'null'
          description: Error message if the deletion failed
        data:
          type: object
          properties:
            id:
              type: string
              description: ID of the deleted order
    OrderIssuedTo_2:
      type: object
      description: Entity to whom the carbon credits are issued
      properties:
        name:
          type: string
          description: Name of the recipient
        email:
          type: string
          format: email
          description: Email address of the recipient
    CreateOrderRequest_2:
      type: object
      description: Request body for creating a new order
      properties:
        project_id:
          type: string
          description: ID of the carbon project to purchase from
        metadata:
          type: object
          additionalProperties: true
          description: Custom key-value metadata to attach to the order
        state:
          type: string
          enum:
          - draft
          - placed
          - reserved
          description: Initial state for the order
        vintage_year:
          type: integer
          description: Specific vintage year for the carbon credits
        vintage_start_year:
          type: integer
          description: Start year of the vintage range
        vintage_end_year:
          type: integer
          description: End year of the vintage range
        total_price:
          type: integer
          description: Total price in the smallest currency unit
        currency:
          type: string
          description: ISO 4217 currency code
        amount:
          type: integer
          description: Amount of carbon offset in grams of CO2 equivalent
        unit:
          type: string
          description: Unit of measurement
        issued_to:
          $ref: '#/components/schemas/OrderIssuedTo_2'
    OrderLineItem_2:
      type: object
      description: An individual line item within an order
      properties:
        id:
          type: string
          description: Unique identifier for the line item
        project:
          $ref: '#/components/schemas/OrderLineItemProject_2'
        vintage_year:
          type: integer
          description: Specific vintage year for the carbon credits
        vintage_start_year:
          type: integer
          description: Start year of the vintage range
        vintage_end_year:
          type: integer
          description: End year of the vintage range
        amount:
          type: integer
          description: Amount of carbon offset in grams of CO2 equivalent
        unit:
          type: string
          description: Unit of measurement
        price:
          type: integer
          description: Price in the smallest currency unit
        currency:
          type: string
          description: ISO 4217 currency code
    Order_2:
      type: object
      description: A carbon offset order
      properties:
        id:
          type: string
          description: Unique identifier for the order
        created_at:
          type: string
          format: date-time
          description: Timestamp when the order was created
        production:
          type: boolean
          description: Whether this is a production (vs. test) order
        state:
          type: string
          enum:
          - draft
          - placed
          - cancelled
          - reserved
          description: Current state of the order
        amount:
          type: integer
          description: Amount of carbon offset in grams of CO2 equivalent
        unit:
          type: string
          description: Unit of measurement (e.g., g, kg, t)
        price:
          type: integer
          description: Price in the smallest currency unit (e.g., cents)
        patch_fee:
          type: integer
          description: Patch platform fee in the smallest currency unit
        currency:
          type: string
          description: ISO 4217 currency code (e.g., USD)
        registry_url:
          type: string
          format: uri
          description: URL to the registry record for this order
        metadata:
          type: object
          additionalProperties: true
          description: Custom key-value metadata attached to the order
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem_2'
          description: Individual line items within the order
        issued_to:
          $ref: '#/components/schemas/OrderIssuedTo_2'
    MetaIndexObject:
      type: object
      description: Pagination metadata
      properties:
        has_more:
          type: boolean
          description: Whether there are more records to retrieve
        next_page:
          type:
          - integer
          - 'null'
          description: The next page number, if available
        current_page:
          type: integer
          description: The current page number
    OrderListResponse_2:
      type: object
      description: API response wrapping a list of Orders
      properties:
        success:
          type: boolean
          description: Whether the request was successful
        error:
          type:
          - string
          - 'null'
          description: Error message if the request failed
        data:
          type: array
          items:
            $ref: '#/components/schemas/Order_2'
        meta:
          $ref: '#/components/schemas/MetaIndexObject'
    ErrorResponse_2:
      type: object
      description: API error response
      properties:
        success:
          type: boolean
          example: false
          description: Always false for error responses
        error:
          type: string
          description: Error message describing what went wrong
    OrderLineItemProject_2:
      type: object
      description: Project reference within an order line item
      properties:
        id:
          type: string
          description: Project identifier
        name:
          type: string
          description: Project name
    PlaceOrderRequest:
      type: object
      description: Optional request body for placing an order
      properties:
        metadata:
          type: object
          additionalProperties: true
          description: Additional metadata to attach when placing
    OrderResponse_2:
      type: object
      description: API response wrapping an Order
      properties:
        success:
          type: boolean
          description: Whether the request was successful
        error:
          type:
          - string
          - 'null'
          description: Error message if the request failed
        data:
          $ref: '#/components/schemas/Order_2'
  responses:
    BadRequest:
      description: Request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API key missing, malformed, or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    PageParam:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
      description: 1-indexed page number for paginated responses.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key bearer token issued from the Patch dashboard. Sandbox and live keys are separated.
    bearer_auth:
      type: http
      scheme: bearer
      description: 'Bearer token API key obtained from the Patch dashboard. Use test keys for sandbox and production keys for live orders.

        '
x-refined-from:
- patch-io-carbon-api-openapi.yml
- patch-io-patch-api-openapi.yml