{"openapi":"3.1.0","info":{"title":"Keap 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":[]}],"paths":{"/rest/v2/automations/{automation_id}/unpublish":{"put":{"tags":["Automation"],"summary":"Unpublish an Automation","description":"Unpublishes a single automation","operationId":"unpublishAutomation","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnpublishAutomationRequest"}}},"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/tasks":{"get":{"tags":["Task"],"summary":"List Tasks","description":"Retrieves a list of tasks based on the provided filter. Tasks which are not assigned to a User may be queried with user_id==UNASSIGNED.","operationId":"listTasks","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `contact_id`\n- (String) `has_due_date`\n- (String) `is_completed`\n- (String) `user_id`\n- (String) `opportunity_id`\n- (String) `task_ids`\n- (String) `priority` — one of `CRITICAL`, `ESSENTIAL`, `NONESSENTIAL`\n- (String) `since_time`\n- (String) `until_time`\n- (String) `id` — supports `==`, `>`, `<`, `>=`, `<=`\n- (String) `title` — supports prefix wildcard (`title==Foo*`)\n\nOperators must be URL-encoded (`==` → `%3D%3D`, `>` → `%3E`, `<` → `%3C`).\nFor the filters listed above, here are some examples:\n- `filter=contact_id%3D%3D123`\n- `filter=has_due_date%3D%3Dtrue`\n- `filter=is_completed%3D%3Dtrue`\n- `filter=user_id%3D%3D321`\n- `filter=opportunity_id%3D%3D321`\n- `filter=task_ids%3D%3D1,2,3`\n- `filter=priority%3D%3DCRITICAL`\n- `filter=since_time%3D%3D2025-04-16T20:33:02.321Z;`\n- `filter=until_time%3D%3D2025-08-16T20:33:02.321Z;`\n- `filter=id%3E5` (id > 5)\n- `filter=id%3C%3D100` (id <= 100)\n- `filter=title%3D%3DFollow%2A` (title starts with \"Follow\")\n\n**Custom fields:** tasks may also be filtered by any custom field defined on the Task record, referenced by its field name (e.g. `filter=cf_priority%3D%3D10`). Both indexed and non-indexed custom fields are filterable. Operators must be URL-encoded, same as the standard fields above. The supported operator and value depend on the field's data type:\n- Text-like fields (Text, Text Area, Name, Email, Website, Phone, Social Security Number) and choice fields with text options (Dropdown, Radio, State) — equals (`==`) and prefix wildcard (e.g. `cf_company%3D%3DAcme%2A`)\n- Numeric fields (Whole Number, Decimal, Currency, Percent, Year, Month, Day of Week, User) — equals and comparison (`==`, `>`, `<`, `>=`, `<=`)\n- Date and Date/Time fields — equals and comparison; the value must be a full ISO-8601 date-time with milliseconds and a timezone offset (e.g. `cf_renewDate%3C%3D2026-01-01T00:00:00.000Z`). Date-only values such as `2026-01-01` are rejected\n- Yes/No fields — equals only, value `0` (No) or `1` (Yes)\n- Drilldown fields — equals only, integer value\n- Multi-select fields (List Box, User List Box) — equals only, matched as a contains search over the stored selections (e.g. `cf_tags%3D%3Dred`)\nA custom field that does not exist, an operator unsupported for the field's type, or a value that does not match the field's type returns `400 Bad Request`.\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.\nOne of the following fields:\n- `id`\n- `create_time`\n- `due_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of optional Task properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"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/ListTasksResponse"}}}}}},"post":{"tags":["Task"],"summary":"Create a Task","description":"Creates a new task as the authenticated user.","operationId":"createTask","parameters":[{"name":"fields","in":"query","description":"Comma-delimited list of optional Task properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskRequest"}}},"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/Task"}}}}}}},"/rest/v2/tasks/model/customFields":{"post":{"tags":["Task"],"summary":"Create a Custom Field","description":"Creates a custom field of the specified type and options to the Task object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"createTaskCustomField","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/CreateCustomFieldResponse"}}}}}}},"/rest/v2/tasks/model/customFields/tabs":{"get":{"tags":["Task"],"summary":"List Task Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Task record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"listTaskCustomFieldTabs","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":["Task"],"summary":"Create a Task Custom Field Tab","description":"Creates a new custom field tab for the Task record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"createTaskCustomFieldTab","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/tasks/model/customFields/groups":{"get":{"tags":["Task"],"summary":"List Task Custom Field Groups","description":"Retrieves a list of custom field groups for the Task record type. Optionally filter by tab_id to scope to a specific tab.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"listTaskCustomFieldGroups","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":["Task"],"summary":"Create a Task Custom Field Group","description":"Creates a new custom field group for the Task record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"createTaskCustomFieldGroup","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/tags":{"get":{"tags":["Tags"],"summary":"List Tags","description":"Retrieves a list of Tags defined in the application\nTo search for `null` or empty fields use `filter==NONE`","operationId":"listTags","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `name`\n- (String) `description`\n- (String) `category_id`\n- (String) `tag_ids`\n- (String) `since_create_time`\n- (String) `until_create_time`\n- (String) `since_update_time`\n- (String) `until_update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. If NONE is passed in for `category_id` or `description`, it will check\nfor the non-existence of that field. For the filters listed above, here are some examples:\n\n- `filter=name%3D%3Dmy-tag`\n- `filter=category_id%3D%3DNONE`\n- `filter=description%3D%3DNONE`\n- `filter=tag_ids%3D%3D1,2,3`\n- `filter=since_create_time%3D%3D2024-12-22T01:00:00.000Z;until_create_time%3D%3D2025-01-01T00:00:00.000Z;`","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.\nOne of the following fields:\n\n- `name`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListTagsResponse"}}}}}},"post":{"tags":["Tags"],"summary":"Create Tag","description":"Creates a new Tag","operationId":"createTag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateTagRequest"}}},"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/Tag"}}}}}}},"/rest/v2/tags/{tag_id}/contacts:removeTags":{"post":{"tags":["Tags"],"summary":"Remove Tags","description":"Removes a Tag from a list of Contacts.","operationId":"removeTags","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyRemoveTagRequest"}}},"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"}}}},"204":{"description":"No Content"}}}},"/rest/v2/tags/{tag_id}/contacts:applyTags":{"post":{"tags":["Tags"],"summary":"Apply Tag","description":"Applies a Tag to a list of Contacts.","operationId":"applyTags","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyRemoveTagRequest"}}},"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/ApplyTagsResponse"}}}}}}},"/rest/v2/tags/categories":{"get":{"tags":["Tags"],"summary":"List Tag Categories","description":"Retrieves a list of defined Tag Categories\nTo search for `null` or empty fields use `filter==NONE`","operationId":"listTagCategories","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `description`\n- (String) `since_create_time`\n- (String) `until_create_time`\n- (String) `since_update_time`\n- (String) `until_update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. If NONE is passed in for `name` or `description`, it will check for the\nnon-existence of that field. For the filters listed above, here are some examples:\n- `filter=name%3D%3Dmy-tag-category`\n- `filter=description%3D%3DNONE`\n- `filter=since_create_time%3D%3D2024-12-22T01:00:00.000Z;until_create_time%3D%3D2025-01-01T00:00:00.000Z;`","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.\nOne of the following fields:\n- `name`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListTagCategoriesResponse"}}}}}},"post":{"tags":["Tags"],"summary":"Create Tag Category","description":"Creates a new Tag Category.","operationId":"createTagCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateTagCategoryRequest"}}},"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/TagCategory"}}}}}}},"/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.\nOne of the following fields:\n- `id`\n- `contact_id`\n- `subscription_plan_id`\n- `modification_time`\n\nOne of the following directions:\n- `asc`\n- `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/sales/merchants/{id}:setDefault":{"post":{"tags":["Sales"],"summary":"Set default Merchant Account","description":"Sets the specified Merchant Account as the default Merchant Account.","operationId":"setMerchantGatewayAsDefault","parameters":[{"name":"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"}}}},"/rest/v2/reporting/reports/{report_id}:run":{"post":{"tags":["Reporting"],"summary":"Run a Report","description":"Runs a report as defined in the application (identified as Saved Search)
Deprecated as of v2","operationId":"runReport","parameters":[{"name":"report_id","in":"path","description":"The unique identifier of the report (Saved Search) to execute","required":true,"schema":{"type":"string"},"example":123},{"name":"runReportRequest","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RunReportRequest"}}],"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/ReportExecutionResult"}}}}}}},"/rest/v2/referrals":{"get":{"tags":["Referral"],"summary":"List Referrals","description":"Retrieves a list of all referrals with optional filtering and sorting","operationId":"listReferrals","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `referral_partner_id` - Allowable operators: \"==\", \"<=\", \"<\", \">=\", \">\", \"!=\"\n- (String) `contact_id` - Allowable operators: \"==\", \"<=\", \"<\", \">=\", \">\", \"!=\"\n- (String) `source` - Wildcard matching allowed\n- (String) `description` - Wildcard matching allowed\n- (String) `type` (Allowed values: `COOKIE`, `PERMANENT`, `MANUAL`)\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=referral_partner_id%3D%3D123`\n- `filter=referral_partner_id%3E10` (referral_partner_id > 10)\n- `filter=contact_id%3D%3D456`\n- `filter=contact_id%3C%3D100` (contact_id <= 100)\n- `filter=source%3D%3DEmail Marketing`\n- `filter=source%3D%3DEmail*` (starts with \"Email\")\n- `filter=description%3D%3DReferred*` (starts with \"Referred\")\n- `filter=type%3D%3DCOOKIE`\n- `filter=referral_partner_id%3D%3D123%3Bcontact_id%3D%3D456`\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.\nOne of the following fields:\n- `id`\n- `referral_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListReferralsResponse"}}}}}},"post":{"tags":["Referral"],"summary":"Create a Referral","description":"Creates a new referral partner referral on the provided contact","operationId":"createReferral","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReferralRequest"}}},"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/Referral"}}}}}}},"/rest/v2/products":{"get":{"tags":["Products"],"summary":"List Products","description":"Retrieves a list of Products","operationId":"listProducts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name` - Wildcard matching allowed\n- (String) `sku` - Wildcard matching allowed\n- (String) `description` - Wildcard matching allowed\n- (String) `short_description` - Wildcard matching allowed\n- (String) `product_id` - supports comparison operators: `==`, `>`, `<`, `>=`, `<=`\n- (List[String]) `product_ids` - accepts a comma-separated list of product IDs\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\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\nFor the filters listed above, here are some examples:\n- `filter=name%3D%3Dtestsearch`\n- `filter=name%3D%3Dtest*` (starts with \"test\")\n- `filter=sku%3D%3Dtestsearch`\n- `filter=sku%3D%3DSKU*` (starts with \"SKU\")\n- `filter=product_id>5` (product ID greater than 5)\n- `filter=product_id>=10` (product ID greater than or equal to 10)\n- `filter=product_id%3D%3D42` (product ID equals 42)\n- `filter=product_ids%3D%3D1,2,3,4,5` (products with IDs 1, 2, 3, 4, or 5)\n- `filter=name%3D%3Dtestsearch%3Bsku%3D%3Dtestsearch`\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.\nOne of the following fields:\n- `name`\n- `sku`\n- `last_updated_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListProductsResponse_List"}}}}}},"post":{"tags":["Products"],"summary":"Create a Product","description":"Creates a new product","operationId":"createProduct","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest_Detail"}}},"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/RestV2Product_Detail"}}}}}}},"/rest/v2/products/{product_id}:adjustInventory":{"post":{"tags":["Products"],"summary":"Adjust Inventory of a Product","description":"Increase or decrease the quantity of the Product","operationId":"adjustInventory","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductInventoryRequest_Detail"}}},"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/RestV2Product_Detail"}}}}}}},"/rest/v2/products/{product_id}/subscriptions":{"get":{"tags":["Subscription Plans"],"summary":"List Subscription Plans","description":"Retrieves a list of Subscription Plans","operationId":"listSubscriptionPlans","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"},"example":"'-' can be used for a wildcard (/v2/products/-/subscriptions"},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Boolean) `active`: true or false\n- (BillingCycle) `cycle_type`: DAILY, WEEKLY, MONTHLY, YEARLY\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=active%3D%3Dtrue`\n- `filter=cycle_type%3D%3DDAILY`\n- `filter=active%3D%3Dfalse%3Bcycle_type%3D%3DWEEKLY`\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.\nOne of the following fields:\n- `id`\n- `product_id`\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListSubscriptionPlansResponse"}}}}}},"post":{"tags":["Subscription Plans"],"summary":"Create Subscription Plan","description":"Creates a Subscription Plan","operationId":"createSubscriptionPlans","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionPlanRequest"}}},"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/SubscriptionPlan"}}}}}}},"/rest/v2/products/{product_id}/options":{"get":{"tags":["Products"],"summary":"List Product Options","description":"Retrieves all options of a Product","operationId":"listProductOptions","parameters":[{"name":"product_id","in":"path","description":"product_id","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/ListProductOptionsResponse"}}}}}},"post":{"tags":["Products"],"summary":"Create a Product Option","description":"Creates a new product option","operationId":"createProductOption","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductOptionRequest"}}},"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/ProductOption"}}}}}}},"/rest/v2/products/{product_id}/options/{product_option_id}/listItems":{"post":{"tags":["Products"],"summary":"Add a Product Option List Option Value","description":"Adds product option values to a product option of type LIST","operationId":"addProductOptionListOptionValue","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateProductOptionListOption"}}}},"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/ProductOption"}}}}}}},"/rest/v2/products/{product_id}/images":{"post":{"tags":["Products"],"summary":"Create the Product Image","description":"Creates the Product Image file and uploads it to the specified Product","operationId":"createProductImage","parameters":[{"name":"product_id","in":"path","description":"The product ID","required":true,"schema":{"type":"string"}},{"name":"legacy","in":"query","description":"Set to 'true' if the product image should also be used in legacy cart features. Only one image is allowed. If an image already exists, it will be replaced by the current image.","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The image file to upload"}},"required":["file"]}}}},"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"}}},"delete":{"tags":["Products"],"summary":"Delete the Product Image","description":"Deletes the Product Image from the specified Product","operationId":"deleteProductImage","parameters":[{"name":"product_id","in":"path","description":"product_id","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"}}}},"/rest/v2/productInterestBundles":{"get":{"tags":["Product Interest Bundles"],"summary":"List Product Interest Bundles","description":"Retrieves a list of Product Interest Bundles","operationId":"listProductInterestBundles","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\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.\nOne of the following fields:\n- `name`\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListProductInterestBundleResponse"}}}}}},"post":{"tags":["Product Interest Bundles"],"summary":"Create a Product Interest Bundle","description":"Creates a new Product Interest Bundle.","operationId":"createProductInterestBundle","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductInterestBundleRequest"}}},"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/ProductInterestBundle"}}}}}}},"/rest/v2/productInterestBundles/{id}/interests":{"post":{"tags":["Product Interest Bundles"],"summary":"Create a Product Interest in an existing Bundle","description":"Creates a new Product Interest in an existing Bundle.","operationId":"addProductInterest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProductInterestRequest"}}},"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/ProductInterest"}}}}}}},"/rest/v2/productCategories":{"get":{"tags":["Product Categories"],"summary":"List all Product Categories","description":"Retrieves a list of Product Categories","operationId":"listProductCategories","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `product_id`\n- (String) `name` - Wildcard matching allowed\n- (Number) `product_category_id` - supports comparison operators: `==`,`!=`, `>`, `<`, `>=`, `<=`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\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\nFor the filters listed above, here are some examples:\n- `filter=product_id%3D%3D29`\n- `filter=name%3D%3DTestSearch`\n- `filter=name%3D%3DElec*` (starts with \"Elec\")\n- `filter=product_category_id>5` (category ID greater than 5)\n- `filter=product_category_id>=10` (category ID greater than or equal to 10)\n- `filter=product_category_id%3D%3D42` (category ID equals 42)\n- `filter=name%3D%3DElec*%3Bproduct_category_id>5` (multiple filters combined)\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.\nOne of the following fields:\n- `id`\n\nOne of the following directions:\n- `asc`\n- `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/ListProductCategoriesResponse"}}}}}},"post":{"tags":["Product Categories"],"summary":"Create a Product Category","description":"Creates a new Product Category","operationId":"createProductCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductCategoryRequest"}}},"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/ProductCategory"}}}}}}},"/rest/v2/productCategories/{category_id}:assignProducts":{"post":{"tags":["Product Categories"],"summary":"Assign Products to a Product Category","description":"Updates the list of products assigned to a Product Category. **Note:** The full list of product IDs that should remain assigned must be provided; any IDs omitted are removed automatically.","operationId":"assignProductsToCategory","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignProductsRequest"}}},"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"}}}},"204":{"description":"No Content"}}}},"/rest/v2/productCategories/{category_id}/images":{"post":{"tags":["Product Categories"],"summary":"Create the product category image file","description":"Creates the product category image file and uploads it to the specified product category","operationId":"createImageFile","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to upload"}},"required":["file"]}}}},"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"}}},"delete":{"tags":["Product Categories"],"summary":"Delete the image from a product category","description":"Deletes the image from the specified product category","operationId":"deleteImageFile","parameters":[{"name":"category_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"}}}},"/rest/v2/paymentMethodConfigs":{"post":{"tags":["Payment Method Configs"],"summary":"Create Payment Method Configuration","description":"Creates configuration details for rendering payment method components","operationId":"createPaymentMethodConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentMethodConfigRequest"}}},"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/PaymentMethodConfig"}}}}}}},"/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.\nOne of the following fields:\n- `id`\n- `order_time`\n- `modification_time`\n\nOne of the following directions:\n- `asc`\n- `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.\nOne of the following fields:\n- `invoice_id`\n- `payment_id`\n- `amount`\n- `pay_time`\n- `pay_status`\n- `skip_commission`\n- `last_updated_time`\n\nOne of the following directions:\n- `asc`\n- `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"}}}},"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/opportunities":{"get":{"tags":["Opportunity"],"summary":"List Opportunities","description":"Retrieves a list of all Opportunities.","operationId":"listOpportunities","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `stage_id`\n- (String) `user_id`\n- (String) `contact_id`\n- (String) `opportunity_title` — supports wildcard prefix search (e.g. `opportunity_title==Deal*`)\n- (String) `lead_source_name` — supports wildcard prefix search (e.g. `lead_source_name==Web*`)\n- (String) `affiliate_id` — exact match only (e.g. `affiliate_id==123`)\n- (String) `opportunity_id` — supports comparison operators: `==`, `>`, `<`, `>=`, `<=`\n- (String) `ids` — comma-separated list of opportunity IDs (e.g. `ids==1,2,3`), maximum 100 IDs\n- (String) `contact_phone` — matches the contact's phone. By default it is an exact match against the stored value, including any formatting characters (e.g. `contact_phone==(480) 123-4567`); it does not normalize or search across an unformatted number. Supports wildcard prefix search for partial matches (e.g. `contact_phone==480*`)\n- (String) `contact_city` — matches the contact's city; supports wildcard prefix search (e.g. `contact_city==Chand*`)\n- (String) `contact_state` — matches the contact's state; supports wildcard prefix search (e.g. `contact_state==AZ*`)\n- (String) `projected_revenue_high` — projected revenue high; supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `projected_revenue_high>=1000`)\n- (String) `projected_revenue_low` — projected revenue low; supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `projected_revenue_low<=500`)\nNote: `opportunity_id` and `ids` cannot be used together in the same request.\n\n**Custom fields:** opportunities may also be filtered by any custom field defined on the Opportunity record, referenced by its field name (e.g. `cf_priority==10`). Both indexed and non-indexed custom fields are filterable. The supported operator and value depend on the field's data type:\n- Text-like fields (Text, Text Area, Name, Email, Website, Phone, Social Security Number) and choice fields with text options (Dropdown, Radio, State) — equals (`==`) and prefix wildcard (e.g. `cf_company==Acme*`)\n- Numeric fields (Whole Number, Decimal, Currency, Percent, Year, Month, Day of Week, User) — equals and comparison (`==`, `>`, `<`, `>=`, `<=`)\n- Date and Date/Time fields — equals and comparison; the value must be a full ISO-8601 date-time with milliseconds and a timezone offset (e.g. `cf_renewDate<=2026-01-01T00:00:00.000Z`). Date-only values such as `2026-01-01` are rejected\n- Yes/No fields — equals only, value `0` (No) or `1` (Yes)\n- Drilldown fields — equals only, integer value\n- Multi-select fields (List Box, User List Box) — equals only, matched as a contains search over the stored selections (e.g. `cf_tags==red`)\nA custom field that does not exist, an operator unsupported for the field's type, or a value that does not match the field's type returns `400 Bad Request`.\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 opportunities items.\nOne of the following fields:\n- `next_action_time`\n- `contact_name`\n- `opportunity_title`\n- `created_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time","required":false,"schema":{"type":"array","items":{"type":"string","enum":["custom_fields","created_by","last_updated_by","status_id","monthly_revenue","order_revenue","objection","status","stage_entrance_time"]},"uniqueItems":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/ListOpportunitiesResponse"}}}}}},"post":{"tags":["Opportunity"],"summary":"Create an Opportunity","description":"Creates a new opportunity as the authenticated user.","operationId":"createOpportunity","parameters":[{"name":"fields","in":"query","description":"Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time","required":false,"schema":{"type":"array","items":{"type":"string","enum":["custom_fields","created_by","last_updated_by","status_id","monthly_revenue","order_revenue","objection","status","stage_entrance_time"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOpportunityRequest"}}},"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/RestV2Opportunity"}}}}}}},"/rest/v2/opportunities/stages":{"get":{"tags":["Opportunity"],"summary":"List of Opportunity Stages","description":"Retrieves a list of Opportunity Stages.","operationId":"listOpportunityStages","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `opportunity_stage_name` — supports wildcard prefix search (e.g. `opportunity_stage_name==Qualified*`)\n- (String) `opportunity_stage_id` — supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `opportunity_stage_id>5`)\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 stage items.\nOne of the following fields:\n- `stage_order`\n\nOne of the following directions:\n- `asc`\n- `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/ListOpportunityStagesResponse"}}}}}},"post":{"tags":["Opportunity"],"summary":"Create an Opportunity Stage","description":"Creates a new Opportunity Stage","operationId":"createOpportunityStage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOpportunityStageRequest"}}},"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/RestOpportunityStage"}}}}}}},"/rest/v2/opportunities/model/customFields":{"post":{"tags":["Opportunity"],"summary":"Create an Opportunity Custom Field","description":"Creates a custom field of the specified type and options to the Opportunity object","operationId":"createOpportunityCustomFields","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/opportunities/model/customFields/tabs":{"get":{"tags":["Opportunity"],"summary":"List Opportunity Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Opportunity record type.","operationId":"listOpportunityCustomFieldTabs","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":["Opportunity"],"summary":"Create an Opportunity Custom Field Tab","description":"Creates a new custom field tab for the Opportunity record type.","operationId":"createOpportunityCustomFieldTab","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/opportunities/model/customFields/groups":{"get":{"tags":["Opportunity"],"summary":"List Opportunity Custom Field Groups","description":"Retrieves a list of custom field groups for the Opportunity record type. Optionally filter by tab_id to scope to a specific tab.","operationId":"listOpportunityCustomFieldGroups","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":["Opportunity"],"summary":"Create an Opportunity Custom Field Group","description":"Creates a new custom field group for the Opportunity record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.","operationId":"createOpportunityCustomFieldGroup","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/notes/model/customFields":{"post":{"tags":["Note"],"summary":"Create a Custom Field","description":"Creates a custom field of the specified type and options to the Note object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"createNoteCustomField","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/notes/model/customFields/tabs":{"get":{"tags":["Note"],"summary":"List Note Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Note record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"listNoteCustomFieldTabs","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":["Note"],"summary":"Create a Note Custom Field Tab","description":"Creates a new custom field tab for the Note record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"createNoteCustomFieldTab","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/notes/model/customFields/groups":{"get":{"tags":["Note"],"summary":"List Note Custom Field Groups","description":"Retrieves a list of custom field groups for the Note record type. Optionally filter by tab_id to scope to a specific tab.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"listNoteCustomFieldGroups","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":["Note"],"summary":"Create a Note Custom Field Group","description":"Creates a new custom field group for the Note record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"createNoteCustomFieldGroup","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/leadSources":{"get":{"tags":["Lead Sources"],"summary":"List Lead Sources","description":"Retrieves a list of Lead Sources","operationId":"listLeadSources","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `id` - Must be a positive integer. Allowable operators: \"==\", \"<=\", \"<\", \">=\", \">\", \"!=\". Values that are zero, negative, or non-integer return a 400.\n- (String) `name` - Wildcard matching allowed\n- (String) `status`\n- (String) `lead_source_category_id`\n- (String) `vendor` - Wildcard matching allowed\n- (String) `medium` - Wildcard matching allowed\n- (String) `message` - Wildcard matching allowed\n- (String) `description` - Wildcard matching allowed\n- (String) `start_time`\n- (String) `end_time`\n\nYou will need to apply the `==` operator (or another supported operator) to check the equality of one of\nthe filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are\nsome examples:\n\n- `filter=name%3D%3Dexample`\n- `filter=name%3D%3DGoogle%2A` (name starts with \"Google\")\n- `filter=id%3E1000` (id > 1000)\n- `filter=id%3E%3D1000` (id >= 1000)\n- `filter=start_time%3D%3D2024-12-22T01:00:00.000Z`\n\nFor fields which allow wildcard matching, you may use the `*` wildcard character (or its encoded form\n`%2A`) for case-insensitive prefix matching on text fields. Example of a valid wildcard pattern:\n\n- `field==foo*` finds anything in `field` that begins with `foo`","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.\nOne of the following fields:\n\n- `name`\n- `status`\n- `vendor`\n- `medium`\n- `start_time`\n- `end_time`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n\n- `asc`\n- `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/ListLeadSourcesResponse"}}}}}},"post":{"tags":["Lead Sources"],"summary":"Create a Lead Source","description":"Creates a new Lead Source","operationId":"createLeadSource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadSourceRequest"}}},"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/LeadSource"}}}}}}},"/rest/v2/leadSources/{lead_source_id}/recurringExpenses":{"get":{"tags":["Lead Source Recurring Expenses"],"summary":"Retrieves a list of lead source recurring expenses","description":"Retrieves a list of recurring expenses with lead_source_id and optional 'filter' query param","operationId":"listLeadSourceRecurringExpenses","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to. Use '-' as a wildcard to list recurring expenses across all lead sources.","required":true,"schema":{"type":"string"},"example":"-"},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `title`\n- (Long) `amount`\n- (String) `start_time`\n- (String) `end_time`\n- (String) `next_expense_time`\n- (String) `create_time`\n- (String) `update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n\n- `filter=amount%3D%3D2500`\n- `filter=next_expense_time%3D%3D2024-12-22T01:00:00.000Z`","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.\nOne of the following fields:\n- `title`\n- `amount`\n- `start_time`\n- `end_time`\n- `next_expense_time`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListLeadSourceRecurringExpensesResponse"}}}}}},"post":{"tags":["Lead Source Recurring Expenses"],"summary":"Create a Lead Source Recurring Expense","description":"Creates a new Lead Source Recurring Expense","operationId":"createLeadSourceRecurringExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadSourceRecurringExpenseRequest"}}},"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/LeadSourceRecurringExpense"}}}}}}},"/rest/v2/leadSources/{lead_source_id}/expenses":{"get":{"tags":["Lead Source Expenses"],"summary":"List Lead Source Expenses","description":"Retrieves a list of lead source expenses","operationId":"listLeadSourceExpenses","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this expense belongs to. Use '-' as a wildcard (e.g. /v2/leadSources/-/expenses).","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `title`\n- (Long) `amount`\n- (String) `incurred_time`\n- (String) `create_time`\n- (String) `update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n\n- `filter=amount%3D%3D2500`\n- `filter=incurred_time%3D%3D2024-12-22T01:00:00.000Z`","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.\nOne of the following fields:\n\n- `title`\n- `amount`\n- `incurred_time`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListLeadSourceExpensesResponse"}}}}}},"post":{"tags":["Lead Source Expenses"],"summary":"Create a Lead Source Expense","description":"Creates a new Lead Source Expense","operationId":"createLeadSourceExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this expense belongs to","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadSourceExpenseRequest"}}},"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/LeadSourceExpense"}}}}}}},"/rest/v2/leadSourceCategories":{"get":{"tags":["Lead Source Categories"],"summary":"List Lead Source Categories","description":"Retrieves a list of Lead Source Categories","operationId":"listLeadSourceCategories","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `name` - Wildcard matching allowed\n- (String) `description` - Wildcard matching allowed\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\n\nFor fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A)\nfor prefix matching on text fields. Example of a valid pattern of wildcard usage:\n- `field==foo*` finds anything in `field` that begins with `foo`\n\nFor the filters listed above, here are some examples:\n\n- `filter=name%3D%3Dexample`\n- `filter=name%3D%3Dexam*` (starts with \"exam\")\n- `filter=description%3D%3Dexample`\n- `filter=description%3D%3Dexam*` (starts with \"exam\")\n- `filter=name%3D%3Dexam*%3Bdescription%3D%3Dsales` (multiple filters combined)","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.\nOne of the following fields:\n- `name`\n\nOne of the following directions:\n- `asc`\n- `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/ListLeadSourceCategoriesResponse"}}}}}},"post":{"tags":["Lead Source Categories"],"summary":"Create a Lead Source Category","description":"Creates a new Lead Source Category.","operationId":"createLeadSourceCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateLeadSourceCategoryRequest"}}},"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/LeadSourceCategory"}}}}}}},"/rest/v2/integrations/wordpress/options":{"get":{"tags":["Integrations"],"summary":"List WordPress Opt-In Options","description":"Retrieves the list of WordPress Opt-In Options available","operationId":"listIntegrationsWordPressOptInOptions","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/ListWordPressOptInOptionsResponse"}}}}}},"post":{"tags":["Integrations"],"summary":"Add a WordPress Opt-In Option","description":"Adds a value to the list of WordPress Opt-In Options Available","operationId":"addIntegrationsWordPressOptIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationsWordPressOptInOption"}}},"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/WordPressOptInOption"}}}}}}},"/rest/v2/integrations/wordpress/options/{option_key}:achieve":{"post":{"tags":["Integrations"],"summary":"Achieve a WordPress Opt-In Goal","description":"Achieves a WordPress Opt-In Option Goal","operationId":"achieveIntegrationsWordPressOptInGoal","parameters":[{"name":"option_key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchieveIntegrationsWordPressOptInOptionGoalRequest"}}},"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"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchieveWordPressOptInGoalResult"}}}}}}},"/rest/v2/files":{"get":{"tags":["Files"],"summary":"List all files","description":"Retrieves a list of files","operationId":"listFiles","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Boolean) `is_public` — `true` (public) or `false` (private)\n- (String) `contact_id`\n- (String) `user_id`\n- (FileBoxCategory) `category` — one of: `ATTACHMENTS`, `CART`, `DOCUMENTS`, `HIDDEN`, `INVOICE`, `LOGO`, `TICKETS`, `WEB_FORM`, `FUNNEL`\n- (FileBoxType) `file_box_type` — one of: `APPLICATION`, `IMAGE`, `FAX`, `ATTACHMENT`, `TICKET`, `CONTACT`, `DIGITAL_PRODUCT`, `IMPORT`, `HIDDEN`, `WEB_FORM`, `STYLED_CART`, `RESAMPLED_IMAGE`, `TEMPLATE_THUMBNAIL`, `FUNNEL`, `LOGO_THUMBNAIL`, `UNLAYER`, `BRANDING_CENTER_LOGO`\n- (String) `file_name`\n- (String) `created_time`\n- (String) `updated_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. Multiple filters are combined with a semicolon (`;`, encoded `%3B`)\nand are ANDed together. For the filters listed above, here are some examples:\n- `filter=contact_id%3D%3D123`\n- `filter=is_public%3D%3Dfalse`\n- `filter=category%3D%3DDOCUMENTS`\n- `filter=file_box_type%3D%3DTICKET%3Bcategory%3D%3DATTACHMENTS`\n- `filter=file_box_type%3D%3DCONTACT%3Bis_public%3D%3Dfalse`\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.\nOne of the following fields:\n- `file_name`\n- `updated_time`\n- ...\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListFilesResponse"}}}}}},"post":{"tags":["Files"],"summary":"Create a file","description":"Uploads a file using multipart/form-data. The `file` part contains the binary file content; `file_name`, `is_public`, `file_association`, and optionally `contact_id` are additional text parts in the same multipart request. Sending these as URL query parameters is not supported.","operationId":"createFile","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to upload"},"file_name":{"type":"string","description":"File name"},"contact_id":{"type":"string","description":"Contact ID. Required if the `file_association` is CONTACT"},"is_public":{"type":"string","description":"Is public"},"file_association":{"type":"string","description":"File association"}},"required":["file","file_association","file_name"]}}}},"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/FileMetadata"}}}}}}},"/rest/v2/files/{file_id}":{"get":{"tags":["Files"],"summary":"Retrieve a file","description":"Retrieves a file","operationId":"getFile","parameters":[{"name":"file_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/FileMetadata"}}}}}},"post":{"tags":["Files"],"summary":"Update a file","description":"Updates a file using multipart/form-data. Note that this endpoint uses POST instead of PATCH.","operationId":"updateFile","parameters":[{"name":"file_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":["file","file_name","is_public"]},"uniqueItems":true}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to upload"},"file_name":{"type":"string","description":"File name"},"is_public":{"type":"boolean","description":"Is public"}}}}}},"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/FileMetadata"}}}}}},"delete":{"tags":["Files"],"summary":"Delete a file","description":"Deletes a specified file","operationId":"deleteFile","parameters":[{"name":"file_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"}}}},"/rest/v2/emails":{"get":{"tags":["Email"],"summary":"List Emails","description":"Retrieves a list of emails that have been sent","operationId":"listEmails","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) contact_id\n- (String) email\n- (String) start_created_time\n- (String) end_created_time\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.\nOne of the following fields:\n- `created_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListEmailsSentResponse"}}}}}},"post":{"tags":["Email"],"summary":"Create an Email Record","description":"Creates a Record of an Email sent to a Contact","operationId":"createEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailSentRequest"}}},"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/EmailSentWithContent"}}}}}}},"/rest/v2/emails:send":{"post":{"tags":["Email"],"summary":"Send an Email","description":"Sends an Email to a list of Contacts","operationId":"sendEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendRequest"}}},"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"}}}},"202":{"description":"Accepted"}}}},"/rest/v2/emails:batchRemove":{"post":{"tags":["Email"],"summary":"Remove a set of Email Records","description":"Removes a set of Email Records","operationId":"deleteEmails","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmailsRequest"}}},"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/DeleteEmailsResponse"}}}}}}},"/rest/v2/emails:batchAdd":{"post":{"tags":["Email"],"summary":"Create a set of Email Records","description":"Creates a set of Records of Emails sent to Contacts, maximum 1000 per transaction.","operationId":"createEmails","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailsSentRequest"}}},"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/EmailsSentList"}}}}}}},"/rest/v2/emails/templates:send":{"post":{"tags":["Email"],"summary":"Send an email based on a template","description":"Send an email based on a template","operationId":"sendEmailTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendTemplateRequest"}}},"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"}}}},"202":{"description":"Accepted"}}}},"/rest/v2/discounts/shipping":{"get":{"tags":["Shipping Discounts"],"summary":"List all Shipping Discounts","description":"Retrieves a list of Shipping Discounts","operationId":"listShippingDiscounts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (DiscountType) `discount_type`: AMOUNT or PERCENT\n- (Double) `discount_value`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=discount_type%3D%3DAMOUNT`\n- `filter=discount_value%3D%3D4.5`\n- `filter=discount_type%3D%3DAMOUNT%3Bdiscount_value%3D%3D4.5`\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.\nOne of the following fields:\n- `discount_type`\n- `discount_value`\n- `id`\n- `name`\n\nOne of the following directions:\n- `asc`\n- `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/ListShippingDiscountsResponse"}}}}}},"post":{"tags":["Shipping Discounts"],"summary":"Create a Shipping Discount","description":"Creates a Shipping Discount","operationId":"createShippingDiscount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShippingDiscountRequest"}}},"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/ShippingDiscount"}}}}}}},"/rest/v2/discounts/shipping/{discount_id}/criteria":{"post":{"tags":["Shipping Discounts"],"summary":"Create a Shipping Discount Criteria","description":"Creates a Shipping Discount Criteria","operationId":"createShippingDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShippingDiscountCriteria"}}},"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/DiscountCriteria"}}}}}}},"/rest/v2/discounts/products":{"get":{"tags":["Product Discounts"],"summary":"List all Product Discounts","description":"Retrieves a list of Product Discounts","operationId":"listProductDiscounts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Boolean) `apply_to_commissions`\n- (DiscountType) `discount_type`: AMOUNT or PERCENT\n- (Double) `discount_value`\n- (String) `product_id`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=apply_to_commissions%3D%3Dtrue`\n- `filter=discount_type%3D%3DAMOUNT`\n- `filter=discount_value%3D%3D10.0`\n- `filter=product_id%3D%3D2`\n- `filter=discount_type%3D%3DAMOUNT%3Bdiscount_value%3D%3D10.0`\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.\nOne of the following fields:\n- `apply_to_commissions`\n- `discount_type`\n- `discount_value`\n- `id`\n- `name`\n- `product_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListProductDiscountsResponse"}}}}}},"post":{"tags":["Product Discounts"],"summary":"Create a Product Discount","description":"Creates a Product Discount","operationId":"createProductDiscount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDiscountRequest"}}},"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/ProductDiscount"}}}}}}},"/rest/v2/discounts/products/{discount_id}/criteria":{"post":{"tags":["Product Discounts"],"summary":"Create a Product Discount Criteria","description":"Creates a Product Discount Criteria","operationId":"createProductDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDiscountCriteria"}}},"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/DiscountCriteria"}}}}}}},"/rest/v2/discounts/productCategories":{"get":{"tags":["Category Discounts"],"summary":"List Category Discounts","description":"Retrieves a list of Category Discounts","operationId":"listCategoryDiscounts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, the allowed field is:\n- (String) `id` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\"\n- (List[String]) `ids`\n- (String) `name` - Wildcard matching allowed\n- (String) `description` - Wildcard matching allowed\n- (String) `product_category_id`\n\nYou will need to apply the `==` operator to check the equality of the filter with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=product_category_id%3D%3D4`\n- `filter=ids%3D%3D1,10,4,24`\n- `filter=id%3E5`\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- `description==foo*` finds anything in `description` that begins with `foo`\n\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.\nOne of the following fields:\n- `id`\n- `name`\n\nOne of the following directions:\n- `asc`\n- `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/ListCategoryDiscountsResponse"}}}}}},"post":{"tags":["Category Discounts"],"summary":"Create a Category Discount","description":"Creates a Category Discount","operationId":"createCategoryDiscount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryDiscountRequest"}}},"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/CategoryDiscount"}}}}}}},"/rest/v2/discounts/productCategories/{discount_id}/criteria":{"post":{"tags":["Category Discounts"],"summary":"Create a Category Discount Criteria","description":"Creates a Category Discount Criteria","operationId":"createCategoryDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryDiscountCriteria"}}},"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/DiscountCriteria"}}}}}}},"/rest/v2/discounts/orderTotals":{"get":{"tags":["Order Total Discounts"],"summary":"List all Order Total Discounts","description":"Retrieves a list of Order Total Discounts","operationId":"listOrderTotalDiscounts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Boolean) `apply_to_commissions`\n- (DiscountStrategy) `discount_strategy`: GROSS or NET\n- (DiscountType) `discount_type`: AMOUNT or PERCENT\n- (Double) `discount_value`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=apply_to_commissions%3D%3Dtrue`\n- `filter=discount_strategy%3D%3DGROSS`\n- `filter=discount_type%3D%3DAMOUNT`\n- `filter=discount_value%3D%3D10.0`\n- `filter=discount_type%3D%3DAMOUNT%3Bdiscount_strategy%3D%3DNET`\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.\nOne of the following fields:\n- `apply_to_commissions`\n- `discount_strategy`\n- `discount_type`\n- `discount_value`\n- `id`\n- `name`\n\nOne of the following directions:\n- `asc`\n- `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/ListOrderTotalDiscountsResponse"}}}}}},"post":{"tags":["Order Total Discounts"],"summary":"Create an Order Total Discount","description":"Creates an Order Total Discount","operationId":"createOrderTotalDiscount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderTotalDiscountRequest"}}},"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/OrderTotalDiscount"}}}}}}},"/rest/v2/discounts/orderTotals/{discount_id}/criteria":{"post":{"tags":["Order Total Discounts"],"summary":"Create an Order Total Discount Criteria","description":"Creates an Order Total Discount Criteria","operationId":"createOrderTotalDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderTotalDiscountCriteria"}}},"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/DiscountCriteria"}}}}}}},"/rest/v2/discounts/freeTrials":{"get":{"tags":["Free Trial Discounts"],"summary":"List all Subscription Free Trial Discounts","description":"Retrieves a list of Subscription Free Trial Discounts","operationId":"listFreeTrialDiscounts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Integer) `free_trial_days`\n- (Boolean) `hide_price`\n- (String) `subscription_plan_id`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=free_trial_days%3D%3D14`\n- `filter=hide_price%3D%3DTrue`\n- `filter=subscription_plan_id%3D%3DmySubscriptionPlanId`\n- `filter=free_trial_days%3D%3D14%3Bhide_price%3D%3DFalse`\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.\nOne of the following fields:\n- `free_trial_days`\n- `hide_price`\n- `id`\n- `name`\n- `subscription_plan_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListFreeTrialDiscountsResponse"}}}}}},"post":{"tags":["Free Trial Discounts"],"summary":"Create a Subscription Free Trial Discount","description":"Creates a Subscription Free Trial Discount","operationId":"createFreeTrialDiscount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFreeTrialDiscountRequest"}}},"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/FreeTrialDiscount"}}}}}}},"/rest/v2/discounts/freeTrials/{discount_id}/criteria":{"post":{"tags":["Free Trial Discounts"],"summary":"Create a Subscription Free Trial Discount Criteria","description":"Creates a Subscription Free Trial Discount Criteria","operationId":"createFreeTrialDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFreeTrialDiscountCriteria"}}},"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/DiscountCriteria"}}}}}}},"/rest/v2/contacts":{"get":{"tags":["Contact"],"summary":"List Contacts","description":"Retrieves a list of Contacts","operationId":"listContacts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `email` — supports wildcard (e.g. `email==john*`)\n- (String) `given_name` — supports wildcard (e.g. `given_name==Mar*`)\n- (String) `family_name` — supports wildcard (e.g. `family_name==Smi*`)\n- (String) `middle_name` — supports wildcard (e.g. `middle_name==J*`)\n- (String) `company_id`\n- (Set[String]) `contact_ids`\n- (Set[String]) `ids` — accepts a list of contact IDs (e.g. `ids==1,2,3`)\n- (String) `start_update_time`\n- (String) `end_update_time`\n- (String) `phone_number` — the phone number to search for. Requires `phone_fields` to be specified; only the specified phone fields are searched.\n- (Set[String]) `phone_fields` — restricts which phone fields to search (e.g. PHONE1, PHONE2, or comma-separated list PHONE1,PHONE2,PHONE3,PHONE4,PHONE5). Required when `phone_number` is supplied.\n- (String) `billing_address_line1`\n- (String) `billing_address_locality`\n- (String) `billing_address_region` (long-form region/state name, e.g. \"Arizona\")\n- (String) `billing_address_postal_code`\n- (String) `billing_address_country_code` (ISO 3166-1 alpha-3, e.g. \"USA\")\n- (String) `shipping_address_line1`\n- (String) `shipping_address_locality`\n- (String) `shipping_address_region`\n- (String) `shipping_address_postal_code`\n- (String) `shipping_address_country_code`\n- (String) `other_address_line1`\n- (String) `other_address_locality`\n- (String) `other_address_region`\n- (String) `other_address_postal_code`\n- (String) `other_address_country_code`\n- (String) `city` — primary-address city (Contact.City); supports prefix wildcard (e.g. `city==Chan*`, \"starts with\")\n- (String) `state` — primary-address state/region (Contact.State); supports prefix wildcard (e.g. `state==Ar*`, \"starts with\")\n- (String) `website` — supports wildcard (e.g. `website==https://example*`)\n- (String) `lead_source_name` — supports wildcard (e.g. `lead_source_name==Google*`)\n- (String) `contact_id` — supports comparison operators: `==`, `>`, `<`, `>=`, `<=`\n(e.g. `contact_id>5` encoded as `contact_id%3E5`)\nCustom fields can be filtered by their field_name (case-insensitive, as returned\nby GET /v2/contacts/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. `firstName1%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: `==`, `>`, `<`, `>=`, `<=`; the value must be a full ISO-8601 date-time with milliseconds and a timezone offset (e.g. `2026-01-01T00:00:00.000Z`), the same format as `start_update_time`/`end_update_time`. Date-only values such as `2026-01-01` are rejected\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 to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\nFor wildcard filtering, use `*` at the end of the value (prefix matching), encoded as `%2A`.\nFor the filters listed above, here are some examples:\n- `filter=given_name%3D%3DMary`\n- `filter=given_name%3D%3DMar%2A` (wildcard: starts with \"Mar\")\n- `filter=company_id%3D%3D123`\n- `filter=company_id%3D%3D123%3Bfamily_name%3D%3DSmith`\n- `filter=billing_address_locality%3D%3DChandler`\n- `filter=city%3D%3DChandler` (city exact match)\n- `filter=city%3D%3DChan%2A` (city prefix wildcard: starts with \"Chan\")\n- `filter=city%3D%3DChandler%3Bstate%3D%3DArizona` (combined city + state filter)\n- `filter=shipping_address_country_code%3D%3DUSA%3Bshipping_address_region%3D%3DArizona`\n- `filter=contact_id%3E5` (contact_id > 5)\n- `filter=ids%3D%3D1,2,3` (contacts with IDs 1, 2, or 3)\n\nCustom field examples (for custom fields with field_name `firstName1` and `Score0`):\n- `filter=firstName1%3D%3DJohn` (custom field exact match)\n- `filter=firstName1%3D%3DJo%2A` (custom field prefix wildcard)\n- `filter=Score0%3E100` (custom field numeric comparison)\n- `filter=given_name%3D%3DJohn%3BStatus0%3D%3DActive` (combined standard + custom field filter)\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.\nOne of the following fields:\n- `id`\n- `create_time`\n- `email`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of Contact properties to include in the response. (Available fields are: addresses,anniversary_date,birth_date,company,contact_type,create_time,\ncustom_fields,email_addresses,family_name,fax_numbers,given_name,id,job_title,leadsource_id,\nlinks,middle_name,notes,origin,owner_id,phone_numbers,preferred_locale,preferred_name,prefix,\nreferral_code,score_value,social_accounts,source_type,spouse_name,suffix,tag_ids,time_zone,\nupdate_time,utm_parameters,website,account_id,assistant_name,assistant_phone,\nbilling_information,created_by,groups,last_updated_by)","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/ListContactsResponse"}}}}}},"post":{"tags":["Contact"],"summary":"Create a Contact","description":"Creates a new Contact.\n*Note:* Contact must contain at least one item in `email_addresses`, `phone_numbers`, or `addresses` and `country_code` is required if `region` is specified.\nOptionally accepts a `duplicate_option` query parameter which performs duplicate checking by one of the following options: `Email`, `EmailAndName`, `EmailAndNameAndCompany`. If a match is found using the option provided, the existing contact will be updated. If an existing contact was not found using the `duplicate_option` provided, a new contact record will be created. When `duplicate_option` is not specified, a new contact is always created.","operationId":"createContact","parameters":[{"name":"duplicate_option","in":"query","description":"Duplicate check strategy. If provided, performs duplicate checking and updates the existing contact if a match is found.","required":false,"schema":{"type":"string","enum":["Email","EmailAndName","EmailAndNameAndCompany"]}},{"name":"fields","in":"query","description":"Comma-delimited list of Contact properties to include in the response. (Available fields are: addresses,anniversary_date,birth_date,company,contact_type,create_time,\ncustom_fields,email_addresses,family_name,fax_numbers,given_name,id,job_title,leadsource_id,\nlinks,middle_name,notes,origin,owner_id,phone_numbers,preferred_locale,preferred_name,prefix,\nreferral_code,score_value,social_accounts,source_type,spouse_name,suffix,tag_ids,time_zone,\nupdate_time,utm_parameters,website,account_id,assistant_name,assistant_phone,\nbilling_information,created_by,groups,last_updated_by)","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateContactRequest"}}},"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 - existing contact updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"201":{"description":"Created - new contact created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}}}}},"/rest/v2/contacts:unlink":{"post":{"tags":["Contact"],"summary":"Delete Link between two Contacts","description":"Deletes Link between two Contacts","operationId":"unlinkContacts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkContactsRequest"}}},"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"}}}},"204":{"description":"No Content"}}}},"/rest/v2/contacts:merge":{"post":{"tags":["Contact"],"summary":"Merge two Contacts","description":"Merges two Contacts together. The duplicate contact will be merged into the primary contact.","operationId":"mergeContacts","parameters":[{"name":"fields","in":"query","description":"Comma-delimited list of Contact properties to include in the response. (Available fields are: addresses,anniversary_date,birth_date,company,contact_type,create_time,\ncustom_fields,email_addresses,family_name,fax_numbers,given_name,id,job_title,leadsource_id,\nlinks,middle_name,notes,origin,owner_id,phone_numbers,preferred_locale,preferred_name,prefix,\nreferral_code,score_value,social_accounts,source_type,spouse_name,suffix,tag_ids,time_zone,\nupdate_time,utm_parameters,website,account_id,assistant_name,assistant_phone,\nbilling_information,created_by,groups,last_updated_by)","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeContactRequest"}}},"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/Contact"}}}}}}},"/rest/v2/contacts:link":{"post":{"tags":["Contact"],"summary":"Link Contacts","description":"Links two Contacts together using the provided Link type","operationId":"linkContacts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkContactsRequest"}}},"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/ContactLink"}}}}}}},"/rest/v2/contacts/{contact_id}/paymentMethods/{payment_method_id}:deactivate":{"post":{"tags":["Payment Methods"],"summary":"Deactivate a Contact Payment Method","description":"Deactivate the specified payment method","operationId":"deactivatePaymentMethod","parameters":[{"name":"contact_id","in":"path","description":"ID of the contact to which the payment method belongs.","required":true,"schema":{"type":"string"}},{"name":"payment_method_id","in":"path","description":"ID of the payment method to be deactivated.","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"}}}},"/rest/v2/contacts/{contact_id}/notes":{"get":{"tags":["Note"],"summary":"List Notes","description":"Retrieves a list of Notes for a given contact","operationId":"listNotes","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply. Allowed fields and operators:\n- (String) `id` — supports `==`, `!=`, `>`, `<`, `>=`, `<=`\n- (String list) `ids` — comma-separated note ids, supports `==` only (e.g. `ids==1,2,3`)\n- (String) `title` — supports `==`. Bare value matches anywhere in the title (contains).\n Wildcard prefix match also supported (e.g. `title==Follow*`)\n- (String) `contact_id`\n- (String) `assigned_to_user_id`\n- (String) `since_time` — ISO-8601 date/time\n- (String) `until_time` — ISO-8601 date/time\n\nOperators must be URL-encoded. Common encodings:\n`==` → `%3D%3D`, `!=` → `!%3D`, `>` → `%3E`, `<` → `%3C`,\n`>=` → `%3E%3D`, `<=` → `%3C%3D`, `*` → `%2A`.\n\nMultiple filters are combined with AND using `;`.\n\nExamples:\n- `filter=contact_id%3D%3D1001`\n- `filter=id%3E5`\n- `filter=ids%3D%3D1,2,3`\n- `filter=title%3D%3DFollow%2A`\n- `filter=since_time%3D%3D2025-04-16T20:33:02.321Z`\n- `filter=until_time%3D%3D2025-08-16T20:33:02.321Z`\n\nCustom fields (when enabled) can be filtered by their field name (case-insensitive).\nA standard field above takes precedence over a custom field with the same name.\nSupported operators depend on the custom field's type:\n- Text-like fields and single-value choice fields with text options (dropdown, radio, state): `==` only, with optional trailing wildcard (e.g. `Priority%3D%3DHigh%2A`)\n- Yes/No and drilldown fields: `==` only\n- Numeric fields (including user, month, day of week): `==`, `>`, `<`, `>=`, `<=`\n- Date fields: `==`, `>`, `<`, `>=`, `<=` using full ISO 8601\n- Multi-select fields: `==` matches records that contain the given option\nExample (for a custom field named `Priority`): `filter=Priority%3D%3DHigh`\n\nNotes:\n- `id` and `ids` cannot be combined in the same request.\n- Wildcard `*` may only appear at the end of the value (prefix match).\n Leading wildcards (`*foo`, `*foo*`) are rejected for performance reasons.\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.\nOne of the following fields:\n- `id`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of optional Note properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"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/ListNotesResponse"}}}}}},"post":{"tags":["Note"],"summary":"Create a Note","description":"Creates a new Note.","operationId":"createNote","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Note properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteRequest"}}},"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/Note"}}}}}}},"/rest/v2/contacts/model/customFields":{"post":{"tags":["Contact"],"summary":"Create a Contact Custom Field","description":"Creates a custom field of the specified type and options to the Contact object","operationId":"createContactCustomField","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/contacts/model/customFields/tabs":{"get":{"tags":["Contact"],"summary":"List Contact Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Contact record type.","operationId":"listContactCustomFieldTabs","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":["Contact"],"summary":"Create a Contact Custom Field Tab","description":"Creates a new custom field tab for the Contact record type.","operationId":"createContactCustomFieldTab","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/contacts/model/customFields/groups":{"get":{"tags":["Contact"],"summary":"List Contact Custom Field Groups","description":"Retrieves a list of custom field groups for the Contact record type. Optionally filter by tab_id to scope to a specific tab.","operationId":"listContactCustomFieldGroups","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":["Contact"],"summary":"Create a Contact Custom Field Group","description":"Creates a new custom field group for the Contact record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.","operationId":"createContactCustomFieldGroup","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/contacts/links/types":{"get":{"tags":["Contact"],"summary":"List Contact Link types","description":"Retrieves a list of Contact Link types.","operationId":"listContactLinkTypes","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=name%3D%3DexpectedValue`\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.\nOne of the following fields:\n- `name`\n- `max_links`\n- `create_time`\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListContactLinkTypesResponse"}}}}}},"post":{"tags":["Contact"],"summary":"Create a Contact Link type","description":"Creates a new type of Contact Link","operationId":"createContactLinkType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactLinkTypeRequest"}}},"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/ContactLinkType"}}}}}}},"/rest/v2/companies":{"get":{"tags":["Company"],"summary":"List Companies","description":"Retrieves a list of all Companies.
","operationId":"listCompanies","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `company_name` - exact match on company name (equality only)\n- (String) `name` - company name with support for a wildcard at the end (e.g. `smith*`)\n- (String) `email` - exact match on email\n- (String) `city` - company city (Contact.City) with support for a prefix wildcard at the end (e.g. `Chan*`)\n- (String) `state` - company state/region (Contact.State) with support for a prefix wildcard at the end (e.g. `Ar*`)\n- (String) `since_time` - companies updated on or after this time\n- (String) `until_time` - companies updated on or before this time\n- (Number) `company_id` - supports comparison operators: `==`, `>`, `<`, `>=`, `<=`\n\nFor equality filters, use the `==` operator in encoded form `%3D%3D`:\n- `filter=company_name%3D%3DCompany`\n- `filter=email%3D%3Dtest@gmail.com`\n- `filter=city%3D%3DChandler`\n- `filter=since_time%3D%3D2025-04-16T20:33:02.321Z`\n- `filter=until_time%3D%3D2025-08-16T20:33:02.321Z`\n\nFor wildcard name/city/state search (prefix only, case-insensitive):\n- `filter=name%3D%3DAcme%2A` (starts with \"Acme\")\n- `filter=city%3D%3DChan%2A` (city starts with \"Chan\")\n- `filter=city%3D%3DChandler%3Bstate%3D%3DArizona` (combined city + state filter)\n\nFor company_id comparison:\n- `filter=company_id%3E5` (company_id > 5)\n- `filter=company_id%3E%3D10` (company_id >= 10)\n\nCustom fields can be filtered by their field name (case-insensitive). A standard\nfield above takes precedence over a custom field with the same name. The supported\noperators 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. `Industry%3D%3DTech%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 `since_time`/`until_time`)\n- Multi-select fields: `==` matches records that contain the given option\nExamples (for a custom field named `Height`):\n- `filter=Height%3D%3DTall`\n- `filter=Height%3E100`\nCustom field filtering on non-indexed fields is supported but may be slower.\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.\nOne of the following fields:\n- `id`\n- `create_time`\n- `name`\n- `email`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of Company properties to include in the response. (Fields such as `notes`, `fax_number`, `address`, `email_address`, `phone_number`, `update_time`, `create_time` and `custom_fields` aren't included, by default.)","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/ListCompaniesResponse"}}}}}},"post":{"tags":["Company"],"summary":"Create a Company","description":"Creates a new Company.`country_code` is required if `region` is specified.","operationId":"createCompany","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyRequest"}}},"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/Company"}}}}}}},"/rest/v2/companies/{company_id}/tags/{tag_id}":{"post":{"tags":["Company"],"summary":"Add Tag to Company","description":"Applies a Tag to a Company.","operationId":"addTagToCompany","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_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"}}},"delete":{"tags":["Company"],"summary":"Remove Tag","description":"Remove a Tag from a Company.","operationId":"removeTagFromCompany","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_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"}}}},"/rest/v2/companies/model/customFields":{"post":{"tags":["Company"],"summary":"Create a Company Custom Field","description":"Creates a custom field of the specified type and options to the Company object","operationId":"createCompanyCustomField","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/companies/model/customFields/tabs":{"get":{"tags":["Company"],"summary":"List Company Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Company record type.","operationId":"listCompanyCustomFieldTabs","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":["Company"],"summary":"Create a Company Custom Field Tab","description":"Creates a new custom field tab for the Company record type.","operationId":"createCompanyCustomFieldTab","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/companies/model/customFields/groups":{"get":{"tags":["Company"],"summary":"List Company Custom Field Groups","description":"Retrieves a list of custom field groups for the Company record type. Optionally filter by tab_id to scope to a specific tab.","operationId":"listCompanyCustomFieldGroups","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":["Company"],"summary":"Create a Company Custom Field Group","description":"Creates a new custom field group for the Company record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.","operationId":"createCompanyCustomFieldGroup","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/campaigns/{campaign_id}/sequences/{sequence_id}:removeContacts":{"post":{"tags":["Campaign"],"summary":"Remove Contacts from Campaign Sequence","description":"Removes a list of contacts from a campaign sequence\nResponse contains a map of the provided list of Contact Ids related to their individual result.","operationId":"removeContactsFromCampaignSequence","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveContactsFromSequenceRequest"}}},"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/RemoveContactsFromSequenceResponse"}}}}}}},"/rest/v2/campaigns/{campaign_id}/sequences/{sequence_id}:addContacts":{"post":{"tags":["Campaign"],"summary":"Add Contacts to Campaign Sequence","description":"Adds a list of contacts to a campaign sequence\nResponse contains a map of the provided list of Contact Ids related to their individual result.","operationId":"addContactsToCampaignSequence","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactsToSequenceRequest"}}},"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/AddContactsToSequenceResponse"}}}}}}},"/rest/v2/automations/{automation_id}/sequences/{sequence_id}:addContacts":{"post":{"tags":["Automation"],"summary":"Add Contacts to an Automation Sequence","description":"Adds a list of contacts to an automation sequence\nResponse contains a map of the provided list of Contact Ids and their individual result.","operationId":"addContactsToAutomationSequence","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddToAutomationSequenceRequest"}}},"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/AddToAutomationSequenceResponse"}}}}}}},"/rest/v2/automations/goals/achieve":{"post":{"tags":["Automation"],"summary":"Achieve an Automation Goal","description":"Achieves a goal in an automation for a contact","operationId":"achieveGoal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchieveGoalRequest"}}},"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/AchieveGoalResponse"}}}}}}},"/rest/v2/automations/categories/batchAssign":{"post":{"tags":["Automation"],"summary":"Bulk update for Automations Categories","description":"Bulk updates the categories of one or more automations","operationId":"bulkAssignmentAutomationsCategories","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAutomationCategoryRequest"}}},"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/automations/batch-unpublish":{"post":{"tags":["Automation"],"summary":"Bulk unpublish Automations","description":"Bulk unpublish one or more automations","operationId":"bulkUnpublishAutomations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUnpublishAutomationRequest"}}},"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/automationCategory":{"get":{"tags":["AutomationCategory"],"summary":"List automation categories","description":"Retrieves a list of automation categories","operationId":"listCategories","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/ListAutomationCategoryResponse"}}}}}},"post":{"tags":["AutomationCategory"],"summary":"Create automation category","description":"Creates a single automation category","operationId":"createCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationCategoryRequest"}}},"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/AutomationCategory"}}}}}},"delete":{"tags":["AutomationCategory"],"summary":"Delete automation category","description":"Deletes one or more automation categories based on the request parameters","operationId":"deleteCategories","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"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"}}}},"/rest/v2/affiliates":{"get":{"tags":["Affiliate"],"summary":"List Affiliates","description":"Retrieves a list of Affiliates","operationId":"listAffiliate","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `id` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\"\n- (String) `name` - Wildcard matching allowed\n- (String) `contact_id`\n- (String) `referral_contact_id`\n- (String) `status`\n- (String) `code`\n- (Custom) Custom field names - Reference by field name (e.g., `tier`, `region`)\n\nYou will need to apply the `==` operator to check the equality of one of the filters with the\nvalue you want to match, in the encoded form `%3D%3D`. For the filters listed above,\nhere are some examples:\n- `filter=id%3C123`\n- `filter=id%3D%3D123`\n- `filter=name%3D%3DBob`\n- `filter=contact_id%3D%3D567`\n- `filter=contact_id%3D%3D123%3Bcode%3D%3D567`\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\nCustom Field Filtering:\nCustom fields are referenced by their field name as configured in the system.\nStandard field names take precedence over custom field names.\n\nSupported operators by field type:\n- Text fields and single-value choice fields with text options (dropdown, radio, state): ==, and wildcard support (e.g., `value*`)\n- Numeric fields (including user, month, day of week): ==, <, <=, >, >=\n- Date fields: ==, <, <=, >, >= (ISO 8601 format)\n- Yes/No and drilldown fields: ==\n- Multi-select fields: == (matches if value is present)\n\nExamples of custom field filtering:\n- `filter=tier%3D%3DPlatinum` - Text field exact match\n- `filter=region%3D%3DWest%2A` - Text field with wildcard (starts with \"West\")\n- `filter=revenue%3E100000` - Numeric field greater than 100000\n- `filter=join_date%3E%3D2024-01-01` - Date field on or after Jan 1, 2024\n- `filter=name%3D%3DBob%3Btier%3D%3DGold` - Combine standard and custom fields\n\nNote: Leading wildcards (e.g., `*value`) are not supported for performance reasons.\nOnly prefix wildcards (e.g., `value*`) are allowed.\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.\nOne of the following fields:\n- `id`\n- `date_created`\n- `name`\n- `status`\n- `code`\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListAffiliatesResponse"}}}}}},"post":{"tags":["Affiliate"],"summary":"Create an Affiliate","description":"Creates a single Affiliate","operationId":"addAffiliate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAffiliateRequest"}}},"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/RestAffiliate"}}}}}}},"/rest/v2/affiliates/{id}:removeFromProgram":{"post":{"tags":["Affiliate"],"summary":"Remove an Affiliate from a Commission Program","description":"Removes an Affiliate from a Commission Program","operationId":"removeAffiliateFromProgram","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateRemoveFromProgramRequest"}}},"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/affiliates/{id}:assignToProgram":{"post":{"tags":["Affiliate"],"summary":"Assign Affiliate to Commission program","description":"Assigns an Affiliate to Commission Program","operationId":"addAffiliateToProgram","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateAddToProgramRequest"}}},"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/affiliates/redirects":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Links","description":"Retrieves a list of Affiliate Links","operationId":"listAffiliateLinks","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `affiliate_id`\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.\nOne of the following fields:\n- `name`\n- `date_created`\n\nOne of the following directions:\n- `asc`\n- `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/ListAffiliateLinksResponse"}}}}}},"post":{"tags":["Affiliate"],"summary":"Create an Affiliate Link","description":"Creates a single Affiliate Link","operationId":"createRedirectLink","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrUpdateAffiliateLinkRequest"}}},"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/AffiliateLink"}}}}}}},"/rest/v2/affiliates/model/customFields":{"post":{"tags":["Affiliate"],"summary":"Create an Affiliate Custom Field","description":"Creates a single Affiliate Custom Field","operationId":"createAffiliateCustomField","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/affiliates/model/customFields/tabs":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Custom Field Tabs","description":"Retrieves a list of custom field tabs for the Affiliate record type.","operationId":"listAffiliateCustomFieldTabs","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":["Affiliate"],"summary":"Create an Affiliate Custom Field Tab","description":"Creates a new custom field tab for the Affiliate record type.","operationId":"createAffiliateCustomFieldTab","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/affiliates/model/customFields/groups":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Custom Field Groups","description":"Retrieves a list of custom field groups for the Affiliate record type. Optionally filter by tab_id to scope to a specific tab.","operationId":"listAffiliateCustomFieldGroups","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":["Affiliate"],"summary":"Create an Affiliate Custom Field Group","description":"Creates a new custom field group for the Affiliate record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.","operationId":"createAffiliateCustomFieldGroup","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/affiliates/commissionPrograms":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Commission Programs","description":"Retrieves a list of Affiliate Commission Programs","operationId":"listAffiliateCommissionPrograms","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `affiliate_id`\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.\nOne of the following fields:\n- `name`\n- `date_created`\n\nOne of the following directions:\n- `asc`\n- `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/ListAffiliateCommissionProgramsResponse"}}}}}},"post":{"tags":["Affiliate"],"summary":"Create an Affiliate Commission Program","description":"Creates an Affiliate Commission Program","operationId":"addCommissionProgram","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommissionProgramRequest"}}},"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/AffiliateCommissionProgramResponse"}}}}}}},"/rest/v2/affiliates/commissionPrograms/{commission_id}:removeSubscriptionCommission":{"post":{"tags":["Affiliate"],"summary":"Remove a Subscription from a Commission Program","description":"Removes a Subscription from a Commission Program","operationId":"removeSubscriptionPlanCommissionFromCommissions","parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriptionPlanCommissionRequest"}}},"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/affiliates/commissionPrograms/{commission_id}:removeProductCommission":{"post":{"tags":["Affiliate"],"summary":"Remove a Product from a Commission Program","description":"Removes a Product from a Commission Program","operationId":"removeProductCommissionFromCommissions","parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProgramCommissionRequest"}}},"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/affiliates/commissionPrograms/subscriptionCommissionPrograms/{commission_program_id}":{"post":{"tags":["Affiliate"],"summary":"Assign a Subscription Commission Program","description":"Assigns a Subscription Commission Program to a Subscription","operationId":"assignSubscriptionCommissionProgram","parameters":[{"name":"commission_program_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}},"patch":{"tags":["Affiliate"],"summary":"Update a Subscription Commission Program","description":"Updates a Subscription Commission Program","operationId":"updateSubscriptionCommissionProgram","parameters":[{"name":"commission_program_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":["percentage","dollar_amount","payout_type","level_1","level_2","unused"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}}},"/rest/v2/affiliates/commissionPrograms/resources":{"post":{"tags":["Affiliate"],"summary":"Create Commission Program Resource","description":"Creates a resource for a commission program","operationId":"addCommissionProgramResource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProgramResourceRequest"}}},"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/AffiliateProgramResource"}}}}}}},"/rest/v2/affiliates/commissionPrograms/productCommissionPrograms/{commission_program_id}":{"post":{"tags":["Affiliate"],"summary":"Assign a Product Commission Program","description":"Assigns a Product Commission Program to a Product","operationId":"assignProductCommissionProgram","parameters":[{"name":"commission_program_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}},"patch":{"tags":["Affiliate"],"summary":"Update a Product Commission Program","description":"Updates a Product Commission Program","operationId":"updateProductCommissionProgram","parameters":[{"name":"commission_program_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":["percentage","dollar_amount","payout_type","level_1","level_2","unused"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}}},"/rest/v2/affiliates/commissionPrograms/defaultCommissionPrograms/{commission_program_id}":{"post":{"tags":["Affiliate"],"summary":"Create a Default Commission Program","description":"Creates a Default Commission Program","operationId":"createDefaultCommissionProgram","parameters":[{"name":"commission_program_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDefaultCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}},"patch":{"tags":["Affiliate"],"summary":"Update a Default Commission Program","description":"Updates a Default Commission Program","operationId":"updateDefaultCommissionProgram","parameters":[{"name":"commission_program_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":["percentage","dollar_amount","payout_type","level_1","level_2","unused"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultCommissionProgramRequest"}}},"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/GetRestCommissionProgram"}}}}}}},"/rest/v2/users/{user_id}":{"get":{"tags":["Users"],"summary":"Get User","description":"Retrieves a specific User","operationId":"getUserById","parameters":[{"name":"user_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/User"}}}}}},"patch":{"tags":["Users"],"summary":"Update User","description":"Updates information on a specific User","operationId":"updateUser","parameters":[{"name":"user_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":["address","company_name","email_address","family_name","fax_numbers","given_name","job_title","phone_numbers","time_zone","website"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"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/User"}}}}}}},"/rest/v2/tasks/{task_id}":{"get":{"tags":["Task"],"summary":"Retrieve a Task","description":"Retrieves a single task","operationId":"getTask","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Task properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"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/Task"}}}}}},"delete":{"tags":["Task"],"summary":"Delete a Task","description":"Deletes a single task","operationId":"deleteTask","parameters":[{"name":"task_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":["Task"],"summary":"Update a Task","description":"Updates a task with only the values provided in the request.","operationId":"updateTask","parameters":[{"name":"task_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":["id","title","description","type","priority","completion_time","due_time","remind_time_mins","assigned_to_user_id","last_updated_by_user_id","contact_id","opportunity_id","accepted","completed","custom_fields"]},"uniqueItems":true}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Task properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateTaskRequest"}}},"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/UpdateTaskResponse"}}}}}}},"/rest/v2/tasks/model/customFields/{custom_field_id}":{"delete":{"tags":["Task"],"summary":"Delete a Custom Field","description":"Deletes a Custom Field from the Task object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteTaskCustomField","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":["Task"],"summary":"Update a Task's Custom Field","description":"Updates a custom field of the specified type and options to the Task object.
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"updateTaskCustomField","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/tasks/model/customFields/tabs/{tab_id}":{"get":{"tags":["Task"],"summary":"Retrieve a Task Custom Field Tab","description":"Retrieves a single custom field tab by id for the Task record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"getTaskCustomFieldTab","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":["Task"],"summary":"Delete a Task Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteTaskCustomFieldTab","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":["Task"],"summary":"Update a Task Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"updateTaskCustomFieldTab","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/tasks/model/customFields/groups/{group_id}":{"get":{"tags":["Task"],"summary":"Retrieve a Task Custom Field Group","description":"Retrieves a single custom field group by id for the Task record type.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"getTaskCustomFieldGroup","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":["Task"],"summary":"Delete a Task Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteTaskCustomFieldGroup","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":["Task"],"summary":"Update a Task Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"updateTaskCustomFieldGroup","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/tags/{tag_id}":{"get":{"tags":["Tags"],"summary":"Retrieve a Tag","description":"Retrieves information about the specified Tag","operationId":"getTag","parameters":[{"name":"tag_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/Tag"}}}}}},"delete":{"tags":["Tags"],"summary":"Delete Tag","description":"Deletes a Tag.","operationId":"deleteTag","parameters":[{"name":"tag_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":["Tags"],"summary":"Update a Tag","description":"Updates a Tag with only the values provided in the request","operationId":"updateTag","parameters":[{"name":"tag_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":["name","description","category"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateTagRequest"}}},"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/UpdateTagResponse"}}}}}}},"/rest/v2/tags/categories/{tag_category_id}":{"get":{"tags":["Tags"],"summary":"Retrieve a Tag Category","description":"Returns information about the specified Tag Category","operationId":"getCategory","parameters":[{"name":"tag_category_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/GetTagCategoryResponse"}}}}}},"delete":{"tags":["Tags"],"summary":"Delete Tag Category","description":"Deletes the specified Tag Category","operationId":"deleteTagCategory","parameters":[{"name":"tag_category_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":["Tags"],"summary":"Update a Tag Category","description":"Updates a Tag Category with only the values provided in the request","operationId":"updateTagCategory","parameters":[{"name":"tag_category_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":["name","description"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateTagCategoryRequest"}}},"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/UpdateTagCategoryResponse"}}}}}}},"/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/products/{product_id}":{"get":{"tags":["Products"],"summary":"Get a Product","description":"Gets a single Product","operationId":"getProduct","parameters":[{"name":"product_id","in":"path","description":"product_id","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/RestV2Product_Detail"}}}}}},"delete":{"tags":["Products"],"summary":"Delete a Product","description":"Deletes a single product","operationId":"deleteProduct","parameters":[{"name":"product_id","in":"path","description":"product_id","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":["Products"],"summary":"Update a Product","description":"Updates a product","operationId":"updateProduct","parameters":[{"name":"product_id","in":"path","description":"product_id","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":["active","name","description","price","sku","shippable","short_description","subscription_only","storefront_hidden","weight","taxable","country_taxable","city_taxable","state_taxable","inventory_limit","out_of_stock_enabled","email_for_inventory_notifications","top_html","bottom_html","is_package","needs_digital_delivery","delivery_description"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest_Detail"}}},"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/RestV2Product_Detail"}}}}}}},"/rest/v2/products/{product_id}/subscriptions/{subscription_plan_id}":{"get":{"tags":["Subscription Plans"],"summary":"Get Subscription Plan","description":"Retrieves a Subscription Plan","operationId":"fetchSubscriptionPlan","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"subscription_plan_id","in":"path","description":"subscription_plan_id","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/SubscriptionPlan"}}}}}},"delete":{"tags":["Subscription Plans"],"summary":"Delete Subscription Plan","description":"Deletes a Subscription Plan","operationId":"deleteSubscriptionPlan","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"subscription_plan_id","in":"path","description":"subscription_plan_id","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":["Subscription Plans"],"summary":"Update Subscription Plan","description":"Updates a Subscription Plan","operationId":"updateSubscriptionPlan","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"subscription_plan_id","in":"path","description":"subscription_plan_id","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":["active","allow_prorating","cycle_type","display_order_index","frequency","plan_price","total_cycles"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPlanRequest"}}},"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/SubscriptionPlan"}}}}}}},"/rest/v2/products/{product_id}/options/{product_option_id}":{"get":{"tags":["Products"],"summary":"Get Product Option","description":"Retrieves a Product Option","operationId":"getProductOption","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","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/ProductOption"}}}}}},"delete":{"tags":["Products"],"summary":"Delete a Product Option","description":"Deletes a single product option","operationId":"deleteProductOption","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","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":["Products"],"summary":"Updates a Product Option","description":"Updates a product option","operationId":"updateProductOption","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","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":["option_label","display_order","required","minimum_characters","maximum_characters","allow_spaces","only_starts_with","only_ends_with","only_contains","error_message"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductOptionRequest"}}},"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/ProductOption"}}}}}}},"/rest/v2/products/{product_id}/options/{product_option_id}/listItems/{item_id}":{"delete":{"tags":["Products"],"summary":"Delete a Product Option List Item","description":"Deletes a single option value in a Product Option of type LIST","operationId":"deleteProductOptionListOptionValue","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","description":"item_id","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":["Products"],"summary":"Updates a Product Option List Option Value","description":"Updates a single product option value","operationId":"updateProductOptionListOptionValue","parameters":[{"name":"product_id","in":"path","description":"product_id","required":true,"schema":{"type":"string"}},{"name":"product_option_id","in":"path","description":"product_option_id","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","description":"item_id","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":["item_label","item_code","item_display_order","price_adjustment"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductOptionListOption"}}},"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/ProductOption"}}}}}}},"/rest/v2/productInterestBundles/{id}":{"get":{"tags":["Product Interest Bundles"],"summary":"Get a Product Interest Bundle","description":"Gets a single Product Interest Bundle.","operationId":"getProductInterestBundle","parameters":[{"name":"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/ProductInterestBundle"}}}}}},"delete":{"tags":["Product Interest Bundles"],"summary":"Delete a Product Interest Bundle","description":"Deletes an existing Product Interest Bundle.","operationId":"deleteProductInterestBundle","parameters":[{"name":"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":["Product Interest Bundles"],"summary":"Update a Product Interest Bundle","description":"Updates an existing Product Interest Bundle.","operationId":"updateProductInterestBundle","parameters":[{"name":"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":["name","description"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductInterestBundleRequest"}}},"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/ProductInterestBundle"}}}}}}},"/rest/v2/productInterestBundles/{id}/interests/{interest_id}":{"delete":{"tags":["Product Interest Bundles"],"summary":"Delete a Product Interest from an existing Bundle","description":"Deletes an existing Product Interest from an existing Bundle.","operationId":"removeProductInterest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"interest_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":["Product Interest Bundles"],"summary":"Update a Product Interest in an existing Bundle","description":"Updates an existing Product Interest in an existing Bundle.","operationId":"updateProductInterest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"interest_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":["quantity","price","discount_percent"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductInterestRequest"}}},"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/ProductInterest"}}}}}}},"/rest/v2/productCategories/{category_id}":{"get":{"tags":["Product Categories"],"summary":"Get a Product Category","description":"Gets a single Product Category","operationId":"getProductCategory","parameters":[{"name":"category_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/ProductCategory"}}}}}},"delete":{"tags":["Product Categories"],"summary":"Delete a Product Category","description":"Deletes the specified Product Category, its sub-categories, and removes products from it","operationId":"deleteProductCategory","parameters":[{"name":"category_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":["Product Categories"],"summary":"Update a Product Category","description":"Updates a single Product Category","operationId":"updateProductCategory","parameters":[{"name":"category_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":["name","display_order_index","parent_category_id"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductCategoryRequest"}}},"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/ProductCategory"}}}}}}},"/rest/v2/orders/{order_id}":{"get":{"tags":["Orders"],"summary":"Retrieve an Order","description":"Retrieves a single Order for a given order id","operationId":"getOrder","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"}}}}}},"delete":{"tags":["Orders"],"summary":"Delete an Order","description":"Deletes an Order
\nNote: The Order must not have any transactions recorded to be available for deletion.\n","operationId":"deleteOrder","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"}}}},"204":{"description":"No Content"}}},"patch":{"tags":["Orders"],"summary":"Update an Order","description":"Updates an Order","operationId":"updateOrder","parameters":[{"name":"order_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","order_items","order_title","order_time","order_type","promo_codes","lead_affiliate_id","sales_affiliate_id","shipping_address","notes","terms","payment_plan","custom_fields","sent_time","title","due_time","invoice_number","external_create_user","external_create_time","external_update_time"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderRequest"}}},"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}/items/{order_item_id}":{"get":{"tags":["Orders"],"summary":"Retrieve an Order Item","description":"Retrieves a single order item from an existing order","operationId":"getOrderItem","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"order_item_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/OrderItem"}}}}}},"delete":{"tags":["Orders"],"summary":"Delete an Order Item","description":"Deletes an order item on an existing order","operationId":"deleteOrderItem","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"order_item_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":["Orders"],"summary":"Update an Order Item","description":"Updates an Order Item","operationId":"updateOrderItem","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"order_item_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":["name","description","notes","quantity","price_per_unit","cost_per_unit","product_id","subscription_plan_id","subscription_plan_description"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderItemRequest"}}},"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/{custom_field_id}":{"delete":{"tags":["Orders"],"summary":"Delete an Order Custom Field","description":"Deletes a Custom Field from the Order object","operationId":"deleteOrderCustomField","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":["Orders"],"summary":"Update an Order Custom Field","description":"Updates a custom field of the specified type and options to the Order object","operationId":"updateOrderCustomField","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/orders/model/customFields/tabs/{tab_id}":{"get":{"tags":["Orders"],"summary":"Retrieve an Order Custom Field Tab","description":"Retrieves a single custom field tab by id for the Order record type.","operationId":"getOrderCustomFieldTab","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":["Orders"],"summary":"Delete an Order Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.","operationId":"deleteOrderCustomFieldTab","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":["Orders"],"summary":"Update an Order Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.","operationId":"updateOrderCustomFieldTab","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/orders/model/customFields/groups/{group_id}":{"get":{"tags":["Orders"],"summary":"Retrieve an Order Custom Field Group","description":"Retrieves a single custom field group by id for the Order record type.","operationId":"getOrderCustomFieldGroup","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":["Orders"],"summary":"Delete an Order Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.","operationId":"deleteOrderCustomFieldGroup","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":["Orders"],"summary":"Update an Order Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.","operationId":"updateOrderCustomFieldGroup","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/opportunities/{opportunity_id}":{"get":{"tags":["Opportunity"],"summary":"Retrieve a Opportunity","description":"Retrieves the specified Opportunity","operationId":"getOpportunity","parameters":[{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time","required":false,"schema":{"type":"array","items":{"type":"string","enum":["custom_fields","created_by","last_updated_by","status_id","monthly_revenue","order_revenue","objection","status","stage_entrance_time"]},"uniqueItems":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/RestV2Opportunity"}}}}}},"delete":{"tags":["Opportunity"],"summary":"Delete an Opportunity","description":"Deletes the specified Opportunity","operationId":"deleteOpportunity","parameters":[{"name":"opportunity_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":["Opportunity"],"summary":"Update an opportunity","description":"Updates specified values of a given opportunity","operationId":"updateOpportunity","parameters":[{"name":"opportunity_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":["opportunity_title","next_action_time","next_action_notes","opportunity_notes","estimated_close_time","include_in_forecast","projected_revenue_low","projected_revenue_high","contact_id","stage_id","user_id","custom_fields","affiliate_id"]},"uniqueItems":true}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time","required":false,"schema":{"type":"array","items":{"type":"string","enum":["custom_fields","created_by","last_updated_by","status_id","monthly_revenue","order_revenue","objection","status","stage_entrance_time"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOpportunityRequestV2"}}},"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/RestV2Opportunity"}}}}}}},"/rest/v2/opportunities/stages/{stage_id}":{"get":{"tags":["Opportunity"],"summary":"Retrieve an Opportunity Stage","description":"Retrieves the specified Opportunity Stage","operationId":"getOpportunityStage","parameters":[{"name":"stage_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/RestOpportunityStage"}}}}}},"delete":{"tags":["Opportunity"],"summary":"Delete an Opportunity Stage","description":"Deletes the specified Opportunity Stage","operationId":"deleteOpportunityStage","parameters":[{"name":"stage_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":["Opportunity"],"summary":"Update an Opportunity Stage","description":"Updates specified values of a given Opportunity Stage","operationId":"updateOpportunityStage","parameters":[{"name":"stage_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":["name","order","target_number_days","probability","checklist_items"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOpportunityStageRequest"}}},"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/RestOpportunityStage"}}}}}}},"/rest/v2/opportunities/model/customFields/{custom_field_id}":{"delete":{"tags":["Opportunity"],"summary":"Delete an Opportunity Custom Field","description":"Deletes a Custom Field from Opportunity.","operationId":"deleteOpportunitiesCustomField","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":["Opportunity"],"summary":"Update a Opportunity's Custom Field","description":"Updates a custom field of the specified type and options to the Opportunity object.","operationId":"updateOpportunityCustomField","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/opportunities/model/customFields/tabs/{tab_id}":{"get":{"tags":["Opportunity"],"summary":"Retrieve an Opportunity Custom Field Tab","description":"Retrieves a single custom field tab by id for the Opportunity record type.","operationId":"getOpportunityCustomFieldTab","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":["Opportunity"],"summary":"Delete an Opportunity Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.","operationId":"deleteOpportunityCustomFieldTab","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":["Opportunity"],"summary":"Update an Opportunity Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.","operationId":"updateOpportunityCustomFieldTab","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/opportunities/model/customFields/groups/{group_id}":{"get":{"tags":["Opportunity"],"summary":"Retrieve an Opportunity Custom Field Group","description":"Retrieves a single custom field group by id for the Opportunity record type.","operationId":"getOpportunityCustomFieldGroup","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":["Opportunity"],"summary":"Delete an Opportunity Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.","operationId":"deleteOpportunityCustomFieldGroup","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":["Opportunity"],"summary":"Update an Opportunity Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.","operationId":"updateOpportunityCustomFieldGroup","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/notes/model/customFields/{custom_field_id}":{"delete":{"tags":["Note"],"summary":"Delete a Note Custom Field","description":"Deletes a Custom Field from the Note object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteNotesCustomField","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":["Note"],"summary":"Update a Custom Field","description":"Updates a custom field of the specified type and options to the Note object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"updateNotesCustomField","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/notes/model/customFields/tabs/{tab_id}":{"get":{"tags":["Note"],"summary":"Retrieve a Note Custom Field Tab","description":"Retrieves a single custom field tab by id for the Note record type.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"getNoteCustomFieldTab","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":["Note"],"summary":"Delete a Note Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteNoteCustomFieldTab","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":["Note"],"summary":"Update a Note Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.
Note: Custom Field Tabs for Tasks, Classic Appointments and Notes are combined.","operationId":"updateNoteCustomFieldTab","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/notes/model/customFields/groups/{group_id}":{"get":{"tags":["Note"],"summary":"Retrieve a Note Custom Field Group","description":"Retrieves a single custom field group by id for the Note record type.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"getNoteCustomFieldGroup","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":["Note"],"summary":"Delete a Note Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"deleteNoteCustomFieldGroup","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":["Note"],"summary":"Update a Note Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.
Note: Custom Field Groups for Tasks, Classic Appointments and Notes are combined.","operationId":"updateNoteCustomFieldGroup","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/leadSources/{lead_source_id}":{"get":{"tags":["Lead Sources"],"summary":"Retrieve a Lead Source","description":"Retrieves a Lead Source by ID","operationId":"getLeadSource","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of a lead source","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/LeadSource"}}}}}},"delete":{"tags":["Lead Sources"],"summary":"Delete a Lead Source","description":"Deletes a Lead Source by ID","operationId":"deleteLeadSource","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of a lead source","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":["Lead Sources"],"summary":"Update a Lead Source","description":"Updates a Lead Source with only the values provided in the request","operationId":"updateLeadSource","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of a lead source","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":["name","description","vendor","medium","message","start_time","end_time","status","lead_source_category_id"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadSourceRequest"}}},"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/LeadSource"}}}}}}},"/rest/v2/leadSources/{lead_source_id}/recurringExpenses/{lead_source_recurring_expense_id}":{"get":{"tags":["Lead Source Recurring Expenses"],"summary":"Retrieve a Lead Source Recurring Expense","description":"Retrieves a Lead Source Recurring Expense using leadSourceId and leadSourceRecurringExpenseId","operationId":"getLeadSourceRecurringExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_recurring_expense_id","in":"path","description":"The ID of a lead source recurring expense","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/LeadSourceRecurringExpense"}}}}}},"delete":{"tags":["Lead Source Recurring Expenses"],"summary":"Delete a Lead Source Recurring Expense","description":"Deletes a new Lead Source Recurring Expense that belongs to a Lead Source","operationId":"deleteLeadSourceRecurringExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_recurring_expense_id","in":"path","description":"The ID of a lead source recurring expense","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":["Lead Source Recurring Expenses"],"summary":"Update a Lead Source Recurring Expense","description":"Updates a Lead Source Recurring Expense","operationId":"updateLeadSourceRecurringExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_recurring_expense_id","in":"path","description":"The ID of a lead source recurring expense","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":["title","notes","amount","start_time","end_time"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSourceRecurringExpenseUpdateRequest"}}},"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/LeadSourceRecurringExpense"}}}}}}},"/rest/v2/leadSources/{lead_source_id}/expenses/{lead_source_expense_id}":{"get":{"tags":["Lead Source Expenses"],"summary":"Retrieve a Lead Source Expense","description":"Retrieves a single Lead Source Expense for a given ID","operationId":"getLeadSourceExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_expense_id","in":"path","description":"The ID of a lead source expense","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/LeadSourceExpense"}}}}}},"delete":{"tags":["Lead Source Expenses"],"summary":"Delete a lead source expense","description":"Deletes a lead source expense by ID","operationId":"deleteLeadSourceExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_expense_id","in":"path","description":"The ID of a lead source expense","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":["Lead Source Expenses"],"summary":"Update a Lead Source Expense","description":"Updates a new Lead Source Expense","operationId":"updateLeadSourceExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_expense_id","in":"path","description":"The ID of a lead source expense","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":["title","notes","amount","incurred_time"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadSourceExpenseRequest"}}},"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/LeadSourceExpense"}}}}}}},"/rest/v2/leadSourceCategories/{lead_source_category_id}":{"get":{"tags":["Lead Source Categories"],"summary":"Retrieve a Lead Source Category","description":"Retrieves a single Lead Source Category for a given ID","operationId":"getLeadSourceCategory","parameters":[{"name":"lead_source_category_id","in":"path","description":"The ID of a lead source category","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/LeadSourceCategory"}}}}}},"delete":{"tags":["Lead Source Categories"],"summary":"Delete a Lead Source Category","description":"Deletes the specified Lead Source Category","operationId":"deleteLeadSourceCategory","parameters":[{"name":"lead_source_category_id","in":"path","description":"The ID of a lead source category","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":["Lead Source Categories"],"summary":"Update a Lead Source Category","description":"Updates a Lead Source Category","operationId":"updateLeadSourceCategory","parameters":[{"name":"lead_source_category_id","in":"path","description":"The ID of a lead source category","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":["name","description"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateLeadSourceCategoryRequest"}}},"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/LeadSourceCategory"}}}}}}},"/rest/v2/emailAddresses/{email}/status":{"get":{"tags":["Email Address"],"summary":"Retrieve an Email Address status","description":"Retrieves the opt-in status for a given Email Address","operationId":"getEmailAddressStatus","parameters":[{"name":"email","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/RestEmailAddressStatus"}}}}}},"patch":{"tags":["Email Address"],"summary":"Update an Email Address opt-in status","description":"Updates an Email Address opt-in status\n\nYou may opt-in or mark an email address as _Marketable_ by including the following field in the request JSON\nwith an opt-in reason. (This field is also shown in the complete request body sample.)\nThe reason you provide here will help with compliance.\nExample reasons: \"Customer opted-in through webform\", \"Company gave explicit permission.\"\n\n```json\n\"opt_in_reason\": \"your reason for opt-in\"\n```\nNote that the email address status will only be updated to `Unconfirmed` (marketable) for email addresses\nthat are currently in the following states:\n- `Unengaged Marketable`\n- `Unengaged Non-Marketable`\n- `Non-Marketable`\n- `Opt-Out: Manual`\n\nAll other existing statuses e.g. `List Unsubscribe`, `Opt-Out`, `System` etc will remain non-marketable and in their existing state.","operationId":"updateEmailAddressOptStatus","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailAddress"}}},"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/RestEmailAddressStatus"}}}}}}},"/rest/v2/easy-automations/{automation_id}":{"patch":{"tags":["Automation"],"summary":"Renames an Easy Automation.","description":"Updates the name of a single easy automation.","operationId":"renameAutomationV2","parameters":[{"name":"automation_id","in":"path","description":"automation_id","required":true,"schema":{"type":"string"},"example":"HWv0fbDNDbWg6cFKY027"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameEasyAutomationCommand"}}},"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"}}}},"204":{"description":"No Content"}}}},"/rest/v2/discounts/shipping/{discount_id}":{"get":{"tags":["Shipping Discounts"],"summary":"Retrieve a Shipping Discount","description":"Retrieves a Shipping Discount","operationId":"getShippingDiscount","parameters":[{"name":"discount_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/ShippingDiscount"}}}}}},"delete":{"tags":["Shipping Discounts"],"summary":"Delete a Shipping Discount","description":"Deletes a specified Shipping Discount","operationId":"deleteShippingDiscount","parameters":[{"name":"discount_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":["Shipping Discounts"],"summary":"Update a Shipping Discount","description":"Updates a Shipping Discount","operationId":"updateShippingDiscount","parameters":[{"name":"discount_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":["name","description","discount_type","discount_value","criteria"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShippingDiscountRequest"}}},"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/ShippingDiscount"}}}}}}},"/rest/v2/discounts/products/{discount_id}":{"get":{"tags":["Product Discounts"],"summary":"Retrieve a Product Discount","description":"Retrieves a Product Discount","operationId":"getProductDiscount","parameters":[{"name":"discount_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/ProductDiscount"}}}}}},"delete":{"tags":["Product Discounts"],"summary":"Delete a Product Discount","description":"Deletes a specified Product Discount","operationId":"deleteProductDiscount","parameters":[{"name":"discount_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":["Product Discounts"],"summary":"Update a Product Discount","description":"Updates a Product Discount","operationId":"updateProductDiscount","parameters":[{"name":"discount_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":["name","description","apply_to_commissions","discount_type","discount_value","product_id","criteria"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDiscountRequest"}}},"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/ProductDiscount"}}}}}}},"/rest/v2/discounts/productCategories/{discount_id}":{"get":{"tags":["Category Discounts"],"summary":"Retrieve a Category Discount","description":"Retrieves a single Category Discount","operationId":"getCategoryDiscount","parameters":[{"name":"discount_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/CategoryDiscount"}}}}}},"delete":{"tags":["Category Discounts"],"summary":"Delete a Category Discount","description":"Deletes a specified Category Discount","operationId":"deleteCategoryDiscount","parameters":[{"name":"discount_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":["Category Discounts"],"summary":"Update a Category Discount","description":"Updates a Category Discount","operationId":"updateCategoryDiscount","parameters":[{"name":"discount_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":["name","description","discount_percent","apply_to_commissions","criteria","product_category_ids"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryDiscountRequest"}}},"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/CategoryDiscount"}}}}}}},"/rest/v2/discounts/orderTotals/{discount_id}":{"get":{"tags":["Order Total Discounts"],"summary":"Retrieve an Order Total Discount","description":"Retrieves an Order Total Discount","operationId":"getOrderTotalDiscount","parameters":[{"name":"discount_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/OrderTotalDiscount"}}}}}},"delete":{"tags":["Order Total Discounts"],"summary":"Delete an Order Total Discount","description":"Deletes a specified Order Total Discount","operationId":"deleteOrderTotalDiscount","parameters":[{"name":"discount_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":["Order Total Discounts"],"summary":"Update an Order Total Discount","description":"Updates an Order Total Discount","operationId":"updateOrderTotalDiscount","parameters":[{"name":"discount_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":["name","description","apply_to_commissions","discount_type","discount_value","discount_strategy","criteria"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderTotalDiscountRequest"}}},"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/OrderTotalDiscount"}}}}}}},"/rest/v2/discounts/freeTrials/{discount_id}":{"get":{"tags":["Free Trial Discounts"],"summary":"Retrieve a Subscription Free Trial Discount","description":"Retrieves a Subscription Free Trial Discount","operationId":"getFreeTrialDiscount","parameters":[{"name":"discount_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/FreeTrialDiscount"}}}}}},"delete":{"tags":["Free Trial Discounts"],"summary":"Delete a Subscription Free Trial Discount","description":"Deletes a specified Subscription Free Trial Discount","operationId":"deleteFreeTrialDiscount","parameters":[{"name":"discount_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":["Free Trial Discounts"],"summary":"Update a Subscription Free Trial Discount","description":"Updates a Subscription Free Trial Discount","operationId":"updateFreeTrialDiscount","parameters":[{"name":"discount_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":["name","description","free_trial_days","hide_price","subscription_plan_id","criteria"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFreeTrialDiscountRequest"}}},"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/FreeTrialDiscount"}}}}}}},"/rest/v2/contacts/{contact_id}":{"get":{"tags":["Contact"],"summary":"Retrieve a Contact","description":"Retrieves a single Contact","operationId":"getContact","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of Contact properties to include in the response. (Available fields are: addresses,anniversary_date,birth_date,company,contact_type,create_time,\ncustom_fields,email_addresses,family_name,fax_numbers,given_name,id,job_title,leadsource_id,\nlinks,middle_name,notes,origin,owner_id,phone_numbers,preferred_locale,preferred_name,prefix,\nreferral_code,score_value,social_accounts,source_type,spouse_name,suffix,tag_ids,time_zone,\nupdate_time,utm_parameters,website,account_id,assistant_name,assistant_phone,\nbilling_information,created_by,groups,last_updated_by)","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/Contact"}}}}}},"delete":{"tags":["Contact"],"summary":"Delete a Contact","description":"Deletes the specified Contact","operationId":"deleteContact","parameters":[{"name":"contact_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":["Contact"],"summary":"Update a Contact","description":"Updates a Contact","operationId":"updateContact","parameters":[{"name":"contact_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":["addresses","anniversary_date","birth_date","company","contact_type","create_time","custom_fields","email_addresses","family_name","fax_numbers","given_name","id","job_title","leadsource_id","links","middle_name","notes","origin","owner_id","phone_numbers","preferred_locale","preferred_name","prefix","referral_code","score_value","social_accounts","source_type","spouse_name","suffix","tag_ids","time_zone","update_time","utm_parameters","website","account_id","assistant_name","assistant_phone","billing_information","created_by","groups","last_updated_by"]},"uniqueItems":true}},{"name":"fields","in":"query","description":"Comma-delimited list of Contact properties to include in the response. (Available fields are: addresses,anniversary_date,birth_date,company,contact_type,create_time,\ncustom_fields,email_addresses,family_name,fax_numbers,given_name,id,job_title,leadsource_id,\nlinks,middle_name,notes,origin,owner_id,phone_numbers,preferred_locale,preferred_name,prefix,\nreferral_code,score_value,social_accounts,source_type,spouse_name,suffix,tag_ids,time_zone,\nupdate_time,utm_parameters,website,account_id,assistant_name,assistant_phone,\nbilling_information,created_by,groups,last_updated_by)","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateContactRequest"}}},"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/Contact"}}}}}}},"/rest/v2/contacts/{contact_id}/notes/{note_id}":{"get":{"tags":["Note"],"summary":"Retrieve a Note","description":"Retrieves the specified Note","operationId":"getNote","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Note properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"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/GetNoteResponse"}}}}}},"delete":{"tags":["Note"],"summary":"Delete a Note","description":"Deletes the specified Note","operationId":"deleteNote","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"note_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":["Note"],"summary":"Update a Note","description":"Updates a Note for a Contact","operationId":"updateNote","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"note_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","title","text","type","user_id","is_pinned","custom_fields"]},"uniqueItems":true}},{"name":"fields","in":"query","description":"Comma-delimited list of optional Note properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteRequest"}}},"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/UpdateNoteResponse"}}}}}}},"/rest/v2/contacts/model/customFields/tabs/{tab_id}":{"get":{"tags":["Contact"],"summary":"Retrieve a Contact Custom Field Tab","description":"Retrieves a single custom field tab by id for the Contact record type.","operationId":"getContactCustomFieldTab","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":["Contact"],"summary":"Delete a Contact Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.","operationId":"deleteContactCustomFieldTab","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":["Contact"],"summary":"Update a Contact Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.","operationId":"updateContactCustomFieldTab","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/contacts/model/customFields/groups/{group_id}":{"get":{"tags":["Contact"],"summary":"Retrieve a Contact Custom Field Group","description":"Retrieves a single custom field group by id for the Contact record type.","operationId":"getContactCustomFieldGroup","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":["Contact"],"summary":"Delete a Contact Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.","operationId":"deleteContactCustomFieldGroup","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":["Contact"],"summary":"Update a Contact Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.","operationId":"updateContactCustomFieldGroup","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/contacts/links/types/{link_type_id}":{"delete":{"tags":["Contact"],"summary":"Delete a Contact Link type","description":"Deletes the specified Contact Link type. The Link type cannot be deleted if it is currently applied to any Linked Contacts.","operationId":"deleteContactLinkType","parameters":[{"name":"link_type_id","in":"path","description":"Contact Link type identifier","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":["Contact"],"summary":"Update a Contact Link type","description":"Updates the specified Contact Link type. Only fields listed in `update_mask` are applied. Reducing `max_links` below the current number of Linked Contacts of this type returns 409 Conflict.","operationId":"updateContactLinkType","parameters":[{"name":"link_type_id","in":"path","description":"Contact Link type identifier","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","max_links"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactLinkTypeRequest"}}},"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/ContactLinkType"}}}}}}},"/rest/v2/companies/{company_id}":{"get":{"tags":["Company"],"summary":"Retrieve a Company","description":"Retrieves a single Company","operationId":"getCompany","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","description":"Comma-delimited list of Company properties to include in the response. (Available fields are: `address`, `custom_fields`, `email_address`, `fax_number`, `phone_number`, `website`, `notes`)","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/Company"}}}}}},"delete":{"tags":["Company"],"summary":"Delete a Company","description":"Deletes the specified Company","operationId":"deleteCompany","parameters":[{"name":"company_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":["Company"],"summary":"Update a Company","description":"Updates a Company with the values provided in the request","operationId":"updateCompany","parameters":[{"name":"company_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":["id","company_name","address","phone_number","fax_number","email_address","notes","website","custom_fields","create_time","update_time","anniversary_date","assistant_name","assistant_phone","billing_information","birth_date","contact_type","first_name","job_title","last_name","middle_name","preferred_name","owner_id","referral_code","spouse_name","suffix","title","account_id","created_by","groups","last_updated_by"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyRequest"}}},"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/Company"}}}}}}},"/rest/v2/companies/model/customFields/{custom_field_id}":{"delete":{"tags":["Company"],"summary":"Delete a Company Custom Field","description":"Deletes a custom field from the company model","operationId":"deleteCompanyCustomField","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":["Company"],"summary":"Update a Company Custom Field","description":"Updates a custom field of the specified type and options to the Company object","operationId":"updateCompanyCustomField","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/companies/model/customFields/tabs/{tab_id}":{"get":{"tags":["Company"],"summary":"Retrieve a Company Custom Field Tab","description":"Retrieves a single custom field tab by id for the Company record type.","operationId":"getCompanyCustomFieldTab","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":["Company"],"summary":"Delete a Company Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.","operationId":"deleteCompanyCustomFieldTab","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":["Company"],"summary":"Update a Company Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.","operationId":"updateCompanyCustomFieldTab","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/companies/model/customFields/groups/{group_id}":{"get":{"tags":["Company"],"summary":"Retrieve a Company Custom Field Group","description":"Retrieves a single custom field group by id for the Company record type.","operationId":"getCompanyCustomFieldGroup","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":["Company"],"summary":"Delete a Company Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.","operationId":"deleteCompanyCustomFieldGroup","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":["Company"],"summary":"Update a Company Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.","operationId":"updateCompanyCustomFieldGroup","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/businessProfile":{"get":{"tags":["Business Profile"],"summary":"Retrieve Business Profile","description":"Retrieves Business Profile information.","operationId":"getBusinessProfile","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/GetBusinessProfileResponse"}}}}}},"patch":{"tags":["Business Profile"],"summary":"Update Business Profile","description":"Updates Business Profile information.","operationId":"updateBusinessProfile","parameters":[{"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":["name","email","website","phone","address","currency_code","business_goals","business_primary_color","business_secondary_color"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBusinessProfileRequest"}}},"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/GetBusinessProfileResponse"}}}}}}},"/rest/v2/automationCategory/{id}":{"patch":{"tags":["AutomationCategory"],"summary":"Update automation category","description":"Updates part of a single automation category","operationId":"patchCategory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAutomationCategoryRequest"}}},"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/AutomationCategory"}}}}}}},"/rest/v2/affiliates/{id}":{"get":{"tags":["Affiliate"],"summary":"Retrieve an Affiliate","description":"Retrieves a single Affiliate","operationId":"getAffiliate","parameters":[{"name":"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/RestAffiliate"}}}}}},"delete":{"tags":["Affiliate"],"summary":"Delete Affiliate","description":"Deletes the specified Affiliate","operationId":"deleteAffiliate","parameters":[{"name":"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":["Affiliate"],"summary":"Update an Affiliate","description":"Updates a single Affiliate","operationId":"updateAffiliate","parameters":[{"name":"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","code","name","status","parent_affiliate_id","notify_on_sale","notify_on_lead","track_leads_days","password","custom_fields"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateRequest"}}},"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/RestAffiliate"}}}}}}},"/rest/v2/affiliates/redirects/{redirect_id}":{"get":{"tags":["Affiliate"],"summary":"Retrieve an Affiliate Link","description":"Retrieves information about a single Affiliate Link","operationId":"getRedirectLink","parameters":[{"name":"redirect_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/AffiliateLink"}}}}}},"delete":{"tags":["Affiliate"],"summary":"Delete an Affiliate Link","description":"Deletes an Affiliate Link","operationId":"deleteRedirectLink","parameters":[{"name":"redirect_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":["Affiliate"],"summary":"Update an Affiliate Link","description":"Updates an Affiliate Link","operationId":"updateRedirectLink","parameters":[{"name":"redirect_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrUpdateAffiliateLinkRequest"}}},"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/AffiliateLink"}}}}}}},"/rest/v2/affiliates/model/customFields/{custom_field_id}":{"delete":{"tags":["Affiliate"],"summary":"Delete a Custom Field","description":"Deletes a Custom Field from Affiliate.","operationId":"deleteAffiliateCustomField","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":["Affiliate"],"summary":"Update a Custom Field","description":"Updates a custom field of the specified type and options to the Affiliate object.","operationId":"updateAffiliateCustomField","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/affiliates/model/customFields/tabs/{tab_id}":{"get":{"tags":["Affiliate"],"summary":"Retrieve an Affiliate Custom Field Tab","description":"Retrieves a single custom field tab by id for the Affiliate record type.","operationId":"getAffiliateCustomFieldTab","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":["Affiliate"],"summary":"Delete an Affiliate Custom Field Tab","description":"Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups.","operationId":"deleteAffiliateCustomFieldTab","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":["Affiliate"],"summary":"Update an Affiliate Custom Field Tab","description":"Updates an existing custom field tab. Only fields listed in `update_mask` are applied.","operationId":"updateAffiliateCustomFieldTab","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/affiliates/model/customFields/groups/{group_id}":{"get":{"tags":["Affiliate"],"summary":"Retrieve an Affiliate Custom Field Group","description":"Retrieves a single custom field group by id for the Affiliate record type.","operationId":"getAffiliateCustomFieldGroup","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":["Affiliate"],"summary":"Delete an Affiliate Custom Field Group","description":"Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields.","operationId":"deleteAffiliateCustomFieldGroup","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":["Affiliate"],"summary":"Update an Affiliate Custom Field Group","description":"Updates an existing custom field group. Only fields listed in `update_mask` are applied.","operationId":"updateAffiliateCustomFieldGroup","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/affiliates/commissionPrograms/{commission_program_id}":{"get":{"tags":["Affiliate"],"summary":"Retrieve a Commission Program","description":"Retrieves a single Commission Program","operationId":"getCommissionProgram","parameters":[{"name":"commission_program_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/GetRestCommissionProgram"}}}}}},"delete":{"tags":["Affiliate"],"summary":"Delete a Commission Program","description":"Deletes a Commission Program","operationId":"deleteAffiliateCommissionProgram","parameters":[{"name":"commission_program_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":["Affiliate"],"summary":"Update an Affiliate Commission Program","description":"Updates the properties of an Affiliate Commission Program","operationId":"updateCommissionProgram","parameters":[{"name":"commission_program_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":["name","notes","priority"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommissionProgramRequest"}}},"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/AffiliateCommissionProgramResponse"}}}}}}},"/rest/v2/affiliates/commissionPrograms/resources/{resource_id}":{"delete":{"tags":["Affiliate"],"summary":"Remove Commission Program Resource","description":"Removes a resource from a commission program","operationId":"deleteCommissionProgramResource","parameters":[{"name":"resource_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":["Affiliate"],"summary":"Update Commission Program Resource","description":"Updates a resource for a commission program","operationId":"updateCommissionProgramResource","parameters":[{"name":"resource_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":["title","notes","url","order","content_html","page_width","page_height","commission_program_ids"]},"uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProgramResourceRequest"}}},"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/AffiliateProgramResource"}}}}}}},"/rest/v2/webforms":{"get":{"tags":["Webforms"],"summary":"List Webforms with filter","description":"Retrieves a list of webforms","operationId":"listWebforms","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `webform_type`\n- (String) `since_create_time`\n- (String) `until_create_time`\n- (String) `since_update_time`\n- (String) `until_update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=name%3D%3DContact Us`\n- `filter=webform_type%3D%3Dlegacy`","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.\nOne of the following fields:\n- `name`\n- `webform_type`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListWebformsResponse"}}}}}}},"/rest/v2/webforms/{webform_id}:data":{"get":{"tags":["Webforms"],"summary":"Get Webform HTML","description":"Returns the HTML","operationId":"getHtml","parameters":[{"name":"webform_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":"HTML content of the webform","content":{"text/html":{"schema":{"type":"string","description":"Raw HTML content of the webform"}}}}}}},"/rest/v2/users":{"get":{"tags":["Users"],"summary":"List Users","description":"Retrieves a list of users","operationId":"listPaginatedUsers","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `email`\n- (String) `given_name`\n- (Boolean) `include_inactive`\n- (Boolean) `include_partners`\n- (Set[String]) `user_ids`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\nFor the filters listed above, here are some examples:\n- `filter=given_name%3D%3DMary`\n- `filter=user_ids%3D%3D123%3Bgiven_name%3D%3DSmith`\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.\nOne of the following fields:\n- `create_time`\n- `email`\n- `name` (sorts by family name / last name; uses User ID as tiebreaker for stable pagination)\n\nOne of the following directions:\n- `asc`\n- `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":100,"minimum":1},"example":10}],"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/ListUsersPaginatedResponse"}}}}}}},"/rest/v2/users/{user_id}/signature":{"get":{"tags":["Users"],"summary":"Get User email signature","description":"Retrieves a HTML snippet that contains the user's email signature.","operationId":"getUserSignature","parameters":[{"name":"user_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":{"type":"string"}}}}}}},"/rest/v2/userGroups":{"get":{"tags":["User Groups"],"summary":"List User Groups","description":"Retrieves a list of all user groups in the application.","operationId":"listUserGroups","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/ListUserGroupsResponse"}}}}}}},"/rest/v2/userGroups/{user_group_id}":{"get":{"tags":["User Groups"],"summary":"Retrieve a User Group","description":"Retrieves a single user group by its ID.","operationId":"getUserGroup","parameters":[{"name":"user_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/UserGroup"}}}}}}},"/rest/v2/tasks/model":{"get":{"tags":["Task"],"summary":"Retrieve Task Model","description":"Get the custom fields for the Task object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"retrieveTaskModel","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"}}}}}}},"/rest/v2/tags/{tag_id}/contacts":{"get":{"tags":["Tags"],"summary":"List Tagged Contacts","description":"Retrieves a list of Contacts with the specified Tag\nTo search for `null` or empty fields use `filter==NONE`","operationId":"listContactsWithTagId","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `given_name`\n- (String) `family_name`\n- (String) `email`\n- (String) `since_applied_time`\n- (String) `until_applied_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. If NONE is passed in for `email`, `given_name`, or `family_name`, it\nwill check for the non-existence of that field. For the filters listed above, here are some examples:\n- `filter=given_name%3D%3DJohn`\n- `filter=family_name%3D%3DSmith`\n- `filter=email%3D%3DNONE`\n- `filter=since_applied_time%3D%3D2025-04-16T20:33:02.321Z;until_applied_time%3D%3D2025-08-16T20:33:02.321Z;`\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.\nOne of the following fields:\n- `given_name`\n- `family_name`\n- `email`\n- `applied_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListTaggedContactsResponse"}}}}}}},"/rest/v2/tags/{tag_id}/companies":{"get":{"tags":["Tags"],"summary":"List Tagged Companies","description":"Retrieves a list of Companies that have the given Tag applied.\nTo search for `null` or empty fields use `filter==NONE`","operationId":"listCompaniesForTagId","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `company_name`\n- (String) `email`\n- (String) `since_applied_time`\n- (String) `until_applied_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. If NONE is passed in for `email`, it\nwill check for the non-existence of that field. For the filters listed above, here are some examples:\n- `filter=company_name%3D%3DCompany`\n- `filter=email%3D%3Dtest@gmail.com`\n- `filter=since_applied_time%3D%3D2025-04-16T20:33:02.321Z;until_applied_time%3D%3D2025-08-16T20:33:02.321Z;`\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.\nOne of the following fields:\n- `company_name`\n- `email`\n- `applied_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListTaggedCompaniesResponse"}}}}}}},"/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"}}}}}}},"/rest/v2/shipping":{"get":{"tags":["Shipping"],"summary":"List Shipping methods","description":"Retrieves a list of Shipping methods","operationId":"listShippingMethods","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/ListRestShippingMethodsResponse"}}}}}}},"/rest/v2/settings/contactOptionTypes":{"get":{"tags":["Settings"],"summary":"Get Contact Option types","description":"Gets a list of Contact Option types.","operationId":"getContactOptionTypes","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/GetContactOptionTypesResponse"}}}}}}},"/rest/v2/settings/applications:isEnabled":{"get":{"tags":["Settings"],"summary":"Get Application Status","description":"Check if the application is enabled or not","operationId":"isApplicationEnabled","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/GetApplicationEnabledStatusResponse"}}}}}}},"/rest/v2/settings/applications:getConfiguration":{"get":{"tags":["Settings"],"summary":"Get Application Configuration","description":"Get configuration values for the application instance.","operationId":"getApplicationConfigurations","parameters":[{"name":"fields","in":"query","description":"By default, only application data is returned. In addition to that, data is returned for the fields that are mentioned in the query.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["AFFILIATE","APPOINTMENT","CONTACT","ECOMMERCE","EMAIL","FORMS","FULFILLMENT","INVOICE","NOTE","OPPORTUNITY","TASK","TEMPLATE"]},"uniqueItems":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/GetSettingsResponse"}}}}}}},"/rest/v2/sales/transactions":{"get":{"tags":["Sales"],"summary":"List Transactions","description":"Retrieves a list of sales transactions","operationId":"listTransactions","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `amount` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\"\n- (String) `order_id`\n- (String) `contact_id`\n- (String) `since_time`\n- (String) `until_time`\n- (String) `merchant_account_id`\n- (String) `merchant_account_type`\n- (String) `status`\n- (String) `transaction_method`\n- (String) `is_successful`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=order_id%3D%3D123`\n- `filter=order_id%3D%3D123%3Bcontact_id%3D%3D567`","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.\nOne of the following fields:\n- `amount`\n- `transaction_time`\n- `contact_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListTransactions"}}}}}}},"/rest/v2/sales/payments":{"get":{"tags":["Sales"],"summary":"List Payments","description":"Retrieves a list of payments","operationId":"listPayments","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `id` - Allowable operators: \"==\",\">\",\">=\",\"<\",\"<=\"\n- (List[String]) `ids`\n- (String) `amount` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\"\n- (String) `order_id`\n- (List[String]) `order_ids`\n- (String) `contact_id`\n- (String) `since_time`\n- (String) `until_time`\n- (String) `merchant_account_id`\n- (String) `merchant_account_type`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=id%3D%3D123`\n- `filter=ids%3D%3D1,10,4,24`\n- `filter=order_id%3D%3D123%3Bcontact_id%3D%3D567`\n- `filter=order_ids%3D%3D1,2,3`","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.\nOne of the following fields:\n- `id`\n- `amount`\n- `payment_time`\n- `contact_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListPayments"}}}}}}},"/rest/v2/reporting/reports":{"get":{"tags":["Reporting"],"summary":"List Reports","description":"Retrieves a list of Reports as defined in the application (identified as Saved Search)
Deprecated as of v2","operationId":"listReports","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (DateTime) `since_created_time`\n- (DateTime) `until_created_time`\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=name%3D%3DMonthly%20Sales`\n- `filter=since_created_time%3D%3D2024-01-01`\n","required":false,"schema":{"type":"string"},"example":"name%3D%3DMonthly%20Sales"},{"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.\nOne of the following fields:\n- `name`\n- `created_time`\n\nOne of the following directions:\n- `asc`\n- `desc`","required":false,"schema":{"type":"string"},"example":"name asc"},{"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/ListReportsResponse"}}}}}}},"/rest/v2/reporting/reports/{report_id}":{"get":{"tags":["Reporting"],"summary":"Retrieve Report","description":"Retrieves information about a Report as defined in the application (identified as Saved Search)
Deprecated as of v2","operationId":"retrieveReport","parameters":[{"name":"report_id","in":"path","description":"The unique identifier of the report (Saved Search)","required":true,"schema":{"type":"string"},"example":123}],"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/Report"}}}}}}},"/rest/v2/reporting/reports/{report_id}/model":{"get":{"tags":["Reporting"],"summary":"Retrieve Report Model","description":"Retrieves the list of fields available for a Report (Saved Search). The returned field `name` values can be used in the `fields` parameter when running the report.","operationId":"retrieveReportModel","parameters":[{"name":"report_id","in":"path","description":"The unique identifier of the report (Saved Search)","required":true,"schema":{"type":"string"},"example":123}],"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/ReportModel"}}}}}}},"/rest/v2/products/{product_id}/images/legacyImageData":{"get":{"tags":["Products"],"summary":"Retrieve Product Legacy Image Data","description":"Retrieves the product's legacy image","operationId":"getFileData","parameters":[{"name":"product_id","in":"path","description":"product_id","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":{"type":"string","format":"byte"}}}}}}},"/rest/v2/productCategories/assignedProducts":{"get":{"tags":["Product Categories"],"summary":"List Assigned Products to Categories","description":"Retrieves a list of Products assigned to Product Categories","operationId":"listAssignedProducts","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (List[String]) `product_ids`\n- (List[String]) `product_category_ids`\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.\nOne of the following fields:\n- `product_category_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListAssignedProductsResponse"}}}}}}},"/rest/v2/paymentMethods":{"get":{"tags":["Payment Methods"],"summary":"List of Payment Methods","description":"Retrieves a list of Payment Methods","operationId":"listPaymentMethods","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `payment_method_id`\n- (String) `credit_card_id`\n- (String) `contact_id`\n- (String) `merchant_account_id`\n- (String) `since_time`\n- (String) `until_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\n- `filter=payment_method_id%3D%3D123`\n- `filter=contact_id%3D%3D123%3Bmerchant_account_id%3D%3D567`\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.\nOne of the following fields:\n- `payment_method_id`\n- `created_time`\n- `contact_id`\n- `merchant_account_id`\n\nOne of the following directions:\n- `desc`\n- `asc`","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/ListPaymentMethodsResponse"}}}}}}},"/rest/v2/orders/model":{"get":{"tags":["Orders"],"summary":"Retrieve Order Custom Field Model","description":"Gets the custom fields for the Order object","operationId":"retrieveOrderCustomFieldModel","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"}}}}}}},"/rest/v2/opportunities/stageMoves":{"get":{"tags":["Opportunity"],"summary":"List Opportunity Stage Moves","description":"Returns a paginated list of historical stage-move records.","operationId":"listOpportunityStageMoves","parameters":[{"name":"filter","in":"query","description":"Filter to apply. Allowed fields:\n- (Id) `opportunity_id` — supports `==`\n- (Id) `user_id` — supports `==`\n\nSeparate multiple filters with semicolons: `opportunity_id==7;user_id==1`\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":"Field and direction to order results.\nSupported fields: `move_date`, `id`\nDirections: `asc` | `desc`\nExample: `move_date desc`\n","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/ListOpportunityStageMoveResponse"}}}}}}},"/rest/v2/opportunities/stageMoves/{stage_move_id}":{"get":{"tags":["Opportunity"],"summary":"Retrieve an Opportunity Stage Move","description":"Retrieves a single historical record of an opportunity being moved from one pipeline stage to another.","operationId":"getOpportunityStageMove","parameters":[{"name":"stage_move_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/OpportunityStageMove"}}}}}}},"/rest/v2/opportunities/model":{"get":{"tags":["Opportunity"],"summary":"Retrieve Opportunity Custom Field Model","description":"Get the custom fields for the Opportunity object","operationId":"retrieveOpportunityCustomFieldModel","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"}}}}}}},"/rest/v2/oauth/connect/userinfo":{"get":{"tags":["Users"],"summary":"Retrieve User Info","description":"Retrieves information for the current authenticated end-user, as outlined by the [OpenID Connect specification](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).","operationId":"getUserInfo","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/GetUserInfoResponse"}}}}}}},"/rest/v2/notes":{"get":{"tags":["Note"],"summary":"List All Notes","description":"Retrieves a list of all notes","operationId":"listAllNotes","parameters":[{"name":"filter","in":"query","description":"Filter to apply. Allowed fields and operators:\n- (String) `id` — supports `==`, `!=`, `>`, `<`, `>=`, `<=`\n- (String list) `ids` — comma-separated note ids, supports `==` only (e.g. `ids==1,2,3`)\n- (String) `title` — supports `==`. Bare value matches anywhere in the title (contains).\n Wildcard prefix match also supported (e.g. `title==Follow*`)\n- (String) `contact_id`\n- (String) `assigned_to_user_id`\n- (String) `since_time` — ISO-8601 date/time\n- (String) `until_time` — ISO-8601 date/time\n\nOperators must be URL-encoded. Common encodings:\n`==` → `%3D%3D`, `!=` → `!%3D`, `>` → `%3E`, `<` → `%3C`,\n`>=` → `%3E%3D`, `<=` → `%3C%3D`, `*` → `%2A`.\n\nMultiple filters are combined with AND using `;`.\n\nExamples:\n- `filter=contact_id%3D%3D1001`\n- `filter=id%3E5`\n- `filter=ids%3D%3D1,2,3`\n- `filter=title%3D%3DFollow%2A`\n- `filter=since_time%3D%3D2025-04-16T20:33:02.321Z`\n- `filter=until_time%3D%3D2025-08-16T20:33:02.321Z`\n\nCustom fields (when enabled) can be filtered by their field name (case-insensitive).\nA standard field above takes precedence over a custom field with the same name.\nSupported operators depend on the custom field's type:\n- Text-like fields and single-value choice fields with text options (dropdown, radio, state): `==` only, with optional trailing wildcard (e.g. `Priority%3D%3DHigh%2A`)\n- Yes/No and drilldown fields: `==` only\n- Numeric fields (including user, month, day of week): `==`, `>`, `<`, `>=`, `<=`\n- Date fields: `==`, `>`, `<`, `>=`, `<=` using full ISO 8601\n- Multi-select fields: `==` matches records that contain the given option\nExample (for a custom field named `Priority`): `filter=Priority%3D%3DHigh`\n\nNotes:\n- `id` and `ids` cannot be combined in the same request.\n- Wildcard `*` may only appear at the end of the value (prefix match).\n Leading wildcards (`*foo`, `*foo*`) are rejected for performance reasons.\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.\nOne of the following fields:\n- `id`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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},{"name":"fields","in":"query","description":"Comma-delimited list of optional Note properties to include in the response. Allowed values: custom_fields","required":false,"schema":{"type":"string","enum":["custom_fields"]}}],"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/ListNotesResponse"}}}}}}},"/rest/v2/notes/templates":{"get":{"tags":["Note"],"summary":"Retrieve Note Templates","description":"Retrieves a list of Note Templates","operationId":"listNoteTemplates","parameters":[{"name":"filter","in":"query","description":"Search filter to apply to results","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 by. E.g. `given_name 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/ListNoteTemplateResponse"}}}}}}},"/rest/v2/notes/model":{"get":{"tags":["Note"],"summary":"Retrieve Note Model","description":"Gets the custom fields for the Note object
Note: Custom Fields for Tasks, Classic Appointments and Notes are combined.","operationId":"retrieveNoteModel","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"}}}}}}},"/rest/v2/merchants":{"get":{"tags":["Merchants"],"summary":"List Merchant accounts","description":"Retrieves a list of Merchant accounts","operationId":"listMerchants","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `id`\n- (String) `name`\n- (String) `type`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=id%3D%3D123`\n- `filter=name%3D%3Dabc`\n- `filter=id%3D%3D123%3Bname%3D%3Dabc`\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.\nOne of the following fields:\n- `id`\n- `name`\n\nOne of the following directions:\n- `asc`\n- `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/ListMerchantsResponse"}}}}}}},"/rest/v2/locales/countries":{"get":{"tags":["Locale"],"summary":"List Countries","description":"Retrieves a list of countries","operationId":"listCountries","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/ListCountriesResponse"}}}}}}},"/rest/v2/locales/countries/{country_code}":{"get":{"tags":["Locale"],"summary":"Get Country","description":"Gets a country by its code or name","operationId":"getCountryByCode","parameters":[{"name":"country_code","in":"path","description":"The ISO 3166-2 alpha-2 code, alpha-3 code, or name of the country to be retrieved","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/Country"}}}}}}},"/rest/v2/locales/countries/{country_code}/provinces":{"get":{"tags":["Locale"],"summary":"List a Country's Provinces","description":"Retrieves a list of provinces for a given country","operationId":"listProvincesForCountry","parameters":[{"name":"country_code","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/ListProvincesResponse"}}}}}}},"/rest/v2/locales/countries/{country_code}/provinces/{province_code}":{"get":{"tags":["Locale"],"summary":"Get Province","description":"Get a province by its code or name","operationId":"getProvinceByCode","parameters":[{"name":"country_code","in":"path","description":"The ISO 3166-1 alpha-2 code, alpha-3 code, or name of the country to be retrieved","required":true,"schema":{"type":"string"}},{"name":"province_code","in":"path","description":"The ISO 3166-2 code or name of the province to be retrieved","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/Province"}}}}}}},"/rest/v2/leadSources/{lead_source_id}/recurringExpenses/{lead_source_recurring_expense_id}/expenses":{"get":{"tags":["Lead Source Recurring Expenses"],"summary":"Retrieves a list of expenses incurred from a recurring expense","description":"Retrieves a list of expenses incurred from a recurring expense","operationId":"listExpensesIncurredFromLeadSourceRecurringExpense","parameters":[{"name":"lead_source_id","in":"path","description":"The ID of the lead source this recurring expense belongs to","required":true,"schema":{"type":"string"}},{"name":"lead_source_recurring_expense_id","in":"path","description":"The ID of a lead source recurring expense","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- (String) `title`\n- (Long) `amount`\n- (String) `incurred_time`\n- (String) `create_time`\n- (String) `update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n\n- `filter=amount%3D%3D2500`\n- `filter=incurred_time%3D%3D2024-12-22T01:00:00.000Z`","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.\nOne of the following fields:\n\n- `title`\n- `amount`\n- `incurred_time`\n- `create_time`\n- `update_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListLeadSourceExpensesResponse"}}}}}}},"/rest/v2/files/{file_id}:data":{"get":{"tags":["Files"],"summary":"Retrieve a file's data","description":"Retrieves a file's data","operationId":"getFileData_1","parameters":[{"name":"file_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":{"type":"string","format":"byte"}}}}}}},"/rest/v2/emails/{id}":{"get":{"tags":["Email"],"summary":"Retrieve an Email","description":"Retrieves a single Email that has been sent","operationId":"getEmail","parameters":[{"name":"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/EmailSentWithContent"}}}}}},"delete":{"tags":["Email"],"summary":"Delete an Email Record","description":"Deletes a specific Email Record","operationId":"deleteEmail","parameters":[{"name":"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"}}}},"/rest/v2/emails/templates":{"get":{"tags":["Email"],"summary":"List email templates","description":"Retrieves a paginated list of email templates","operationId":"listEmailTemplates","parameters":[{"name":"filter","in":"query","description":"Search filter to apply to results","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.\nOne of the following fields:\n- `id`\nOne of the following directions:\n- `asc`\n- `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/ListEmailTemplatesResponse"}}}}}}},"/rest/v2/emails/templates/{email_template_id}":{"get":{"tags":["Email"],"summary":"Retrieve an email template","description":"Retrieve an email template","operationId":"getEmailTemplate","parameters":[{"name":"email_template_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/EmailTemplate"}}}}}}},"/rest/v2/emailAddresses":{"get":{"tags":["Email Address"],"summary":"List Email Address Statuses","description":"Retrieve a list of the Status of Email Addresses","operationId":"listEmailAddressStatuses","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (Set[String]) `emails`\n- (Set[EmailOptStatus]) `statuses`\n- (Boolean) `opted_in`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\nFor the filters listed above, here are some examples:\n- `filter=opted_in%3D%3Dtrue`\n- `filter=emails%3D%3Dexample%40test.com`\n- `filter=emails%3D%3Dexample%40test.com%2Csecond%40test.com`\n","required":false,"schema":{"type":"string"},"example":"filter=opted_in%3D%3Dtrue"},{"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.\nOne of the following fields:\n- `email`\n- `status`\n- `create_time`\n- `last_click_time`\n- `last_open_time`\n- `last_sent_time`\n\nOne of the following directions:\n- `asc`\n- `desc`","required":false,"schema":{"type":"string"},"example":"order_by=last_sent_time desc"},{"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/ListEmailAddressStatusResponse"}}}}}}},"/rest/v2/contacts/{contact_id}/tags":{"get":{"tags":["Contact"],"summary":"List Applied Tags","description":"Retrieves a list of tags applied to the specified Contact","operationId":"listTagsForContact","parameters":[{"name":"contact_id","in":"path","description":"Contact identifier","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `description`\n- (String) `category_id` (use `category_id==NONE` to filter tags not assigned to any category)\n- (String) `since_applied_time`\n- (String) `until_applied_time`\n- (String) `since_create_time`\n- (String) `until_create_time`\n- (String) `since_update_time`\n- (String) `until_update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=name%3D%3DCustomer`\n- `filter=category_id%3D%3D123`\n- `filter=category_id%3D%3DNONE`\n- `filter=since_applied_time%3D%3D2025-04-16T20:33:02.321Z;until_applied_time%3D%3D2025-08-16T20:33:02.321Z;`\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.\nOne of the following fields:\n- `name`\n- `create_time`\n- `update_time`\n- `applied_time`\n- `category_id`\nOne of the following directions:\n- `asc`\n- `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/ListContactTagsResponse"}}}}}}},"/rest/v2/contacts/{contact_id}/paymentMethods":{"get":{"tags":["Payment Methods"],"summary":"List of Contact Payment Methods","description":"Retrieves a list of Contact Payment Methods","operationId":"listPaymentMethods_1","parameters":[{"name":"contact_id","in":"path","description":"ID of the contact to which the payment method belongs.","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `merchant_account_id`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\n- `filter=merchant_account_id%3D%3D123`\n\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.\nOne of the following fields:\n- `created_time`\n\nOne of the following directions:\n- `desc`\n- `asc`","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/ListContactPaymentMethodsResponse"}}}}}}},"/rest/v2/contacts/{contact_id}/links":{"get":{"tags":["Contact"],"summary":"List Linked Contacts","description":"Retrieves a list of Linked Contacts for a given Contact","operationId":"listContactLinks","parameters":[{"name":"contact_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/ListContactLinksResponse"}}}}}}},"/rest/v2/contacts/{contact_id}/leadScore":{"get":{"tags":["LeadScore"],"summary":"Retrieve Lead Score of a Contact","description":"Retrieves information about the Lead Score of a Contact","operationId":"getLeadScoreDetails","parameters":[{"name":"contact_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/LeadScore"}}}}}}},"/rest/v2/contacts/model":{"get":{"tags":["Contact"],"summary":"Retrieve Contact Model","description":"Get the custom fields and optional properties for the Contact object","operationId":"retrieveContactModel","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"}}}}}}},"/rest/v2/companies/{company_id}/tags":{"get":{"tags":["Company"],"summary":"List Applied Tags","description":"Retrieves a list of tags applied to the specified Company","operationId":"listTagsForCompany","parameters":[{"name":"company_id","in":"path","description":"Company identifier","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n- (String) `description`\n- (String) `category_id` (use `category_id==NONE` to filter tags not assigned to any category)\n- (String) `since_applied_time`\n- (String) `until_applied_time`\n- (String) `since_create_time`\n- (String) `until_create_time`\n- (String) `since_update_time`\n- (String) `until_update_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=name%3D%3DCustomer`\n- `filter=category_id%3D%3D123`\n- `filter=category_id%3D%3DNONE`\n- `filter=since_applied_time%3D%3D2025-04-16T20:33:02.321Z;until_applied_time%3D%3D2025-08-16T20:33:02.321Z;`\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.\nOne of the following fields:\n- `name`\n- `create_time`\n- `update_time`\n- `applied_time`\n- `category_id`\n\nOne of the following directions:\n- `asc`\n- `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/ListCompanyTagsResponse"}}}}}}},"/rest/v2/companies/model":{"get":{"tags":["Company"],"summary":"Retrieve Company Custom Field Model","description":"Get the custom fields for the Company object","operationId":"retrieveCompanyCustomFieldModel","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"}}}}}}},"/rest/v2/campaigns":{"get":{"tags":["Campaign"],"summary":"List Campaigns","description":"Retrieves a list of campaigns for the authenticated user","operationId":"listCampaigns","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `name`\n\nYou will need to apply the `==` operator to check the equality of the filter with your searched\ntext, in the encoded form `%3D%3D`.\nThe search will look for the text anywhere in the campaign name.\n- `filter=name%3D%3DSpring Campaign`\n- `filter=name%3D%3DTag New Contacts`\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.\nOne of the following fields:\n- `name`\n- `publisheddate`\n- `id`\n- `completedContactCount`\n- `activeContacts`\n- `datecreated`\n- `lastupdated`\n\nOne of the following directions:\n- `asc`\n- `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/ListCampaignsResponse"}}}}}}},"/rest/v2/campaigns/{campaign_id}":{"get":{"tags":["Campaign"],"summary":"Retrieve a Campaign","description":"Retrieves a single campaign","operationId":"getCampaign","parameters":[{"name":"campaign_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/Campaign"}}}}}}},"/rest/v2/campaigns/{campaign_id}/sequences":{"get":{"tags":["Campaign"],"summary":"Retrieve a list of Sequences for a Campaign","description":"Retrieves a list of Sequences (published) for a Campaign","operationId":"getCampaignSequences","parameters":[{"name":"campaign_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/ListCampaignSequenceResponse"}}}}}}},"/rest/v2/campaigns/{campaign_id}/goals":{"get":{"tags":["Campaign"],"summary":"Retrieve a list of Goals for a Campaign","description":"Retrieves a list of Goals (published) for a Campaign","operationId":"getCampaignGoals","parameters":[{"name":"campaign_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/ListCampaignGoalsResponse"}}}}}}},"/rest/v2/automations":{"get":{"tags":["Automation"],"summary":"List Automations","description":"Retrieves a list of automations","operationId":"listAutomations","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- `name` (String): Filter by automation name. Supports the `==` operator with optional prefix wildcard (`foo*`).\n Without a wildcard, the search matches automations whose name contains the given text.\n With a prefix wildcard, it matches automations whose name starts with the given text.\n - `filter=name%3D%3DSpring Automation` — names containing \"Spring Automation\"\n - `filter=name%3D%3DSpring*` — names starting with \"Spring\"\n\n- `id` (Long): Filter by automation ID. Supports comparison operators:\n `==` `!=` `>` `<` `>=` `<=`\n - `filter=id%3E5` — id > 5\n - `filter=id%3E%3D10` — id >= 10\n\n- `status` (String): Filter by automation status. Accepted values: `published`, `draft`.\n - `filter=status%3D%3Dpublished` — published automations only\n - `filter=status%3D%3Ddraft` — draft automations only\n\n- `categories` (String): Filter by category ID (comma-separated list of IDs).\n - `filter=categories%3D%3D1` — automations in category 1\n - `filter=categories%3D%3D1,2,3` — automations in categories 1, 2, or 3\n\nMultiple filters can be combined with `;` (AND logic):\n- `filter=name%3D%3DSpring*%3Bautomation_id%3E5`\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.\nOne of the following fields:\n- `name`\n- `category`\n- `activeContacts`\n- `publishedDate`\n\nOne of the following directions:\n- `asc`\n- `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":25,"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/ListAutomationResponse"}}}}}},"delete":{"tags":["Automation"],"summary":"Delete an Automation","description":"Deletes a single automation","operationId":"deleteAutomation","parameters":[{"name":"automation_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"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"}}}},"/rest/v2/automations/{automation_id}":{"get":{"tags":["Automation"],"summary":"Retrieve an Automation","description":"Retrieves a single automation","operationId":"getAutomation","parameters":[{"name":"automation_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/Automation"}}}}}}},"/rest/v2/automations/ids":{"get":{"tags":["Automation"],"summary":"List Automations Ids","description":"Retrieves a list of automations IDs","operationId":"listAllAutomationIds","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n\n- `name` (String): Filter by automation name. Supports the `==` operator with optional prefix wildcard (`foo*`).\n Without a wildcard, the search matches automations whose name contains the given text.\n With a prefix wildcard, it matches automations whose name starts with the given text.\n - `filter=name%3D%3DSpring Automation` — names containing \"Spring Automation\"\n - `filter=name%3D%3DSpring*` — names starting with \"Spring\"\n\n- `id` (Long): Filter by automation ID. Supports comparison operators:\n `==` `!=` `>` `<` `>=` `<=`\n - `filter=id%3E5` — id > 5\n - `filter=id%3E%3D10` — id >= 10\n\n- `status` (String): Filter by automation status. Accepted values: `published`, `draft`.\n - `filter=status%3D%3Dpublished` — published automations only\n - `filter=status%3D%3Ddraft` — draft automations only\n\n- `categories` (String): Filter by category ID (comma-separated list of IDs).\n - `filter=categories%3D%3D1` — automations in category 1\n - `filter=categories%3D%3D1,2,3` — automations in categories 1, 2, or 3\n\nMultiple filters can be combined with `;` (AND logic):\n- `filter=name%3D%3DSpring*%3Bautomation_id%3E5`\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.\nOne of the following fields:\n- `name`\n- `category`\n- `activeContacts`\n- `publishedDate`\n\nOne of the following directions:\n- `asc`\n- `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":25,"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/ListAutomationIdsResponse"}}}}}}},"/rest/v2/affiliates/{affiliate_id}:commissions":{"get":{"tags":["Affiliate"],"summary":"Retrieve Affiliate Commissions","description":"Retrieve a list of Affiliate's Commissions","operationId":"getAffiliateCommissions","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `since_time`\n- (String) `until_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=since_time%3D%3D2024-05-21T23:00:00Z%3Buntil_time%3D%3D2025-05-21T23:00:00Z`\n- `filter=until_time%3D%3D2025-05-21T23:00:00Z`\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.\nOne of the following fields:\n- `invoice_id`\n- `time_earned`\n\nOne of the following directions:\n- `asc`\n- `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/ListAffiliateCommissionsResponse"}}}}}}},"/rest/v2/affiliates/{affiliate_id}/referrals":{"get":{"tags":["Affiliate"],"summary":"Retrieve Affiliate Referrals","description":"Retrieves all referrals belonging to the given affiliate","operationId":"getReferralsByAffiliateId","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `source` - Wildcard matching allowed\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`.\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\nFor the filters listed above, here are some examples:\n- `filter=source%3D%3DEmail Marketing`\n- `filter=source%3D%3DEmail*` (starts with \"Email\")\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.\nOne of the following fields:\n- `id`\n- `referral_time`\n\nOne of the following directions:\n- `asc`\n- `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/ListAffiliateReferralsResponse"}}}}}}},"/rest/v2/affiliates/{affiliate_id}/payments":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Payments","description":"Retrieves a list of affiliate payments","operationId":"listAffiliatePayments","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (String) `since_time`\n- (String) `until_time`\n\nYou will need to apply the `==` operator to check the equality of one of the filters with your searched\nword, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:\n- `filter=since_time%3D%3D2024-09-17T-15:50+00`\n- `filter=until_time%3D%3D2024-09-17T-15:50+00`\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.\nOne of the following fields:\n- `create_time`\n- `pay_date`\n- `pay_amount`\n\nOne of the following directions:\n- `asc`\n- `desc`\n","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/ListAffiliatePaymentsResponse"}}}}}}},"/rest/v2/affiliates/{affiliate_id}/commissionTotal":{"get":{"tags":["Affiliate"],"summary":"Retrieve Affiliate Commission Earned and View LedgerURl for portal","description":"Get the Affiliate Commission Earned and View LedgerURl for portal","operationId":"getAffiliateCommissionTotal","parameters":[{"name":"affiliate_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/AffiliateCommissionEarned"}}}}}}},"/rest/v2/affiliates/summaries":{"get":{"tags":["Affiliate"],"summary":"List Affiliate Summaries","description":"Retrieves a list of Affiliate Summaries","operationId":"listSummaries","parameters":[{"name":"filter","in":"query","description":"Filter to apply, allowed fields are:\n- (List[String]) `affiliate_ids`\n- (String) `since_time`\n- (String) `until_time`\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=since_time%3D%3D2024-09-17T-15:50+00`\n - `filter=until_time%3D%3D2024-09-17T-15:50+00`\n - `filter=affiliate_ids%3D%3D123,456,789`\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.\nOne of the following fields:\n- `affiliate_id`\n- `amount_earned`\n- `balance`\n- `clawbacks`\n\nOne of the following directions:\n- `asc`\n- `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/ListAffiliateSummariesResponse"}}}}}}},"/rest/v2/affiliates/model":{"get":{"tags":["Affiliate"],"summary":"Retrieve Affiliate Model","description":"Get the custom fields and optional properties for the Affiliate object","operationId":"getAffiliateCustomFields","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"}}}}}}},"/rest/v2/affiliates/commissionPrograms/{commission_program_id}/resources":{"get":{"tags":["Affiliate"],"summary":"Retrieve Commission Program Resources","description":"Retrieves resources for a commission program","operationId":"listCommissionProgramResources","parameters":[{"name":"commission_program_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/ListProgramResourcesResponse"}}}}}}},"/rest/v2/integrations/wordpress/options/{option_key}":{"delete":{"tags":["Integrations"],"summary":"Delete a WordPress Opt-In Option","description":"Deletes a value from the list of WordPress Opt-In Options Available","operationId":"deleteIntegrationsWordPressOptIn","parameters":[{"name":"option_key","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"}}}},"/rest/v2/discounts/shipping/{discount_id}/criteria/{criteria_id}":{"delete":{"tags":["Shipping Discounts"],"summary":"Delete a Shipping Discount Criteria","description":"Deletes a specified Shipping Discount Criteria","operationId":"deleteShippingDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"criteria_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"}}}},"/rest/v2/discounts/products/{discount_id}/criteria/{criteria_id}":{"delete":{"tags":["Product Discounts"],"summary":"Delete a Product Discount Criteria","description":"Deletes a specified Product Discount Criteria","operationId":"deleteProductDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"criteria_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"}}}},"/rest/v2/discounts/productCategories/{discount_id}/criteria/{criteria_id}":{"delete":{"tags":["Category Discounts"],"summary":"Delete a Category Discount Criteria","description":"Deletes a specified Category Discount Criteria","operationId":"deleteCategoryDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"criteria_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"}}}},"/rest/v2/discounts/orderTotals/{discount_id}/criteria/{criteria_id}":{"delete":{"tags":["Order Total Discounts"],"summary":"Delete an Order Total Discount Criteria","description":"Deletes a specified Order Total Discount Criteria","operationId":"deleteOrderTotalDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"criteria_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"}}}},"/rest/v2/discounts/freeTrials/{discount_id}/criteria/{criteria_id}":{"delete":{"tags":["Free Trial Discounts"],"summary":"Delete a Subscription Free Trial Discount Criteria","description":"Deletes a specified Subscription Free Trial Discount Criteria","operationId":"deleteFreeTrialDiscountCriteria","parameters":[{"name":"discount_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"criteria_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"}}}},"/rest/v2/contacts/{contact_id}/paymentMethods/{payment_method_id}":{"delete":{"tags":["Payment Methods"],"summary":"Delete a Contact Payment Method","description":"Deletes the specified payment method","operationId":"deletePaymentMethod","parameters":[{"name":"contact_id","in":"path","description":"ID of the contact to which the payment method belongs.","required":true,"schema":{"type":"string"}},{"name":"payment_method_id","in":"path","description":"ID of the payment method to be deleted.","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"}}}},"/rest/v2/contacts/model/customFields/{custom_field_id}":{"delete":{"tags":["Contact"],"summary":"Delete a Contact Custom Field","description":"Deletes a custom field from the Contacts model","operationId":"deleteContactCustomField","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"}}}}},"components":{"schemas":{"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"}}},"UnpublishAutomationRequest":{"type":"object","description":"Request to unpublish a single automation","properties":{"unpublished_form_message":{"type":"string","description":"Custom message to display on forms when the automation is unpublished","example":"This form is currently unavailable"}}},"CreateTaskRequest":{"type":"object","description":"task","properties":{"title":{"type":"string","description":"Task title","example":"Follow up on proposal"},"description":{"type":"string","description":"Task description","example":"Review client feedback"},"type":{"type":"string","description":"Task type","example":"CALL"},"priority":{"type":"string","description":"Task priority","enum":["CRITICAL","ESSENTIAL","NONESSENTIAL"],"example":"ESSENTIAL"},"completed":{"type":"boolean","description":"Whether task is completed","example":false},"completion_time":{"type":"string","description":"Completion timestamp (ISO-8601)","example":"2024-03-20T14:00:00Z"},"due_time":{"type":"string","description":"Due date/time (ISO-8601)","example":"2024-03-18T17:00:00Z"},"remind_time_mins":{"type":"integer","format":"int32","description":"Value in minutes before start_date to show pop-up reminder.","enum":["5","10","15","30","60","120","240","480","1440","2880"],"example":30},"assigned_to_user_id":{"type":"string","description":"Assigned user ID","example":456},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"opportunity_id":{"type":"string","description":"Associated opportunity ID","example":553},"accepted":{"type":"boolean","description":"Whether the task has been accepted.","example":true},"custom_fields":{"type":"array","description":"Custom field values for the task. An empty array resets all custom fields to their defaults.","example":[{"id":"1","content":"Red"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}},"required":["assigned_to_user_id"]},"CustomFieldValueObject":{"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."}}},"Task":{"type":"object","properties":{"id":{"type":"string","description":"Task ID","example":123},"title":{"type":"string","description":"Task title","example":"Follow up on proposal"},"description":{"type":"string","description":"Task description. Legacy XML-RPC name for this field was `CreationNotes`","example":"Review and respond to client feedback."},"type":{"type":"string","description":"Task type","example":"CALL"},"priority":{"type":"string","description":"Task priority","enum":["CRITICAL","ESSENTIAL","NONESSENTIAL"],"example":"CRITICAL"},"completed":{"type":"boolean","description":"Whether task is completed","example":false},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"modification_time":{"type":"string","description":"Last modification timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"completion_time":{"type":"string","description":"Completion timestamp (ISO-8601)","example":"2024-03-20T14:00:00Z"},"due_time":{"type":"string","description":"Due date/time (ISO-8601)","example":"2024-03-18T17:00:00Z"},"remind_time_mins":{"type":"integer","format":"int32","description":"Reminder minutes before due.","enum":["5","10","15","30","60","120","240","480","1440","2880"],"example":30},"assigned_to_user_id":{"type":"string","description":"Assigned user ID","example":456},"created_by_user_id":{"type":"string","description":"Creator user ID","example":789},"last_updated_by_user_id":{"type":"string","description":"User who last updated the task.","example":77},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"opportunity_id":{"type":"string","description":"Associated opportunity ID","example":321},"accepted":{"type":"boolean","description":"Whether the task has been accepted","example":true},"custom_fields":{"type":"array","description":"Custom field values for the task","example":[{"id":"1","content":"Red"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}}},"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"]},"CreateCustomFieldResponse":{"type":"object","properties":{"custom_field":{"$ref":"#/components/schemas/CustomFieldMetaData"}}},"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"}}},"CreateCustomFieldTabRequest":{"type":"object","properties":{"name":{"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"}}},"CreateCustomFieldGroupRequest":{"type":"object","properties":{"name":{"type":"string"},"tab_id":{"type":"string"}}},"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"]}}},"CategoryReference":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tag category","example":123}},"required":["id"]},"CreateUpdateTagRequest":{"type":"object","description":"tag","properties":{"name":{"type":"string","description":"Name of the tag, up to 255 characters will be saved","example":"VIP Customer"},"description":{"type":"string","description":"Description of the tag","example":"High-value customers"},"category":{"$ref":"#/components/schemas/CategoryReference","description":"Category of the tag. If not provided, the tag will not be assigned to a category."}}},"Tag":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this tag","example":123},"name":{"type":"string","description":"The unique name of this tag","example":"VIP Customer"},"description":{"type":"string","description":"A description of this tag","example":"High-value customers"},"category":{"$ref":"#/components/schemas/CategoryReference","description":"The category this tag belongs to"},"create_time":{"type":"string","format":"date-time","description":"The time this tag was created, in ISO 8601 format","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this tag was last updated, in ISO 8601 format","example":"2024-03-15T10:30:00Z"}}},"ApplyRemoveTagRequest":{"type":"object","properties":{"contact_ids":{"type":"array","description":"The IDs of the contacts to apply/remove the tag to/from","example":["123","456"],"items":{"type":"string"},"uniqueItems":true}},"required":["contact_ids"]},"ApplyTagsResponse":{"type":"object","properties":{"results":{"type":"object","additionalProperties":{"type":"string"}}}},"CreateUpdateTagCategoryRequest":{"type":"object","description":"tagCategory","properties":{"name":{"type":"string","description":"The name of the tag category, must be unique","example":"Customer Segments"},"description":{"type":"string","description":"A description of the tag category","example":"Tags for customer segmentation"}}},"TagCategory":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this tag category","example":123},"name":{"type":"string","description":"The unique name of this tag category","example":"Customer Segments"},"description":{"type":"string","description":"A description of this tag category","example":"Tags for customer segmentation"},"create_time":{"type":"string","format":"date-time","description":"The time this tag category was created, in ISO 8601 format","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this tag category was last updated, in ISO 8601 format","example":"2024-03-15T10:30:00Z"}}},"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"}}},"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"]},"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."}}},"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}}},"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"}}}},"BasicContact":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"given_name":{"type":"string"},"family_name":{"type":"string"}}},"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"}}},"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"}}},"InvoiceFile":{"type":"object","properties":{"file_id":{"type":"string"}}},"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:\n- `UNPAID_MANUAL` - The item is set for manual charge, and its `amount_due` has not been completely paid.\n- `UNPAID_AUTOCHARGE` - The item is set for auto-charge, and its `amount_due` has not been completely paid.\n- `PAID` - The item has been completely paid.\n- `FAILED` - The item `amount_due` has not been completely paid, and there was a failure. (*Note: This status is deprecated and not currently used.*)\n","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}}},"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}}},"CancelSubscriptionRequest":{"type":"object","properties":{"reason":{"type":"string","description":"The reason for cancelling the subscription.","example":"Customer request"}}},"RunReportRequest":{"type":"object","properties":{"page_token":{"type":"string"},"order_by":{"type":"string"},"page_size":{"type":"integer","format":"int32"},"fields":{"type":"string"}}},"ReportEntryRecord":{"type":"object","properties":{"columns":{"type":"array","description":"The set of column values for this record","items":{"$ref":"#/components/schemas/ReportEntryValue"},"uniqueItems":true}}},"ReportEntryValue":{"type":"object","properties":{"field_name":{"type":"string","description":"The name of the field/column","example":"contact_email"},"value":{"type":"string","description":"The value of the field","example":"john.smith@example.com"}}},"ReportExecutionResult":{"type":"object","properties":{"results":{"type":"array","description":"The list of report result records","items":{"$ref":"#/components/schemas/ReportEntryRecord"}},"page_token":{"type":"string","description":"Token for retrieving the next page of results","example":"eyJsYXN0Um93IjoxMDB9"}}},"CreateReferralRequest":{"type":"object","properties":{"description":{"type":"string","description":"The referral description.","example":"Referred via email campaign"},"source":{"type":"string","description":"The source for the referral.","example":"Email Marketing"},"contact_id":{"type":"string","description":"The referral's contact ID.","example":123},"referral_partner_id":{"type":"string","description":"The referring affiliate ID.","example":456},"referral_time":{"type":"string","format":"date-time","description":"The time of the referral.","example":"2024-05-21T14:30:00Z"},"expiration_time":{"type":"string","format":"date-time","description":"When the referral expires.","example":"2024-08-21T14:30:00Z"},"ip_address":{"type":"string","description":"The IP address of the referral.","example":"192.168.1.100"},"referral_type":{"type":"string","description":"The referral type.","enum":["COOKIE","MANUAL","PERMANENT"],"example":"COOKIE"}},"required":["contact_id"]},"Referral":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this referral.","example":555},"description":{"type":"string","description":"The referral description.","example":"Referred via email campaign"},"source":{"type":"string","description":"The source for the referral.","example":"Email Marketing"},"contact_id":{"type":"string","description":"The referral's contact_id.","example":1001},"referral_partner_id":{"type":"string","description":"The referring affiliate ID.","example":123},"referral_time":{"type":"string","format":"date-time","description":"The time of the referral.","example":"2024-05-21T23:00:00Z"},"expiration_time":{"type":"string","format":"date-time","description":"The time when the referral expires.","example":"2024-08-21T23:00:00Z"},"ip_address":{"type":"string","description":"The IP address of the referral.","example":"192.168.1.100"},"referral_type":{"type":"string","description":"The referral type.","enum":["COOKIE","MANUAL","PERMANENT"],"example":"COOKIE"}}},"CreateProductRequest_Detail":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Premium Widget"},"sku":{"type":"string","description":"Product SKU","example":"PROD-001"},"price":{"type":"integer","format":"int64","description":"The product price. The value is in the currency's smallest unit. e.g. $12.50 is 1250. Must be greater than or equal to 0.","example":1250},"active":{"type":"boolean","description":"True means active, False means inactive","example":true},"description":{"type":"string","description":"Product long description","example":"A high-quality widget"},"shippable":{"type":"boolean","description":"If the product requires shipping","example":true},"weight":{"type":"number","format":"double","description":"The product weight. Must be greater than or equal to 0.","example":2.5},"taxable":{"type":"boolean","description":"Whether or not the product should be taxed","example":true},"inventory":{"$ref":"#/components/schemas/ProductInventory_Detail","description":"The inventory details for this product"},"short_description":{"type":"string","description":"Product short description","example":"Premium widget"},"subscription_only":{"type":"boolean","description":"If the product is a subscription-only product","example":false},"storefront_hidden":{"type":"boolean","description":"If the product should not be shown in the storefront","example":false},"country_taxable":{"type":"boolean","description":"If country-based taxes should be applied to this product","example":false},"state_taxable":{"type":"boolean","description":"If state-based taxes should be applied to this product","example":true},"city_taxable":{"type":"boolean","description":"If city-based taxes should be applied to this product","example":false},"top_html":{"type":"string"},"bottom_html":{"type":"string"},"is_package":{"type":"boolean"},"needs_digital_delivery":{"type":"boolean"},"delivery_description":{"type":"string"}},"required":["name","price","short_description"]},"ProductInventory_Detail":{"type":"object","properties":{"inventory_limit":{"type":"integer","format":"int32","description":"The inventory limit for this product. Must be greater than or equal to 0.","example":100},"inventory_count":{"type":"integer","format":"int32","description":"The current inventory count for this product. Must be greater than or equal to 0. This field is omitted in List responses.","example":75},"out_of_stock_enabled":{"type":"boolean","description":"The flag to enable out of stock inventory","example":false},"email_for_inventory_notifications":{"type":"string","description":"The email address for notifications about inventory","example":"notify@example.com"}}},"CurrencyValue_Detail":{"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"}}},"ProductFixedOption_Detail":{"type":"object","properties":{"value":{"type":"string","description":"The displayable label given to the option","example":"Red"},"code":{"type":"string","description":"An internal code to reference the option value","example":"RED"},"price_adjustment":{"type":"number","format":"double","description":"Positive value indicates additional amount added to the original price. Negative value indicates subtraction from the original price.","example":500}}},"ProductOptions_Detail":{"type":"object","properties":{"name":{"type":"string","description":"The option name","example":"Color"},"type":{"type":"string","description":"The option type. If FIXED, then fixed_options will be returned. If VARIABLE, then variable_setting will be returned.","enum":["FIXED","VARIABLE"],"example":"FIXED"},"required":{"type":"boolean","description":"If the user is required to select/fill in an option for the product","example":true},"fixed_options":{"type":"array","description":"List of option values for the fixed option","items":{"$ref":"#/components/schemas/ProductFixedOption_Detail"}},"variable_setting":{"$ref":"#/components/schemas/ProductVariableSetting_Detail","description":"The option is a user-defined free-form field. The settings define the restrictions on what can be entered."}}},"ProductVariableSetting_Detail":{"type":"object","properties":{"contains":{"type":"string","description":"Requires the value (excluding start and end) to contain given type.","enum":["LETTER","NUMBER","BOTH"],"example":"BOTH"},"min_chars":{"type":"integer","format":"int32","description":"Minimum allowable characters","example":1},"max_chars":{"type":"integer","format":"int32","description":"Max allowable chars. Its value must be greater than min_chars","example":50},"contain_spaces":{"type":"boolean","description":"If spaces are allowed for the option","example":true},"start_with":{"type":"string","description":"Requires the value to start with the given type.","enum":["LETTER","NUMBER","BOTH"],"example":"LETTER"},"end_with":{"type":"string","description":"Requires the value to end with the given type.","enum":["LETTER","NUMBER","BOTH"],"example":"LETTER"},"validation_msg":{"type":"string","description":"Customized validation message to display when option criteria aren't met","example":"Invalid input format"}}},"RestV2Product_Detail":{"type":"object","properties":{"id":{"type":"string","description":"The product ID","example":1},"name":{"type":"string","description":"Product name","example":"Premium Widget"},"price":{"$ref":"#/components/schemas/CurrencyValue_Detail","description":"The product price"},"active":{"type":"boolean","description":"True means active, False means inactive","example":true},"description":{"type":"string","description":"Product long description","example":"A high-quality widget for all your needs"},"sku":{"type":"string","description":"Product SKU","example":"PROD-001"},"shippable":{"type":"boolean","description":"If the product requires shipping","example":true},"weight":{"type":"number","format":"double","description":"Product weight","example":2.5},"taxable":{"type":"boolean","description":"Whether or not the product should be taxed","example":true},"categories":{"type":"array","description":"List of category ids to indicate which categories this product will belong to. Can be empty.","items":{"type":"string"}},"options":{"type":"array","description":"List of product options. Can be empty.","items":{"$ref":"#/components/schemas/ProductOptions_Detail"}},"inventory":{"$ref":"#/components/schemas/ProductInventory_Detail","description":"The inventory details for this product"},"short_description":{"type":"string","description":"Product short description","example":"Premium widget"},"subscription_only":{"type":"boolean","description":"If the product is a subscription-only product","example":false},"storefront_hidden":{"type":"boolean","description":"If the product should not be shown in the storefront","example":false},"country_taxable":{"type":"boolean","description":"If country-based taxes should be applied to this product","example":false},"state_taxable":{"type":"boolean","description":"If state-based taxes should be applied to this product","example":true},"city_taxable":{"type":"boolean","description":"If city-based taxes should be applied to this product","example":false},"subscription_plans":{"type":"array","description":"List of subscription plans associated with the product. Can be empty.","items":{"$ref":"#/components/schemas/SubscriptionPlan_Detail"}},"top_html":{"type":"string"},"bottom_html":{"type":"string"},"is_package":{"type":"boolean"},"needs_digital_delivery":{"type":"boolean"},"has_legacy_image":{"type":"boolean"},"delivery_description":{"type":"string"},"create_time":{"type":"string"},"update_time":{"type":"string"}}},"SubscriptionPlan_Detail":{"type":"object","properties":{"id":{"type":"string","description":"The subscription plan id","example":1},"active":{"type":"boolean","description":"If the subscription plan should be active/available for purchase","example":true},"prorate":{"type":"boolean","description":"If the subscription plan should allow prorating","example":false},"billing_cycle":{"type":"string","description":"How frequent to bill.","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"],"example":"MONTHLY"},"billing_frequency":{"type":"integer","format":"int32","description":"How many times per billing cycle to bill","example":1},"number_of_cycles":{"type":"integer","format":"int32","description":"How many billing cycles to bill. Optional field i.e. can be no value or 0.","example":12},"plan_price":{"$ref":"#/components/schemas/CurrencyValue_Detail","description":"The price of the subscription plan"},"order_index":{"type":"integer","format":"int32","description":"Determines the order in which the plan will be displayed","example":0}}},"UpdateProductInventoryRequest_Detail":{"type":"object","properties":{"type":{"type":"string","enum":["INCREASE","DECREASE"]},"quantity":{"type":"integer","format":"int32"}}},"CreateSubscriptionPlanRequest":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the subscription plan is active.","example":true},"frequency":{"type":"integer","format":"int32","default":1,"description":"The frequency of the subscription plan. Must be greater than 0. Default is 1.","example":1},"allow_prorating":{"type":"boolean","description":"Allow prorating of the subscription plan.","example":false},"cycle_type":{"type":"string","description":"The cycle type of the subscription plan.","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"],"example":"MONTHLY"},"display_order_index":{"type":"integer","format":"int32","default":0,"description":"The order that this plan will be displayed to the user. Lower values indicate higher priority in order.","example":0},"plan_price":{"type":"number","format":"double","description":"The price of the subscription plan in the smallest currency unit. Must be greater than or equal to 0.","example":10000},"total_cycles":{"type":"integer","format":"int32","default":0,"description":"How many cycles the subscription plan will have. 0 means infinite.","example":12}},"required":["cycle_type","plan_price"]},"CreateProductOptionListOption":{"type":"object","properties":{"item_label":{"type":"string","description":"The displayable name of the option item. Cannot be whitespace only."},"item_code":{"type":"string","description":"An internal code (e.g. sku) to associate the item option."},"item_display_order":{"type":"integer","format":"int64","description":"The order in which this item will be displayed among other items. Minimum is 0. Lower values indicate higher priority in order."},"price_adjustment":{"type":"number","format":"double","description":"An amount to adjust to the product price is selected. Negative value indicates subtraction from price."}}},"CreateProductOptionRequest":{"type":"object","properties":{"required":{"type":"boolean","default":false,"description":"Whether this option is required for product purchase."},"option_type":{"type":"string","description":"The type of option. Possible valid values are LIST and TEXT.","enum":["LIST","TEXT"]},"option_label":{"type":"string","description":"The displayable name of the option (e.g. Size). Cannot be whitespace only."},"display_order":{"type":"integer","format":"int32","description":"The order in which this option will be displayed among other options. Minimum is 0. Lower values indicate higher priority in order."},"list_items":{"type":"array","description":"Appears only for option_type of LIST. A fixed list of available selectable items for this product option.","items":{"$ref":"#/components/schemas/CreateProductOptionListOption"}},"text_rules":{"$ref":"#/components/schemas/CreateProductOptionTextOption","description":"The option is a user-defined free-form field. The settings define the restrictions on what can be entered."}},"required":["option_type"]},"CreateProductOptionTextOption":{"type":"object","properties":{"minimum_characters":{"type":"integer","format":"int32","description":"Minimum allowable characters. Minimum is 0."},"maximum_characters":{"type":"integer","format":"int32","description":"Maximum allowable characters. Minimum is 0."},"allow_spaces":{"type":"boolean","description":"Whether or not to allow whitespace in the text."},"only_starts_with":{"type":"string","description":"Restricts the text to start with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_ends_with":{"type":"string","description":"Restricts the text to end with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_contains":{"type":"string","description":"Restricts the text to contain certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"error_message":{"type":"string","description":"An error message to display if any rules are broken. Cannot be whitespace only."}}},"ListOption":{"type":"object","properties":{"item_id":{"type":"string","description":"The unique id of this option’s item value."},"item_label":{"type":"string","description":"The displayable name of the option item."},"item_code":{"type":"string","description":"An internal code (e.g. sku) to associate the item option."},"item_display_order":{"type":"integer","format":"int64","description":"The order in which this item will be displayed among other items. Minimum is 0. Lower values indicate higher priority in order."},"price_adjustment":{"type":"number","format":"double","description":"An amount to adjust to the product price is selected. Negative value indicates subtraction from price."}}},"ProductOption":{"type":"object","properties":{"id":{"type":"string","description":"The unique id of the product option"},"required":{"type":"boolean","description":"Whether this option is required for product purchase."},"option_label":{"type":"string","description":"The displayable name of the option. E.g. Size"},"product_id":{"type":"string","description":"The product id that this option belongs to."},"option_type":{"type":"string","description":"The type of option. Possible valid values are LIST and TEXT.","enum":["LIST","TEXT"]},"display_order":{"type":"integer","format":"int32","description":"The order in which this option will be displayed among other options. Minimum is 0. Lower values indicate higher priority in order."},"list_items":{"type":"array","description":"Appears only for option_type of LIST. A fixed list of available selectable items for this product option. e.g (Medium)","items":{"$ref":"#/components/schemas/ListOption"}},"text_rules":{"$ref":"#/components/schemas/TextOption","description":"The option is a user-defined free-form field. The settings define the restrictions on what can be entered."}}},"TextOption":{"type":"object","properties":{"minimum_characters":{"type":"integer","format":"int32","description":"Minimum allowable characters. Minimum is 0."},"maximum_characters":{"type":"integer","format":"int32","description":"Maximum allowable characters. Minimum is 0."},"allow_spaces":{"type":"boolean","description":"Whether or not to allow whitespace in the text."},"only_starts_with":{"type":"string","description":"Restricts the text to start with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_ends_with":{"type":"string","description":"Restricts the text to end with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_contains":{"type":"string","description":"Restricts the text to contain certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"error_message":{"type":"string","description":"An error message to display if any rules are broken."}}},"CreateProductInterestBundleRequest":{"type":"object","properties":{"name":{"type":"string","description":"Product interest bundle name","example":"Premium Bundle"},"description":{"type":"string","description":"Product interest bundle description","example":"Bundle of premium products"}},"required":["description","name"]},"ProductInterest":{"type":"object","properties":{"id":{"type":"string","description":"The product interest ID","example":456},"type":{"type":"string","description":"The product interest type","enum":["PRODUCT","SUBSCRIPTION_PLAN"],"example":"PRODUCT"},"quantity":{"type":"integer","format":"int32","description":"The quantity of product.","example":1},"price":{"$ref":"#/components/schemas/CurrencyValue","description":"The price per unit of the product."},"interest_id":{"type":"string","description":"The interest ID","example":789},"discount_percent":{"type":"integer","format":"int32","description":"The percent to discount the product. Percent represented in a whole number, for example 10 is 10%","example":10}}},"ProductInterestBundle":{"type":"object","properties":{"id":{"type":"string","description":"The product interest bundle ID","example":123},"name":{"type":"string","description":"Product interest bundle name","example":"Premium Bundle"},"description":{"type":"string","description":"Product interest bundle description","example":"Bundle of premium products"},"product_interests":{"type":"array","description":"Product interests","items":{"$ref":"#/components/schemas/ProductInterest"}},"subscription_plan_interests":{"type":"array","description":"Subscription plan interests","items":{"$ref":"#/components/schemas/ProductInterest"}}}},"AddProductInterestRequest":{"type":"object","properties":{"type":{"type":"string","description":"The product interest type.","enum":["PRODUCT","SUBSCRIPTION_PLAN"],"example":"PRODUCT"},"entity_id":{"type":"string","description":"The `product_id` (when the `type` is set to `PRODUCT`)\n or the `subscription_plan_id` (when the `type` is set to `SUBSCRIPTION_PLAN`).\n","example":123},"price":{"type":"number","format":"double","description":"The price per unit of the product.","example":10000},"quantity":{"type":"integer","format":"int32","description":"Defaults to `1`.","example":1},"discount_percent":{"type":"integer","format":"int32","description":"Defaults to `0`.","example":10}},"required":["entity_id","price","type"]},"CreateProductCategoryRequest":{"type":"object","description":"productCategory","properties":{"name":{"type":"string","description":"The category name","example":"Electronics"},"display_order_index":{"type":"integer","format":"int32","description":"Display order of the category","example":0},"parent_category_id":{"type":"string","description":"Parent category ID for subcategories","example":2}},"required":["name"]},"ProductCategory":{"type":"object","properties":{"id":{"type":"string","description":"The product category ID","example":1},"name":{"type":"string","description":"The category name","example":"Electronics"},"display_order_index":{"type":"integer","format":"int32","description":"Display order of the category","example":0},"parent_category_id":{"type":"string","description":"Parent category ID for subcategories","example":2}}},"AssignProductsRequest":{"type":"object","properties":{"product_ids":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"required":["product_ids"]},"CreatePaymentMethodConfigRequest":{"type":"object","properties":{"contact_id":{"type":"string"}}},"PaymentMethodConfig":{"type":"object","properties":{"session_key":{"type":"string","description":"A temporary session key required for rendering Keap's payment component."}}},"AddressInformation":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"zip_code":{"type":"string"},"zip_four":{"type":"string"},"country_code":{"type":"string"},"first_name":{"type":"string"},"middle_name":{"type":"string"},"last_name":{"type":"string"},"is_invoice_to_company":{"type":"boolean"}}},"CreateOrderItemRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the order item. Must not be whitespace. If not specified, the product name will be used.","example":"Premium Widget"},"description":{"type":"string","description":"The description of the order item. Must not be whitespace.","example":"High-quality widget"},"quantity":{"type":"integer","format":"int32","description":"The quantity. Must be greater than or equal to 1.","example":2},"notes":{"type":"string","description":"The notes for the order item. Must not be whitespace.","example":"Gift wrap"},"product_id":{"type":"string","description":"The id of the product to be added to the order. Must be a valid product id. Required for item_type PRODUCT or SUBSCRIPTION.","example":123},"subscription_plan_id":{"type":"string","description":"The id of the subscription plan to be added to the order. Must be a valid subscription plan id. Required only when the item_type is SUBSCRIPTION.","example":456},"subscription_plan_description":{"type":"string","description":"A short description of the subscription's schedule. Used only for item_type SUBSCRIPTION. Must not be whitespace.","example":"Monthly subscription plan"},"item_type":{"type":"string","default":"PRODUCT","description":"The type of this order item. Will default to [PRODUCT] if omitted.","enum":["PRODUCT","SHIPPING","TAX","FINANCE_CHARGE","SUBSCRIPTION","DISCOUNT","DISCOUNT_FREE_TRIAL","DISCOUNT_ORDER_TOTAL","DISCOUNT_PRODUCT","DISCOUNT_PRODUCT_CATEGORY","DISCOUNT_SHIPPING","OTHER","FEE"],"example":"PRODUCT"},"price_per_unit":{"type":"number","format":"double","description":"The price per unit. For item_type PRODUCT or SUBSCRIPTION, if not specified, the product price will be used.","example":29.99},"cost_per_unit":{"type":"number","format":"double","description":"The cost per unit. Used only for item_type PRODUCT or SUBSCRIPTION. If not specified, the product cost will be used.","example":15.0}},"required":["quantity"]},"RestCreateOrderRequest":{"type":"object","properties":{"notes":{"type":"string","description":"Internal notes","example":"Rush delivery requested"},"terms":{"type":"string","description":"Order terms","example":"Net 30"},"title":{"type":"string","description":"A title for the invoice","example":"Monthly subscription invoice"},"contact_id":{"type":"string","description":"ID of the contact for this order","example":123},"order_items":{"type":"array","description":"List of items to include in the order","items":{"$ref":"#/components/schemas/CreateOrderItemRequest"}},"order_title":{"type":"string","description":"Title for the order","example":"Online Purchase"},"order_time":{"type":"string","format":"date-time","description":"The date and time of the order. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z)","example":"2024-05-21T14:30:00Z"},"order_type":{"type":"string","description":"The order type.","enum":["ONLINE","OFFLINE"],"example":"ONLINE"},"promo_codes":{"type":"array","description":"Uses multiple strings as promo codes. The corresponding discount will be applied to the order.","example":["SUMMER20","FREESHIP"],"items":{"type":"string"}},"lead_affiliate_id":{"type":"string","description":"Lead affiliate ID","example":456},"sales_affiliate_id":{"type":"string","description":"Sales affiliate ID","example":789},"shipping_address":{"$ref":"#/components/schemas/AddressInformation","description":"Shipping address for the order"},"custom_fields":{"type":"array","description":"List of custom field values to apply 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"},"invoice_number":{"type":"string","description":"Invoice number","example":1001},"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"}},"required":["contact_id","order_time","order_title","order_type"]},"FileOperationRequest":{"type":"object","description":"File name","properties":{"file_id":{"type":"string"}},"required":["file_id"]},"RestCreatePaymentRequest":{"type":"object","properties":{"notes":{"type":"string","description":"The notes for this payment."},"payment_method_id":{"type":"string","description":"The payment method id to charge immediately against this order. Omit if you want to add a payment record instead."},"payment_method_type":{"type":"string","description":"The manual payment method type for manually recording a payment. Value must match against the list of types defined under your application's Order Settings. Ignored if payment_method_id is provided."},"payment_time":{"type":"string","format":"date-time","description":"The date and time of payment. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z)","example":"2024-05-21T14:30:00Z"},"payment_amount":{"type":"number","format":"double","description":"The amount to pay. Must not exceed the current balance of the order. Must be greater than 0 if charging with a payment_method_id"},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this payment to commissions."},"external_source":{"type":"string","description":"The external source type of this payment."},"external_source_value":{"type":"string","description":"The external source value of this payment."},"external_status_value":{"type":"string","description":"The external status value of this payment."},"external_create_time":{"type":"string","format":"date-time","description":"The external creation timestamp of this payment. 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 external update timestamp of this payment. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z)","example":"2024-05-21T14:30:00Z"},"external_create_user":{"type":"string","description":"The user who created this payment externally."}},"required":["apply_to_commissions","payment_amount"]},"PaymentResult":{"type":"object","properties":{"id":{"type":"string","description":"Payment result ID","example":123},"invoice_id":{"type":"string","description":"Associated invoice ID","example":456},"payment_amount":{"type":"number","format":"double","description":"Amount paid","example":99.99},"payment_status_message":{"type":"string","description":"Payment status","example":"APPROVED"},"transaction_id":{"type":"string","description":"Transaction ID from payment processor","example":"TXN-789"}}},"ApplyCommissionRequest":{"type":"object","description":"RestApplyCommissionRequest","properties":{"affiliate_id":{"type":"string","description":"The affiliate id","example":123},"pay_percent":{"type":"number","format":"double","description":"Commission percentage","example":10.0},"commission_amount":{"type":"number","format":"double","description":"Fixed commission amount","example":50.0},"payout_type":{"type":"string","description":"The payout type","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"description":{"type":"string","description":"Commission description","example":"Q1 Sales Commission"},"commission_date":{"type":"string","format":"date","description":"Date of the commission","example":"2024-05-21"}},"required":["affiliate_id","payout_type"]},"CreateOpportunityRequest":{"type":"object","description":"opportunity","properties":{"opportunity_title":{"type":"string","description":"Opportunity title","example":"New Business Deal"},"next_action_time":{"type":"string","description":"Next action timestamp (ISO-8601)","example":"2024-03-20T10:00:00Z"},"next_action_notes":{"type":"string","description":"Notes for next action","example":"Schedule demo call"},"opportunity_notes":{"type":"string","description":"General notes","example":"Prospect from website inquiry"},"estimated_close_time":{"type":"string","description":"Estimated close timestamp (ISO-8601)","example":"2024-04-15T00:00:00Z"},"include_in_forecast":{"type":"boolean","description":"Include in sales forecast","example":true},"projected_revenue_low":{"type":"number","format":"double","description":"Low revenue estimate","example":5000.0},"projected_revenue_high":{"type":"number","format":"double","description":"High revenue estimate","example":10000.0},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"stage_id":{"type":"string","description":"Pipeline stage ID","example":2},"user_id":{"type":"string","description":"Assigned user ID","example":456},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"affiliate_id":{"type":"string","description":"Affiliate ID","example":789}},"required":["contact_id","opportunity_title","stage_id"]},"CustomField":{"type":"object","properties":{"content":{},"id":{"type":"string"}}},"CheckListItemDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"description":{"type":"string"},"required":{"type":"boolean"},"instance_id":{"type":"integer","format":"int64"},"item_order":{"type":"integer","format":"int32"},"done_date":{"type":"string","format":"date-time"}}},"OpportunityContact":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID","example":1001},"email":{"type":"string","description":"Email address","example":"john.smith@example.com"},"city":{"type":"string","description":"City","example":"Chandler"},"state":{"type":"string","description":"State","example":"AZ"},"first_name":{"type":"string","description":"First name","example":"John"},"last_name":{"type":"string","description":"Last name","example":"Smith"},"company_name":{"type":"string","description":"Company name","example":"Acme Corp"},"job_title":{"type":"string","description":"Job title","example":"Sales Manager"},"phone_number":{"type":"string","description":"Phone number","example":5551234567}},"required":["id"]},"OpportunityStage":{"type":"object","properties":{"id":{"type":"string","description":"Stage ID","example":1},"name":{"type":"string","description":"Stage name","example":"Qualified"},"details":{"$ref":"#/components/schemas/StageDetails","description":"Stage details"},"reasons":{"type":"array","description":"Stage change reasons","items":{"type":"string"}}},"required":["id"]},"RestV2Opportunity":{"type":"object","properties":{"id":{"type":"string","description":"Opportunity ID","example":123},"contact":{"$ref":"#/components/schemas/OpportunityContact"},"stage":{"$ref":"#/components/schemas/OpportunityStage"},"user":{"$ref":"#/components/schemas/RestV2User"},"opportunity_title":{"type":"string","description":"Opportunity title","example":"New Business Deal"},"next_action_time":{"type":"string","description":"Next action timestamp (ISO-8601)","example":"2024-03-20T10:00:00Z"},"next_action_notes":{"type":"string","description":"Notes for next action","example":"Follow up with decision maker"},"opportunity_notes":{"type":"string","description":"General notes","example":"High-value prospect from trade show"},"estimated_close_time":{"type":"string","description":"Estimated close timestamp (ISO-8601)","example":"2024-04-15T00:00:00Z"},"include_in_forecast":{"type":"boolean","description":"Include in sales forecast","example":true},"projected_revenue_low":{"type":"number","format":"double","description":"Low revenue estimate","example":5000.0},"projected_revenue_high":{"type":"number","format":"double","description":"High revenue estimate","example":10000.0},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"created_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"last_updated_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T14:30:00Z"},"affiliate_id":{"type":"string","description":"Affiliate ID","example":456},"lead_source":{"type":"string","description":"Lead source","example":"Web Form"},"monthly_revenue":{"type":"number","format":"double","description":"Monthly recurring revenue","example":500.0},"order_revenue":{"type":"number","format":"double","description":"Order revenue","example":2500.0},"objection":{"type":"string","description":"Objection reason","example":"Price"},"status":{"type":"string","description":"Status name","example":"Active"},"status_id":{"type":"string","description":"Status ID","example":123},"stage_entrance_time":{"type":"string","description":"Timestamp when the opportunity entered its current stage (ISO-8601)","example":"2024-03-20T10:00:00Z"},"last_updated_by":{"type":"string","description":"User who last updated the opportunity record","example":945},"created_by":{"type":"string","description":"User who created the opportunity record","example":852}},"required":["contact","opportunity_title","stage"]},"RestV2User":{"type":"object","properties":{"id":{"type":"string","description":"User ID","example":456},"first_name":{"type":"string","description":"First name","example":"Jane"},"last_name":{"type":"string","description":"Last name","example":"Doe"}}},"StageDetails":{"type":"object","properties":{"probability":{"type":"integer","format":"int32","description":"Win probability (0-100)","example":50},"stage_order":{"type":"integer","format":"int32","description":"Stage order in pipeline","example":2},"target_num_days":{"type":"integer","format":"int32","description":"Target days in stage","example":14},"checklist_items":{"type":"array","description":"Stage checklist items","items":{"$ref":"#/components/schemas/CheckListItemDetails"}}}},"CreateOpportunityStageChecklistItem":{"type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean","example":true},"order":{"type":"integer","format":"int32","description":"Must be Numeric could be negative values as well for ordering","examples":["-2","1"]}},"required":["description","order","required"]},"CreateOpportunityStageRequest":{"type":"object","description":"opportunity","properties":{"name":{"type":"string","example":"Won"},"order":{"type":"integer","format":"int32","example":5},"target_number_days":{"type":"integer","format":"int32","example":10,"minimum":0},"probability":{"type":"integer","format":"int32","example":42,"maximum":100,"minimum":0},"checklist_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateOpportunityStageChecklistItem"}}},"required":["name","order","probability","target_number_days"]},"ChecklistItem":{"type":"object","properties":{"id":{"type":"string","description":"Checklist item ID","example":101},"description":{"type":"string","description":"Item description","example":"Send proposal document"},"required":{"type":"boolean","description":"Whether item is required","example":true},"order":{"type":"integer","format":"int32","description":"Display order","example":1}}},"RestOpportunityStage":{"type":"object","properties":{"id":{"type":"string","description":"Stage ID","example":1},"name":{"type":"string","description":"Stage name","example":"Qualified"},"order":{"type":"integer","format":"int32","description":"Stage order in pipeline","example":2},"target_number_days":{"type":"integer","format":"int32","description":"Target days in stage","example":14},"probability":{"type":"integer","format":"int32","description":"Win probability (0-100)","example":50},"created_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"updated_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"checklist_items":{"type":"array","description":"Stage checklist items","items":{"$ref":"#/components/schemas/ChecklistItem"}}}},"CreateLeadSourceRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the lead source","example":"Google Ads"},"description":{"type":"string","description":"A description of the lead source","example":"Paid search advertising"},"vendor":{"type":"string","description":"The vendor of the lead source","example":"Google"},"medium":{"type":"string","description":"The medium of the lead source","example":"cpc"},"message":{"type":"string","description":"A message on the lead source","example":"Spring promotion"},"status":{"type":"string","description":"The status of the lead source","enum":["ACTIVE","INACTIVE"],"example":"ACTIVE"},"lead_source_category_id":{"type":"string","description":"The lead source category that the lead source belongs to","example":456},"start_time":{"type":"string","format":"date-time","description":"When the lead source starts","example":"2024-01-01T00:00:00Z"},"end_time":{"type":"string","format":"date-time","description":"When the lead source ends","example":"2024-12-31T23:59:59Z"}}},"LeadSource":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this lead source","example":123},"name":{"type":"string","description":"The name of the lead source","example":"Google Ads"},"description":{"type":"string","description":"The description of the lead source","example":"Paid search advertising"},"vendor":{"type":"string","description":"The vendor of the lead source","example":"Google"},"medium":{"type":"string","description":"The medium of the lead source","example":"cpc"},"message":{"type":"string","description":"The message/content of the lead source","example":"Spring promotion"},"status":{"type":"string","description":"The status of the lead source","enum":["ACTIVE","INACTIVE"],"example":"ACTIVE"},"lead_source_category_id":{"type":"string","description":"The ID of the category that the lead source belongs to","example":456},"start_time":{"type":"string","format":"date-time","description":"The time that this lead source started","example":"2024-01-01T00:00:00Z"},"end_time":{"type":"string","format":"date-time","description":"The time that this lead source will end","example":"2024-12-31T23:59:59Z"},"create_time":{"type":"string","format":"date-time","description":"The time that this lead source was created","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time that this lead source was last updated","example":"2024-03-15T10:30:00Z"}}},"CreateLeadSourceRecurringExpenseRequest":{"type":"object","properties":{"title":{"type":"string","description":"The title of the lead source recurring expense","example":"Monthly Google Ads subscription"},"notes":{"type":"string","description":"The notes for the lead source recurring expense","example":"Automated monthly billing"},"amount":{"type":"integer","format":"int64","description":"The monthly cost of the lead source recurring expense. The value should be in the smallest unit of currency for your currency locale. For example, if your currency locale is USD, then the smallest unit of currency is in cents, $225.50 would be provided in the request as 22550.","example":22550,"minimum":0},"start_time":{"type":"string","format":"date-time","description":"The time the lead source recurring expense starts","example":"2024-01-01T00:00:00Z"},"end_time":{"type":"string","format":"date-time","description":"The time the lead source recurring expense ends","example":"2024-12-31T23:59:59Z"}},"required":["amount"]},"LeadSourceRecurringExpense":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the lead source recurring expense","example":123},"title":{"type":"string","description":"The title of the lead source recurring expense","example":"Monthly Google Ads subscription"},"notes":{"type":"string","description":"The notes for the lead source recurring expense","example":"Automated monthly billing"},"amount":{"$ref":"#/components/schemas/CurrencyValue","description":"The amount of the lead source recurring expense"},"lead_source_id":{"type":"string","description":"The ID of the lead source the recurring expense belongs to","example":456},"start_time":{"type":"string","format":"date-time","description":"The time this lead source recurring expense starts","example":"2024-01-01T00:00:00Z"},"end_time":{"type":"string","format":"date-time","description":"The time this lead source recurring expense ends","example":"2024-12-31T23:59:59Z"},"next_expense_time":{"type":"string","format":"date-time","description":"The time this lead source recurring expense will incur a new expense","example":"2024-04-01T00:00:00Z"},"create_time":{"type":"string","format":"date-time","description":"The time this lead source recurring expense was created","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this lead source recurring expense was last updated","example":"2024-03-15T10:30:00Z"}}},"CreateLeadSourceExpenseRequest":{"type":"object","properties":{"title":{"type":"string","description":"The title of the lead source expense","example":"Google Ads Campaign"},"notes":{"type":"string","description":"The notes for the lead source expense","example":"Q1 advertising spend"},"amount":{"type":"integer","format":"int64","description":"The cost of the lead source expense. The value should be in the smallest unit of currency for your currency locale. For example, if your currency locale is USD, then the smallest unit of currency is in cents, $225.50 would be provided in the request as 22550.","example":22550,"minimum":0},"incurred_time":{"type":"string","format":"date-time","description":"The time that the lead source expense was incurred.","example":"2024-03-15T00:00:00Z"}},"required":["amount"]},"LeadSourceExpense":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense.","example":123},"title":{"type":"string","description":"The title of the expense","example":"Google Ads Campaign"},"notes":{"type":"string","description":"The notes for the expense","example":"Q1 advertising spend"},"amount":{"$ref":"#/components/schemas/CurrencyValue","description":"The amount of the expense"},"lead_source_id":{"type":"string","description":"The ID of the lead source this expense belongs to","example":456},"lead_source_recurring_expense_id":{"type":"string","description":"If this expense was incurred from a recurring expense, this is the ID of that recurring expense","example":789},"create_time":{"type":"string","format":"date-time","description":"The date the expense was created","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The date the expense was last updated","example":"2024-03-15T10:30:00Z"},"incurred_time":{"type":"string","format":"date-time","description":"The date the expense was incurred","example":"2024-03-15T00:00:00Z"}}},"CreateUpdateLeadSourceCategoryRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the category, must be unique","example":"Paid Advertising"},"description":{"type":"string","description":"The description of the category","example":"All paid marketing channels"}}},"LeadSourceCategory":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the category","example":123},"name":{"type":"string","description":"The name of the category","example":"Paid Advertising"},"description":{"type":"string","description":"The description of the category","example":"All paid marketing channels"},"create_time":{"type":"string","format":"date-time","description":"The date the category was created","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The date the category was last updated","example":"2024-03-15T10:30:00Z"}}},"CreateIntegrationsWordPressOptInOption":{"type":"object","properties":{"key":{"type":"string","description":"The unique identifier of the opt-in option, which must be an alphanumeric string","example":"NewsletterOptIn"},"name":{"type":"string","description":"The display name of the opt-in option","example":"Newsletter Opt-In"}}},"WordPressOptInOption":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}}},"AchieveIntegrationsWordPressOptInOptionGoalRequest":{"type":"object","properties":{"contact_id":{"type":"string","description":"The Contact Id to Opt-In","example":"d05dc112-3c92-4aaf-b2fa-00cc6cb452ec"}}},"AchieveWordPressOptInGoalResult":{"type":"object","properties":{"successful":{"type":"boolean"}}},"FileMetadata":{"type":"object","properties":{"id":{"type":"string","description":"File ID","example":12345},"category":{"type":"string","description":"File category","enum":["ATTACHMENTS","CART","DOCUMENTS","HIDDEN","INVOICE","LOGO","TICKETS","WEB_FORM","FUNNEL"],"example":"DOCUMENTS"},"file_name":{"type":"string","description":"File name with extension","example":"document.pdf"},"is_public":{"type":"boolean","description":"Whether file is publicly accessible","example":false},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"created_by_id":{"type":"string","description":"ID of user who created the file","example":456},"remote_file_key":{"type":"string","description":"Remote storage key","example":"files/12345/document.pdf"},"file_box_type":{"type":"string","description":"File box type","enum":["APPLICATION","IMAGE","FAX","ATTACHMENT","TICKET","CONTACT","DIGITAL_PRODUCT","IMPORT","HIDDEN","WEB_FORM","STYLED_CART","RESAMPLED_IMAGE","TEMPLATE_THUMBNAIL","FUNNEL","LOGO_THUMBNAIL","UNLAYER","BRANDING_CENTER_LOGO"],"example":"APPLICATION"},"file_size":{"type":"integer","format":"int64","description":"File size in bytes","example":1048576},"created_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"updated_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"}}},"CreateEmailSentRequest":{"type":"object","description":"Request to create an email record","properties":{"subject":{"type":"string","description":"The subject of the email","example":"Welcome to our service"},"headers":{"type":"string","description":"Email headers","example":"X-Custom-Header: value"},"contact_id":{"type":"string","description":"The contact ID who received the email","example":456},"sent_to_address":{"type":"string","description":"The email address the email was sent to","example":"john@example.com"},"sent_to_cc_address_list":{"type":"array","description":"List of CC email addresses","example":["cc1@example.com","cc2@example.com"],"items":{"type":"string"}},"sent_to_bcc_address_list":{"type":"array","description":"List of BCC email addresses","example":["bcc@example.com"],"items":{"type":"string"}},"sent_from_address":{"type":"string","description":"The sender's email address","example":"sender@company.com"},"sent_from_reply_address":{"type":"string","description":"The reply-to email address","example":"reply@company.com"},"sent_time":{"type":"string","format":"date-time","description":"When the email was sent, in ISO-8601 format. If omitted, the stored sent_time will be null.","example":"2024-05-21T14:30:00Z"},"received_time":{"type":"string","format":"date-time","description":"When the email was received, in ISO-8601 format","example":"2024-05-21T14:31:00Z"},"opened_time":{"type":"string","format":"date-time","description":"When the email was opened, in ISO-8601 format","example":"2024-05-21T15:00:00Z"},"clicked_time":{"type":"string","format":"date-time","description":"When a link in the email was clicked, in ISO-8601 format","example":"2024-05-21T15:05:00Z"},"plain_content":{"type":"string","description":"Base64 encoded text","example":"V2VsY29tZSB0byBvdXIgc2VydmljZQ=="},"html_content":{"type":"string","description":"Base64 encoded HTML","example":"PGgxPldlbGNvbWU8L2gxPg=="},"original_provider":{"type":"string","description":"Provider that sent the email, defaults to UNKNOWN","enum":["UNKNOWN","INFUSIONSOFT","MICROSOFT","GOOGLE"],"example":"INFUSIONSOFT"},"original_provider_id":{"type":"string","description":"Provider id that sent the email, must be unique when combined with provider. If omitted a UUID without dashes is autogenerated for the record.","example":"msg_abc123"},"provider_source_id":{"type":"string","description":"The email address of the synced email account that generated this message.","example":"sync@company.com"}},"required":["sent_to_address"]},"EmailSentWithContent":{"type":"object","description":"A sent email record with full content","properties":{"id":{"type":"string","description":"The unique identifier of the email","example":123},"subject":{"type":"string","description":"The subject of the email","example":"Welcome to our service"},"headers":{"type":"string","description":"Email headers","example":"X-Custom-Header: value"},"contact_id":{"type":"string","description":"The contact ID who received the email","example":456},"sent_to_address":{"type":"string","description":"The email address the email was sent to","example":"john@example.com"},"sent_to_cc_address_list":{"type":"array","description":"List of CC email addresses","example":["cc1@example.com","cc2@example.com"],"items":{"type":"string"}},"sent_to_bcc_address_list":{"type":"array","description":"List of BCC email addresses","example":["bcc@example.com"],"items":{"type":"string"}},"sent_from_address":{"type":"string","description":"The sender's email address","example":"sender@company.com"},"sent_from_reply_address":{"type":"string","description":"The reply-to email address","example":"reply@company.com"},"sent_time":{"type":"string","format":"date-time","description":"When the email was sent, in ISO-8601 format","example":"2024-05-21T14:30:00Z"},"received_time":{"type":"string","format":"date-time","description":"When the email was received, in ISO-8601 format","example":"2024-05-21T14:31:00Z"},"opened_time":{"type":"string","format":"date-time","description":"When the email was opened, in ISO-8601 format","example":"2024-05-21T15:00:00Z"},"clicked_time":{"type":"string","format":"date-time","description":"When a link in the email was clicked, in ISO-8601 format","example":"2024-05-21T15:05:00Z"},"original_provider_id":{"type":"string","description":"The original provider's message ID","example":"msg_abc123"},"original_provider":{"type":"string","description":"The email provider that sent the email","enum":["UNKNOWN","INFUSIONSOFT","MICROSOFT","GOOGLE"],"example":"INFUSIONSOFT"},"provider_source_id":{"type":"string","description":"The synced email account that generated this message","example":"sync@company.com"},"plain_content":{"type":"string","description":"Base64 encoded plain text content","example":"V2VsY29tZSB0byBvdXIgc2VydmljZQ=="},"html_content":{"type":"string","description":"Base64 encoded HTML content","example":"PGgxPldlbGNvbWU8L2gxPg=="}}},"EmailSendRequest":{"type":"object","description":"Request to send an email to contacts","properties":{"contacts":{"type":"array","description":"An array of Contact Ids to receive the email","example":["1","2","3"],"items":{"type":"string"}},"subject":{"type":"string","description":"The subject line of the email","example":"Welcome to our newsletter"},"attachments":{"type":"array","description":"Attachments to be sent with each copy of the email, maximum of 10 with size of 1MB each","items":{"$ref":"#/components/schemas/EmailSendRequestAttachment"},"uniqueItems":true},"user_id":{"type":"string","description":"The user ID to send the email on behalf of. Exactly one of user_id or from_address is required.","example":1},"from_address":{"type":"string","description":"The authenticated sender email address to send from. Exactly one of user_id or from_address is required.","example":"sales@example.com"},"html_content":{"type":"string","description":"The HTML-formatted content of the email, encoded in Base64","example":"PGgxPldlbGNvbWU8L2gxPg=="},"plain_content":{"type":"string","description":"The plain-text content of the email, encoded in Base64","example":"V2VsY29tZSB0byBvdXIgbmV3c2xldHRlcg=="},"address_field":{"type":"string","description":"Email field of each Contact record to address the email to, such as 'Email', 'EmailAddress2', 'EmailAddress3' or '_CustomFieldName', defaulting to the contact's primary email","example":"EMAIL1"}},"required":["contacts","subject"]},"EmailSendRequestAttachment":{"type":"object","description":"An attachment for an email","properties":{"file_name":{"type":"string","description":"The filename of the attached file, including extension. The extension determines whether the attachment is accepted; only the following extensions are supported (case-insensitive):\n- Image: bmp, cdr, fpx, gif, jif, jiff, jp2, jpeg, jpg, jpx, j2k, pcd, pdf, png, psd, pspimage, thm, tif, tiff, yuv\n- Text/Document: doc, docx, err, log, msg, notes, pages, pwd, rtf, text, txt, vcf, wp, wp4, wp5, wp7, wpd, wps, wsd, xdl\n- Audio: mid, mp3, mp4, wav, wma\n- Video: avi, divx, f4p, flv, gvi, hdmov, hdv, m2ts, m4v, mnv, mov, movie, mp4, mp4v, mpeg, mpeg1, mpeg4, mpg, qt, rm, vob, wm, wmv\n- Data: csv, ics, key, pps, ppt, pptx, xlr, xls, xlsx, xml, zip\n\nRequests including an attachment with any other extension return `400 Bad Request` with the message \"attachment type is invalid\".\n","example":"document.pdf"},"file_data":{"type":"string","description":"The content of the attachment, encoded in Base64","example":"JVBERi0xLjQKJeLjz9MK..."}},"required":["file_data","file_name"]},"DeleteEmailsRequest":{"type":"object","description":"Request to delete multiple email records","properties":{"email_ids":{"type":"array","description":"List of email IDs to delete","example":["123","456","789"],"items":{"type":"string"}}},"required":["email_ids"]},"DeleteEmailsResponse":{"type":"object","description":"Response from deleting email records","properties":{"results":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of email ID to deletion result (SUCCESS, NO_PERMISSION, EMAIL_ID_NOT_FOUND)"}}},"CreateEmailsSentRequest":{"type":"object","description":"Email records to persist, with content.","properties":{"emails":{"type":"array","description":"Collection of email records to create, maximum 1000","items":{"$ref":"#/components/schemas/CreateEmailSentRequest"}}},"required":["emails"]},"EmailSentCreateError":{"type":"object","description":"Error that occurred when creating an email record","properties":{"error_message":{"type":"string","description":"Description of the error","example":"Contact not found"},"email":{"$ref":"#/components/schemas/CreateEmailSentRequest","description":"The email request that failed"}}},"EmailsSentList":{"type":"object","description":"Response containing created emails and any errors","properties":{"emails":{"type":"array","description":"Successfully created email records","items":{"$ref":"#/components/schemas/EmailSentWithContent"}},"errors":{"type":"array","description":"Errors that occurred during creation","items":{"$ref":"#/components/schemas/EmailSentCreateError"}}}},"EmailSendTemplateRequest":{"type":"object","description":"Use a template to send an email to a list of contacts ","properties":{"template_id":{"type":"string","description":"Template ID","example":123},"contact_ids":{"type":"array","description":"List of contact IDs to send the email to","example":["1","2","3"],"items":{"type":"string"}},"user_id":{"type":"string","description":"The user ID to send the email on behalf of","example":1},"address_field":{"type":"string","description":"Email field of each Contact record to address the email to, such as 'Email', 'EmailAddress2', 'EmailAddress3' or '_CustomFieldName', defaulting to the contact's primary email","example":"EMAIL1"}},"required":["contact_ids","template_id","user_id"]},"CreateShippingDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"CreateShippingDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Free Shipping Over $100"},"description":{"type":"string","description":"Description of the discount","example":"Free shipping on orders over $100"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CreateShippingDiscountCriteria"}},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":100.0}},"required":["discount_type","discount_value","name"]},"DiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"ShippingDiscount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this shipping discount","example":105},"name":{"type":"string","description":"Name of the discount","example":"Free Shipping Over $100"},"description":{"type":"string","description":"Description of the discount","example":"Free shipping on orders over $100"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/DiscountCriteria"}},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":100.0}}},"CreateProductDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"CreateProductDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Summer Sale 20% Off"},"description":{"type":"string","description":"Description of the discount","example":"20% off on all summer products"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CreateProductDiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"product_id":{"type":"string","description":"ID of the product this discount applies to","example":456},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":20.0}},"required":["discount_type","discount_value","name","product_id"]},"ProductDiscount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this product discount","example":101},"name":{"type":"string","description":"Name of the discount","example":"Summer Sale 20% Off"},"description":{"type":"string","description":"Description of the discount","example":"20% off on all summer products"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/DiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"product_id":{"type":"string","description":"ID of the product this discount applies to","example":456},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":20.0}}},"CategoryDiscountCriteriaRequest":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE or PROMO_CODE","enum":["DATE_RANGE","PROMO_CODE"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"}}},"CreateCategoryDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Electronics Category Sale"},"description":{"type":"string","description":"Description of the discount","example":"15% off all electronics"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CategoryDiscountCriteriaRequest"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":false},"discount_percent":{"type":"number","format":"double","description":"Percentage discount to apply. Must be greater than or equal to 0.","example":15.0},"product_category_ids":{"type":"array","description":"List of product category IDs this discount applies to","example":["10","11","12"],"items":{"type":"string"}}},"required":["apply_to_commissions","discount_percent","name","product_category_ids"]},"CategoryDiscount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this category discount","example":102},"name":{"type":"string","description":"Name of the discount","example":"Electronics Category Sale"},"description":{"type":"string","description":"Description of the discount","example":"15% off all electronics"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CategoryDiscountCriteriaResponse"}},"discount_percent":{"type":"number","format":"double","description":"Percentage discount to apply (0-100)","example":15.0},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":false},"product_categories":{"type":"array","description":"List of product category IDs this discount applies to","example":["10","11","12"],"items":{"type":"string"}}}},"CategoryDiscountCriteriaResponse":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE or PROMO_CODE","enum":["DATE_RANGE","PROMO_CODE"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"}}},"CreateCategoryDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE or PROMO_CODE","enum":["DATE_RANGE","PROMO_CODE"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"}}},"CreateOrderTotalDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"CreateOrderTotalDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Bulk Order Discount"},"description":{"type":"string","description":"Description of the discount","example":"$50 off orders over $500"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CreateOrderTotalDiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"AMOUNT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":50.0},"discount_strategy":{"type":"string","description":"Strategy for applying discount: GROSS (before tax) or NET (after tax)","enum":["GROSS","NET"],"example":"GROSS"}},"required":["discount_type","discount_value","name"]},"OrderTotalDiscount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this order total discount","example":103},"name":{"type":"string","description":"Name of the discount","example":"Bulk Order Discount"},"description":{"type":"string","description":"Description of the discount","example":"$50 off orders over $500"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/DiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"AMOUNT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":50.0},"discount_strategy":{"type":"string","description":"Strategy for applying discount: GROSS (before tax) or NET (after tax)","enum":["GROSS","NET"],"example":"GROSS"}}},"CreateFreeTrialDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"CreateFreeTrialDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"30-Day Free Trial"},"description":{"type":"string","description":"Description of the discount","example":"Try our premium plan free for 30 days"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CreateFreeTrialDiscountCriteria"}},"hide_price":{"type":"boolean","description":"Whether to hide the price during the trial period","example":true},"subscription_plan_id":{"type":"string","description":"ID of the subscription plan this trial applies to","example":789},"free_trial_days":{"type":"integer","format":"int32","description":"Number of free trial days. Must be a positive number. Defaults to 0.","example":30}},"required":["name","subscription_plan_id"]},"FreeTrialDiscount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this free trial discount","example":104},"name":{"type":"string","description":"Name of the discount","example":"30-Day Free Trial"},"description":{"type":"string","description":"Description of the discount","example":"Try our premium plan free for 30 days"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/FreeTrialDiscountCriteriaResponse"}},"hide_price":{"type":"boolean","description":"Whether to hide the price during the trial period","example":true},"subscription_plan_id":{"type":"string","description":"ID of the subscription plan this trial applies to","example":789},"free_trial_days":{"type":"integer","format":"int32","description":"Number of days for the free trial period","example":30}}},"FreeTrialDiscountCriteriaResponse":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}}},"BasicCompany":{"type":"object","properties":{"id":{"type":"string","description":"Company ID","example":100},"company_name":{"type":"string","description":"Company name","example":"Thryv"}}},"CreateContactUtmPropertiesRequest":{"type":"object","properties":{"keap_source_id":{"type":"string","description":"The formId","example":6088383224687662},"utm_source":{"type":"string","description":"UTM source information","example":"google"},"utm_medium":{"type":"string","description":"UTM medium information","example":"cpc"},"utm_term":{"type":"string","description":"UTM term information","example":"financial_consulting"},"utm_campaign":{"type":"string","description":"UTM campaign information","example":"spring_sale"},"utm_content":{"type":"string","description":"UTM content information","example":"textlink"}},"required":["keap_source_id"]},"CreateUpdateContactRequest":{"type":"object","description":"contact","properties":{"addresses":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/Address"}},"company":{"$ref":"#/components/schemas/BasicCompany"},"origin":{"$ref":"#/components/schemas/OriginRequest"},"prefix":{"type":"string","description":"Name prefix","example":"Dr."},"suffix":{"type":"string","description":"Name suffix","example":"Jr"},"website":{"type":"string","description":"Personal website URL","example":"https://thryv.com","maxLength":100},"anniversary_date":{"type":"string","description":"The anniversary date","example":"2015-06-20"},"birth_date":{"type":"string","description":"The birth date","example":"1985-03-15"},"contact_type":{"type":"string","description":"Type of contact","example":"Prospect"},"custom_fields":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/CustomFieldValue"}},"email_addresses":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/EmailAddressRequest"}},"family_name":{"type":"string","description":"Last name / surname","example":"Smith","maxLength":40},"fax_numbers":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/FaxNumber"}},"given_name":{"type":"string","description":"First name","example":"John","maxLength":40},"job_title":{"type":"string","description":"Job title","example":"Senior Software Engineer","maxLength":255},"leadsource_id":{"type":"string","description":"Lead source identifier","example":12},"middle_name":{"type":"string","description":"Middle name","example":"Robert","maxLength":100},"owner_id":{"type":"string","description":"ID of the user who owns this contact","example":45},"phone_numbers":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/PhoneNumber"}},"preferred_locale":{"type":"string","description":"Preferred locale","example":"en_US"},"preferred_name":{"type":"string","description":"Preferred name or nickname","example":"Johnny","maxLength":100},"referral_code":{"type":"string","description":"Referral code","example":"REF2024ABC"},"social_accounts":{"type":"array","description":"Any item not listed here will be removed if it already exists. If an empty array is specified, all existing values will be removed.","items":{"$ref":"#/components/schemas/SocialAccount"}},"source_type":{"type":"string","enum":["SOURCE_TYPE_UNSPECIFIED","API","APPOINTMENT","FORM_API_HOSTED","FORM_API_INTERNAL","IMPORT","INTERNAL_FORM","LANDING_PAGE","MANUAL","OTHER","UNKNOWN","WEBFORM"]},"spouse_name":{"type":"string","description":"Spouse's name","example":"Jane Smith","maxLength":100},"time_zone":{"type":"string","description":"Contact's timezone","example":"America/New_York"},"utm_parameters":{"$ref":"#/components/schemas/CreateContactUtmPropertiesRequest"},"assistant_name":{"type":"string","description":"Assistant's name","example":"Pat Doe","maxLength":20},"assistant_phone":{"type":"string","description":"Assistant's phone number","example":5551234567,"maxLength":15},"billing_information":{"type":"string","description":"Billing information","maxLength":100}}},"EmailAddressRequest":{"type":"object","properties":{"email":{"type":"string","description":"Email address. Maximum length is 75 characters for EMAIL1 and 100 characters for EMAIL2 and EMAIL3.","example":"john.smith@example.com"},"field":{"type":"string","description":"Email address slot","enum":["EMAIL_FIELD_UNSPECIFIED","EMAIL1","EMAIL2","EMAIL3"],"example":"EMAIL1"},"opt_in_reason":{"type":"string","description":"Reason for opting in","example":"Subscribed via website form"}}},"FaxNumber":{"type":"object","properties":{"number":{"type":"string","description":"Fax number","example":5551234568},"type":{"type":"string","description":"Fax type","example":"Work"},"field":{"type":"string","description":"Fax number slot","enum":["FAX_NUMBER_FIELD_UNSPECIFIED","FAX1","FAX2"],"example":"FAX1"}}},"OriginRequest":{"type":"object","properties":{"ip_address":{"type":"string"}}},"PhoneNumber":{"type":"object","properties":{"extension":{"type":"string","description":"Phone extension","example":101},"number":{"type":"string","description":"Phone number. Maximum length is 40 characters for PHONE1-PHONE3 and 20 characters for PHONE4-PHONE5.","example":5551234567},"type":{"type":"string","description":"Phone type","example":"Work"},"field":{"type":"string","description":"Phone number slot","enum":["PHONE_NUMBER_FIELD_UNSPECIFIED","PHONE1","PHONE2","PHONE3","PHONE4","PHONE5"],"example":"PHONE1"},"number_e164":{"type":"string","description":"Phone number in E.164 format","example":"+15551234567"}}},"SocialAccount":{"type":"object","properties":{"name":{"type":"string","description":"Social account username or handle. Maximum length is 255 characters.","example":"@thryv"},"type":{"type":"string","description":"Social account type","enum":["SOCIAL_ACCOUNT_TYPE_UNSPECIFIED","FACEBOOK","LINKED_IN","TWITTER","INSTAGRAM","SNAPCHAT","YOUTUBE","PINTEREST"],"example":"FACEBOOK"}},"required":["type"]},"Contact":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","example":1001},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"company":{"$ref":"#/components/schemas/BasicCompany","description":"Associated company"},"origin":{"$ref":"#/components/schemas/Origin"},"prefix":{"type":"string","description":"Name prefix","example":"Dr."},"suffix":{"type":"string","description":"Name suffix","example":"Jr"},"website":{"type":"string","description":"Personal website URL","example":"https://thryv.com"},"groups":{"type":"string"},"update_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"score_value":{"type":"string","description":"Contact score value","example":85},"tag_ids":{"type":"array","items":{"type":"string"}},"anniversary_date":{"type":"string","description":"The anniversary date","example":"2015-06-20"},"birth_date":{"type":"string","description":"The birth date","example":"1985-03-15"},"contact_type":{"type":"string","description":"Type of contact","example":"Prospect"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValue"}},"email_addresses":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"}},"family_name":{"type":"string","description":"Last name / surname","example":"Smith"},"fax_numbers":{"type":"array","items":{"$ref":"#/components/schemas/FaxNumber"}},"given_name":{"type":"string","description":"First name","example":"John"},"job_title":{"type":"string","description":"Job title","example":"Senior Software Engineer"},"leadsource_id":{"type":"string","description":"Lead source identifier","example":12},"middle_name":{"type":"string","description":"Middle name","example":"Robert"},"owner_id":{"type":"string","description":"ID of the user who owns this contact","example":45},"phone_numbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"preferred_locale":{"type":"string","description":"Preferred locale","example":"en_US"},"preferred_name":{"type":"string","description":"Preferred name or nickname","example":"Johnny"},"referral_code":{"type":"string","description":"Referral code","example":"REF2024ABC"},"social_accounts":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccount"}},"source_type":{"type":"string","enum":["SOURCE_TYPE_UNSPECIFIED","API","APPOINTMENT","FORM_API_HOSTED","FORM_API_INTERNAL","IMPORT","INTERNAL_FORM","LANDING_PAGE","MANUAL","OTHER","UNKNOWN","WEBFORM"]},"spouse_name":{"type":"string","description":"Spouse's name","example":"Jane Smith"},"time_zone":{"type":"string","description":"Contact's timezone","example":"America/New_York"},"utm_parameters":{"type":"array","items":{"$ref":"#/components/schemas/ContactUtmResponse"}},"account_id":{"type":"string"},"assistant_name":{"type":"string"},"assistant_phone":{"type":"string"},"billing_information":{"type":"string"},"created_by":{"type":"string"},"last_updated_by":{"type":"string"}}},"ContactUtmResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"keapSourceId":{"type":"string"},"utmSource":{"type":"string"},"utmMedium":{"type":"string"},"utmTerm":{"type":"string"},"utmCampaign":{"type":"string"},"utmContent":{"type":"string"},"firstTouch":{"type":"boolean"},"lastTouch":{"type":"boolean"},"dateCreated":{"type":"string","format":"date-time"}}},"EmailAddress":{"type":"object","properties":{"email":{"type":"string","description":"Email address. Maximum length is 75 characters for EMAIL1 and 100 characters for EMAIL2 and EMAIL3.","example":"john.smith@example.com"},"field":{"type":"string","description":"Email address slot","enum":["EMAIL_FIELD_UNSPECIFIED","EMAIL1","EMAIL2","EMAIL3"],"example":"EMAIL1"},"opt_in_reason":{"type":"string","description":"Reason for opting in","example":"Subscribed via website form"},"is_opt_in":{"type":"boolean"},"email_opt_status":{"type":"string","enum":["UNENGAGED_MARKETABLE","SINGLE_OPT_IN","DOUBLE_OPT_IN","CONFIRMED","UNENGAGED_NON_MARKETABLE","NON_MARKETABLE","LOCKDOWN","BOUNCE","HARD_BOUNCE","MANUAL","ADMIN","SYSTEM","LIST_UNSUBSCRIBE","FEEDBACK","SPAM","INVALID","DEACTIVATED"]}}},"Link":{"type":"object","properties":{"id":{"type":"string","description":"Link ID","example":1},"linked_contact_id":{"type":"string","description":"ID of the linked contact","example":2001},"link_type_id":{"type":"string","description":"Link type ID","example":1},"link_type_name":{"type":"string","description":"Link type name","example":"Spouse"}}},"Origin":{"type":"object","properties":{"date":{"type":"string"},"ip_address":{"type":"string"}}},"LinkContactsRequest":{"type":"object","properties":{"contact1_id":{"type":"string","description":"First contact ID to link","example":1001},"link_type_id":{"type":"string","description":"Link type ID","example":1},"contact2_id":{"type":"string","description":"Second contact ID to link","example":1002}}},"MergeContactRequest":{"type":"object","properties":{"contact_id":{"type":"string","description":"Primary contact ID to merge into","example":1001},"duplicate_contact_id":{"type":"string","description":"Duplicate contact ID to merge from","example":1002}},"required":["contact_id","duplicate_contact_id"]},"ContactLink":{"type":"object","properties":{"contact1_id":{"type":"string","description":"First contact ID in the link","example":1001},"contact2_id":{"type":"string","description":"Second contact ID in the link","example":1002},"link_type_id":{"type":"string","description":"Link type ID","example":1},"link_type_name":{"type":"string","description":"Link type name","example":"Spouse"}}},"CreateNoteRequest":{"type":"object","properties":{"title":{"type":"string","description":"A value for either `title` or `type` is required.","example":"Follow-up Meeting"},"text":{"type":"string","description":"Note content","example":"Discussed pricing for contract renewal"},"type":{"type":"string","description":"A value for either `title` or `type` is required. The value may be one of `Appointment`, `Call`, `Email`, `Fax`, `Letter` or `Other` in Keap Max/Pro, or an admin-configured value in Classic.","example":"Call"},"user_id":{"type":"string","description":"ID of user creating the note","example":123},"is_pinned":{"type":"boolean","description":"Whether to pin this note","example":false},"custom_fields":{"type":"array","description":"Custom field values for the note. An empty array resets all custom fields to their defaults.","example":[{"id":"1","content":"Red"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}},"required":["user_id"]},"BasicUser":{"type":"object","properties":{"id":{"type":"string","description":"User ID","example":456},"given_name":{"type":"string","description":"First name","example":"Jane"},"family_name":{"type":"string","description":"Last name","example":"Doe"},"email_address":{"type":"string","description":"Email address","example":"jane.doe@example.com"}}},"Note":{"type":"object","properties":{"id":{"type":"string","description":"Note ID","example":12345},"text":{"type":"string","description":"Note content","example":"Called about the Q3 proposal"},"title":{"type":"string","description":"Note title","example":"Sales Call"},"type":{"type":"string","description":"Note type","example":"Call"},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"assigned_to_user":{"$ref":"#/components/schemas/BasicUser","description":"User assigned to this note"},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"last_updated_by_user_id":{"type":"string","description":"ID of user who last updated","example":456},"pinned_at":{"type":"string","description":"Pin timestamp (ISO-8601), null if not pinned","example":"2024-02-18T16:45:00Z"},"created_by_user_id":{"type":"string","description":"ID of user who created","example":789},"custom_fields":{"type":"array","description":"Custom field values for the note","example":[{"id":"1","content":"Red"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}}},"CreateContactLinkTypeRequest":{"type":"object","properties":{"name":{"type":"string","description":"Link type name","example":"Spouse"},"max_links":{"type":"integer","format":"int64","description":"Maximum number of links allowed (must be > 0)","example":1}}},"ContactLinkType":{"type":"object","properties":{"id":{"type":"string","description":"Link type ID","example":1},"name":{"type":"string","description":"Link type name","example":"Spouse"},"max_links":{"type":"integer","format":"int64","description":"Maximum number of links allowed","example":1},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-15T10:30:00Z"}}},"CreateCompanyRequest":{"type":"object","description":"company","properties":{"address":{"$ref":"#/components/schemas/Address","description":"The company's address"},"notes":{"type":"string","description":"Notes about the company","example":"Key enterprise client since 2020"},"website":{"type":"string","description":"The company's website URL","example":"https://www.thryv.com"},"suffix":{"type":"string","description":"Name suffix","example":"Jr"},"title":{"type":"string","description":"Name prefix or salutation","example":"Dr."},"company_name":{"type":"string","description":"The name of the company","example":"Thryv"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValue"}},"email_address":{"$ref":"#/components/schemas/EmailAddress"},"fax_number":{"$ref":"#/components/schemas/FaxNumber"},"phone_number":{"$ref":"#/components/schemas/PhoneNumber"},"anniversary_date":{"type":"string","description":"The anniversary date","example":"2015-06-20"},"assistant_name":{"type":"string","description":"The name of the company contact's assistant","example":"Jane Doe"},"assistant_phone":{"type":"string","description":"The phone number of the company contact's assistant","example":"555-123-4567"},"billing_information":{"type":"string","description":"Billing information for the company","example":"NET 30"},"birth_date":{"type":"string","description":"The birth date","example":"1985-03-15"},"contact_type":{"type":"string","description":"Type of contact","example":"Vendor"},"first_name":{"type":"string","description":"First name of the company contact","example":"John"},"job_title":{"type":"string","description":"Job title of the company contact","example":"CEO"},"last_name":{"type":"string","description":"Last name of the company contact","example":"Smith"},"middle_name":{"type":"string","description":"Middle name of the company contact","example":"Robert"},"preferred_name":{"type":"string","description":"Preferred name or nickname of the company contact","example":"Johnny"},"owner_id":{"type":"string","description":"ID of the user who owns this company","example":45},"referral_code":{"type":"string","description":"Referral code","example":"REF2024ABC"},"spouse_name":{"type":"string","description":"Spouse's name","example":"Jane Smith"}}},"Company":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","example":123},"address":{"$ref":"#/components/schemas/Address","description":"The company's address"},"notes":{"type":"string","description":"Notes about the company","example":"Key enterprise client since 2020"},"website":{"type":"string","description":"The company's website URL","example":"https://www.thryv.com"},"suffix":{"type":"string","description":"Name suffix","example":"Jr"},"title":{"type":"string","description":"Name prefix or salutation","example":"Dr."},"groups":{"type":"string","description":"Comma-delimited list of tag IDs applied to this company","example":"1,5,12"},"company_name":{"type":"string","description":"The name of the company","example":"Thryv"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValue"}},"email_address":{"$ref":"#/components/schemas/EmailAddress"},"fax_number":{"$ref":"#/components/schemas/FaxNumber"},"phone_number":{"$ref":"#/components/schemas/PhoneNumber"},"update_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"anniversary_date":{"type":"string","description":"The anniversary date","example":"2015-06-20"},"assistant_name":{"type":"string","description":"The name of the company contact's assistant","example":"Jane Doe"},"assistant_phone":{"type":"string","description":"The phone number of the company contact's assistant","example":"555-123-4567"},"billing_information":{"type":"string","description":"Billing information for the company","example":"NET 30"},"birth_date":{"type":"string","description":"The birth date","example":"1985-03-15"},"contact_type":{"type":"string","description":"Type of contact","example":"Vendor"},"first_name":{"type":"string","description":"First name of the company contact","example":"John"},"job_title":{"type":"string","description":"Job title of the company contact","example":"CEO"},"last_name":{"type":"string","description":"Last name of the company contact","example":"Smith"},"middle_name":{"type":"string","description":"Middle name of the company contact","example":"Robert"},"preferred_name":{"type":"string","description":"Preferred name or nickname of the company contact","example":"Johnny"},"owner_id":{"type":"string","description":"ID of the user who owns this company","example":45},"referral_code":{"type":"string","description":"Referral code","example":"REF2024ABC"},"spouse_name":{"type":"string","description":"Spouse's name","example":"Jane Smith"},"account_id":{"type":"string","description":"The company's account ID","example":100},"created_by":{"type":"string","description":"ID of the user who created this company","example":10},"last_updated_by":{"type":"string","description":"ID of the user who last updated this company","example":10}}},"RemoveContactsFromSequenceRequest":{"type":"object","properties":{"contact_ids":{"type":"array","description":"List of contact IDs to remove from the sequence","example":["123","456","789"],"items":{"type":"string"}}},"required":["contact_ids"]},"RemoveContactsFromSequenceResponse":{"type":"object","properties":{"remove_from_sequence_results":{"type":"object","additionalProperties":{"type":"string","enum":["SUCCESS","CONTACT_DOES_NOT_EXIST","FAILED"]},"description":"A map containing the contact ID as key and the result of removing them from the sequence as value"}}},"AddContactsToSequenceRequest":{"type":"object","properties":{"contact_ids":{"type":"array","description":"List of contact IDs to add to the sequence","example":["123","456","789"],"items":{"type":"string"}}},"required":["contact_ids"]},"AddContactsToSequenceResponse":{"type":"object","properties":{"add_to_sequence_results":{"type":"object","additionalProperties":{"type":"string","enum":["SUCCESS","ALREADY_IN_SEQUENCE","CONTACT_DOES_NOT_EXIST","FAILED"]},"description":"A map containing the contact ID as key and the result of adding them to the sequence as value"}}},"AddToAutomationSequenceRequest":{"type":"object","properties":{"contact_ids":{"type":"array","description":"List of contact IDs to add to the automation sequence","example":["123","456","789"],"items":{"type":"string"}}},"required":["contact_ids"]},"AddToAutomationSequenceResponse":{"type":"object","properties":{"add_to_automation_sequence_results":{"type":"object","additionalProperties":{"type":"string","enum":["SUCCESS","ALREADY_IN_SEQUENCE","CONTACT_DOES_NOT_EXIST","FAILED"]},"description":"A map containing the contact ID as key and the result of adding them to the sequence as value"}}},"AchieveGoalRequest":{"type":"object","description":"Request to achieve a goal in an automation. You must provide EITHER (integration + call_name) OR (automation_id + goal_id), along with contact_id.","properties":{"integration":{"type":"string","description":"The integration name of the goal. Required when using integration/call_name approach. Use together with 'call_name'. Mutually exclusive with automation_id/goal_id.","example":"my_integration"},"call_name":{"type":"string","description":"The call name of the goal. Required when using integration/call_name approach. Use together with 'integration'. Mutually exclusive with automation_id/goal_id.","example":"goal_achieved"},"automation_id":{"type":"integer","format":"int64","description":"The automation ID. Required when using automation_id/goal_id approach. Use together with 'goal_id'. Mutually exclusive with integration/call_name.","example":123},"goal_id":{"type":"integer","format":"int64","description":"The goal ID within the automation. Required when using automation_id/goal_id approach. Use together with 'automation_id'. Mutually exclusive with integration/call_name.","example":456},"contact_id":{"type":"integer","format":"int64","description":"The contact ID for whom to achieve the goal","example":789}},"required":["contact_id"]},"AchieveGoalResponse":{"type":"object","description":"Response containing the results of achieving a goal","properties":{"results":{"type":"array","description":"List of results for each goal that was achieved. Contains information about flows started and stopped as a result.","items":{"$ref":"#/components/schemas/GoalEventResultDTO"}}}},"FlowEventResultDTO":{"type":"object","description":"Result of a flow being started or stopped","properties":{"success":{"type":"boolean","description":"Whether the flow operation was successful","example":true},"message":{"type":"string","description":"A message with details about the flow operation","example":"Flow started successfully"},"flow_id":{"type":"integer","format":"int64","description":"The flow ID that was affected","example":789}}},"GoalEventResultDTO":{"type":"object","description":"Result of achieving a specific goal","properties":{"success":{"type":"boolean","description":"Whether the goal was successfully achieved","example":true},"message":{"type":"string","description":"A message with details about the result","example":"Goal achieved successfully"},"automation_id":{"type":"integer","format":"int64","description":"The automation ID where the goal was achieved","example":123},"goal_id":{"type":"integer","format":"int64","description":"The goal ID that was achieved","example":456},"flow_start_results":{"type":"array","description":"List of flows that were started as a result of achieving this goal","items":{"$ref":"#/components/schemas/FlowEventResultDTO"}},"flow_stop_results":{"type":"array","description":"List of flows that were stopped as a result of achieving this goal","items":{"$ref":"#/components/schemas/FlowEventResultDTO"}}}},"AssignAutomationCategoryRequest":{"type":"object","description":"Request to assign categories to automations","properties":{"category_ids":{"type":"array","description":"List of category IDs to assign to the automations","example":["1","2","3"],"items":{"type":"string"}},"automation_ids":{"type":"array","description":"List of automation IDs to update. Use '0' as a wildcard to select all automations.","example":["100","200","300"],"items":{"type":"string"}},"apply_category":{"type":"boolean","description":"If true, the categories will be applied to the automations. If false, the categories will be removed from the automations.","example":true}}},"BatchUnpublishAutomationRequest":{"type":"object","description":"Request to unpublish multiple automations at once","properties":{"automation_ids":{"type":"array","description":"List of automation IDs to unpublish","example":["123","456","789"],"items":{"type":"string"}},"unpublished_form_message":{"type":"string","description":"Custom message to display on forms when the automation is unpublished","example":"This form is currently unavailable"}},"required":["automation_ids"]},"CreateAutomationCategoryRequest":{"type":"object","description":"Request to create an automation category","properties":{"name":{"type":"string","description":"The name of the category to create","example":"Marketing Campaigns"}},"required":["name"]},"AutomationCategory":{"type":"object","description":"An automation category","properties":{"id":{"type":"string","description":"The unique identifier of the category","example":1},"name":{"type":"string","description":"The name of the category","example":"Marketing Campaigns"},"automation_count":{"type":"integer","format":"int64","description":"Number of automations in this category","example":15}}},"CreateAffiliateRequest":{"type":"object","properties":{"code":{"type":"string","description":"The Affiliate code which have some validations.\n1. The code should not have white spaces\n2. The code should starts with letters\n3. The code minimum 4 characters length","example":"M123"},"status":{"type":"string","default":"INACTIVE","description":"The Affiliate Status","enum":["ACTIVE","INACTIVE"],"example":"ACTIVE"},"name":{"type":"string","description":"The Affiliate name will be derived from the Contact,\nwhen not explicitly provided","example":"John Smith"},"contact_id":{"type":"string","description":"The contactId identifier , Must be a positive number","example":1},"parent_affiliate_id":{"type":"string","description":"The Parent Affiliate Id","example":0},"notify_on_sale":{"type":"boolean","description":"Whether to notify on sale events","example":true},"notify_on_lead":{"type":"boolean","description":"Whether to notify on lead events","example":true},"track_leads_days":{"type":"integer","format":"int32","description":"Number of days to track leads","example":30},"password":{"type":"string","description":"Affiliate portal password"},"custom_fields":{"type":"array","description":"List of custom field values to apply to this affiliate","example":[{"id":"1","content":"VIP"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValue"}}},"required":["code","contact_id"]},"RestAffiliate":{"type":"object","properties":{"id":{"type":"string","description":"The AffiliateId","example":1},"code":{"type":"string","description":"The Affiliate Code","example":"M123"},"name":{"type":"string","description":"The Affiliate Name","example":"John Smith"},"status":{"type":"string","description":"The Affiliate Status","enum":["ACTIVE","INACTIVE"],"example":"ACTIVE"},"contact_id":{"type":"string","description":"The ContactID","example":1},"unique_site_id":{"type":"string","description":"The Affiliate PortalSite Id","example":123456},"date_created":{"type":"string","description":"Date affiliate was created (ISO-8601)","example":"2024-03-15T10:30:00Z"},"parent_affiliate_id":{"type":"string","description":"The Parent Affiliate Id","example":0},"notify_on_sale":{"type":"boolean","description":"Whether to notify on sale events","example":true},"notify_on_lead":{"type":"boolean","description":"Whether to notify on lead events","example":true},"track_leads_days":{"type":"integer","format":"int32","description":"Number of days to track leads","example":30},"custom_fields":{"type":"array","description":"List of custom field values applied to this affiliate","example":[{"id":"1","content":"VIP"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValue"}}}},"AffiliateRemoveFromProgramRequest":{"type":"object","properties":{"affiliate_program_id":{"type":"string"}}},"AffiliateAddToProgramRequest":{"type":"object","properties":{"affiliate_program_id":{"type":"string"}}},"CreateOrUpdateAffiliateLinkRequest":{"type":"object","properties":{"name":{"type":"string","description":"The Affiliate Link Name","example":"Fitness Program"},"code":{"type":"string","description":"Code","example":"fP100"},"affiliate_id":{"type":"string","description":"The AffiliateId","example":1},"website_address":{"type":"string","description":"Website Address","example":"https://thryv.com/promo"},"program_ids":{"type":"array","description":"Program IDs to associate","example":["1","2"],"items":{"type":"string"}}},"required":["code","name","website_address"]},"AffiliateLink":{"type":"object","properties":{"id":{"type":"string","description":"Affiliate link ID","example":789},"name":{"type":"string","description":"Link name","example":"Fitness Program"},"code":{"type":"string","description":"URL code for tracking","example":"fP100"},"affiliate_id":{"type":"string","description":"Associated affiliate ID","example":123},"local_url_code":{"type":"string","deprecated":true,"description":"URL code for tracking. Deprecated: use 'code' instead.","example":"fP100"},"redirect_url":{"type":"string","deprecated":true,"description":"Destination URL. This field is deprecated. Use 'website_address' instead.","example":"https://thryv.com/fitness"},"website_address":{"type":"string","description":"Destination URL","example":"https://thryv.com/fitness"},"program_ids":{"type":"array","description":"Associated program IDs","example":["1","2"],"items":{"type":"string"}},"date_created":{"type":"string","description":"Date link was created (ISO-8601)","example":"2024-03-15T10:30:00Z"}}},"CreateCommissionProgramRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the Commission Program","example":"Fitness program"},"notes":{"type":"string","description":"The notes of the Commission Program","example":"20% default commission"},"priority":{"type":"integer","format":"int32","description":"The priority of the Commission Program","example":1}},"required":["name","priority"]},"AffiliateCommissionProgramResponse":{"type":"object","properties":{"id":{"type":"string","description":"Commission program ID","example":100},"name":{"type":"string","description":"Program name","example":"Gold Partner Program"},"notes":{"type":"string","description":"Program notes","example":"20% commission on all sales"},"priority":{"type":"integer","format":"int32","description":"Program priority","example":1}}},"DeleteSubscriptionPlanCommissionRequest":{"type":"object","properties":{"product_id":{"type":"string"},"subscription_plan_id":{"type":"string"}}},"DeleteProgramCommissionRequest":{"type":"object","properties":{"product_id":{"type":"string"}}},"CommissionItemRequest":{"type":"object","properties":{"sale_percent":{"type":"string","description":"The percentage to be paid for Sale.","example":10.5},"sale_amount":{"type":"string","description":"The fixed dollar amount to be paid for Sale.","example":25.0},"lead_percent":{"type":"string","description":"The percentage to be paid for Lead.","example":10.5},"lead_amount":{"type":"string","description":"The fixed dollar amount to be paid for Lead.","example":25.0}}},"CreateSubscriptionCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"subscription_id":{"type":"string","description":"Subscription ID to assign commission","example":456}}},"CommissionItem":{"type":"object","properties":{"sale_percent":{"type":"number","format":"double","description":"The percentage to be paid for Sale.","example":10.5},"sale_amount":{"type":"number","format":"double","description":"The fixed dollar amount to be paid for Sale.","example":25.0},"lead_percent":{"type":"number","format":"double","description":"The percentage to be paid for Lead.","example":10.5},"lead_amount":{"type":"number","format":"double","description":"The fixed dollar amount to be paid for Lead.","example":25.0}}},"DefaultCommission":{"type":"object","properties":{"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"dollar_amount":{"type":"number","format":"double","description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"percentage":{"type":"number","format":"double","description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"unused":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for any unused commissions."},"level_1":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 2 recipients of the commission."}}},"GetRestCommissionProgram":{"type":"object","properties":{"id":{"type":"string","description":"Commission program ID","example":1},"name":{"type":"string","description":"The affiliate commission program name","example":"commission program"},"priority":{"type":"string","description":"The Affiliate commission program priority","example":0},"notes":{"type":"string","description":"The affiliate commission program notes","example":"notes for the commission program"},"create_time":{"type":"string","description":"The created time of affiliate commission program","example":"2019-08-24T14:15:22Z"},"affiliate_ids":{"type":"array","description":"The list of affiliate_ids using this commission program","example":[123,124],"items":{"type":"string"}},"default_commission":{"$ref":"#/components/schemas/DefaultCommission"},"product_commissions":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommission"}},"subscription_commissions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionCommission"}}}},"ProductCommission":{"type":"object","properties":{"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"dollar_amount":{"type":"number","format":"double","description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"percentage":{"type":"number","format":"double","description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"unused":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for any unused commissions."},"level_1":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 2 recipients of the commission."},"product_id":{"type":"string","description":"Product ID","example":123},"product_name":{"type":"string","description":"Product name","example":"Premium Membership"},"product_price":{"type":"number","format":"double","description":"Product price","example":99.99}}},"SubscriptionCommission":{"type":"object","properties":{"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"dollar_amount":{"type":"number","format":"double","description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"percentage":{"type":"number","format":"double","description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"unused":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for any unused commissions."},"level_1":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItem","description":"Payout rules for Level 2 recipients of the commission."},"name":{"type":"string","description":"Subscription name","example":"Monthly Pro Plan"},"subscription_id":{"type":"string","description":"Subscription ID","example":456},"plan_price":{"type":"number","format":"double","description":"Plan price","example":49.99}}},"CreateProgramResourceRequest":{"type":"object","properties":{"title":{"type":"string","description":"The program resource title","example":"Summer Sale Banner"},"type":{"type":"string","description":"The type of resource","enum":["EMAIL","BANNER","PAGE"],"example":"BANNER"},"notes":{"type":"string","description":"The resource notes.","example":"Use this banner for summer promotions"},"url":{"type":"string","description":"The URL to the resource.","example":"https://thryv.com/banners/summer-sale.jpg"},"order":{"type":"integer","format":"int32","description":"The order in which the resource is displayed. Minimum value is 0. Defaults to 0. Lower values indicate higher priority.","example":1},"content_html":{"type":"string","description":"The contents of the PAGE or EMAIL. In HTML format.","example":"
Get 20% off!
"},"page_width":{"type":"integer","format":"int32","description":"The width of the page for PAGE types, in pixels. Minimum value is 0. Defaults to 0","example":728},"page_height":{"type":"integer","format":"int32","description":"The height of the page for PAGE types, in pixels. Minimum value is 0. Defaults to 0","example":90},"commission_program_ids":{"type":"array","description":"A list of commission program ids that will use this resource.","example":["123","456"],"items":{"type":"string"}}},"required":["commission_program_ids","title","type"]},"AffiliateProgramResource":{"type":"object","properties":{"id":{"type":"string","description":"The program resource identifier","example":101},"title":{"type":"string","description":"The program resource title","example":"Summer Sale Banner"},"type":{"type":"string","description":"The type of resource","enum":["EMAIL","BANNER","PAGE"],"example":"BANNER"},"notes":{"type":"string","description":"The resource notes.","example":"Use this banner for summer promotions"},"url":{"type":"string","description":"The URL to the resource.","example":"https://thryv.com/banners/summer-sale.jpg"},"order":{"type":"integer","format":"int32","description":"The order which the resource to be displayed. Minimum value is 0. Lower values indicate higher priority.","example":1},"content_html":{"type":"string","description":"The contents of the PAGE or EMAIL. In HTML format.","example":"Get 20% off!
"},"page_width":{"type":"integer","format":"int32","description":"The width of the page for PAGE types, in pixels.","example":728},"page_height":{"type":"integer","format":"int32","description":"The height of the page for PAGE types, in pixels.","example":90},"commission_programs":{"type":"array","description":"A list of commission programs using this resource.","items":{"$ref":"#/components/schemas/ResourceCommissionProgram"}}}},"ResourceCommissionProgram":{"type":"object","properties":{"commission_program_id":{"type":"string","description":"The commission program identifier","example":100}}},"CreateProductCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"product_id":{"type":"string","description":"Product ID to assign commission","example":123}}},"CreateDefaultCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"}}},"UpdateUserRequest":{"type":"object","description":"user","properties":{"address":{"$ref":"#/components/schemas/Address","description":"The user's address"},"title":{"type":"string","description":"The user's job title","example":"Sales Manager"},"website":{"type":"string","description":"The user's website URL","example":"https://example.com"},"company_name":{"type":"string","description":"The user's company name","example":"Acme Corp"},"email_address":{"$ref":"#/components/schemas/EmailAddressRequest","description":"The user's email address"},"family_name":{"type":"string","description":"The user's last name","example":"Smith"},"fax_numbers":{"type":"array","description":"List of user's fax numbers","items":{"$ref":"#/components/schemas/FaxNumber"}},"given_name":{"type":"string","description":"The user's first name","example":"John"},"phone_numbers":{"type":"array","description":"List of user's phone numbers","items":{"$ref":"#/components/schemas/PhoneNumber"}},"time_zone":{"type":"string","description":"The user's timezone in IANA format","example":"America/New_York"}}},"User":{"type":"object","description":"A user in the system","properties":{"address":{"$ref":"#/components/schemas/Address","description":"The user's address"},"title":{"type":"string","description":"The user's job title","example":"Sales Manager"},"website":{"type":"string","description":"The user's website URL","example":"https://example.com"},"partner":{"type":"boolean","description":"Whether the user is a partner","example":false},"admin":{"type":"boolean","description":"Whether the user is an admin","example":true},"status":{"type":"string","description":"The user's status","enum":["ACTIVE","INVITED","INACTIVE","NOT_A_USER"],"example":"ACTIVE"},"id":{"type":"string","description":"The unique identifier of the user","example":123},"global_user_id":{"type":"string","description":"The global user identifier across tenants","example":"usr_abc123"},"keap_id":{"type":"string","description":"The Keap ID of the user","example":456},"given_name":{"type":"string","description":"The user's first name","example":"John"},"family_name":{"type":"string","description":"The user's last name","example":"Smith"},"middle_name":{"type":"string","description":"The user's middle name","example":"Edward"},"nickname":{"type":"string","description":"The user's nickname or preferred name","example":"Tony"},"spouse_name":{"type":"string","description":"The name of the user's spouse","example":"Mia"},"suffix":{"type":"string","description":"The user's name suffix","example":"Jr."},"phone_numbers":{"type":"array","description":"List of user's phone numbers","items":{"$ref":"#/components/schemas/PhoneNumber"}},"fax_numbers":{"type":"array","description":"List of user's fax numbers","items":{"$ref":"#/components/schemas/FaxNumber"}},"email_addresses":{"type":"array","description":"List of user's email addresses","items":{"$ref":"#/components/schemas/EmailAddress"}},"social_accounts":{"type":"array","description":"List of user's social media accounts","items":{"$ref":"#/components/schemas/SocialAccount"}},"company_name":{"type":"string","description":"The user's company name","example":"Acme Corp"},"created_by":{"type":"integer","format":"int64","description":"ID of the user who created this user","example":1},"create_time":{"type":"string","format":"date-time","description":"When the user was created, in ISO-8601 format","example":"2024-05-21T14:30:00Z"},"updated_by":{"type":"integer","format":"int64","description":"ID of the user who last updated this user","example":1},"update_time":{"type":"string","format":"date-time","description":"When the user was last updated, in ISO-8601 format","example":"2024-05-21T15:00:00Z"}}},"CreateUpdateTaskRequest":{"type":"object","description":"task","properties":{"title":{"type":"string","description":"Task title","example":"Follow up on proposal"},"description":{"type":"string","description":"Task description","example":"Review client feedback"},"type":{"type":"string","description":"Task type","example":"CALL"},"priority":{"type":"string","description":"Task priority","enum":["CRITICAL","ESSENTIAL","NONESSENTIAL"],"example":"ESSENTIAL"},"completed":{"type":"boolean","description":"Whether task is completed","example":false},"completion_time":{"type":"string","description":"Completion timestamp (ISO-8601)","example":"2024-03-20T14:00:00Z"},"due_time":{"type":"string","description":"Due date/time (ISO-8601)","example":"2024-03-18T17:00:00Z"},"remind_time_mins":{"type":"integer","format":"int32","description":"Value in minutes before start_date to show pop-up reminder.","enum":["5","10","15","30","60","120","240","480","1440","2880"],"example":30},"assigned_to_user_id":{"type":"string","description":"Assigned user ID","example":456},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"opportunity_id":{"type":"string","description":"Associated opportunity ID","example":77},"accepted":{"type":"boolean","description":"Whether the task has been accepted. Defaults to false","example":true},"custom_fields":{"type":"array","description":"Custom field values for the task. An empty array resets all custom fields to their defaults.","example":[{"id":"1","content":"Red"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}}},"UpdateTaskResponse":{"type":"object","properties":{"id":{"type":"string","description":"Task ID","example":123},"title":{"type":"string","description":"Task title","example":"Follow up on proposal"},"description":{"type":"string","description":"Task description. Legacy XML-RPC name for this field was `CreationNotes`","example":"Review and respond to client feedback."},"type":{"type":"string","description":"Task type","example":"CALL"},"priority":{"type":"string","description":"Task priority","enum":["CRITICAL","ESSENTIAL","NONESSENTIAL"],"example":"CRITICAL"},"completed":{"type":"boolean","description":"Whether task is completed","example":false},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"modification_time":{"type":"string","description":"Last modification timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"completion_time":{"type":"string","description":"Completion timestamp (ISO-8601)","example":"2024-03-20T14:00:00Z"},"due_time":{"type":"string","description":"Due date/time (ISO-8601)","example":"2024-03-18T17:00:00Z"},"remind_time_mins":{"type":"integer","format":"int32","description":"Reminder minutes before due.","enum":["5","10","15","30","60","120","240","480","1440","2880"],"example":30},"assigned_to_user_id":{"type":"string","description":"Assigned user ID","example":456},"created_by_user_id":{"type":"string","description":"Creator user ID","example":789},"last_updated_by_user_id":{"type":"string","description":"User who last updated the task.","example":77},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"opportunity_id":{"type":"string","description":"Associated opportunity ID","example":321},"accepted":{"type":"boolean","description":"Whether the task has been accepted","example":true},"custom_fields":{"type":"array","description":"Custom field values for the task","example":[{"id":"1","content":"Red"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}}},"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"}}},"UpdateCustomFieldGroupRequest":{"type":"object","properties":{"name":{"type":"string"},"order":{"type":"integer","format":"int32"},"tab_id":{"type":"string"}}},"UpdateTagResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this tag","example":123},"name":{"type":"string","description":"The unique name of this tag","example":"VIP Customer"},"description":{"type":"string","description":"A description of this tag","example":"High-value customers"},"category":{"$ref":"#/components/schemas/CategoryReference","description":"The category this tag belongs to"},"create_time":{"type":"string","format":"date-time","description":"The time this tag was created, in ISO 8601 format","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this tag was last updated, in ISO 8601 format","example":"2024-03-15T10:30:00Z"}}},"UpdateTagCategoryResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this tag category","example":123},"name":{"type":"string","description":"The unique name of this tag category","example":"Customer Segments"},"description":{"type":"string","description":"A description of this tag category","example":"Tags for customer segmentation"},"create_time":{"type":"string","format":"date-time","description":"The time this tag category was created, in ISO 8601 format","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this tag category was last updated, in ISO 8601 format","example":"2024-03-15T10:30:00Z"}}},"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"}}}},"UpdateProductRequest_Detail":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Premium Widget"},"sku":{"type":"string","description":"Product SKU","example":"PROD-001"},"price":{"type":"integer","format":"int64","description":"The product price. The value is in the currency's smallest unit. e.g. $12.50 is 1250. Must be greater than or equal to 0.","example":1250},"active":{"type":"boolean","description":"True means active, False means inactive","example":true},"description":{"type":"string","description":"Product long description","example":"A high-quality widget"},"shippable":{"type":"boolean","description":"If the product requires shipping","example":true},"weight":{"type":"number","format":"double","description":"The product weight. Must be greater than or equal to 0.","example":2.5},"taxable":{"type":"boolean","description":"Whether or not the product should be taxed","example":true},"short_description":{"type":"string","description":"Product short description","example":"Premium widget"},"subscription_only":{"type":"boolean","description":"If the product is a subscription-only product","example":false},"storefront_hidden":{"type":"boolean","description":"If the product should not be shown in the storefront","example":false},"country_taxable":{"type":"boolean","description":"If country-based taxes should be applied to this product","example":false},"state_taxable":{"type":"boolean","description":"If state-based taxes should be applied to this product","example":true},"city_taxable":{"type":"boolean","description":"If city-based taxes should be applied to this product","example":false},"inventory_limit":{"type":"integer","format":"int32","description":"The inventory limit for this product. Must be greater than or equal to 0.","example":100},"out_of_stock_enabled":{"type":"boolean","description":"The flag to enable out of stock inventory","example":false},"email_for_inventory_notifications":{"type":"string","description":"The email address for notifications about inventory","example":"notify@example.com"},"top_html":{"type":"string"},"bottom_html":{"type":"string"},"is_package":{"type":"boolean"},"needs_digital_delivery":{"type":"boolean"},"delivery_description":{"type":"string"}}},"UpdateSubscriptionPlanRequest":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the subscription plan is active.","example":true},"frequency":{"type":"integer","format":"int32","description":"The frequency of the subscription plan. Must be greater than 0.","example":1},"allow_prorating":{"type":"boolean","description":"Allow prorating of the subscription plan.","example":false},"cycle_type":{"type":"string","description":"The cycle type of the subscription plan.","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"],"example":"MONTHLY"},"display_order_index":{"type":"integer","format":"int32","description":"The order that this plan will be displayed to the user.","example":0},"plan_price":{"type":"number","format":"double","description":"The price of the subscription plan in the smallest currency unit. Must be greater than or equal to 0.","example":10000},"total_cycles":{"type":"integer","format":"int32","description":"How many cycles the subscription plan will have. 0 means infinite.","example":12}},"required":["cycle_type","plan_price"]},"UpdateProductOptionRequest":{"type":"object","properties":{"required":{"type":"boolean","description":"Whether this option is required for product purchase."},"option_label":{"type":"string","description":"The displayable name of the option (e.g. Size). Cannot be whitespace only."},"display_order":{"type":"integer","format":"int32","description":"The order in which this option will be displayed among other options. Minimum is 0. Lower values indicate higher priority in order."},"minimum_characters":{"type":"integer","format":"int32","description":"Used only for option_type of `TEXT`. Minimum allowable characters. Minimum is 0."},"maximum_characters":{"type":"integer","format":"int32","description":"Used only for option_type of `TEXT`. Maximum allowable characters. Minimum is 0."},"allow_spaces":{"type":"boolean","description":"Used only for option_type of `TEXT`. Whether or not to allow whitespace in the text."},"only_starts_with":{"type":"string","description":"Used only for option_type of `TEXT`. Restricts the text to start with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_ends_with":{"type":"string","description":"Used only for option_type of `TEXT`. Restricts the text to end with certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"only_contains":{"type":"string","description":"Used only for option_type of `TEXT`. Restricts the text to contain certain character types. Valid values are NONE, LETTER, DIGIT, BOTH.","enum":["NONE","LETTER","DIGIT","BOTH"]},"error_message":{"type":"string","description":"Used only for option_type of `TEXT`. An error message to display if any rules are broken. Cannot be whitespace only."}}},"UpdateProductOptionListOption":{"type":"object","properties":{"item_label":{"type":"string","description":"The displayable name of the option item. Cannot be whitespace only."},"item_code":{"type":"string","description":"An internal code (e.g. sku) to associate the item option."},"item_display_order":{"type":"integer","format":"int64","description":"The order in which this item will be displayed among other items. Minimum is 0. Lower values indicate higher priority in order."},"price_adjustment":{"type":"number","format":"double","description":"An amount to adjust to the product price is selected. Negative value indicates subtraction from price."}}},"UpdateProductInterestBundleRequest":{"type":"object","properties":{"name":{"type":"string","description":"Product interest bundle name","example":"Premium Bundle"},"description":{"type":"string","description":"Product interest bundle description","example":"Bundle of premium products"}}},"UpdateProductInterestRequest":{"type":"object","properties":{"price":{"type":"number","format":"double","description":"The price per unit of the product.","example":10000},"quantity":{"type":"integer","format":"int32","description":"The quantity of product.","example":1},"discount_percent":{"type":"integer","format":"int32","description":"The percent to discount the product.","example":10}}},"UpdateProductCategoryRequest":{"type":"object","properties":{"name":{"type":"string","description":"The category name","example":"Electronics"},"display_order_index":{"type":"integer","format":"int32","description":"Display order of the category","example":0},"parent_category_id":{"type":"string","description":"Parent category ID for subcategories","example":2}}},"UpdateOrderRequest":{"type":"object","description":"order","properties":{"notes":{"type":"string","description":"Internal notes","example":"Rush delivery"},"terms":{"type":"string","description":"Order terms","example":"Net 30"},"title":{"type":"string","description":"A title for the invoice","example":"Monthly subscription invoice"},"contact_id":{"type":"string","description":"ID of the contact for this order","example":123},"order_title":{"type":"string","description":"Title for the order","example":"Online Purchase"},"order_time":{"type":"string","format":"date-time","description":"The date and time of the order. In ISO-8601 format (e.g. 2024-05-21T23:00:00Z)","example":"2024-05-21T14:30:00Z"},"order_type":{"type":"string","description":"The order type.","enum":["ONLINE","OFFLINE"],"example":"ONLINE"},"promo_codes":{"type":"array","description":"Uses multiple strings as promo codes. The corresponding discount will be applied to the order.","example":["SUMMER20"],"items":{"type":"string"}},"lead_affiliate_id":{"type":"string","description":"Lead affiliate ID","example":456},"sales_affiliate_id":{"type":"string","description":"Sales affiliate ID","example":789},"shipping_address":{"$ref":"#/components/schemas/AddressInformation","description":"Shipping address for the order"},"payment_plan":{"$ref":"#/components/schemas/UpdatedPaymentPlan","description":"Payment plan details"},"custom_fields":{"type":"array","description":"List of custom field values to apply 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"},"invoice_number":{"type":"string","description":"Invoice number","example":1001},"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"}}},"UpdatedPaymentPlan":{"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","example":123},"initial_payment_amount":{"type":"number","format":"double","description":"Initial payment amount","example":50.0},"initial_payment_date":{"type":"string","format":"date","description":"ISO date of the initial payment in pay plan","example":"2024-05-21"},"plan_start_date":{"type":"string","format":"date","description":"ISO date of the start of pay plan","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}}},"UpdateOrderItemRequest":{"type":"object","description":"order","properties":{"name":{"type":"string","description":"The name of the order item. Must not be whitespace.","example":"Premium Widget"},"description":{"type":"string","description":"The description of the order item. Must not be whitespace.","example":"High-quality widget"},"quantity":{"type":"integer","format":"int32","description":"The quantity. Must be greater than or equal to 1.","example":2},"notes":{"type":"string","description":"The notes for the order item. Must not be whitespace.","example":"Gift wrap requested"},"product_id":{"type":"string","description":"The id of the product. Must be a valid product id. Used only for item_type PRODUCT or SUBSCRIPTION.","example":123},"subscription_plan_id":{"type":"string","description":"The id of the subscription plan. Must be a valid subscription plan id. Used only for item_type SUBSCRIPTION.","example":456},"subscription_plan_description":{"type":"string","description":"A short description of the subscription's schedule. Used only for item_type SUBSCRIPTION. Must not be whitespace.","example":"Monthly billing"},"price_per_unit":{"type":"number","format":"double","description":"The price per unit.","example":29.99},"cost_per_unit":{"type":"number","format":"double","description":"The cost per unit. Used for item_type PRODUCT or SUBSCRIPTION.","example":15.0}}},"UpdateOpportunityRequestV2":{"type":"object","properties":{"opportunity_title":{"type":"string","description":"Opportunity title","example":"New Business Deal"},"next_action_time":{"type":"string","description":"Next action timestamp (ISO-8601)","example":"2024-03-20T10:00:00Z"},"next_action_notes":{"type":"string","description":"Notes for next action","example":"Schedule demo call"},"opportunity_notes":{"type":"string","description":"General notes","example":"Prospect from website inquiry"},"estimated_close_time":{"type":"string","description":"Estimated close timestamp (ISO-8601)","example":"2024-04-15T00:00:00Z"},"include_in_forecast":{"type":"boolean","description":"Include in sales forecast","example":true},"projected_revenue_low":{"type":"number","format":"double","description":"Low revenue estimate","example":5000.0},"projected_revenue_high":{"type":"number","format":"double","description":"High revenue estimate","example":10000.0},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"stage_id":{"type":"string","description":"Pipeline stage ID","example":2},"user_id":{"type":"string","description":"Assigned user ID","example":456},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"affiliate_id":{"type":"string","description":"Affiliate ID","example":789}}},"UpdateOpportunityStageChecklistItem":{"type":"object","properties":{"id":{"type":"string","description":"Checklist item ID","example":101},"description":{"type":"string","description":"Item description","example":"Review contract terms"},"required":{"type":"boolean","description":"Whether item is required","example":true},"order":{"type":"integer","format":"int32","description":"Display order position","example":1}},"required":["description","order","required"]},"UpdateOpportunityStageRequest":{"type":"object","properties":{"name":{"type":"string","example":"Qualified"},"order":{"type":"integer","format":"int32"},"probability":{"type":"integer","format":"int32","description":"must be an integer between 0 and 100.","example":2},"target_number_days":{"type":"integer","format":"int32","description":"Value should be >=0."},"checklist_items":{"type":"array","items":{"$ref":"#/components/schemas/UpdateOpportunityStageChecklistItem"}}}},"LeadSourceRecurringExpenseUpdateRequest":{"type":"object","properties":{"title":{"type":"string","description":"The title of the lead source recurring expense","example":"Monthly Google Ads subscription"},"notes":{"type":"string","description":"The notes for the lead source recurring expense","example":"Automated monthly billing"},"amount":{"type":"integer","format":"int64","description":"The monthly cost of the lead source recurring expense.\n The value should be in the smallest unit of currency for your currency locale.\n For example, if your currency locale is USD, then the smallest unit of currency is\n in cents, $225.50 would be provided in the request as 22550.","example":22550,"minimum":0},"start_time":{"type":"string","format":"date-time","description":"The time the lead source recurring expense starts","example":"2024-01-01T00:00:00Z"},"end_time":{"type":"string","format":"date-time","description":"The time the lead source recurring expense ends","example":"2024-12-31T23:59:59Z"}}},"UpdateLeadSourceExpenseRequest":{"type":"object","properties":{"title":{"type":"string","description":"The title of the lead source expense","example":"Google Ads Campaign"},"notes":{"type":"string","description":"The notes for the lead source expense","example":"Q1 advertising spend"},"amount":{"type":"integer","format":"int64","description":"The cost of the lead source expense. The value should be in the smallest unit of currency for your currency locale. For example, if your currency locale is USD, then the smallest unit of currency is in cents, $225.50 would be provided in the request as 22550.","example":22550,"minimum":0},"incurred_time":{"type":"string","format":"date-time","description":"The time that the lead source expense was incurred.","example":"2024-03-15T00:00:00Z"}}},"UpdateEmailAddress":{"type":"object","description":"Request to update email address opt-in status","properties":{"reason":{"type":"string","description":"Reason for the opt-in status change","example":"Customer requested to receive marketing emails"},"opted_in":{"type":"boolean","description":"Whether to opt-in the email address","example":true}},"required":["opted_in","reason"]},"RestEmailAddressStatus":{"type":"object","description":"Email address opt-in status information","properties":{"email":{"type":"string","description":"The email address","example":"john@example.com"},"opted_in":{"type":"boolean","description":"Whether the email address is opted in for marketing","example":true},"status":{"type":"string","description":"The opt-in status of the email address","enum":["UNENGAGED_MARKETABLE","SINGLE_OPT_IN","DOUBLE_OPT_IN","CONFIRMED","UNENGAGED_NON_MARKETABLE","NON_MARKETABLE","LOCKDOWN","BOUNCE","HARD_BOUNCE","MANUAL","ADMIN","SYSTEM","LIST_UNSUBSCRIBE","FEEDBACK","SPAM","INVALID","DEACTIVATED"],"example":"SINGLE_OPT_IN"},"create_time":{"type":"string","format":"date-time","description":"When the email status was first recorded, in ISO-8601 format","example":"2024-05-21T14:30:00Z"},"last_click_time":{"type":"string","format":"date-time","description":"The most recent click on an email sent to this address, in ISO-8601 format","example":"2024-05-21T15:05:00Z"},"last_open_time":{"type":"string","format":"date-time","description":"The most recent open of an email sent to this address, in ISO-8601 format","example":"2024-05-21T15:00:00Z"},"last_sent_time":{"type":"string","format":"date-time","description":"The most recent time an email was sent to this address, in ISO-8601 format","example":"2024-05-21T14:30:00Z"}},"required":["create_time","email","opted_in","status"]},"RenameEasyAutomationCommand":{"type":"object","description":"An object used to rename an automation.","properties":{"name":{"type":"string","description":"Name of the easy automation","example":"Welcome new customer (Fall 26)","minLength":1}},"required":["name"]},"UpdateShippingDiscountCriteria":{"type":"object","properties":{"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}},"required":["criteria_id"]},"UpdateShippingDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Free Shipping Over $100"},"description":{"type":"string","description":"Description of the discount","example":"Free shipping on orders over $100"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/UpdateShippingDiscountCriteria"}},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":100.0}}},"UpdateProductDiscountCriteria":{"type":"object","properties":{"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}},"required":["criteria_id"]},"UpdateProductDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Summer Sale 20% Off"},"description":{"type":"string","description":"Description of the discount","example":"20% off on all summer products"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/UpdateProductDiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"product_id":{"type":"string","description":"ID of the product this discount applies to","example":456},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"PERCENT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":20.0}}},"UpdateCategoryDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Electronics Category Sale"},"description":{"type":"string","description":"Description of the discount","example":"15% off all electronics"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/CategoryDiscountCriteriaRequest"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":false},"discount_percent":{"type":"number","format":"double","description":"Percentage discount to apply. Must be greater than or equal to 0.","example":15.0},"product_category_ids":{"type":"array","description":"List of product category IDs this discount applies to","example":["10","11","12"],"items":{"type":"string"}}}},"UpdateOrderTotalDiscountCriteria":{"type":"object","properties":{"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}},"required":["criteria_id"]},"UpdateOrderTotalDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"Bulk Order Discount"},"description":{"type":"string","description":"Description of the discount","example":"$50 off orders over $500"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/UpdateOrderTotalDiscountCriteria"}},"apply_to_commissions":{"type":"boolean","description":"Whether to apply this discount to commission calculations","example":true},"discount_type":{"type":"string","description":"Type of discount: AMOUNT (fixed amount) or PERCENT (percentage)","enum":["AMOUNT","PERCENT"],"example":"AMOUNT"},"discount_value":{"type":"number","format":"double","description":"Value of the discount (amount or percentage depending on discount_type)","example":50.0},"discount_strategy":{"type":"string","description":"Strategy for applying discount: GROSS (before tax) or NET (after tax)","enum":["GROSS","NET"],"example":"GROSS"}}},"UpdateFreeTrialDiscountCriteria":{"type":"object","properties":{"type":{"type":"string","description":"Type of criteria: DATE_RANGE, PROMO_CODE, PRODUCT, SUBSCRIPTION_PLAN, or ORDER_TOTAL","enum":["DATE_RANGE","PROMO_CODE","PRODUCT","SUBSCRIPTION_PLAN","ORDER_TOTAL"],"example":"DATE_RANGE"},"code":{"type":"string","description":"Promotional code for PROMO_CODE criteria","example":"SUMMER2024"},"criteria_id":{"type":"string","description":"Unique identifier for this criteria","example":501},"range_start_time":{"type":"string","format":"date-time","description":"Start date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-01-01T00:00:00Z"},"range_end_time":{"type":"string","format":"date-time","description":"End date/time for DATE_RANGE criteria (ISO-8601 format)","example":"2024-12-31T23:59:59Z"},"product_id":{"type":"string","description":"Product ID for PRODUCT criteria","example":456},"product_quantity_min":{"type":"integer","format":"int32","description":"Minimum product quantity for PRODUCT criteria","example":1},"product_quantity_max":{"type":"integer","format":"int32","description":"Maximum product quantity for PRODUCT criteria","example":10},"plan_id":{"type":"string","description":"Subscription plan ID for SUBSCRIPTION_PLAN criteria","example":789},"subscription_quantity":{"type":"integer","format":"int32","description":"Subscription quantity for SUBSCRIPTION_PLAN criteria","example":1},"total_amount":{"type":"number","format":"double","description":"Total amount threshold for ORDER_TOTAL criteria","example":100.0},"operator":{"type":"string","description":"Comparison operator for ORDER_TOTAL criteria: LESS_THAN or GREATER_THAN","enum":["LESS_THAN","GREATER_THAN"],"example":"GREATER_THAN"}},"required":["criteria_id"]},"UpdateFreeTrialDiscountRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the discount","example":"30-Day Free Trial"},"description":{"type":"string","description":"Description of the discount","example":"Try our premium plan free for 30 days"},"criteria":{"type":"array","description":"List of criteria that must be met for this discount to apply","items":{"$ref":"#/components/schemas/UpdateFreeTrialDiscountCriteria"}},"free_trial_days":{"type":"integer","format":"int32","description":"Number of free trial days","example":30},"hide_price":{"type":"boolean","description":"Whether to hide the price during the trial period","example":true},"subscription_plan_id":{"type":"string","description":"ID of the subscription plan this trial applies to","example":789}}},"UpdateNoteRequest":{"type":"object","properties":{"title":{"type":"string","description":"A value for either `title` or `type` is required.","example":"Follow-up Meeting"},"text":{"type":"string","description":"Note content","example":"Discussed pricing for contract renewal"},"type":{"type":"string","description":"A value for either `title` or `type` is required. The value may be one of `Appointment`, `Call`, `Email`, `Fax`, `Letter` or `Other` in Keap Max/Pro, or an admin-configured value in Classic.","example":"Call"},"user_id":{"type":"string","description":"ID of user creating the note","example":123},"is_pinned":{"type":"boolean","description":"Whether to pin this note","example":false},"custom_fields":{"type":"array","description":"Custom field values for the note. An empty array resets all custom fields to their defaults.","example":[{"id":"1","content":"Red"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}},"contact_id":{"type":"string","description":"Associated contact ID","example":1001}},"required":["user_id"]},"UpdateNoteResponse":{"type":"object","properties":{"id":{"type":"string","description":"Note ID","example":12345},"text":{"type":"string","description":"Note content","example":"Called about the Q3 proposal"},"title":{"type":"string","description":"Note title","example":"Sales Call"},"type":{"type":"string","description":"Note type","example":"Call"},"contact_id":{"type":"string","description":"Associated contact ID","example":1001},"assigned_to_user":{"$ref":"#/components/schemas/BasicUser","description":"User assigned to this note"},"create_time":{"type":"string","description":"Creation timestamp (ISO-8601)","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","description":"Last update timestamp (ISO-8601)","example":"2024-03-15T10:30:00Z"},"last_updated_by_user_id":{"type":"string","description":"ID of user who last updated","example":456},"pinned_at":{"type":"string","description":"Pin timestamp (ISO-8601), null if not pinned","example":"2024-02-18T16:45:00Z"},"created_by_user_id":{"type":"string","description":"ID of user who created","example":789},"custom_fields":{"type":"array","description":"Custom field values for the note","example":[{"id":"1","content":"Red"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValueObject"}}}},"UpdateContactLinkTypeRequest":{"type":"object","properties":{"name":{"type":"string","description":"Link type name","example":"Spouse"},"max_links":{"type":"integer","format":"int64","description":"Maximum number of links allowed (must be > 0)","example":1}}},"UpdateCompanyRequest":{"type":"object","description":"company","properties":{"address":{"$ref":"#/components/schemas/Address","description":"The company's address"},"notes":{"type":"string","description":"Notes about the company","example":"Key enterprise client since 2020"},"website":{"type":"string","description":"The company's website URL","example":"https://www.thryv.com"},"suffix":{"type":"string","description":"Name suffix","example":"Jr"},"title":{"type":"string","description":"Name prefix or salutation","example":"Dr."},"company_name":{"type":"string","description":"The name of the company","example":"Thryv"},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValue"}},"email_address":{"$ref":"#/components/schemas/EmailAddress"},"fax_number":{"$ref":"#/components/schemas/FaxNumber"},"phone_number":{"$ref":"#/components/schemas/PhoneNumber"},"anniversary_date":{"type":"string","description":"The anniversary date","example":"2015-06-20"},"assistant_name":{"type":"string","description":"The name of the company contact's assistant","example":"Jane Doe"},"assistant_phone":{"type":"string","description":"The phone number of the company contact's assistant","example":"555-123-4567"},"billing_information":{"type":"string","description":"Billing information for the company","example":"NET 30"},"birth_date":{"type":"string","description":"The birth date","example":"1985-03-15"},"contact_type":{"type":"string","description":"Type of contact","example":"Vendor"},"first_name":{"type":"string","description":"First name of the company contact","example":"John"},"job_title":{"type":"string","description":"Job title of the company contact","example":"CEO"},"last_name":{"type":"string","description":"Last name of the company contact","example":"Smith"},"middle_name":{"type":"string","description":"Middle name of the company contact","example":"Robert"},"preferred_name":{"type":"string","description":"Preferred name or nickname of the company contact","example":"Johnny"},"owner_id":{"type":"string","description":"ID of the user who owns this company","example":45},"referral_code":{"type":"string","description":"Referral code","example":"REF2024ABC"},"spouse_name":{"type":"string","description":"Spouse's name","example":"Jane Smith"}}},"BusinessProfileAddressRequest":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"locality":{"type":"string","description":"The municipality to which the address belongs","example":"Phoenix"},"region":{"type":"string","description":"The long-name descriptive version of the Region Code","example":"Arizona"},"country_code":{"type":"string","description":"An ISO 3166-1 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)","example":"USA"},"postal_code":{"type":"string"}},"required":["country_code","line1","line2","locality","postal_code","region"]},"UpdateBusinessProfileRequest":{"type":"object","description":"businessProfile","properties":{"name":{"type":"string"},"email":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"address":{"$ref":"#/components/schemas/BusinessProfileAddressRequest"},"currency_code":{"type":"string","description":"ISO 4217 Currency Code","example":"USD"},"business_goals":{"type":"array","description":"The goals of this business, ie. Grow Business, Convert more leads","items":{"type":"string"}},"business_primary_color":{"type":"string"},"business_secondary_color":{"type":"string"}}},"BusinessProfileAddressResponse":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"locality":{"type":"string","description":"The municipality to which the address belongs","example":"Phoenix"},"region":{"type":"string","description":"The long-name descriptive version of the Region Code","example":"Arizona"},"country_code":{"type":"string","description":"An ISO 3166-1 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)","example":"USA"},"postal_code":{"type":"string"}}},"GetBusinessProfileResponse":{"type":"object","description":"Profile information about the business that owns/uses this account","properties":{"name":{"type":"string"},"email":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"address":{"$ref":"#/components/schemas/BusinessProfileAddressResponse"},"time_zone":{"type":"string"},"logo_url":{"type":"string"},"currency_code":{"type":"string","description":"ISO 4217 Currency Code","example":"USD"},"language_tag":{"type":"string"},"business_type":{"type":"string","description":"The type of business"},"business_goals":{"type":"array","description":"The goals of this business, ie. Grow Business, Convert more leads","items":{"type":"string"}},"business_primary_color":{"type":"string"},"business_secondary_color":{"type":"string"}}},"PatchAutomationCategoryRequest":{"type":"object","properties":{"name":{"type":"string","description":"New name for the category","example":"Marketing Campaigns","maxLength":100,"minLength":1}}},"UpdateAffiliateRequest":{"type":"object","properties":{"code":{"type":"string","description":"The Affiliate code which have some validations.\n1. The code should not have white spaces\n2. The code should starts with letters\n3. The code minimum 2 characters length","example":"M123"},"name":{"type":"string","description":"The Affiliate name.","example":"John Smith"},"status":{"type":"string","description":"The Affiliate Status","enum":["ACTIVE","INACTIVE"],"example":"ACTIVE"},"contact_id":{"type":"string","description":"The contactId identifier. Must be a positive number","example":1},"parent_affiliate_id":{"type":"string","description":"The Parent Affiliate Id","example":0},"notify_on_sale":{"type":"boolean","description":"Whether to notify on sale events","example":true},"notify_on_lead":{"type":"boolean","description":"Whether to notify on lead events","example":true},"track_leads_days":{"type":"integer","format":"int32","description":"Number of days to track leads","example":30},"password":{"type":"string","description":"Affiliate portal password."},"custom_fields":{"type":"array","description":"List of custom field values to apply to this affiliate","example":[{"id":"1","content":"VIP"},{"id":"2","content":"Preferred"}],"items":{"$ref":"#/components/schemas/CustomFieldValue"}}}},"UpdateCommissionProgramRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the Commission Program","example":"Fitness program"},"notes":{"type":"string","description":"The notes of the Commission Program","example":"20% default commission"},"priority":{"type":"integer","format":"int32","description":"The priority of the Commission Program","example":1}}},"UpdateSubscriptionCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"subscription_id":{"type":"string","description":"Subscription ID to assign commission","example":456}}},"UpdateProgramResourceRequest":{"type":"object","properties":{"title":{"type":"string","description":"The program resource title","example":"Summer Sale Banner"},"notes":{"type":"string","description":"The resource notes.","example":"Use this banner for summer promotions"},"url":{"type":"string","description":"The URL to the resource.","example":"https://thryv.com/banners/summer-sale.jpg"},"order":{"type":"integer","format":"int32","description":"The order in which the resource is displayed. Minimum value is 0. Lower values indicate higher priority.","example":1},"content_html":{"type":"string","description":"The contents of the PAGE or EMAIL. In HTML format.","example":"Get 20% off!
"},"page_width":{"type":"integer","format":"int32","description":"The width of the page for PAGE types, in pixels. Minimum value is 0.","example":728},"page_height":{"type":"integer","format":"int32","description":"The height of the page for PAGE types, in pixels. Minimum value is 0.","example":90},"commission_program_ids":{"type":"array","description":"A list of commission program ids to use this resource. The values in this list will replace the existing list of commission program ids.","example":["123","456"],"items":{"type":"string"}}}},"UpdateProductCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"},"product_id":{"type":"string","description":"Product ID to assign commission","example":123}},"required":["product_id"]},"UpdateDefaultCommissionProgramRequest":{"type":"object","properties":{"percentage":{"type":"string","deprecated":true,"description":"Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1`","example":10.5},"unused":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for any unused commissions."},"dollar_amount":{"type":"string","deprecated":true,"description":"Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1`","example":25.0},"level_1":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 1 recipients of the commission."},"level_2":{"$ref":"#/components/schemas/CommissionItemRequest","description":"Payout rules for Level 2 recipients of the commission."},"payout_type":{"type":"string","default":"UPFRONT","description":"The payout type for this commission.","enum":["UPFRONT","PAYMENT_RECEIVED"],"example":"UPFRONT"}}},"ListWebformsResponse":{"type":"object","properties":{"webforms":{"type":"array","description":"The webforms in the current page","items":{"$ref":"#/components/schemas/Webform"}},"next_page_token":{"type":"string"}}},"Webform":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this webform","example":42},"xid":{"type":"string","description":"The public unique identifier for this webform, used in webform URLs","example":"a1b2c3d4e5"},"name":{"type":"string","description":"The name of this webform","example":"Newsletter Signup Form"},"funnel_id":{"type":"string","description":"The id of the funnel this webform belongs to, if any","example":15},"custom_slug":{"type":"string","description":"The custom slug of the webform. Used in pretty webform URLs","example":"newsletter-signup"},"webform_url":{"type":"string","description":"The URL for this webform that uses the xid to identify it","example":"https://thryv.com/app/form/a1b2c3d4e5"},"pretty_webform_url":{"type":"string","description":"The URL for this webform that uses the custom slug to identify it","example":"https://thryv.com/app/form/newsletter-signup"},"thank_you_page_url":{"type":"string","description":"The URL of the thank you page for this webform","example":"https://thryv.com/thank-you"},"duplicate_check_option":{"type":"string","description":"The option that determines if the lead submitted through the form is a duplicate or not. If it's a duplicate, then the lead will be merged with the existing contact record","enum":["EMAIL","EMAIL_AND_NAME","EMAIL_AND_NAME_AND_COMPANY","NO_CHECK"],"example":"EMAIL"},"exit_option":{"type":"string","description":"The option that determines what happens after the form is submitted","enum":["REDIRECT","FUNNEL_LINK","HOSTED","LANDING_PAGE","WEB_FORM","SURVEY","UPDATE","UPDATE_OPT_OUT","OPT_OUT","CONFIRM","MESSAGE","AUTHORING_MESSAGE","MANUAL","CLOSE","DISPLAY_TEXT_AND_BUTTON","ERROR","HOSTED_PAGE"],"example":"REDIRECT"},"webform_type":{"type":"string","description":"The type of webform this is","enum":["LEGACY","STANDALONE","FUNNEL","LANDING_PAGE","SURVEY","INTERNAL","TWITTER","UNKNOWN"],"example":"STANDALONE"},"create_time":{"type":"string","format":"date-time","description":"When the webform was created","example":"2024-01-15T10:30:00Z"},"update_time":{"type":"string","format":"date-time","description":"When the webform was last updated","example":"2024-06-20T14:45:00Z"}}},"ListUsersPaginatedResponse":{"type":"object","description":"Paginated response containing a list of users","properties":{"users":{"type":"array","description":"List of users","items":{"$ref":"#/components/schemas/User"}},"next_page_token":{"type":"string"}}},"ListUserGroupsResponse":{"type":"object","description":"Response containing a list of user groups","properties":{"user_groups":{"type":"array","description":"List of user groups","items":{"$ref":"#/components/schemas/UserGroup"}},"next_page_token":{"type":"string"}}},"UserGroup":{"type":"object","description":"A user group in the application","properties":{"id":{"type":"string","description":"The unique identifier for this user group.","example":5},"name":{"type":"string","description":"The name of this user group.","example":"Accounting"}}},"ListTasksResponse":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"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}}},"ListCustomFieldTabsResponse":{"type":"object","properties":{"tabs":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldTab"}}}},"ListCustomFieldGroupsResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldGroup"}}}},"ListTagsResponse":{"type":"object","properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"next_page_token":{"type":"string"}}},"ListTaggedContactsResponse":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/TaggedContact"}},"next_page_token":{"type":"string"}}},"TaggedContact":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"given_name":{"type":"string"},"family_name":{"type":"string"},"applied_time":{"type":"string","format":"date-time","description":"The time the tag was applied to the contact, in ISO 8601 format.","example":"2023-10-01T12:00:00Z"}}},"ListTaggedCompaniesResponse":{"type":"object","properties":{"tagged_companies":{"type":"array","items":{"$ref":"#/components/schemas/TaggedCompany"}},"next_page_token":{"type":"string"}}},"TaggedCompany":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/Company","description":"The company the tag is applied to"},"applied_time":{"type":"string","format":"date-time","description":"The time the tag was applied to the company, in ISO 8601 format.","example":"2023-10-01T12:00:00Z"}}},"ListTagCategoriesResponse":{"type":"object","properties":{"tag_categories":{"type":"array","items":{"$ref":"#/components/schemas/TagCategory"}},"next_page_token":{"type":"string"}}},"GetTagCategoryResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this tag category","example":123},"name":{"type":"string","description":"The unique name of this tag category","example":"Customer Segments"},"description":{"type":"string","description":"A description of this tag category","example":"Tags for customer segmentation"},"create_time":{"type":"string","format":"date-time","description":"The time this tag category was created, in ISO 8601 format","example":"2024-01-10T08:00:00Z"},"update_time":{"type":"string","format":"date-time","description":"The time this tag category was last updated, in ISO 8601 format","example":"2024-03-15T10:30:00Z"}}},"ListSubscriptionsResponse":{"type":"object","properties":{"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"next_page_token":{"type":"string"}}},"ListRestShippingMethodsResponse":{"type":"object","properties":{"shipping_methods":{"type":"array","items":{"$ref":"#/components/schemas/ShippingMethod"}}}},"ShippingMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"international":{"type":"boolean"},"settings":{"$ref":"#/components/schemas/ShippingMethodSettings"}}},"ShippingMethodSettings":{},"GetContactOptionTypesResponse":{"type":"object","properties":{"option_types":{"type":"array","items":{"type":"string"}}}},"GetApplicationEnabledStatusResponse":{"type":"object","properties":{"isEnabled":{"type":"boolean"}}},"ApplicationCompany":{"type":"object","properties":{"name":{"type":"string"},"country":{"type":"string"},"email":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"street_address_1":{"type":"string"},"street_address_2":{"type":"string"},"phone_ext":{"type":"string"},"caller_id_number":{"type":"string"},"web_logo_url":{"type":"string"}}},"ApplicationConfigurationModuleAffiliate":{"type":"object","properties":{"commission":{"$ref":"#/components/schemas/ApplicationConfigurationModuleAffiliateCommission"},"choose_affiliate":{"type":"boolean"},"custom_affiliate_url":{"type":"string"},"display_affiliate_ip_address":{"type":"boolean"},"do_not_notify_affiliate":{"type":"boolean"},"use_referral_history_if_no_tracking_cookie":{"type":"boolean"},"skip_pay_if_unused":{"type":"boolean"}}},"ApplicationConfigurationModuleAffiliateCommission":{"type":"object","properties":{"levels":{"type":"integer","format":"int32"},"calculation_type":{"type":"string"},"participant_types":{"type":"string"}}},"ApplicationConfigurationModuleApplication":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/ApplicationCompany"},"time_zone":{"type":"string"},"default_view_locale":{"type":"string"},"features_enabled":{"$ref":"#/components/schemas/ApplicationFeaturesEnabled"}}},"ApplicationConfigurationModuleAppointment":{"type":"object","properties":{"appointment_types":{"type":"string"},"share_opportunity_with_related_user":{"type":"boolean"}}},"ApplicationConfigurationModuleContact":{"type":"object","properties":{"title_types":{"type":"string"},"suffix_types":{"type":"string"},"contact_types":{"type":"string"},"phone_types":{"type":"string"},"fax_types":{"type":"string"},"address_labels":{"$ref":"#/components/schemas/ApplicationConfigurationModuleContactAddressLabels"},"disable_contact_edit_in_client_login":{"type":"boolean"},"default_new_contact_form":{"type":"string"}}},"ApplicationConfigurationModuleContactAddressLabels":{"type":"object","properties":{"line_1":{"type":"string"},"line_2":{"type":"string"},"line_3":{"type":"string"}}},"ApplicationConfigurationModuleEcommerce":{"type":"object","properties":{"currency":{"type":"string"},"default_country":{"type":"string"},"default_merchant":{"type":"string"},"credit_card_types":{"type":"string"},"default_tax":{"type":"string"},"payment_types":{"type":"string"},"default_to_auto_charge":{"type":"boolean"},"default_charge_max_retry_attempts":{"type":"integer","format":"int32"},"default_number_of_days_between_charge_attempts":{"type":"integer","format":"int32"},"merchant_account_max_retry_attempts":{"type":"integer","format":"int32"},"promo_codes":{"type":"string"},"track_cost_per_unit":{"type":"boolean"},"track_inventory":{"type":"boolean"}}},"ApplicationConfigurationModuleEmail":{"type":"object","properties":{"default_opt_in_link":{"type":"string"},"default_opt_out_link":{"type":"string"},"whitelisted_domains":{"type":"string"},"hide_emails_to_and_from_domains":{"type":"string"},"append_contact_key_to_links":{"type":"boolean"}}},"ApplicationConfigurationModuleForms":{"type":"object","properties":{"spam_filters_enabled":{"type":"boolean"}}},"ApplicationConfigurationModuleFulfillment":{"type":"object","properties":{"default_message_to":{"type":"string"},"default_message_fields":{"type":"string"}}},"ApplicationConfigurationModuleInvoice":{"type":"object","properties":{"tax_label":{"type":"string"}}},"ApplicationConfigurationModuleNote":{"type":"object","properties":{"appointment_types":{"type":"string"},"share_opportunity_with_related_user":{"type":"boolean"}}},"ApplicationConfigurationModuleOpportunity":{"type":"object","properties":{"states":{"$ref":"#/components/schemas/ApplicationConfigurationModuleOpportunityStates"},"default_stage":{"type":"string"}}},"ApplicationConfigurationModuleOpportunityStates":{"type":"object","properties":{"active":{"$ref":"#/components/schemas/ApplicationConfigurationModuleOpportunityStatesActive"},"win":{"$ref":"#/components/schemas/ApplicationConfigurationModuleOpportunityStatesWin"},"loss":{"$ref":"#/components/schemas/ApplicationConfigurationModuleOpportunityStatesLoss"}}},"ApplicationConfigurationModuleOpportunityStatesActive":{"type":"object","properties":{"stages":{"type":"string"}}},"ApplicationConfigurationModuleOpportunityStatesLoss":{"type":"object","properties":{"reasons":{"type":"string"},"stage":{"type":"string"}}},"ApplicationConfigurationModuleOpportunityStatesWin":{"type":"object","properties":{"reasons":{"type":"string"},"stage":{"type":"string"}}},"ApplicationConfigurationModuleTask":{"type":"object","properties":{"appointment_types":{"type":"string"},"share_opportunity_with_related_user":{"type":"boolean"}}},"ApplicationConfigurationModuleTemplate":{"type":"object","properties":{"default_country_code":{"type":"integer","format":"int32"},"default_user_id":{"type":"string"}}},"ApplicationFeaturesEnabled":{"type":"object","properties":{"marketing":{"type":"boolean"}}},"GetSettingsResponse":{"type":"object","properties":{"affiliate":{"$ref":"#/components/schemas/ApplicationConfigurationModuleAffiliate"},"appointment":{"$ref":"#/components/schemas/ApplicationConfigurationModuleAppointment"},"application":{"$ref":"#/components/schemas/ApplicationConfigurationModuleApplication"},"contact":{"$ref":"#/components/schemas/ApplicationConfigurationModuleContact"},"ecommerce":{"$ref":"#/components/schemas/ApplicationConfigurationModuleEcommerce"},"email":{"$ref":"#/components/schemas/ApplicationConfigurationModuleEmail"},"forms":{"$ref":"#/components/schemas/ApplicationConfigurationModuleForms"},"fulfillment":{"$ref":"#/components/schemas/ApplicationConfigurationModuleFulfillment"},"invoice":{"$ref":"#/components/schemas/ApplicationConfigurationModuleInvoice"},"note":{"$ref":"#/components/schemas/ApplicationConfigurationModuleNote"},"opportunity":{"$ref":"#/components/schemas/ApplicationConfigurationModuleOpportunity"},"task":{"$ref":"#/components/schemas/ApplicationConfigurationModuleTask"},"template":{"$ref":"#/components/schemas/ApplicationConfigurationModuleTemplate"}}},"CardInfo":{"type":"object","properties":{"brand":{"type":"string"},"fingerprint":{"type":"string","description":"A token that uniquely identifies the card info"},"card_type":{"type":"string","description":"The card type. Valid values are: CREDIT, DEBIT, PREPAID.","enum":["CREDIT","DEBIT","PREPAID","ACH"]},"last_four":{"type":"string"},"expiration_year":{"type":"string","description":"Four-digit expiration year"},"expiration_month":{"type":"string","description":"Two-digit expiration month"}}},"ListTransactions":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionV2"}},"next_page_token":{"type":"string"}}},"PaymentMethod":{"type":"object","properties":{"contact_id":{"type":"string","description":"The id of the contact the payment method is associated with.","example":123},"payment_method_id":{"type":"string","description":"The unique identifier of the payment method.","example":123},"credit_card_id":{"type":"string","description":"For backward-compatibility with v1 endpoints. If present, it's the credit card id this payment method refers to."},"merchant_account_type":{"type":"string","description":"The merchant account type through which the payment method was tokenized.","enum":["PAYPAL","UNSUPPORTED","AUTHORIZE","EWAY","WEPAY","STRIPE","KEAP_PAY"],"example":"STRIPE"},"merchant_account_id":{"type":"string","description":"The merchant account id through which the payment method was tokenize."},"payment_method_type":{"type":"string","description":"The type of payment method. For now, only CARD is supported.","enum":["CARD"]},"created_time":{"type":"string","format":"date-time","description":"When this payment method was made. In ISO-8601 format.","example":"2024-05-21T14:30:00Z"},"card_info":{"$ref":"#/components/schemas/CardInfo","description":"If present, it provides additional details for payment methods of payment_method_type CARD."},"status":{"type":"string","description":"Status of the payment method. Fow now, only EXPIRED is supported.","enum":["EXPIRED"]}}},"TransactionV2":{"type":"object","properties":{"amount":{"type":"number","format":"double","description":"The amount of the transaction.","example":123.34},"status":{"type":"string","description":"The resulting status of the transaction.","enum":["APPROVED","PENDING","ERROR","FAILED","NONE"],"example":"APPROVED"},"description":{"type":"string","description":"A description of the transaction."},"contact":{"$ref":"#/components/schemas/BasicContact","description":"Contact associated with this order"},"order_ids":{"type":"array","description":"List of order ids transaction was against.","example":["123","456"],"items":{"type":"string"}},"contact_id":{"type":"string","description":"The id of the contact the transaction was for.","example":123},"transaction_method":{"type":"string","description":"The method of transaction.","enum":["CAPTURE","REFUND","VOID","MANUAL"],"example":"ONLINE"},"transaction_time":{"type":"string","format":"date-time","description":"When this transaction was made. In ISO-8601 format.","example":"2024-05-21T14:30:00Z"},"external_reference_id":{"type":"string","description":"An external reference id - typically from a payment processor - that references this transaction.","example":"txn_123"},"external_response_code":{"type":"string","description":"An external response code generated by payment processor","example":"abc123"},"error_details":{"type":"string","description":"Any details if the transaction failed."},"payment_id":{"type":"string","description":"Identifier of an order/invoice payment created by the transaction."},"is_successful":{"type":"boolean","description":"If the transaction completed in a successful state. PENDING transactions are treated `false`."},"merchant_account_id":{"type":"string","description":"The merchant account id through which the transaction was made."},"merchant_account_type":{"type":"string","description":"The merchant account id through which the transaction was made.","enum":["PAYPAL","UNSUPPORTED","AUTHORIZE","EWAY","WEPAY","STRIPE","KEAP_PAY"],"example":"PAYPAL"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod","description":"Details of the payment method used for this transaction."}}},"ListPayments":{"type":"object","properties":{"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"next_page_token":{"type":"string"}}},"Payment":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the payment.","example":123},"type":{"type":"string","description":"A label describing the type of payment made.","example":"Credit Card"},"amount":{"type":"number","format":"double","description":"The payment amount.","example":123.34},"note":{"type":"string","description":"A note about the payment."},"status":{"type":"string","description":"Provides the current status of the payment, if available.","enum":["PENDING","APPROVED","COMPLETED","NONE"],"example":"COMPLETED"},"commissioned":{"type":"boolean","description":"Whether this payment had a commission."},"synced":{"type":"boolean","description":"Whether or not the data is synced externally."},"payment_time":{"type":"string","format":"date-time","description":"When this payment was made. In ISO-8601 format.","example":"2024-05-21T14:30:00Z"},"refund_payment_id":{"type":"string","description":"If this payment had a refund, this refers to the id of the refund payment.","example":123},"contact_id":{"type":"string","description":"The id of the contact the payment is associated with.","example":123},"order_ids":{"type":"array","description":"List of order ids the payment was made was against.","example":["123","456"],"items":{"type":"string"}},"update_time":{"type":"string","format":"date-time","description":"When this payment was updated. In ISO-8601 format.","example":"2024-05-21T14:30:00Z"},"external_transaction_id":{"type":"string","description":"An external id - typically from a payment processor - that references this transaction.","example":"txn_123"},"merchant_account_id":{"type":"string","description":"The merchant account id through which the transaction was made."},"merchant_account_type":{"type":"string","description":"The merchant account type through which the transaction was made.","enum":["PAYPAL","UNSUPPORTED","AUTHORIZE","EWAY","WEPAY","STRIPE","KEAP_PAY"],"example":"PAYPAL"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod","description":"Details of the payment method used for this transaction."}}},"ListReportsResponse":{"type":"object","properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"next_page_token":{"type":"string"}}},"Report":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the report (Saved Search)","example":123},"name":{"type":"string","description":"The name of the report","example":"Monthly Sales Report"},"updated_time":{"type":"string","description":"The last update timestamp","example":"2024-01-15T10:30:00Z"},"created_time":{"type":"string","description":"The creation timestamp","example":"2024-01-01T08:00:00Z"},"user_ids":{"type":"array","description":"A list of Users who have access to this Saved Search, or ALL_USERS if visible to all","example":["1","2","ALL_USERS"],"items":{"type":"string"}}}},"ReportField":{"type":"object","properties":{"name":{"type":"string","description":"The field name as accepted by the report execution `fields` parameter","example":"Id"},"label":{"type":"string","description":"The human-readable label for the field","example":"ID"}}},"ReportModel":{"type":"object","properties":{"fields":{"type":"array","description":"The list of fields available for this Report (Saved Search)","items":{"$ref":"#/components/schemas/ReportField"}}}},"ListReferralsResponse":{"type":"object","properties":{"referrals":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}},"next_page_token":{"type":"string"}}},"CurrencyValue_List":{"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"}}},"ListProductsResponse_List":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/RestV2Product_List"}},"next_page_token":{"type":"string"}}},"ProductFixedOption_List":{"type":"object","properties":{"value":{"type":"string","description":"The displayable label given to the option","example":"Red"},"code":{"type":"string","description":"An internal code to reference the option value","example":"RED"},"price_adjustment":{"type":"number","format":"double","description":"Positive value indicates additional amount added to the original price. Negative value indicates subtraction from the original price.","example":500}}},"ProductInventory_List":{"type":"object","properties":{"inventory_limit":{"type":"integer","format":"int32","description":"The inventory limit for this product. Must be greater than or equal to 0.","example":100},"out_of_stock_enabled":{"type":"boolean","description":"The flag to enable out of stock inventory","example":false},"email_for_inventory_notifications":{"type":"string","description":"The email address for notifications about inventory","example":"notify@example.com"}}},"ProductOptions_List":{"type":"object","properties":{"name":{"type":"string","description":"The option name","example":"Color"},"type":{"type":"string","description":"The option type. If FIXED, then fixed_options will be returned. If VARIABLE, then variable_setting will be returned.","enum":["FIXED","VARIABLE"],"example":"FIXED"},"required":{"type":"boolean","description":"If the user is required to select/fill in an option for the product","example":true},"fixed_options":{"type":"array","description":"List of option values for the fixed option","items":{"$ref":"#/components/schemas/ProductFixedOption_List"}},"variable_setting":{"$ref":"#/components/schemas/ProductVariableSetting_List","description":"The option is a user-defined free-form field. The settings define the restrictions on what can be entered."}}},"ProductVariableSetting_List":{"type":"object","properties":{"contains":{"type":"string","description":"Requires the value (excluding start and end) to contain given type.","enum":["LETTER","NUMBER","BOTH"],"example":"BOTH"},"min_chars":{"type":"integer","format":"int32","description":"Minimum allowable characters","example":1},"max_chars":{"type":"integer","format":"int32","description":"Max allowable chars. Its value must be greater than min_chars","example":50},"contain_spaces":{"type":"boolean","description":"If spaces are allowed for the option","example":true},"start_with":{"type":"string","description":"Requires the value to start with the given type.","enum":["LETTER","NUMBER","BOTH"],"example":"LETTER"},"end_with":{"type":"string","description":"Requires the value to end with the given type.","enum":["LETTER","NUMBER","BOTH"],"example":"LETTER"},"validation_msg":{"type":"string","description":"Customized validation message to display when option criteria aren't met","example":"Invalid input format"}}},"RestV2Product_List":{"type":"object","properties":{"id":{"type":"string","description":"The product ID","example":1},"name":{"type":"string","description":"Product name","example":"Premium Widget"},"price":{"$ref":"#/components/schemas/CurrencyValue_List","description":"The product price"},"active":{"type":"boolean","description":"True means active, False means inactive","example":true},"description":{"type":"string","description":"Product long description","example":"A high-quality widget for all your needs"},"sku":{"type":"string","description":"Product SKU","example":"PROD-001"},"shippable":{"type":"boolean","description":"If the product requires shipping","example":true},"weight":{"type":"number","format":"double","description":"Product weight","example":2.5},"taxable":{"type":"boolean","description":"Whether or not the product should be taxed","example":true},"categories":{"type":"array","description":"List of category ids to indicate which categories this product will belong to. Can be empty.","items":{"type":"string"}},"options":{"type":"array","description":"List of product options. Can be empty.","items":{"$ref":"#/components/schemas/ProductOptions_List"}},"inventory":{"$ref":"#/components/schemas/ProductInventory_List","description":"The inventory details for this product"},"short_description":{"type":"string","description":"Product short description","example":"Premium widget"},"subscription_only":{"type":"boolean","description":"If the product is a subscription-only product","example":false},"storefront_hidden":{"type":"boolean","description":"If the product should not be shown in the storefront","example":false},"country_taxable":{"type":"boolean","description":"If country-based taxes should be applied to this product","example":false},"state_taxable":{"type":"boolean","description":"If state-based taxes should be applied to this product","example":true},"city_taxable":{"type":"boolean","description":"If city-based taxes should be applied to this product","example":false},"subscription_plans":{"type":"array","description":"List of subscription plans associated with the product. Can be empty.","items":{"$ref":"#/components/schemas/SubscriptionPlan_List"}},"top_html":{"type":"string"},"bottom_html":{"type":"string"},"is_package":{"type":"boolean"},"needs_digital_delivery":{"type":"boolean"},"has_legacy_image":{"type":"boolean"},"delivery_description":{"type":"string"},"create_time":{"type":"string"},"update_time":{"type":"string"}}},"SubscriptionPlan_List":{"type":"object","properties":{"id":{"type":"string","description":"The subscription plan id","example":1},"active":{"type":"boolean","description":"If the subscription plan should be active/available for purchase","example":true},"prorate":{"type":"boolean","description":"If the subscription plan should allow prorating","example":false},"billing_cycle":{"type":"string","description":"How frequent to bill.","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"],"example":"MONTHLY"},"billing_frequency":{"type":"integer","format":"int32","description":"How many times per billing cycle to bill","example":1},"number_of_cycles":{"type":"integer","format":"int32","description":"How many billing cycles to bill. Optional field i.e. can be no value or 0.","example":12},"plan_price":{"$ref":"#/components/schemas/CurrencyValue_List","description":"The price of the subscription plan"},"order_index":{"type":"integer","format":"int32","description":"Determines the order in which the plan will be displayed","example":0}}},"ListSubscriptionPlansResponse":{"type":"object","properties":{"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPlan"}},"next_page_token":{"type":"string"}}},"ListProductOptionsResponse":{"type":"object","properties":{"product_options":{"type":"array","items":{"$ref":"#/components/schemas/ProductOption"}}}},"ListProductInterestBundleResponse":{"type":"object","properties":{"product_interest_bundles":{"type":"array","items":{"$ref":"#/components/schemas/ProductInterestBundle"}},"next_page_token":{"type":"string"}}},"ListProductCategoriesResponse":{"type":"object","properties":{"product_categories":{"type":"array","items":{"$ref":"#/components/schemas/ProductCategory"}},"next_page_token":{"type":"string"}}},"AssignedProducts":{"type":"object","properties":{"product_category_id":{"type":"string","description":"The product category ID","example":123},"product_ids":{"type":"array","description":"Assigned product IDs","items":{"type":"string"}}}},"ListAssignedProductsResponse":{"type":"object","properties":{"assigned_product_categories":{"type":"array","items":{"$ref":"#/components/schemas/AssignedProducts"}},"next_page_token":{"type":"string"}}},"ListPaymentMethodsResponse":{"type":"object","properties":{"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"next_page_token":{"type":"string"}}},"ListOrders":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderV2"}},"next_page_token":{"type":"string"}}},"InvoiceOrderPayment":{"type":"object","properties":{"id":{"type":"string","description":"The invoice order payment ID.","example":123},"amount":{"type":"number","description":"The payment amount.","example":10000},"note":{"type":"string","description":"A note about the payment.","example":"Monthly payment"},"invoice_id":{"type":"string","description":"The invoice ID.","example":456},"payment_id":{"type":"string","description":"The payment ID.","example":789},"pay_time":{"type":"string","format":"date-time","description":"The date and time of payment.","example":"2024-05-21T23:00:00Z"},"pay_status":{"type":"string","description":"The payment status.","enum":["MANUAL_PAID","REFUNDED","VOIDED","PAYPAL_PAID","APPROVED","FAILED","ERROR","PENDING"],"example":"APPROVED"},"last_updated_time":{"type":"string","format":"date-time","description":"When this payment record was last updated.","example":"2024-05-21T23:00:00Z"},"skip_commission":{"type":"boolean","description":"Whether to skip commission for this payment.","example":false},"refund_invoice_payment_id":{"type":"string","description":"The refund invoice payment ID, if this is a refund.","example":101}}},"ListOrderPaymentsResponse":{"type":"object","properties":{"invoice_order_payments":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceOrderPayment"}},"next_page_token":{"type":"string"}}},"ListOpportunitiesResponse":{"type":"object","properties":{"opportunities":{"type":"array","items":{"$ref":"#/components/schemas/RestV2Opportunity"}},"next_page_token":{"type":"string"}}},"ListOpportunityStagesResponse":{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#/components/schemas/RestOpportunityStage"}},"next_page_token":{"type":"string"}}},"ListOpportunityStageMoveResponse":{"type":"object","properties":{"stage_moves":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityStageMove"}},"next_page_token":{"type":"string"}}},"OpportunityStageMove":{"type":"object","description":"Historical record of an opportunity moving from one pipeline stage to another","properties":{"id":{"type":"string","description":"Unique ID of this stage-move record","example":42},"opportunity_id":{"type":"string","description":"ID of the opportunity that was moved","example":7},"move_time":{"type":"string","description":"Date-time when the move occurred (ISO-8601 UTC)","example":"2024-03-15T10:30:00.000+0000"},"move_from_stage_id":{"type":"string","description":"ID of the stage moved FROM. 0 = no previous stage (first move)","example":3},"move_to_stage_id":{"type":"string","description":"ID of the stage moved TO","example":5},"prev_stage_move_time":{"type":"string","description":"Date-time of the previous stage-move (ISO-8601 UTC). Null if first move.","example":"2024-02-10T08:00:00.000+0000"},"user_id":{"type":"string","description":"ID of the user associated with this move","example":1},"created_by":{"type":"string","description":"ID of the user who created this record","example":1},"create_time":{"type":"string","description":"Date-time this record was created (ISO-8601 UTC)","example":"2024-03-15T10:30:00.000+0000"}}},"GetUserInfoResponse":{"type":"object","description":"User information response","properties":{"email":{"type":"string","description":"The user's email address","example":"john.smith@example.com"},"sub":{"type":"string","description":"The subject identifier","example":12345},"id":{"type":"string","description":"The global user identifier","example":123456},"keap_id":{"type":"string","description":"The keap user identifier","example":"john.smith@example.com"},"family_name":{"type":"string","description":"The user's last name","example":"Smith"},"given_name":{"type":"string","description":"The user's first name","example":"John"},"middle_name":{"type":"string","description":"The user's middle name","example":"Robert"},"preferred_name":{"type":"string","description":"The user's preferred name","example":"Johnny"},"is_admin":{"type":"boolean","description":"Whether the user is an admin","example":true},"tenant_id":{"type":"string","description":"The tenant ID the user belongs to","example":"xyz789"}}},"ListNotesResponse":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"next_page_token":{"type":"string"}}},"ListNoteTemplateResponse":{"type":"object","properties":{"note_templates":{"type":"array","items":{"$ref":"#/components/schemas/NoteTemplate"}},"next_page_token":{"type":"string"}}},"NoteTemplate":{"type":"object","properties":{"id":{"type":"string","description":"Template ID","example":5001},"title":{"type":"string","description":"Template title","example":"Post-Sale Follow-up"},"description":{"type":"string","description":"Template description","example":"Follow up within 24 hours of purchase"},"action_type":{"type":"string","description":"Note action type","example":"Call"},"assignment_user_id":{"type":"integer","format":"int64","description":"Default assigned user ID","example":100},"notify_users":{"type":"array","description":"List of user IDs to notify","items":{"type":"string"}}}},"ListMerchantAccountResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["PAYPAL","UNSUPPORTED","AUTHORIZE","EWAY","WEPAY","STRIPE","KEAP_PAY"]},"is_test":{"type":"boolean"}}},"ListMerchantsResponse":{"type":"object","properties":{"default_merchant_account_id":{"type":"string"},"merchant_accounts":{"type":"array","items":{"$ref":"#/components/schemas/ListMerchantAccountResponse"}},"next_page_token":{"type":"string"}}},"Country":{"type":"object","properties":{"codes":{"$ref":"#/components/schemas/CountryCodes"},"name":{"type":"string"}}},"CountryCodes":{"type":"object","properties":{"alpha2":{"type":"string"},"alpha3":{"type":"string"}}},"ListCountriesResponse":{"type":"object","properties":{"countries":{"type":"array","description":"A key-value pair of country code and country name.","items":{"$ref":"#/components/schemas/Country"}},"next_page_token":{"type":"string"}},"required":["countries"]},"ListProvincesResponse":{"type":"object","properties":{"provinces":{"type":"array","description":"A key-value pair of province code and province name.","items":{"$ref":"#/components/schemas/Province"}},"next_page_token":{"type":"string"}},"required":["provinces"]},"Province":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"}}},"ListLeadSourcesResponse":{"type":"object","properties":{"lead_sources":{"type":"array","description":"The lead sources in the current page","items":{"$ref":"#/components/schemas/LeadSource"}},"next_page_token":{"type":"string"}}},"ListLeadSourceRecurringExpensesResponse":{"type":"object","properties":{"lead_source_recurring_expenses":{"type":"array","description":"The lead source recurring expenses in the current page","items":{"$ref":"#/components/schemas/LeadSourceRecurringExpense"}},"next_page_token":{"type":"string"}}},"ListLeadSourceExpensesResponse":{"type":"object","properties":{"lead_source_expenses":{"type":"array","description":"The lead source expenses in the current page","items":{"$ref":"#/components/schemas/LeadSourceExpense"}},"next_page_token":{"type":"string"}}},"ListLeadSourceCategoriesResponse":{"type":"object","properties":{"lead_source_categories":{"type":"array","description":"The lead source categories in the current page","items":{"$ref":"#/components/schemas/LeadSourceCategory"}},"next_page_token":{"type":"string"}}},"ListWordPressOptInOptionsResponse":{"type":"object","properties":{"wordpress_opt_in_options":{"type":"array","items":{"$ref":"#/components/schemas/WordPressOptInOption"}},"next_page_token":{"type":"string"}}},"ListFilesResponse":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/FileMetadata"}},"next_page_token":{"type":"string"}}},"EmailSent":{"type":"object","description":"A sent email record","properties":{"id":{"type":"string","description":"The unique identifier of the email","example":123},"subject":{"type":"string","description":"The subject of the email","example":"Welcome to our service"},"headers":{"type":"string","description":"Email headers","example":"X-Custom-Header: value"},"contact_id":{"type":"string","description":"The contact ID who received the email","example":456},"sent_to_address":{"type":"string","description":"The email address the email was sent to","example":"john@example.com"},"sent_to_cc_address_list":{"type":"array","description":"List of CC email addresses","example":["cc1@example.com","cc2@example.com"],"items":{"type":"string"}},"sent_to_bcc_address_list":{"type":"array","description":"List of BCC email addresses","example":["bcc@example.com"],"items":{"type":"string"}},"sent_from_address":{"type":"string","description":"The sender's email address","example":"sender@company.com"},"sent_from_reply_address":{"type":"string","description":"The reply-to email address","example":"reply@company.com"},"sent_time":{"type":"string","format":"date-time","description":"When the email was sent, in ISO-8601 format","example":"2024-05-21T14:30:00Z"},"received_time":{"type":"string","format":"date-time","description":"When the email was received, in ISO-8601 format","example":"2024-05-21T14:31:00Z"},"opened_time":{"type":"string","format":"date-time","description":"When the email was opened, in ISO-8601 format","example":"2024-05-21T15:00:00Z"},"clicked_time":{"type":"string","format":"date-time","description":"When a link in the email was clicked, in ISO-8601 format","example":"2024-05-21T15:05:00Z"},"original_provider_id":{"type":"string","description":"The original provider's message ID","example":"msg_abc123"},"original_provider":{"type":"string","description":"The email provider that sent the email","enum":["UNKNOWN","INFUSIONSOFT","MICROSOFT","GOOGLE"],"example":"INFUSIONSOFT"},"provider_source_id":{"type":"string","description":"The synced email account that generated this message","example":"sync@company.com"}}},"ListEmailsSentResponse":{"type":"object","description":"Response containing a list of sent emails","properties":{"emails":{"type":"array","description":"List of sent emails","items":{"$ref":"#/components/schemas/EmailSent"}},"next_page_token":{"type":"string"}}},"EmailTemplateSummary":{"type":"object","description":"Email template metadata returned by the list endpoint. Does not include body content; use GET /v2/emails/templates/{id} for full detail.","properties":{"id":{"type":"integer","format":"int64","description":"The id of the template"},"piece_title":{"type":"string","description":"The title of the template","example":"Welcome Email"},"categories":{"type":"array","description":"The categories associated with the email","example":["Marketing","Onboarding"],"items":{"type":"string"}},"from_address":{"type":"string","description":"The from address of the email","example":"~Owner.Email~"},"to_address":{"type":"string","description":"The to address of the email","example":"~Contact.Email~"},"cc_address":{"type":"string","description":"The cc address of the email","example":"manager@company.com"},"bcc_address":{"type":"string","description":"The bcc address of the email","example":"archive@company.com"},"subject":{"type":"string","description":"The subject of the email","example":"Welcome ~Contact.FirstName~!"},"content_type":{"type":"string","description":"The content type of the email","enum":["TEXT","HTML","MULTIPART"],"example":"HTML"},"merge_context":{"type":"string","description":"The merge context of the email","example":"Contact"}}},"ListEmailTemplatesResponse":{"type":"object","properties":{"email_templates":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateSummary"}},"next_page_token":{"type":"string"}}},"EmailTemplate":{"type":"object","description":"An email template","properties":{"id":{"type":"integer","format":"int64","description":"The id of the template"},"piece_title":{"type":"string","description":"The title of the template","example":"Welcome Email"},"categories":{"type":"array","description":"The categories associated with the email","example":["Marketing","Onboarding"],"items":{"type":"string"}},"from_address":{"type":"string","description":"The from address of the email","example":"~Owner.Email~"},"to_address":{"type":"string","description":"The to address of the email","example":"~Contact.Email~"},"cc_address":{"type":"string","description":"The cc address of the email","example":"manager@company.com"},"bcc_address":{"type":"string","description":"The bcc address of the email","example":"archive@company.com"},"subject":{"type":"string","description":"The subject of the email","example":"Welcome ~Contact.FirstName~!"},"text_body":{"type":"string","description":"The text body of the email","example":"Hello ~Contact.FirstName~, welcome!"},"html_body":{"type":"string","description":"The HTML body of the email","example":"