{
  "opencollection": "1.0.0",
  "info": {
    "name": "API Reference agents orders API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "orders",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ]
          },
          "docs": "List orders"
        },
        {
          "info": {
            "name": "Create order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create order"
        },
        {
          "info": {
            "name": "Get order by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get order by ID"
        },
        {
          "info": {
            "name": "Delete order",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete order"
        },
        {
          "info": {
            "name": "Activate order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId/activate",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Activate order"
        },
        {
          "info": {
            "name": "Activate order and process payment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId/activate-and-pay",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path",
                "description": "The order ID (can be internal ID or display ID)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Activates the order and processes the initial payment using the provided Stripe confirmation token."
        },
        {
          "info": {
            "name": "Cancel order renewal",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId/cancel",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path",
                "description": "The order ID (can be internal ID or display ID)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Schedules the cancellation of an order's renewal from a specified date. The order will remain active until the cancellation date."
        },
        {
          "info": {
            "name": "Schedule a plan change with proration",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId/schedule-plan-change",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path",
                "description": "The order ID (can be internal ID or display ID)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Schedules a plan upgrade or downgrade for an order with automatic proration calculation. Credits are applied for the unused portion of the current billing period."
        },
        {
          "info": {
            "name": "Get invoices for an order",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/:orderId/invoices",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "orderId",
                "value": "",
                "type": "path",
                "description": "The order ID (can be internal ID or display ID)"
              }
            ]
          },
          "docs": "Retrieves all invoices associated with a specific order."
        },
        {
          "info": {
            "name": "List orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "customerId",
                "value": "",
                "type": "query",
                "description": "Filter by customer ID."
              },
              {
                "name": "externalCustomerId",
                "value": "",
                "type": "query",
                "description": "Filter by customer external ID."
              },
              {
                "name": "externalId",
                "value": "",
                "type": "query",
                "description": "Filter by the order's external ID (exact match)."
              },
              {
                "name": "creationState",
                "value": "",
                "type": "query",
                "description": "Filter by creation state: draft or active."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Filter by derived order status. draft: not yet activated. paused: billing is paused. ended: end date is in the past. active: activated, not paused, and not ended."
              },
              {
                "name": "startDateFrom",
                "value": "",
                "type": "query",
                "description": "Only orders whose start date is on or after this date. Accepts an ISO 8601 date or date-time. Date-only values (e.g. 2026-06-30) are treated as UTC; date-times without an explicit timezone offset are ambiguous, so include one (e.g. 2026-06-30T00:00:00-05:00) when precision matters."
              },
              {
                "name": "startDateTo",
                "value": "",
                "type": "query",
                "description": "Only orders whose start date is on or before this date. Accepts an ISO 8601 date or date-time. Date-only values (e.g. 2026-06-30) are treated as UTC; date-times without an explicit timezone offset are ambiguous, so include one (e.g. 2026-06-30T00:00:00-05:00) when precision matters."
              },
              {
                "name": "endDateFrom",
                "value": "",
                "type": "query",
                "description": "Only orders whose end date is on or after this date. Orders without an end date are not matched. Accepts an ISO 8601 date or date-time. Date-only values (e.g. 2026-06-30) are treated as UTC; date-times without an explicit timezone offset are ambiguous, so include one (e.g. 2026-06-30T00:00:00-05:00) when precision matters."
              },
              {
                "name": "endDateTo",
                "value": "",
                "type": "query",
                "description": "Only orders whose end date is on or before this date. Orders without an end date are not matched. Accepts an ISO 8601 date or date-time. Date-only values (e.g. 2026-06-30) are treated as UTC; date-times without an explicit timezone offset are ambiguous, so include one (e.g. 2026-06-30T00:00:00-05:00) when precision matters."
              }
            ]
          },
          "docs": "Get a list of orders for the organization"
        },
        {
          "info": {
            "name": "Create a new order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new order for the organization"
        },
        {
          "info": {
            "name": "Get order",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/:id",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get an order by ID"
        },
        {
          "info": {
            "name": "Update order",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.agentpaid.io/api/v1/orders/:id",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an order by ID"
        },
        {
          "info": {
            "name": "Delete order",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.agentpaid.io/api/v1/orders/:id",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete an order by ID"
        },
        {
          "info": {
            "name": "Activate order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:id/activate",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Activate a draft order by ID. Activation starts billing for the order using the same validation and side effects as the dashboard activation flow."
        },
        {
          "info": {
            "name": "Get order lines",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/:id/lines",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Get the order lines for an order by ID"
        },
        {
          "info": {
            "name": "List seats",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.agentpaid.io/api/v1/orders/:id/seats",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "productExternalId",
                "value": "",
                "type": "query"
              },
              {
                "name": "status",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List seats for an order"
        },
        {
          "info": {
            "name": "Assign or unassign seat",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.agentpaid.io/api/v1/orders/:id/seats/:seatId",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              },
              {
                "name": "seatId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Assign or unassign a single seat on an order"
        },
        {
          "info": {
            "name": "Batch assign seats",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.agentpaid.io/api/v1/orders/:id/seat-assignments",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Assign or unassign seats in batch for an order"
        }
      ]
    }
  ],
  "bundled": true
}