Skip to main content
The Commerce API enables Miteos agents to manage company spending autonomously — from issuing single-use virtual cards for controlled purchases to routing larger expenditures through structured approval workflows. Every transaction is tracked in real time and scoped to the limits you define.
Issuing virtual cards requires the Business plan or above. On Free, Pro, and Power plans, the virtual card endpoints return a 402 Payment Required error. You can still create and manage purchase orders on all plans. Upgrade your plan to unlock card issuance.

Authentication

All requests require a Bearer token in the Authorization header.
Authorization: Bearer mt_live_xxx

Virtual Cards

GET /commerce/cards

List all virtual cards issued under your account.

Response Fields

id
string
Unique identifier for the virtual card.
name
string
The label assigned to the card at issuance.
last4
string
The last four digits of the card number.
spend_limit
number
The maximum cumulative spend allowed on this card, in the card’s currency.
spent
number
Total amount spent to date against the spend_limit.
currency
string
Three-letter ISO 4217 currency code (e.g., USD, EUR).
status
string
Card state. One of active, frozen, or cancelled.

Examples

curl --request GET \
  --url https://api.miteos.com/v1/commerce/cards \
  --header 'Authorization: Bearer mt_live_xxx'
Example Response
{
  "data": [
    {
      "id": "crd_4jx8wn2q",
      "name": "AWS Infrastructure - November",
      "last4": "4921",
      "spend_limit": 2000,
      "spent": 843.50,
      "currency": "USD",
      "status": "active"
    },
    {
      "id": "crd_7mt1kp6r",
      "name": "Design Tools Subscription",
      "last4": "3387",
      "spend_limit": 500,
      "spent": 500.00,
      "currency": "USD",
      "status": "frozen"
    }
  ]
}

POST /commerce/cards

Issue a new virtual card with a defined spend limit. The full card details (number, CVV, expiry) are returned only in this response and are never retrievable again — store them securely if needed immediately.

Request

name
string
required
A descriptive label for the card, such as the vendor or cost center it covers.
spend_limit
number
required
The maximum cumulative amount that can be charged to this card. Once reached, the card is automatically frozen.
currency
string
required
The three-letter ISO 4217 currency code for the card (e.g., USD, EUR, GBP).

Examples

curl --request POST \
  --url https://api.miteos.com/v1/commerce/cards \
  --header 'Authorization: Bearer mt_live_xxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "AWS Infrastructure - November",
    "spend_limit": 2000,
    "currency": "USD"
  }'
Example Response
{
  "id": "crd_4jx8wn2q",
  "name": "AWS Infrastructure - November",
  "number": "4111 1111 1111 4921",
  "cvv": "382",
  "expiry": "11/2026",
  "last4": "4921",
  "spend_limit": 2000,
  "spent": 0,
  "currency": "USD",
  "status": "active",
  "created_at": "2024-11-14T09:00:00Z"
}
The number, cvv, and expiry fields are only present in the creation response. Subsequent GET /commerce/cards requests return only last4. Save sensitive card details immediately if your workflow requires them.

Purchase Orders

GET /commerce/orders

List all purchase orders, ordered by creation date descending.

Response Fields

id
string
Unique identifier for the purchase order.
description
string
Human-readable description of what is being purchased.
amount
number
The requested purchase amount in USD.
vendor
string
The vendor or supplier name.
status
string
Order lifecycle state. One of pending, approved, rejected, or complete.

Examples

curl --request GET \
  --url https://api.miteos.com/v1/commerce/orders \
  --header 'Authorization: Bearer mt_live_xxx'
Example Response
{
  "data": [
    {
      "id": "po_9bz2xm4k",
      "description": "Annual Figma Team license renewal",
      "amount": 756.00,
      "vendor": "Figma",
      "status": "pending",
      "created_at": "2024-11-14T10:00:00Z"
    },
    {
      "id": "po_3wq7rl8j",
      "description": "Cloud compute — October overage",
      "amount": 214.50,
      "vendor": "AWS",
      "status": "complete",
      "created_at": "2024-11-01T08:30:00Z"
    }
  ]
}

POST /commerce/orders

Create a new purchase order. Orders start with status: pending and must be approved before any payment is initiated.

Request

description
string
required
A clear description of the purchase, including what it is and why it’s needed.
amount
number
required
The total purchase amount in USD.
vendor
string
required
The name of the vendor or supplier.

Examples

curl --request POST \
  --url https://api.miteos.com/v1/commerce/orders \
  --header 'Authorization: Bearer mt_live_xxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "description": "Annual Figma Team license renewal",
    "amount": 756.00,
    "vendor": "Figma"
  }'
Example Response
{
  "id": "po_9bz2xm4k",
  "description": "Annual Figma Team license renewal",
  "amount": 756.00,
  "vendor": "Figma",
  "status": "pending",
  "created_at": "2024-11-14T10:00:00Z"
}

POST /commerce/orders//approve

Approve a pending purchase order and advance its status to approved. Once approved, payment processing begins automatically.

Path Parameters

id
string
required
The purchase order ID to approve.

Examples

curl --request POST \
  --url https://api.miteos.com/v1/commerce/orders/po_9bz2xm4k/approve \
  --header 'Authorization: Bearer mt_live_xxx'
Example Response
{
  "id": "po_9bz2xm4k",
  "description": "Annual Figma Team license renewal",
  "amount": 756.00,
  "vendor": "Figma",
  "status": "approved",
  "approved_at": "2024-11-14T10:05:00Z"
}

POST /commerce/orders//reject

Reject a pending purchase order. The order status moves to rejected and no payment is initiated. You may optionally include a reason in the request body.

Path Parameters

id
string
required
The purchase order ID to reject.

Request

reason
string
Optional. A short explanation for the rejection, recorded on the order for audit purposes.

Examples

curl --request POST \
  --url https://api.miteos.com/v1/commerce/orders/po_9bz2xm4k/reject \
  --header 'Authorization: Bearer mt_live_xxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "reason": "Budget not approved for Q4. Revisit in January."
  }'
Example Response
{
  "id": "po_9bz2xm4k",
  "description": "Annual Figma Team license renewal",
  "amount": 756.00,
  "vendor": "Figma",
  "status": "rejected",
  "reason": "Budget not approved for Q4. Revisit in January.",
  "rejected_at": "2024-11-14T10:07:00Z"
}
Use purchase orders for any agent-initiated spend above a threshold you define in Settings → Commerce → Approval Thresholds. Orders below the threshold can be configured to auto-approve, streamlining routine purchases while keeping humans in the loop for larger commitments.