Keap Orders API

Keap Orders API — 29 operations across 16 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.

Operations 29

GET /rest/v2/orders List orders #
POST /rest/v2/orders Create an Order #
POST /rest/v2/orders/{order_id}:detachFile Detach a File from an Order Invoice #
POST /rest/v2/orders/{order_id}:attachFile Attach a File to an Order Invoice #
POST /rest/v2/orders/{order_id}:applyTax Apply Taxes on an Order #
GET /rest/v2/orders/{order_id}/payments Retrieve Order Payments #
POST /rest/v2/orders/{order_id}/payments Create a Payment #
POST /rest/v2/orders/{order_id}/items Create an Order Item #
POST /rest/v2/orders/{order_id}/items/{order_item_id}:applyCommission Apply Commission to an Order Item #
POST /rest/v2/orders/model/customFields Create an Order Custom Field #
GET /rest/v2/orders/model/customFields/tabs List Order Custom Field Tabs #
POST /rest/v2/orders/model/customFields/tabs Create an Order Custom Field Tab #
GET /rest/v2/orders/model/customFields/groups List Order Custom Field Groups #
POST /rest/v2/orders/model/customFields/groups Create an Order Custom Field Group #
GET /rest/v2/orders/{order_id} Retrieve an Order #
DELETE /rest/v2/orders/{order_id} Delete an Order #
PATCH /rest/v2/orders/{order_id} Update an Order #
GET /rest/v2/orders/{order_id}/items/{order_item_id} Retrieve an Order Item #
DELETE /rest/v2/orders/{order_id}/items/{order_item_id} Delete an Order Item #
PATCH /rest/v2/orders/{order_id}/items/{order_item_id} Update an Order Item #
DELETE /rest/v2/orders/model/customFields/{custom_field_id} Delete an Order Custom Field #
PATCH /rest/v2/orders/model/customFields/{custom_field_id} Update an Order Custom Field #
GET /rest/v2/orders/model/customFields/tabs/{tab_id} Retrieve an Order Custom Field Tab #
DELETE /rest/v2/orders/model/customFields/tabs/{tab_id} Delete an Order Custom Field Tab #
PATCH /rest/v2/orders/model/customFields/tabs/{tab_id} Update an Order Custom Field Tab #
GET /rest/v2/orders/model/customFields/groups/{group_id} Retrieve an Order Custom Field Group #
DELETE /rest/v2/orders/model/customFields/groups/{group_id} Delete an Order Custom Field Group #
PATCH /rest/v2/orders/model/customFields/groups/{group_id} Update an Order Custom Field Group #
GET /rest/v2/orders/model Retrieve Order Custom Field Model #

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/keap-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

keap-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keap Orders API
  description: Keap Public API Documentation
  termsOfService: https://www.thryv.com/terms-of-use
  contact:
    name: Keap
    url: https://developer.keap.com/get-support
    email: api.keap@thryv.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: v2
