Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: CNaught Orders API
version: '2026-10-09'
description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-10-09: 7 operation(s) read from 11 public documentation page(s) (each operation names its page in x-source). This is not the provider''s published contract; CNaught has published no machine-readable contract that the pipeline could find. Engine: local.'
x-evidence-tiers:
code-example: 11
documentation: -4
pages-with-code: 11
pages-read: 11
x-generated-from: documentation
x-provenance: generated
x-authored-by: API Evangelist
x-generated: '2026-10-09'
x-generator: generate-contract-from-docs.py
x-engine: local
x-sources:
- https://docs.cnaught.com/api-reference/orders/cancel-order.md
- https://docs.cnaught.com/api-reference/orders/get-order-by-id.md
- https://docs.cnaught.com/api-reference/orders/get-list-of-orders.md
- https://docs.cnaught.com/api-reference/projects/get-project-by-id.md
- https://docs.cnaught.com/api-reference/subaccounts/create-subaccount.md
- https://docs.cnaught.com/api-reference/subaccounts/delete-subaccount.md
- https://docs.cnaught.com/api-reference/subaccounts/update-subaccount.md
- https://docs.cnaught.com/api-reference/portfolios/get-portfolio-by-id.md
- https://docs.cnaught.com/api-reference/subaccounts/get-subaccount-by-id.md
- https://docs.cnaught.com/api-reference/portfolios/get-list-of-portfolios.md
- https://docs.cnaught.com/api-reference/orders/create-carbon-credits-order.md
servers:
- url: https://api.cnaught.com
security:
- bearer: []
tags:
- name: Orders
paths:
/v1/orders/{id}:
post:
operationId: post_v1_orders_id
tags:
- Orders
summary: POST /v1/orders/{id}
x-source: https://docs.cnaught.com/api-reference/orders/cancel-order.md
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'201':
description: Success (shape read from the example response on the page)
content:
application/json:
schema:
$ref: '#/components/schemas/PostV1OrdersIdResponse'
x-evidence:
kind: code-example
language: curl
snippet: 'curl --request POST --url https://api.cnaught.com/v1/orders/<id>/cancel --header ''Authorization: Bearer <token>''
```'
/v1/orders/{id}/cancel:
post:
operationId: post_v1_orders_id_cancel
tags:
- Orders
summary: Cancel Order
description: When cancelling an order that has been fulfilled, a credit for the price of the order will be applied to the current invoice. This means that it is possible for the credit for a cancellation to appear on the invoice of the following billing period.
x-source: https://docs.cnaught.com/api-reference/orders/cancel-order.md
parameters:
- name: id
in: path
required: true
schema:
type: string
- name: X-Subaccount-Id
in: header
required: false
schema:
type: string
description: If present, will only cancel the order if it belongs to the subaccount with given id.
- name: Idempotency-Key
in: header
required: false
schema:
type: string
description: If present, a unique identifier that allows you to retry a request multiple times while only performing the action once.
- name: Authorization
in: header
required: true
schema:
type: string
description: Bearer token for CNaught API key
responses:
'201':
description: Success (status as documented)
content:
application/json:
schema:
$ref: '#/components/schemas/PostV1OrdersIdCancelResponse'
x-evidence:
kind: documentation
components:
schemas:
PostV1OrdersIdResponse:
type: object
properties:
method:
type: string
headers:
type: object
properties:
Authorization:
type: string
PostV1OrdersIdCancelResponse:
type: object
properties:
'200':
type: string
description: Order Details
'401':
type: string
description: Request Unauthorized
'403':
type: string
description: Forbidden Due to Order Already Cancelled
'404':
type: string
description: Order Not Found
'409':
type: string
description: Concurrent Requests with Same Idempotency Key
'422':
type: string
description: Mismatched Requests with Same Idempotency Key
securitySchemes:
bearer:
type: http
scheme: bearer