All URIs are relative to https://api.invoicetronic.com
| Method | HTTP request | Description |
|---|---|---|
| webhook_get | GET /webhook | List webhooks |
| webhook_id_delete | DELETE /webhook/{id} | Delete a webhook by id |
| webhook_id_get | GET /webhook/{id} | Get a webhook by id |
| webhook_post | POST /webhook | Add a webhook |
| webhook_put | PUT /webhook | Update a webhook |
| webhookhistory_get | GET /webhookhistory | List webhook history items |
| webhookhistory_id_get | GET /webhookhistory/{id} | Get a webhook history item by id |
List[WebHook] webhook_get(company_id=company_id, page=page, page_size=page_size, sort=sort, description=description, enabled=enabled, events=events, url=url)
List webhooks
Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL.
Webhooks allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur.
You can also manage webhooks via the Dashboard.
For more information, see the Webhooks documentation page.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook import WebHook
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
company_id = 56 # int | Company id (optional)
page = 1 # int | Page number. (optional) (default to 1)
page_size = 100 # int | Items per page. Cannot be greater than 200. (optional) (default to 100)
sort = 'sort_example' # str | Sort by field. Prefix with '-' for descending order. (optional)
description = 'description_example' # str | (optional)
enabled = True # bool | (optional)
events = 'events_example' # str | (optional)
url = 'url_example' # str | (optional)
try:
# List webhooks
api_response = api_instance.webhook_get(company_id=company_id, page=page, page_size=page_size, sort=sort, description=description, enabled=enabled, events=events, url=url)
print("The response of WebhookApi->webhook_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhook_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| company_id | int | Company id | [optional] |
| page | int | Page number. | [optional] [default to 1] |
| page_size | int | Items per page. Cannot be greater than 200. | [optional] [default to 100] |
| sort | str | Sort by field. Prefix with '-' for descending order. | [optional] |
| description | str | [optional] | |
| enabled | bool | [optional] | |
| events | str | [optional] | |
| url | str | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebHook webhook_id_delete(id)
Delete a webhook by id
Delete a webhook subscription by its internal id.
Webhooks allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur.
You can also manage webhooks via the Dashboard.
For more information, see the Webhooks documentation page.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook import WebHook
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
id = 56 # int | Item id
try:
# Delete a webhook by id
api_response = api_instance.webhook_id_delete(id)
print("The response of WebhookApi->webhook_id_delete:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhook_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Item id |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebHook webhook_id_get(id)
Get a webhook by id
Retrieve a webhook by its internal id.
Webhooks allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur.
You can also manage webhooks via the Dashboard.
For more information, see the Webhooks documentation page.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook import WebHook
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
id = 56 # int | Item id
try:
# Get a webhook by id
api_response = api_instance.webhook_id_get(id)
print("The response of WebhookApi->webhook_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhook_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Item id |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebHook webhook_post(web_hook)
Add a webhook
Create a new webhook subscription.
Webhooks allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur.
You can also manage webhooks via the Dashboard.
For more information, see the Webhooks documentation page.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook import WebHook
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
web_hook = invoicetronic_sdk.WebHook() # WebHook |
try:
# Add a webhook
api_response = api_instance.webhook_post(web_hook)
print("The response of WebhookApi->webhook_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhook_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| web_hook | WebHook |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
| 422 | Unprocessable Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebHook webhook_put(web_hook)
Update a webhook
Update an existing webhook subscription.
Webhooks allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur.
You can also manage webhooks via the Dashboard.
For more information, see the Webhooks documentation page.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook import WebHook
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
web_hook = invoicetronic_sdk.WebHook() # WebHook |
try:
# Update a webhook
api_response = api_instance.webhook_put(web_hook)
print("The response of WebhookApi->webhook_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhook_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| web_hook | WebHook |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 422 | Unprocessable Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[WebHookHistory] webhookhistory_get(page=page, page_size=page_size, sort=sort, webhook_id=webhook_id)
List webhook history items
Webhook history items are stored in the database and can be accessed via the API. They are preserved for 15 in both the live and sandbox environments.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook_history import WebHookHistory
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
page = 1 # int | Page number. (optional) (default to 1)
page_size = 100 # int | Items per page. Cannot be greater than 200. (optional) (default to 100)
sort = 'sort_example' # str | Sort by field. Prefix with '-' for descending order. (optional)
webhook_id = 56 # int | WebHook id (optional)
try:
# List webhook history items
api_response = api_instance.webhookhistory_get(page=page, page_size=page_size, sort=sort, webhook_id=webhook_id)
print("The response of WebhookApi->webhookhistory_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhookhistory_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number. | [optional] [default to 1] |
| page_size | int | Items per page. Cannot be greater than 200. | [optional] [default to 100] |
| sort | str | Sort by field. Prefix with '-' for descending order. | [optional] |
| webhook_id | int | WebHook id | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebHookHistory webhookhistory_id_get(id)
Get a webhook history item by id
Webhook history items are stored in the database and can be accessed via the API. They are preserved for 15 in both the live and sandbox environments.
- Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.web_hook_history import WebHookHistory
from invoicetronic_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
host = "https://api.invoicetronic.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoicetronic_sdk.WebhookApi(api_client)
id = 56 # int | Item id
try:
# Get a webhook history item by id
api_response = api_instance.webhookhistory_id_get(id)
print("The response of WebhookApi->webhookhistory_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookApi->webhookhistory_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Item id |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]