servers:
- url: https://api.infusionsoft.com/crm
security:
- oauth2: []
tags:
- name: Orders
paths:
  /rest/v2/orders:
    get:
      tags:
      - Orders
      summary: List orders
      description: Retrieves a list of orders
      operationId: listOrders
      parameters:
      - name: filter
        in: query
        description: "Filter to apply, allowed fields are:\n- (String) `id` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\"\n- (List[String]) `ids`\n- (String) `product_id`\n- (String) `contact_id`\n- (String) `invoice_id`\n- (String) `invoice_xid`\n- (Boolean) `paid`\n- (String) `created_since_time`\n- (String) `created_until_time`\n- (String) `modified_since_time`\n- (String) `modified_until_time`\n- (String) `title` - Wildcard matching allowed\n- (String) `order_type` (Allowed values: `ONLINE`, `OFFLINE`)\n- (String) `shipping_locality`\n- (String) `shipping_region_code`\n- (String) `shipping_postal_code`\n- (String) `shipping_country_code`\n\nCustom fields can be filtered by their field_name (case-insensitive, as returned\nby GET /v2/orders/model). A standard field above takes precedence over a custom\nfield with the same name. The supported operators depend on the custom field's type:\n- Text-like fields (text, text area, name, email, phone, website, social security\n  number) and single-value choice fields with text options (dropdown, radio,\n  state): `==` only, with optional trailing wildcard (e.g. `_OrderTitle0%3D%3DValue%2A`)\n- Yes/No and drilldown fields: `==` only\n- Numeric fields (whole number, decimal, currency, percent, year, month, day of\n  week, user): `==`, `>`, `<`, `>=`, `<=`\n- Date fields: `==`, `>`, `<`, `>=`, `<=` using full ISO 8601 (same as `created_since_time`/`created_until_time`)\n- Multi-select fields: `==` matches records that contain the given option\nCustom field filtering on non-indexed fields is supported but may be slower.\n\nYou will need to apply the `==` operator (or other supported operators), to check the equality\nof one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above,\nhere are some examples:\n- `filter=product_id%3D%3D123`\n- `filter=id%3C123`\n- `filter=ids%3D%3D1,10,4,24`\n- `filter=invoice_xid%3D%3Df411a79c-9a92-4960-91d9-656f910a25e8`\n- `filter=product_id%3D%3D123%3Bcontact_id%3D%3D567`\n- `filter=shipping_locality%3D%3DPhoenix`\n- `filter=shipping_region_code%3D%3DIN-MH`\n- `filter=shipping_postal_code%3D%3D85001`\n- `filter=shipping_country_code%3D%3DIND`\n\nCustom field examples (for custom fields with field_name `_OrderTitle0` and `_OrderValue1`):\n- `filter=_OrderTitle0%3D%3DTest` (custom field exact match)\n- `filter=_OrderTitle0%3D%3DTest%2A` (custom field prefix wildcard)\n- `filter=_OrderValue1%3E100` (custom field numeric comparison)\n- `filter=product_id%3D%3D123%3B_OrderStatus0%3D%3DActive` (combined standard + custom field filter)\n\nFor fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A)\nfor case-insensitive partial matching on text fields. Example of a valid pattern of wildcard usage:\n- `field==foo*` finds anything in `field` that begins with `foo`\n"
        required: false
        schema:
          type: string
      - name: page_token
        in: query
        description: Page token
        required: false
        schema:
          type: string
      - name: order_by
        in: query
        description: 'Attribute and direction to order items.

          One of the following fields:

          - `id`

          - `order_time`

          - `modification_time`


          One of the following directions:

          - `asc`

          - `desc`'
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        description: Total number of items to return per page
        required: false
        schema:
          type: integer
          format: int32
          maximum: 1000
          minimum: 0
        example: 0
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrders'
    post:
      tags:
      - Orders
      summary: Create an Order
      description: Creates a one time Order with Order items
      operationId: createOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestCreateOrderRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderV2'
  /rest/v2/orders/{order_id}:detachFile:
    post:
      tags:
      - Orders
      summary: Detach a File from an Order Invoice
      description: Detaches a File from an Order Invoice
      operationId: detachFileFromOrder
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileOperationRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderV2'
  /rest/v2/orders/{order_id}:attachFile:
    post:
      tags:
      - Orders
      summary: Attach a File to an Order Invoice
      description: Attaches an uploaded File to an Order Invoice
      operationId: attachFileToOrder
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileOperationRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderV2'
  /rest/v2/orders/{order_id}:applyTax:
    post:
      tags:
      - Orders
      summary: Apply Taxes on an Order
      description: Calculate taxes for a single Order for a given order id
      operationId: applyTax
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderV2'
  /rest/v2/orders/{order_id}/payments:
    get:
      tags:
      - Orders
      summary: Retrieve Order Payments
      description: Retrieves a list of payments made against a given order, including historical or external payments of cash or credit card
      operationId: listOrderPayments
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      - name: filter
        in: query
        description: "Filter to apply, allowed fields are:\n- (String) `invoice_id`\n- (String) `payment_id`\n- (String) `amount`\n- (String) `pay_status`\n- (Boolean) `skip_commission`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\n word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=payment_id%3D%3D123`\n- `filter=pay_status%3D%3DAPPROVED`\n- `filter=invoice_id%3D%3D456%3Bskip_commission=true`\n"
        required: false
        schema:
          type: string
      - name: page_token
        in: query
        description: Page token
        required: false
        schema:
          type: string
      - name: order_by
        in: query
        description: 'Attribute and direction to order items.

          One of the following fields:

          - `invoice_id`

          - `payment_id`

          - `amount`

          - `pay_time`

          - `pay_status`

          - `skip_commission`

          - `last_updated_time`


          One of the following directions:

          - `asc`

          - `desc`'
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        description: Total number of items to return per page
        required: false
        schema:
          type: integer
          format: int32
          maximum: 1000
          minimum: 0
        example: 0
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrderPaymentsResponse'
    post:
      tags:
      - Orders
      summary: Create a Payment
      description: Creates a payment record. Alternatively, adds a record of historical or external payment of cash or credit card
      operationId: createPaymentForAnOrder
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestCreatePaymentRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResult'
  /rest/v2/orders/{order_id}/items:
    post:
      tags:
      - Orders
      summary: Create an Order Item
      description: Creates an order item on an existing order
      operationId: createOrderItem
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderItemRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItem'
  /rest/v2/orders/{order_id}/items/{order_item_id}:applyCommission:
    post:
      tags:
      - Orders
      summary: Apply Commission to an Order Item
      description: Applies commission to an order item on an existing order.
      operationId: applyCommissionOnOrderItems
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      - name: order_item_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyCommissionRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderItem'
  /rest/v2/orders/model/customFields:
    post:
      tags:
      - Orders
      summary: Create an Order Custom Field
      description: Creates a custom field of the specified type and options to the Order object
      operationId: createOrderCustomField
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldMetaData'
  /rest/v2/orders/model/customFields/tabs:
    get:
      tags:
      - Orders
      summary: List Order Custom Field Tabs
      description: Retrieves a list of custom field tabs for the Order record type.
      operationId: listOrderCustomFieldTabs
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldTabsResponse'
    post:
      tags:
      - Orders
      summary: Create an Order Custom Field Tab
      description: Creates a new custom field tab for the Order record type.
      operationId: createOrderCustomFieldTab
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldTabRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldTab'
  /rest/v2/orders/model/customFields/groups:
    get:
      tags:
      - Orders
      summary: List Order Custom Field Groups
      description: Retrieves a list of custom field groups for the Order record type. Optionally filter by tab_id to scope to a specific tab.
      operationId: listOrderCustomFieldGroups
      parameters:
      - name: tab_id
        in: query
        description: Optional tab id to scope groups to a single tab
        required: false
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldGroupsResponse'
    post:
      tags:
      - Orders
      summary: Create an Order Custom Field Group
      description: Creates a new custom field group for the Order record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.
      operationId: createOrderCustomFieldGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldGroupRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '40

# --- truncated at 32 KB (108 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/keap/refs/heads/main/openapi/keap-orders-api-openapi.yml