openapi: 3.1.0 info: title: Keap Subscriptions 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 tags: - name: Subscriptions paths: /rest/v2/subscriptions: get: tags: - Subscriptions summary: List Subscriptions description: Retrieves a list of subscriptions using the specified search criteria. operationId: listSubscriptions parameters: - name: filter in: query description: "Filter to apply, allowed fields are:\n- (String) `contact_id`\n- (String) `subscription_plan_id`\n\ - (String) `status`\n- (String) `id` - Allowable operators: \"==\", \"<=\", \"<\", \">=\", \"\ >\", \"!=\"\n- (String) `billing_amount` - Allowable operators: \"==\", \"<=\", \"<\", \">=\"\ , \">\", \"!=\"\n- (List[String]) `ids`\n- (List[String]) `subscription_plan_ids`\n\nCustom\ \ fields can be filtered by their field_name (case-insensitive, as returned\nby GET /v2/subscriptions/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. `_SubscriptionNote0%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\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 of one of the filters with your searched word, in the encoded form `%3D%3D`.\ \ For the filters listed above, here are some examples:\n- `filter=contact_id%3D%3D123`\n- `filter=subscription_plan_id%3D%3D456`\n\ - `filter=status%3D%3DActive`\n- `filter=id%3E5`\n- `filter=billing_amount%3E%3D100`\n- `filter=ids%3D%3D1,10,4,24`\n\ - `filter=subscription_plan_ids%3D%3D10,20,30`\n- `filter=contact_id%3D%3D123%3Bstatus%3D%3DActive`\n\ \nCustom field examples (for custom fields with field_name `_SubscriptionNote0` and `_SubscriptionCount1`):\n\ - `filter=_SubscriptionNote0%3D%3DTest` (custom field exact match)\n- `filter=_SubscriptionNote0%3D%3DTest%2A`\ \ (custom field prefix wildcard)\n- `filter=_SubscriptionCount1%3E100` (custom field numeric\ \ comparison)\n- `filter=contact_id%3D%3D123%3B_SubscriptionNote0%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) for 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` - `contact_id` - `subscription_plan_id` - `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/ListSubscriptionsResponse' post: tags: - Subscriptions summary: Create Subscription description: Creates a subscription with the specified product and product subscription id. operationId: createSubscription requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateSubscriptionRequest' 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/Subscription' /rest/v2/subscriptions/{subscription_id}:invoice: post: tags: - Subscriptions summary: Invoice a Subscription description: Generates invoices from all cycles of a subscription that are due. Returns the most recently billed invoice. operationId: invoiceSubscription parameters: - name: subscription_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/subscriptions/{subscription_id}:deactivate: post: tags: - Subscriptions summary: Cancel Subscription description: Cancels the specified subscription operationId: cancelSubscription parameters: - name: subscription_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CancelSubscriptionRequest' 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 /rest/v2/subscriptions/model/customFields: post: tags: - Subscriptions summary: Create a Subscription Custom Field description: Creates a custom field of the specified type and options to the Subscription object operationId: createSubscriptionCustomField 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/subscriptions/model/customFields/tabs: get: tags: - Subscriptions summary: List Subscription Custom Field Tabs description: Retrieves a list of custom field tabs for the Subscription record type. operationId: listSubscriptionCustomFieldTabs 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: - Subscriptions summary: Create a Subscription Custom Field Tab description: Creates a new custom field tab for the Subscription record type. operationId: createSubscriptionCustomFieldTab 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/subscriptions/model/customFields/groups: get: tags: - Subscriptions summary: List Subscription Custom Field Groups description: Retrieves a list of custom field groups for the Subscription record type. Optionally filter by tab_id to scope to a specific tab. operationId: listSubscriptionCustomFieldGroups 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: - Subscriptions summary: Create a Subscription Custom Field Group description: Creates a new custom field group for the Subscription record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab. operationId: createSubscriptionCustomFieldGroup 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' '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/CustomFieldGroup' /rest/v2/subscriptions/{subscription_id}: get: tags: - Subscriptions summary: Retrieve a Subscription description: Retrieves a single subscription operationId: getSubscription parameters: - name: subscription_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/Subscription' patch: tags: - Subscriptions summary: Update a Subscription description: Updates a Subscription operationId: updateSubscription parameters: - name: subscription_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - contact_id - subscription_plan_id - quantity - billing_amount - auto_charge - max_charge_attempts - days_between_retries - active - billing_frequency - billing_cycle - next_bill_date - end_date - payment_method_id - allow_tax - lead_affiliate_id - sale_affiliate_id - promo_code - shipping_option_id - reason_stopped - shipping_address - custom_fields uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateSubscriptionRequest' 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/Subscription' /rest/v2/subscriptions/model/customFields/{custom_field_id}: delete: tags: - Subscriptions summary: Delete a Subscription Custom Field description: Deletes a custom field from the Subscription object operationId: deleteSubscriptionCustomField parameters: - name: custom_field_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' '204': description: No Content patch: tags: - Subscriptions summary: Update a Subscription Custom Field description: Updates a custom field of the specified type and options to the Subscription object operationId: updateSubscriptionCustomField parameters: - name: custom_field_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - group_id - label - options uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldMetaDataRequest' 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/CustomFieldMetaData' /rest/v2/subscriptions/model/customFields/tabs/{tab_id}: get: tags: - Subscriptions summary: Retrieve a Subscription Custom Field Tab description: Retrieves a single custom field tab by id for the Subscription record type. operationId: getSubscriptionCustomFieldTab parameters: - name: tab_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/CustomFieldTab' delete: tags: - Subscriptions summary: Delete a Subscription Custom Field Tab description: Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups. operationId: deleteSubscriptionCustomFieldTab parameters: - name: tab_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' '204': description: No Content patch: tags: - Subscriptions summary: Update a Subscription Custom Field Tab description: Updates an existing custom field tab. Only fields listed in `update_mask` are applied. operationId: updateSubscriptionCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldTabRequest' 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/CustomFieldTab' /rest/v2/subscriptions/model/customFields/groups/{group_id}: get: tags: - Subscriptions summary: Retrieve a Subscription Custom Field Group description: Retrieves a single custom field group by id for the Subscription record type. operationId: getSubscriptionCustomFieldGroup parameters: - name: group_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/CustomFieldGroup' delete: tags: - Subscriptions summary: Delete a Subscription Custom Field Group description: Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields. operationId: deleteSubscriptionCustomFieldGroup parameters: - name: group_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' '204': description: No Content patch: tags: - Subscriptions summary: Update a Subscription Custom Field Group description: Updates an existing custom field group. Only fields listed in `update_mask` are applied. operationId: updateSubscriptionCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - tab_id - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldGroupRequest' 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/CustomFieldGroup' /rest/v2/subscriptions/model: get: tags: - Subscriptions summary: Retrieve Subscription Custom Field Model description: Get the custom fields for the Subscription object operationId: retrieveSubscriptionCustomFieldModel 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/ObjectModel' components: schemas: Address: type: object properties: country: type: string deprecated: true description: Deprecated. The long-name descriptive version of the Country Code. Please use 'country_code' for POST/PATCH operations. Maximum length is 100 characters. example: United States of America line1: type: string description: Street address line 1. Maximum length is 75 characters for the BILLING address and 100 characters for the SHIPPING and OTHER addresses. example: 123 line2: type: string description: Street address line 2. Maximum length is 75 characters for the BILLING address and 100 characters for the SHIPPING and OTHER addresses. example: Suite 100 locality: type: string description: The municipality to which the address belongs. Maximum length is 50 characters for the BILLING address and 100 characters for the SHIPPING and OTHER addresses. example: Phoenix region: type: string deprecated: true description: The long-name descriptive version of the Region Code. Please use 'region_code' for POST/PATCH operations. Maximum length is 50 characters. example: Arizona field: type: string description: Address type field enum: - ADDRESS_FIELD_UNSPECIFIED - BILLING - SHIPPING - OTHER example: BILLING country_code: type: string description: An ISO 3166-2 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) example: USA postal_code: type: string description: Postal or ZIP code. Maximum length is 15 characters for the BILLING and OTHER addresses and 20 characters for the SHIPPING address. example: 85001 region_code: type: string description: An ISO 3166-2 Province Code, such as one of the US States (https://en.wikipedia.org/wiki/ISO_3166-2:US) example: US-AZ zip_code: type: string description: ZIP code (US). Maximum length is 15 characters for the BILLING and OTHER addresses and 20 characters for the SHIPPING address. example: 85001 zip_four: type: string description: ZIP+4 extension. Maximum length is 10 characters. example: 1234 AddressRequest: type: object properties: line1: type: string line2: type: string locality: type: string description: The municipality to which the address belongs example: Phoenix field: type: string description: Address type field enum: - ADDRESS_FIELD_UNSPECIFIED - BILLING - SHIPPING - OTHER example: BILLING country_code: type: string description: An ISO 3166-2 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) example: USA postal_code: type: string region_code: type: string description: An ISO 3166-2 Province Code, such as one of the US States (https://en.wikipedia.org/wiki/ISO_3166-2:US) example: US-AZ BasicContact: type: object properties: id: type: string email: type: string given_name: type: string family_name: type: string CancelSubscriptionRequest: type: object properties: reason: type: string description: The reason for cancelling the subscription. example: Customer request CreateCustomFieldGroupRequest: type: object properties: name: type: string tab_id: type: string CreateCustomFieldOptionRequest: type: object properties: label: type: string CreateCustomFieldRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CreateCustomFieldOptionRequest' field_type: type: string enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO group_id: type: string description: An optional tab group to place the field under in the interface. If not specified, will default to the 'Custom Fields' tab. user_group_id: type: string description: An optional user group to choose from when selecting values for User or UserListBox fields. required: - field_type - label CreateCustomFieldTabRequest: type: object properties: name: type: string CreateSubscriptionRequest: type: object properties: quantity: type: integer format: int32 description: The subscription quantity. Must be 1 or greater. Default is 1. example: 1 active: type: boolean description: If the subscription is active or not. Default is true example: true contact_id: type: string description: Id of the contact to create the subscription for. example: 123 subscription_plan_id: type: string description: Id of the product subscription plan. example: 456 billing_amount: type: number format: double description: The billing amount. Must be 0 or greater. Default is the price in the product subscription plan. example: 10000 auto_charge: type: boolean description: If the subscription should auto charge on the next billing date. Default is true. example: true max_charge_attempts: type: integer format: int32 description: Maximum number of charge attempts. Must be 1 or greater. Default is the configured [Max Retries] value. example: 3 days_between_retries: type: integer format: int32 description: Number of days between charge attempts. Must be 1 or greater. Default is the configured [Num Days Between Retries] value. example: 5 start_date: type: string format: date description: The first day the subscription will bill. Must not be in the past. Default is today. example: '2024-05-21' payment_method_id: type: string description: Id associated with the payment method. Default is the contact's most recently used card, if auto charge is true. Default is 0 otherwise. example: 789 allow_tax: type: boolean description: Only works if the product associated with the product subscription is taxable. Default is false. example: false allow_duplicate: type: boolean description: If true, it will disable the check to see if there is already an identical subscription for the contact. Default is false. example: false lead_affiliate_id: type: string description: The affiliate id for the lead of the subscription. Default is 0. example: 101 sale_affiliate_id: type: string description: The affiliate id for the sale of the subscription. Default is 0. example: 102 shipping_address: $ref: '#/components/schemas/AddressRequest' description: The shipping address for the subscription. promo_code: type: string description: The promo code for the subscription. example: PROMO123 shipping_option_id: type: string description: The shipping option ID for the subscription. example: 123 reason_stopped: type: string description: The reason the subscription is no longer active. example: Customer requested custom_fields: type: array description: List of custom field values to apply to this subscription example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' required: - contact_id - subscription_plan_id CurrencyValue: type: object properties: amount: type: integer format: int64 description: The price amount in the smallest currency unit example: 10000 currency_code: type: string description: Three-letter ISO currency code example: USD formatted_amount: type: string description: The product amount formatted using the tenant's currency locale example: $100.00 CustomFieldGroup: type: object properties: id: type: string name: type: string order: type: integer format: int32 tab_id: type: string record_type: type: string enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION CustomFieldMetaData: type: object description: Metadata describing a custom field, including its type and options properties: id: type: string description: The unique identifier of the custom field example: 123 label: type: string description: The display label of the custom field example: Favorite Color options: type: array description: The list of available options for select/radio/multiselect/drilldown field types items: $ref: '#/components/schemas/CustomFieldOption' record_type: type: string description: The entity type this custom field belongs to (e.g. CONTACT, COMPANY) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION field_type: type: string description: The data type of the custom field (e.g. Text, Number, Date, Select) enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO default_value: type: string description: The default value for this custom field, if any group_id: type: string description: The ID of the group this custom field belongs to example: 45 group_name: type: string description: The name of the group this custom field belongs to example: Personal Info field_name: type: string description: The database column name for this custom field. Use this value when filtering contacts (e.g. for field_name 'firstName1', filter with 'firstName1==John'). example: firstName1 CustomFieldOption: type: object properties: id: type: string label: type: string CustomFieldTab: type: object properties: id: type: string description: The unique identifier of the custom field tab example: 123 name: type: string description: The name of the custom field tab example: Personal Info order: type: integer format: int32 description: The display order of the tab example: 1 record_type: type: string description: The record type this tab belongs to (e.g., CONTACT, COMPANY, OPPORTUNITY, REFERRAL_PARTNER, ORDER, SUBSCRIPTION, TASK_NOTE_APPOINTMENT) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION example: CONTACT CustomFieldValue: type: object properties: id: type: string content: description: The value of the custom field. Text custom field values have a maximum length of 65535 characters. Discount: type: object properties: amount: type: number format: double description: Discount amount example: 10.0 special_item_id: type: string description: Discount item ID example: 123 discount_method: type: string description: Discount method enum: - AMOUNT - PERCENT example: PERCENT Error: type: object properties: code: type: integer format: int32 message: type: string status: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetails' ErrorDetails: type: object properties: domain: type: string resource: type: string InvoiceFile: type: object properties: file_id: type: string ListCustomFieldGroupsResponse: type: object properties: groups: type: array items: $ref: '#/components/schemas/CustomFieldGroup' ListCustomFieldTabsResponse: type: object properties: tabs: type: array items: $ref: '#/components/schemas/CustomFieldTab' ListSubscriptionsResponse: type: object properties: subscriptions: type: array items: $ref: '#/components/schemas/Subscription' next_page_token: type: string ObjectModel: type: object properties: custom_fields: type: array items: $ref: '#/components/schemas/CustomFieldMetaData' optional_properties: type: array description: These fields are not transmitted by default on this model, but can be requested by specifying them in a comma-separated list in the optional_properties query parameter. items: type: string uniqueItems: true OrderItem: type: object properties: id: type: string description: Unique identifier for the order item example: 456 name: type: string description: Name of the item example: Premium Widget description: type: string description: Item description example: High-quality widget with warranty notes: type: string description: Additional notes example: Gift wrap requested quantity: type: integer format: int32 description: Quantity ordered example: 2 discount: $ref: '#/components/schemas/CurrencyValue' description: If the order item is a discount type, this is the amount of the discount. special: $ref: '#/components/schemas/Discount' description: If the line item is a discount type, the details about the discount. product: $ref: '#/components/schemas/OrderItemProduct' description: Product details subscription_id: type: string description: If the order item is a subscription type, this refers to the subscription id that generated the order. example: 123 item_type: type: string description: The type of order item. enum: - PRODUCT - SHIPPING - TAX - SERVICE - UPSELL - FINANCE_CHARGE - DISCOUNT - PROGRAM - SUBSCRIPTION - DISCOUNT_FREE_TRIAL - DISCOUNT_ORDER_TOTAL - DISCOUNT_PRODUCT - DISCOUNT_PRODUCT_CATEGORY - DISCOUNT_SHIPPING - TIP - OTHER - FEE - UNKNOWN example: PRODUCT cost_per_unit: $ref: '#/components/schemas/CurrencyValue' description: Cost per unit price_per_unit: $ref: '#/components/schemas/CurrencyValue' description: Price per unit charged to customer subscription_plan: $ref: '#/components/schemas/SubscriptionPlan' description: If the order item is a subscription type, the details of the subscription plan. OrderItemProduct: type: object properties: id: type: string description: Product ID example: 123 name: type: string description: Product name example: Premium Widget sku: type: string description: Stock keeping unit example: WDG-001 description: type: string description: Product description example: High-quality widget shippable: type: boolean description: Whether product requires shipping example: true taxable: type: boolean description: Whether product is taxable example: true OrderV2: type: object properties: id: type: string description: Unique identifier for the order example: 123 title: type: string description: Title of the order example: 'Online Order #1234' status: type: string description: The order status. enum: - DRAFT - SENT - VIEWED - PAID example: PAID total: $ref: '#/components/schemas/CurrencyValue' description: The total amount of the order. contact: $ref: '#/components/schemas/BasicContact' description: Contact associated with this order notes: type: string description: Internal notes for the order example: Customer requested gift wrapping terms: type: string description: Order terms and conditions example: Net 30 order_type: type: string description: The order type. enum: - ONLINE - OFFLINE example: ONLINE source_type: type: string description: The source where the order was created. enum: - API - CHECKOUT_FORM - INVOICE - MANUAL_PAYMENT - QUICKBOOKS - UNKNOWN example: API creation_time: type: string format: date-time description: When this order was originally created. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' modification_time: type: string format: date-time description: When this order was changed. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' order_time: type: string format: date-time description: A user-defined date and time of the order. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' lead_affiliate_id: type: string description: ID of the lead affiliate example: 456 sales_affiliate_id: type: string description: ID of the sales affiliate example: 789 total_paid: $ref: '#/components/schemas/CurrencyValue' description: The total amount paid to the order. total_due: $ref: '#/components/schemas/CurrencyValue' description: The total amount of the order that is due. This is not current balance. shipping_information: $ref: '#/components/schemas/ShippingInformation' description: Shipping details for the order refund_total: $ref: '#/components/schemas/CurrencyValue' description: Total amount refunded allow_payment: type: boolean description: Whether or not card-related payments should be allowed on this order. Applies only to Keap Pro/Max edition. example: true allow_paypal: type: boolean description: Whether or not PayPal payments should be allowed on this order. Applies only to Keap Pro/Max edition. example: false order_items: type: array description: List of items in the order items: $ref: '#/components/schemas/OrderItem' payment_plan: $ref: '#/components/schemas/PaymentPlan' description: Payment plan details if applicable invoice_number: type: string description: The associated invoice identifier. Applies only to Keap Pro/Max edition. Feature not yet supported. example: 1001 files: type: array description: A list of attached files to this order. Applies only to Keap Pro/Max edition. items: $ref: '#/components/schemas/InvoiceFile' credit_status: type: string description: Credit status of the order example: APPROVED promo_code: type: string description: Promotional code applied example: SUMMER20 refund_status: type: string description: Refund status example: NONE synced: type: boolean description: Whether order is synced with external systems example: true invoice_id: type: string description: Associated invoice ID example: 456 custom_fields: type: array description: List of custom field values applied to this order example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' sent_time: type: string format: date-time description: The date and time the invoice was sent. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' due_time: type: string format: date-time description: The date and time the invoice is due. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-06-20T14:30:00Z' external_create_user: type: string description: The external system user that created this order. example: user@example.com external_create_time: type: string format: date-time description: The date and time the order was created in the external system. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' external_update_time: type: string format: date-time description: The date and time the order was last updated in the external system. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z) example: '2024-05-21T14:30:00Z' PaymentPlan: type: object properties: auto_charge: type: boolean description: Whether to auto-charge payments example: true max_charge_attempts: type: integer format: int64 description: Maximum charge attempts example: 3 days_between_retries: type: integer format: int64 description: Days between retry attempts example: 7 payment_method_id: type: string description: Payment method ID to charge example: 123 initial_payment_amount: $ref: '#/components/schemas/CurrencyValue' description: Initial payment amount initial_payment_percent: type: number format: double description: Initial payment as percentage example: 25.0 initial_payment_date: type: string format: date description: The initial payment date. In ISO-8601 date format (e.g. 2024-05-21) example: '2024-05-21' plan_start_date: type: string format: date description: The start date of the payment plan. In ISO-8601 date format (e.g. 2024-05-21) example: '2024-05-21' number_of_payments: type: integer format: int64 description: Number of payments in the plan example: 12 days_between_payments: type: integer format: int64 description: Days between each payment example: 30 payment_plan_items: type: array description: List of scheduled payment items items: $ref: '#/components/schemas/PaymentPlanItem' required: - days_between_payments - number_of_payments - plan_start_date PaymentPlanItem: type: object properties: status: type: string description: 'The status of the payment plan item. Possible values are: - `UNPAID_MANUAL` - The item is set for manual charge, and its `amount_due` has not been completely paid. - `UNPAID_AUTOCHARGE` - The item is set for auto-charge, and its `amount_due` has not been completely paid. - `PAID` - The item has been completely paid. - `FAILED` - The item `amount_due` has not been completely paid, and there was a failure. (*Note: This status is deprecated and not currently used.*) ' enum: - UNPAID_MANUAL - UNPAID_AUTOCHARGE - PAID - FAILED due_date: type: string format: date description: The due date in the application's timezone, as an ISO 8601 calendar date string (date only), in the format YYYY-MM-DD example: '2024-05-21' amount_due: $ref: '#/components/schemas/CurrencyValue' amount_paid: $ref: '#/components/schemas/CurrencyValue' ShippingInformation: type: object properties: id: type: string description: Shipping information ID example: 123 address: $ref: '#/components/schemas/Address' description: Shipping address company: type: string description: Company name example: Acme Corp given_name: type: string description: First name example: John family_name: type: string description: Last name example: Doe phone_number: type: string description: Phone number example: +1-555-123-4567 invoice_to_company: type: boolean description: Whether to invoice to company example: false Subscription: type: object properties: id: type: string description: Id of the subscription. example: 123 quantity: type: integer format: int64 description: The subscription quantity. example: 1 active: type: boolean description: If the subscription is active or not. example: true contact_id: type: string description: Id of the contact associated with the subscription. example: 456 product_id: type: string description: Id of the product associated with the subscription. example: 789 subscription_plan_id: type: string description: Id of the product subscription plan. example: 101 billing_amount: type: number format: double description: The billing amount. example: 10000 auto_charge: type: boolean description: If the subscription should auto charge on the next billing date. example: true billing_frequency: type: integer format: int32 description: The billing frequency in days. example: 30 billing_cycle: type: string description: The billing cycle of the subscription. enum: - YEAR - MONTH - WEEK - DAY example: MONTH start_date: type: string format: date description: The first day the subscription will bill. example: '2024-05-21' last_bill_date: type: string format: date description: The last date the subscription was billed. example: '2024-05-21' next_bill_date: type: string format: date description: The next date the subscription will bill. example: '2024-06-21' end_date: type: string format: date description: The last date the subscription will bill. example: '2025-05-21' merchant_account_id: type: string description: The merchant account id associated with the subscription. example: 123 payment_method_id: type: string description: Id associated with the payment method. example: 456 allow_tax: type: boolean description: If the subscription allows tax. example: false max_charge_attempts: type: integer format: int32 description: Maximum number of charge attempts. example: 3 days_between_retries: type: integer format: int32 description: Number of days between charge attempts. example: 5 lead_affiliate_id: type: string description: The affiliate id for the lead of the subscription. example: 789 sale_affiliate_id: type: string description: The affiliate id for the sale of the subscription. example: 101 shipping_address: $ref: '#/components/schemas/Address' description: The shipping address for the subscription. promo_code: type: string description: The promo code for the subscription. example: PROMO123 shipping_option_id: type: string description: The shipping option ID for the subscription. example: 123 reason_stopped: type: string description: The reason the subscription is no longer active. example: Customer requested cancellation modification_time: type: string format: date-time description: The date and time the subscription was last modified. example: '2025-06-15T10:30:00Z' custom_fields: type: array description: List of custom field values applied to this subscription example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' SubscriptionPlan: type: object properties: id: type: string description: Subscription plan ID example: 123 frequency: type: integer format: int32 description: Interval at which a customer receives a product or service as part of a subscription plan. example: 1 active: type: boolean description: If the subscription plan is active or not. example: true subscription_plan_name: type: string description: Plan name example: Premium Monthly cycle_type: type: string description: The cycle type of the subscription plan. enum: - YEARLY - MONTHLY - WEEKLY - DAILY example: MONTHLY total_cycles: type: integer format: int32 description: Total number of cycles the plan will run before ending. Value of 0 indicates plan will never end. example: 12 plan_price: $ref: '#/components/schemas/CurrencyValue' description: Price of the plan display_order_index: type: integer format: int32 description: The order index where this plan will be displayed on a page against other plans. Smaller number indicates plan will be displayed higher in the list. example: 1 UpdateCustomFieldGroupRequest: type: object properties: name: type: string order: type: integer format: int32 tab_id: type: string UpdateCustomFieldMetaDataRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CustomFieldOption' group_id: type: string required: - group_id UpdateCustomFieldTabRequest: type: object properties: name: type: string order: type: integer format: int32 UpdateSubscriptionRequest: type: object properties: quantity: type: integer format: int32 description: The subscription quantity. Must be 1 or greater. example: 1 active: type: boolean description: If the subscription is active or not. example: true contact_id: type: string description: Id of the contact associated with the subscription. example: 123 subscription_plan_id: type: string description: Id of the product subscription plan. example: 456 billing_amount: type: number format: double description: The billing amount. Must be 0 or greater. example: 10000 auto_charge: type: boolean description: If the subscription should auto charge on the next billing date. example: true max_charge_attempts: type: integer format: int32 description: Maximum number of charge attempts. Must be 1 or greater. example: 3 days_between_retries: type: integer format: int32 description: Number of days between charge attempts. Must be 1 or greater. example: 5 billing_frequency: type: integer format: int32 description: The number of days between billing cycles. Must be 1 or greater. example: 30 billing_cycle: type: string description: The billing cycle for the subscription. enum: - YEAR - MONTH - WEEK - DAY example: MONTH next_bill_date: type: string format: date description: The next date the subscription will bill. Must not be in the past. example: '2024-06-21' end_date: type: string format: date description: The date the subscription will end. Must not be in the past. example: '2025-05-21' payment_method_id: type: string description: Id associated with the payment method. example: 789 allow_tax: type: boolean description: Only works if the product associated with the product subscription is taxable. example: false lead_affiliate_id: type: string description: The affiliate id for the lead of the subscription. example: 101 sale_affiliate_id: type: string description: The affiliate id for the sale of the subscription. example: 102 shipping_address: $ref: '#/components/schemas/AddressRequest' description: The shipping address for the subscription. promo_code: type: string description: The promo code for the subscription. example: PROMO123 shipping_option_id: type: string description: The shipping option ID for the subscription. example: 123 reason_stopped: type: string description: The reason the subscription is no longer active. example: Customer requested cancellation custom_fields: type: array description: List of custom field values to apply to this subscription example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: {} security: - oauth2: []