All URIs are relative to https://api.merge.dev/api/accounting/v1
Method | HTTP request | Description |
---|---|---|
invoices_create | POST /invoices | |
invoices_list | GET /invoices | |
invoices_meta_post_retrieve | GET /invoices/meta/post | |
invoices_retrieve | GET /invoices/{id} |
InvoiceResponse invoices_create(x_account_token, invoice_endpoint_request)
Creates an Invoice
object with the given values.
- Api Key Authentication (tokenAuth):
import time
import MergeAccountingClient
from MergeAccountingClient.api import invoices_api
from MergeAccountingClient.model.invoice_response import InvoiceResponse
from MergeAccountingClient.model.invoice_endpoint_request import InvoiceEndpointRequest
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/accounting/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeAccountingClient.Configuration(
host = "https://api.merge.dev/api/accounting/v1"
)
# 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 API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with MergeAccountingClient.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoices_api.InvoicesApi(api_client)
x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
invoice_endpoint_request = InvoiceEndpointRequest(
model=InvoiceRequest(
remote_id="990110",
type=,
contact="022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
number="AIQ12546",
issue_date=dateutil_parser('2020-03-31T00:00:00Z'),
due_date=dateutil_parser('2020-04-15T00:00:00Z'),
paid_on_date=dateutil_parser('2020-04-01T00:00:00Z'),
memo="Weekly Payment",
currency=,
total_discount=3.14,
sub_total=100,
total_tax_amount=5,
total_amount=105,
balance=105,
remote_updated_at=dateutil_parser('2020-04-01T00:00:00Z'),
payments=["b26fd49a-cbae-470a-a8f8-bcbc119e0390"],
),
) # InvoiceEndpointRequest |
is_debug_mode = True # bool | Whether to include debug fields (such as log file links) in the response. (optional)
run_async = True # bool | Whether or not third-party updates should be run asynchronously. (optional)
# example passing only required values which don't have defaults set
try:
api_response = api_instance.invoices_create(x_account_token, invoice_endpoint_request)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_create: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.invoices_create(x_account_token, invoice_endpoint_request, is_debug_mode=is_debug_mode, run_async=run_async)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | str | Token identifying the end user. | |
invoice_endpoint_request | InvoiceEndpointRequest | ||
is_debug_mode | bool | Whether to include debug fields (such as log file links) in the response. | [optional] |
run_async | bool | Whether or not third-party updates should be run asynchronously. | [optional] |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedInvoiceList invoices_list(x_account_token)
Returns a list of Invoice
objects.
- Api Key Authentication (tokenAuth):
import time
import MergeAccountingClient
from MergeAccountingClient.api import invoices_api
from MergeAccountingClient.model.paginated_invoice_list import PaginatedInvoiceList
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/accounting/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeAccountingClient.Configuration(
host = "https://api.merge.dev/api/accounting/v1"
)
# 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 API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with MergeAccountingClient.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoices_api.InvoicesApi(api_client)
x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
contact_id = "contact_id_example" # str | If provided, will only return invoices for this contact. (optional)
created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional)
created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional)
cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
expand = "payments,line_items,contact" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional)
include_deleted_data = True # bool | Whether to include data that was marked as deleted by third party webhooks. (optional)
include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional)
modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional)
page_size = 1 # int | Number of results to return per page. (optional)
remote_fields = "type" # str | Which fields should be returned in non-normalized form. (optional) if omitted the server will use the default value of "type"
remote_id = "remote_id_example" # str, none_type | The API provider's ID for the given object. (optional)
type = "" # str, none_type | If provided, will only return Invoices with this type (optional)
# example passing only required values which don't have defaults set
try:
api_response = api_instance.invoices_list(x_account_token)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_list: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.invoices_list(x_account_token, contact_id=contact_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_fields=remote_fields, remote_id=remote_id, type=type)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | str | Token identifying the end user. | |
contact_id | str | If provided, will only return invoices for this contact. | [optional] |
created_after | datetime | If provided, will only return objects created after this datetime. | [optional] |
created_before | datetime | If provided, will only return objects created before this datetime. | [optional] |
cursor | str | The pagination cursor value. | [optional] |
expand | str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] |
include_deleted_data | bool | Whether to include data that was marked as deleted by third party webhooks. | [optional] |
include_remote_data | bool | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
modified_after | datetime | If provided, will only return objects modified after this datetime. | [optional] |
modified_before | datetime | If provided, will only return objects modified before this datetime. | [optional] |
page_size | int | Number of results to return per page. | [optional] |
remote_fields | str | Which fields should be returned in non-normalized form. | [optional] if omitted the server will use the default value of "type" |
remote_id | str, none_type | The API provider's ID for the given object. | [optional] |
type | str, none_type | If provided, will only return Invoices with this type | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MetaResponse invoices_meta_post_retrieve(x_account_token)
Returns metadata for Invoice
POSTs.
- Api Key Authentication (tokenAuth):
import time
import MergeAccountingClient
from MergeAccountingClient.api import invoices_api
from MergeAccountingClient.model.meta_response import MetaResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/accounting/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeAccountingClient.Configuration(
host = "https://api.merge.dev/api/accounting/v1"
)
# 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 API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with MergeAccountingClient.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoices_api.InvoicesApi(api_client)
x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
# example passing only required values which don't have defaults set
try:
api_response = api_instance.invoices_meta_post_retrieve(x_account_token)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_meta_post_retrieve: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | str | Token identifying the end user. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Invoice invoices_retrieve(x_account_token, id)
Returns an Invoice
object with the given id
.
- Api Key Authentication (tokenAuth):
import time
import MergeAccountingClient
from MergeAccountingClient.api import invoices_api
from MergeAccountingClient.model.invoice import Invoice
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/accounting/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeAccountingClient.Configuration(
host = "https://api.merge.dev/api/accounting/v1"
)
# 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 API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with MergeAccountingClient.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = invoices_api.InvoicesApi(api_client)
x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
id = "id_example" # str |
expand = "payments,line_items,contact" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional)
include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
remote_fields = "type" # str | Which fields should be returned in non-normalized form. (optional) if omitted the server will use the default value of "type"
# example passing only required values which don't have defaults set
try:
api_response = api_instance.invoices_retrieve(x_account_token, id)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_retrieve: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.invoices_retrieve(x_account_token, id, expand=expand, include_remote_data=include_remote_data, remote_fields=remote_fields)
pprint(api_response)
except MergeAccountingClient.ApiException as e:
print("Exception when calling InvoicesApi->invoices_retrieve: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | str | Token identifying the end user. | |
id | str | ||
expand | str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] |
include_remote_data | bool | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
remote_fields | str | Which fields should be returned in non-normalized form. | [optional] if omitted the server will use the default value of "type" |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]