Keap Lead Source Recurring Expenses API
Keap Lead Source Recurring Expenses API — 6 operations across 3 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.
Keap Lead Source Recurring Expenses API — 6 operations across 3 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.
openapi: 3.1.0
info:
title: Keap Lead Source Recurring Expenses API
description: Keap Public API Documentation
termsOfService: https://www.thryv.com/terms-of-use
contact:
name: Keap
url: https://developer.keap.com/get-support
email: api.keap@thryv.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: v2
servers:
- url: https://api.infusionsoft.com/crm
tags:
- name: Lead Source Recurring Expenses
paths:
/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:
- (String) `title`
- (Long) `amount`
- (String) `start_time`
- (String) `end_time`
- (String) `next_expense_time`
- (String) `create_time`
- (String) `update_time`
You will need to apply the `==` operator 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:
- `filter=amount%3D%3D2500`
- `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.
One of the following fields:
- `title`
- `amount`
- `start_time`
- `end_time`
- `next_expense_time`
- `create_time`
- `update_time`
One of the following directions:
- `asc`
- `desc`'
required: false
schema:
type: string
- name: page_size
in: query
description: Total number of items to return per page
required: false
schema:
type: integer
format: int32
maximum: 1000
minimum: 0
example: 0
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/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}/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}/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:
- (String) `title`
- (Long) `amount`
- (String) `incurred_time`
- (String) `create_time`
- (String) `update_time`
You will need to apply the `==` operator 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:
- `filter=amount%3D%3D2500`
- `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.
One of the following fields:
- `title`
- `amount`
- `incurred_time`
- `create_time`
- `update_time`
One of the following directions:
- `asc`
- `desc`'
required: false
schema:
type: string
- name: page_size
in: query
description: Total number of items to return per page
required: false
schema:
type: integer
format: int32
maximum: 1000
minimum: 0
example: 0
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListLeadSourceExpensesResponse'
components:
schemas:
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
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
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
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'
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'
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'
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
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
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize
tokenUrl: https://api.infusionsoft.com/token
scopes: {}
security:
- oauth2: []