client.entity_group.get_all(...)
-
-
-
Get all entity groups. If using a JWT, will return all groups the entity is part of. If using an API key, will return all groups for the organization.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.get_all()
-
-
-
limit:
typing.Optional[int]
— The maximum number of results to return. Defaults to 1. Max is 10.
-
starting_after:
typing.Optional[EntityGroupId]
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.create(...)
-
-
-
Create an entity group
-
-
-
from mercoa import EntityGroupRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.create( request=EntityGroupRequest( entity_ids=[ "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", ], ), )
-
-
-
request:
EntityGroupRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.get(...)
-
-
-
Get an entity group
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.get( entity_group_id="entg_a3582b70-fd04-4888-9185-a640ae9048be", )
-
-
-
entity_group_id:
EntityGroupId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.update(...)
-
-
-
Update an entity group
-
-
-
from mercoa import EntityGroupRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.update( entity_group_id="entg_a3582b70-fd04-4888-9185-a640ae9048be", request=EntityGroupRequest( entity_ids=[ "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", ], ), )
-
-
-
entity_group_id:
EntityGroupId
-
request:
EntityGroupRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.delete(...)
-
-
-
Delete an entity group
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.delete( entity_group_id="string", )
-
-
-
entity_group_id:
EntityGroupId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.user.find(...)
-
-
-
Search entity group users
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.user.find( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", name="John", )
-
-
-
entity_group_id:
EntityGroupId
— Entity Group ID
-
foreign_id:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— ID used to identify user in your system
-
role:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— Filter users by role. If multiple roles are provided, users with any of the roles will be returned.
-
name:
typing.Optional[str]
— Filter users by name. Partial matches are supported.
-
email:
typing.Optional[str]
— Filter users by email. Partial matches are supported.
-
limit:
typing.Optional[int]
— Number of entities to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityUserId]
— The ID of the user to start after. If not provided, the first page of entities will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.user.create(...)
-
-
-
Create entity user that will be added to all entities in the group.
-
-
-
from mercoa import EntityGroupUserEntityRequest, EntityGroupUserRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.user.create( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=EntityGroupUserRequest( foreign_id="MY-DB-ID-12345", email="john.doe@acme.com", name="John Doe", entities=[ EntityGroupUserEntityRequest( roles=["admin", "approver"], entity_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", ), EntityGroupUserEntityRequest( roles=["viewer"], entity_id="ent_574s93r-3943-fu39-g9dfr-33b42a55812c", ), ], ), )
-
-
-
entity_group_id:
EntityGroupId
— Entity Group ID
-
request:
EntityGroupUserRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.user.get(...)
-
-
-
Get entity user from a group
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.user.get( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", foreign_id="MY-DB-ID-12345", )
-
-
-
entity_group_id:
EntityGroupId
— Entity Group ID
-
foreign_id:
str
— ID used to identify user in your system
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.user.update(...)
-
-
-
Update entity user for all entities in the group.
-
-
-
from mercoa import EntityGroupUserEntityRequest, EntityGroupUserRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.user.update( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", foreign_id="MY-DB-ID-12345", request=EntityGroupUserRequest( foreign_id="MY-DB-ID-12345", email="john.doe@acme.com", name="John Doe", entities=[ EntityGroupUserEntityRequest( roles=["admin", "approver"], entity_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", ), EntityGroupUserEntityRequest( roles=["viewer"], entity_id="ent_574s93r-3943-fu39-g9dfr-33b42a55812c", ), ], ), )
-
-
-
entity_group_id:
EntityGroupId
— Entity Group ID
-
foreign_id:
str
— ID used to identify user in your system
-
request:
EntityGroupUserRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.user.delete(...)
-
-
-
Delete entity user from all entities in the group. This will also remove the user from all approval policies. If an approval policy will break as a result of this operation, this request will fail.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.user.delete( entity_group_id="string", foreign_id="string", )
-
-
-
entity_group_id:
EntityGroupId
— Entity Group ID
-
foreign_id:
str
— ID used to identify user in your system
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.find(...)
-
-
-
Search all entities with the given filters. If no filters are provided, all entities will be returned.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.find( is_customer=True, foreign_id="MY-DB-ID-12345", payment_methods=True, )
-
-
-
payment_methods:
typing.Optional[bool]
— If true, will include entity payment methods as part of the response
-
is_customer:
typing.Optional[bool]
— If true, only entities with a direct relationship to the requesting organization will be returned. If false or not provided, all entities will be returned.
-
foreign_id:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— ID used to identify this entity in your system
-
status:
typing.Optional[typing.Union[EntityStatus, typing.Sequence[EntityStatus]]]
-
is_payee:
typing.Optional[bool]
If true, entities that are marked as payees will be returned. If false or not provided, entities that are marked as payees will not be returned.
-
is_payor:
typing.Optional[bool]
If true or not provided, entities that are marked as payors will be returned. If false, entities that are marked as payors will not be returned.
-
name:
typing.Optional[str]
— Filter entities by name. Partial matches are supported.
-
limit:
typing.Optional[int]
— Number of entities to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityId]
— The ID of the entity to start after. If not provided, the first page of entities will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.create(...)
-
-
-
from mercoa import BusinessProfileRequest, EntityRequest, ProfileRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.create( request=EntityRequest( is_customer=False, is_payor=False, is_payee=True, account_type="business", foreign_id="MY-DB-ID-90909", profile=ProfileRequest( business=BusinessProfileRequest( email="vendor@bigboxstore.com", legal_business_name="Big Box Store", website="http://www.bigboxstore.com", business_type="publicCorporation", ), ), ), )
-
-
-
request:
EntityRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.get( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.update(...)
-
-
-
from mercoa import ( Address, BusinessProfileRequest, Ein, EntityUpdateRequest, PhoneNumber, ProfileRequest, TaxId, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.update( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", request=EntityUpdateRequest( is_customer=True, is_payor=True, is_payee=False, account_type="business", foreign_id="MY-DB-ID-12345", profile=ProfileRequest( business=BusinessProfileRequest( email="customer@acme.com", legal_business_name="Acme Inc.", website="http://www.acme.com", business_type="llc", phone=PhoneNumber( country_code="1", number="4155551234", ), address=Address( address_line_1="123 Main St", address_line_2="Unit 1", city="San Francisco", state_or_province="CA", postal_code="94105", country="US", ), tax_id=TaxId( ein=Ein( number="12-3456789", ), ), ), ), ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.delete(...)
-
-
-
Will archive the entity. This action cannot be undone, and the entity will no longer be available for use. The foreignId on the entity will be cleared as well.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.delete( entity_id="string", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.accept_terms_of_service(...)
-
-
-
This endpoint is used to indicate acceptance of Mercoa's terms of service for an entity. Send a request to this endpoint only after the entity has accepted the Mercoa ToS. Entities must accept Mercoa ToS before they can be send or pay invoices using Mercoa's payment rails.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.accept_terms_of_service( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.initiate_kyb(...)
-
-
-
This endpoint is used to initiate KYB for an entity. Send a request to this endpoint only after the entity has accepted the Mercoa ToS, all representatives have been added, and all required fields have been filled out.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.initiate_kyb( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.get_token(...)
-
-
-
Generate a JWT token for an entity with the given options. This token can be used to authenticate the entity in the Mercoa API and iFrame.
We recommend using this endpoint. This will enable features such as approvals and comments.
-
-
-
from mercoa import TokenGenerationOptions from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.get_token( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", request=TokenGenerationOptions( expires_in="1h", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
TokenGenerationOptions
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.plaid_link_token(...)
-
-
-
Get a Plaid link token for an entity. This token can be used to add or update a bank account to the entity using Plaid Link.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.plaid_link_token( entity_id="string", payment_method_id="string", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
typing.Optional[PaymentMethodId]
— ID of Bank Account to update
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.get_onboarding_link(...)
-
-
-
Generate an onboarding link for the entity.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.get_onboarding_link( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", type="PAYOR", expires_in="1h", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
type:
EntityOnboardingLinkType
— The type of onboarding link to generate. If not provided, the default is payee. The onboarding options are determined by your organization's onboarding configuration.
-
expires_in:
typing.Optional[str]
— Expressed in seconds or a string describing a time span. The default is 24h.
-
connected_entity_id:
typing.Optional[EntityId]
— The ID of the entity to connect to. If onboarding a payee, this should be the payor entity ID. If onboarding a payor, this should be the payee entity ID. If no connected entity ID is provided, the onboarding link will be for a standalone entity.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.send_onboarding_link(...)
-
-
-
Send an email with a onboarding link to the entity. The email will be sent to the email address associated with the entity.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.send_onboarding_link( entity_id="string", type="PAYEE", expires_in="string", connected_entity_id="string", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
type:
EntityOnboardingLinkType
— The type of onboarding link to generate. If not provided, the default is payee. The onboarding options are determined by your organization's onboarding configuration.
-
expires_in:
typing.Optional[str]
— Expressed in seconds or a string describing a time span. The default is 7 days.
-
connected_entity_id:
typing.Optional[EntityId]
— The ID of the entity to connect to. If onboarding a payee, this should be the payor entity ID. If onboarding a payor, this should be the payee entity ID. If no connected entity ID is provided, the onboarding link will be for a standalone entity.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.email_log.find(...)
-
-
-
Get all incoming invoice emails for an entity.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.email_log.find( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
start_date:
typing.Optional[dt.datetime]
-
end_date:
typing.Optional[dt.datetime]
-
limit:
typing.Optional[int]
— Number of logs to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityId]
— The ID of the log to start after. If not provided, the first page of logs will be returned.
-
search:
typing.Optional[str]
— Search for logs by email address or subject
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.email_log.get(...)
-
-
-
Get an email log by ID
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.email_log.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", log_id="log_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
log_id:
EmailLogId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.get_all(...)
-
-
-
Get all entity users (DEPRECATED, use Search Entity Users)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.get_all( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.find(...)
-
-
-
Search entity users
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.find( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", name="John", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
foreign_id:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— ID used to identify user in your system
-
role:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— Filter users by role. If multiple roles are provided, users with any of the roles will be returned.
-
name:
typing.Optional[str]
— Filter users by name. Partial matches are supported.
-
email:
typing.Optional[str]
— Filter users by email. Partial matches are supported.
-
limit:
typing.Optional[int]
— Number of entities to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityUserId]
— The ID of the user to start after. If not provided, the first page of entities will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.create(...)
-
-
-
from mercoa import EntityUserRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.create( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", request=EntityUserRequest( foreign_id="MY-DB-ID-12345", email="john.doe@acme.com", name="John Doe", roles=["admin", "approver"], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityUserRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.get(...)
-
-
-
Get entity user
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.get( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", user_id="user_ec3aafc8-ea86-408a-a6c1-545497badbbb", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.update(...)
-
-
-
Update entity user
-
-
-
from mercoa import EntityUserRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.update( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", user_id="user_ec3aafc8-ea86-408a-a6c1-545497badbbb", request=EntityUserRequest( foreign_id="MY-DB-ID-12345", email="john.doe@acme.com", name="John Doe", roles=["admin", "approver"], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
request:
EntityUserRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.delete(...)
-
-
-
Delete entity user. This will also remove the user from all approval policies. If an approval policy will break as a result of this operation, this request will fail.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.delete( entity_id="string", user_id="string", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.get_token(...)
-
-
-
Generate a JWT token for an entity user with the given options. This token can be used to authenticate the entity and entity user in the Mercoa API and iFrame.
-
-
-
from mercoa import TokenGenerationOptions from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.get_token( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", user_id="user_a0f6ea94-0761-4a5e-a416-3c453cb7eced", request=TokenGenerationOptions( expires_in="1h", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
request:
TokenGenerationOptions
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.find(...)
-
-
-
Search invoices for all entities in the organization
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.find( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by the ID of the entity that created the invoice.
-
start_date:
typing.Optional[dt.datetime]
— Start date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
end_date:
typing.Optional[dt.datetime]
— End date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
date_type:
typing.Optional[InvoiceDateFilter]
— Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.
-
order_by:
typing.Optional[InvoiceOrderByField]
— Field to order invoices by. Defaults to CREATED_AT.
-
order_direction:
typing.Optional[OrderDirection]
— Direction to order invoices by. Defaults to asc.
-
limit:
typing.Optional[int]
— Number of invoices to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[InvoiceId]
— The ID of the invoice to start after. If not provided, the first page of invoices will be returned.
-
search:
typing.Optional[str]
— Find invoices by vendor name, invoice number, or amount. Partial matches are supported.
-
metadata:
typing.Optional[ typing.Union[InvoiceMetadataFilter, typing.Sequence[InvoiceMetadataFilter]] ]
— Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
-
line_item_metadata:
typing.Optional[ typing.Union[InvoiceMetadataFilter, typing.Sequence[InvoiceMetadataFilter]] ]
— Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
-
line_item_gl_account_id:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.
-
payer_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by payer ID.
-
vendor_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by vendor ID.
-
approver_id:
typing.Optional[typing.Union[EntityUserId, typing.Sequence[EntityUserId]]]
— Filter invoices by assigned approver user ID.
-
approver_action:
typing.Optional[typing.Union[ApproverAction, typing.Sequence[ApproverAction]]]
— Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.
-
invoice_id:
typing.Optional[typing.Union[InvoiceId, typing.Sequence[InvoiceId]]]
— Filter invoices by invoice ID.
-
status:
typing.Optional[typing.Union[InvoiceStatus, typing.Sequence[InvoiceStatus]]]
— Invoice status to filter on
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.create(...)
-
-
-
import datetime from mercoa import InvoiceCreationRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.create( request=InvoiceCreationRequest( status="SCHEDULED", payer_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", creator_entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", vendor_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", currency="USD", amount=100.0, invoice_date=datetime.datetime.fromisoformat( "2021-01-01 00:00:00+00:00", ), due_date=datetime.datetime.fromisoformat( "2021-01-31 00:00:00+00:00", ), payment_source_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", payment_destination_id="pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18", deduction_date=datetime.datetime.fromisoformat( "2021-01-29 00:00:00+00:00", ), ), )
-
-
-
request:
InvoiceCreationRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.get( invoice_id="inv_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.update(...)
-
-
-
import datetime from mercoa import InvoiceUpdateRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.update( invoice_id="inv_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=InvoiceUpdateRequest( status="SCHEDULED", payment_destination_id="pm_5fde2f4a-facc-48ef-8f0d-6b7d087c7b18", deduction_date=datetime.datetime.fromisoformat( "2021-01-29 00:00:00+00:00", ), ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request:
InvoiceUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.delete(...)
-
-
-
Only invoices in the DRAFT and NEW status can be deleted.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.delete( invoice_id="inv_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.line_item.update(...)
-
-
-
Update invoice line item
-
-
-
import datetime from mercoa import InvoiceLineItemIndividualUpdateRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.line_item.update( invoice_id="in_d8f68285-1c6d-4d5a-a9e3-252c3180fac4", line_item_id="inli_8aa84cb8-2ae7-4579-8fa3-87586e7c14a7", request=InvoiceLineItemIndividualUpdateRequest( name="Product A", description="Product A", service_start_date=datetime.datetime.fromisoformat( "2021-01-01 00:00:00+00:00", ), service_end_date=datetime.datetime.fromisoformat( "2021-01-31 00:00:00+00:00", ), metadata={"key1": "value1", "key2": "value2"}, gl_account_id="600394", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID
-
line_item_id:
InvoiceLineItemId
— Invoice Line Item ID
-
request:
InvoiceLineItemIndividualUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.get(...)
-
-
-
Get current organization information
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.get( payment_methods=True, email_provider=True, external_accounting_system_provider=True, color_scheme=True, payee_onboarding_options=True, payor_onboarding_options=True, metadata_schema=True, )
-
-
-
payment_methods:
typing.Optional[bool]
— include supported payment methods in response
-
email_provider:
typing.Optional[bool]
— include email provider info in response
-
external_accounting_system_provider:
typing.Optional[bool]
— include external accounting system provider info in response
-
color_scheme:
typing.Optional[bool]
— include color scheme info in response
-
payee_onboarding_options:
typing.Optional[bool]
— include payee onboarding options in response
-
payor_onboarding_options:
typing.Optional[bool]
— include payor onboarding options in response
-
metadata_schema:
typing.Optional[bool]
— include metadata schema in response
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.update(...)
-
-
-
Update current organization
-
-
-
from mercoa import ( ColorSchemeRequest, EmailProviderRequest, ExternalAccountingSystemProviderRequest_None, MetadataSchema, OnboardingOptionsRequest, OrganizationRequest, PaymentMethodsRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.update( request=OrganizationRequest( name="string", logo="string", website_url="string", support_email="string", payment_methods=PaymentMethodsRequest(), email_provider=EmailProviderRequest(), external_accounting_system_provider=ExternalAccountingSystemProviderRequest_None(), color_scheme=ColorSchemeRequest(), payee_onboarding_options=OnboardingOptionsRequest(), payor_onboarding_options=OnboardingOptionsRequest(), metadata_schema=[MetadataSchema()], ), )
-
-
-
request:
OrganizationRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.email_log(...)
-
-
-
Get log of all emails sent to this organization. Content format subject to change.
-
-
-
import datetime from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.email_log( start_date=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), end_date=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), limit=1, starting_after="string", )
-
-
-
start_date:
typing.Optional[dt.datetime]
-
end_date:
typing.Optional[dt.datetime]
-
limit:
typing.Optional[int]
— Number of logs to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[str]
— The ID of the log to start after. If not provided, the first page of logs will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.bank_lookup.find(...)
-
-
-
Find bank account details
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.bank_lookup.find( routing_number="026009593", )
-
-
-
routing_number:
str
— Routing number to validate
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calculate.fee(...)
-
-
-
Calculate the estimated fees associated with an payment given the amount, payment source, and disbursement method. Can be used to calculate fees for a payment before creating an invoice.
-
-
-
from mercoa import CalculateFeesRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.calculate.fee( request=CalculateFeesRequest( amount=100.0, payment_source_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", payment_destination_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", ), )
-
-
-
request:
CalculateFeesRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calculate.payment_timing(...)
-
-
-
Calculate the estimated payment timing given the deduction date, payment source, and disbursement method. Can be used to calculate timing for a payment.
-
-
-
import datetime from mercoa import CalculatePaymentTimingRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.calculate.payment_timing( request=CalculatePaymentTimingRequest( estimated_deduction_date=datetime.datetime.fromisoformat( "2024-01-02 00:00:00+00:00", ), payment_source_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", payment_destination_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", ), )
-
-
-
request:
CalculatePaymentTimingRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.custom_payment_method_schema.get_all()
-
-
-
Get all custom payment method schemas
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.custom_payment_method_schema.get_all()
-
-
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.custom_payment_method_schema.create(...)
-
-
-
Create custom payment method schema
-
-
-
from mercoa import ( CustomPaymentMethodSchemaField, CustomPaymentMethodSchemaRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.custom_payment_method_schema.create( request=CustomPaymentMethodSchemaRequest( name="Check", is_source=False, is_destination=True, supported_currencies=["USD"], fields=[ CustomPaymentMethodSchemaField( name="payToTheOrderOf", display_name="Pay To The Order Of", type="text", optional=False, ), CustomPaymentMethodSchemaField( name="accountNumber", display_name="Account Number", type="usBankAccountNumber", optional=False, use_as_account_number=True, ), CustomPaymentMethodSchemaField( name="routingNumber", display_name="Routing Number", type="usBankRoutingNumber", optional=False, ), CustomPaymentMethodSchemaField( name="address", display_name="Address", type="address", optional=False, ), ], estimated_processing_time=7, max_amount=50000.0, min_amount=1.0, ), )
-
-
-
request:
CustomPaymentMethodSchemaRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.custom_payment_method_schema.update(...)
-
-
-
Update custom payment method schema
-
-
-
from mercoa import ( CustomPaymentMethodSchemaField, CustomPaymentMethodSchemaRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.custom_payment_method_schema.update( schema_id="cpms_14f78dcd-4614-426e-a37a-7af262431d41", request=CustomPaymentMethodSchemaRequest( name="Wire", is_source=False, is_destination=True, supported_currencies=["USD", "EUR"], fields=[ CustomPaymentMethodSchemaField( name="bankName", display_name="Bank Name", type="text", optional=False, ), CustomPaymentMethodSchemaField( name="recipientName", display_name="Recipient Name", type="text", optional=False, ), CustomPaymentMethodSchemaField( name="accountNumber", display_name="Account Number", type="usBankAccountNumber", optional=False, use_as_account_number=True, ), CustomPaymentMethodSchemaField( name="routingNumber", display_name="Routing Number", type="usBankRoutingNumber", optional=False, ), ], estimated_processing_time=0, max_amount=100000.0, min_amount=1.0, ), )
-
-
-
schema_id:
CustomPaymentMethodSchemaId
-
request:
CustomPaymentMethodSchemaRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.custom_payment_method_schema.get(...)
-
-
-
Get custom payment method schema
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.custom_payment_method_schema.get( schema_id="cpms_14f78dcd-4614-426e-a37a-7af262431d41", )
-
-
-
schema_id:
CustomPaymentMethodSchemaId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.custom_payment_method_schema.delete(...)
-
-
-
Delete custom payment method schema. Schema that have been used in an invoice cannot be deleted.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.custom_payment_method_schema.delete( schema_id="cpms_14f78dcd-4614-426e-a37a-7af262431d41", )
-
-
-
schema_id:
CustomPaymentMethodSchemaId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.invoice.find(...)
-
-
-
Get invoices for an entity group with the given filters.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.invoice.find( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", exclude_receivables=True, order_by="CREATED_AT", order_direction="ASC", limit=10, )
-
-
-
entity_group_id:
EntityGroupId
-
exclude_payables:
typing.Optional[bool]
— Return only invoices that are receivable by the entity.
-
exclude_receivables:
typing.Optional[bool]
— Return only invoices that are payable by the entity.
-
start_date:
typing.Optional[dt.datetime]
— Start date for invoice created on date filter.
-
end_date:
typing.Optional[dt.datetime]
— End date for invoice created date filter.
-
date_type:
typing.Optional[InvoiceDateFilter]
— Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.
-
order_by:
typing.Optional[InvoiceOrderByField]
— Field to order invoices by. Defaults to CREATED_AT.
-
order_direction:
typing.Optional[OrderDirection]
— Direction to order invoices by. Defaults to asc.
-
limit:
typing.Optional[int]
— Number of invoices to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[InvoiceId]
— The ID of the invoice to start after. If not provided, the first page of invoices will be returned.
-
metadata:
typing.Optional[ typing.Union[InvoiceMetadataFilter, typing.Sequence[InvoiceMetadataFilter]] ]
— Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
-
search:
typing.Optional[str]
— Find invoices by vendor name, invoice number, or amount. Partial matches are supported.
-
payer_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by payer ID.
-
vendor_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by vendor ID.
-
approver_id:
typing.Optional[typing.Union[EntityUserId, typing.Sequence[EntityUserId]]]
— Filter invoices by assigned approver user ID.
-
approver_action:
typing.Optional[typing.Union[ApproverAction, typing.Sequence[ApproverAction]]]
— Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.
-
invoice_id:
typing.Optional[typing.Union[InvoiceId, typing.Sequence[InvoiceId]]]
— Filter invoices by invoice ID.
-
status:
typing.Optional[typing.Union[InvoiceStatus, typing.Sequence[InvoiceStatus]]]
— Invoice status to filter on.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity_group.invoice.metrics(...)
-
-
-
Get invoice metrics for an entity group with the given filters. Invoices will be grouped by currency. If none of excludePayables, excludeReceivables, payerId, vendorId, or invoiceId status filters are provided, excludeReceivables will be set to true.
-
-
-
import datetime from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity_group.invoice.metrics( entity_group_id="entg_8545a84e-a45f-41bf-bdf1-33b42a55812c", return_by_date="CREATION_DATE", exclude_receivables=True, created_date_start=datetime.datetime.fromisoformat( "2021-01-01 00:00:00+00:00", ), created_date_end=datetime.datetime.fromisoformat( "2021-01-31 23:59:59.999000+00:00", ), currency="USD", status="NEW", )
-
-
-
entity_group_id:
EntityGroupId
-
search:
typing.Optional[str]
— Find invoices by vendor name, invoice number, or amount. Partial matches are supported.
-
exclude_payables:
typing.Optional[bool]
— Only return invoices that are not payable by the entity. This will return only invoices that are receivable by the entity.
-
exclude_receivables:
typing.Optional[bool]
— Only return invoices that are not receivable by the entity. This will return only invoices that are payable by the entity.
-
return_by_date:
typing.Optional[InvoiceMetricsPerDateGroupBy]
— Return invoice metrics grouped by date.
-
payer_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by payer ID.
-
vendor_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by vendor ID.
-
approver_id:
typing.Optional[typing.Union[EntityUserId, typing.Sequence[EntityUserId]]]
— Filter invoices by assigned approver user ID.
-
invoice_id:
typing.Optional[typing.Union[InvoiceId, typing.Sequence[InvoiceId]]]
— Filter invoices by invoice ID.
-
status:
typing.Optional[typing.Union[InvoiceStatus, typing.Sequence[InvoiceStatus]]]
— Invoice status to filter on
-
start_date:
typing.Optional[dt.datetime]
— Start date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
end_date:
typing.Optional[dt.datetime]
— End date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
date_type:
typing.Optional[InvoiceDateFilter]
— Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.
-
due_date_start:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. Start date for invoice dueDate filter.
-
due_date_end:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. End date for invoice dueDate filter.
-
created_date_start:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. Start date for invoice created on date filter.
-
created_date_end:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. End date for invoice created date filter.
-
currency:
typing.Optional[typing.Union[CurrencyCode, typing.Sequence[CurrencyCode]]]
— Currency to filter on
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.approval_policy.get_all(...)
-
-
-
Retrieve all invoice approval policies associated with an entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.approval_policy.get_all( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.approval_policy.create(...)
-
-
-
Create an invoice approval policy associated with an entity
-
-
-
from mercoa import ApprovalPolicyRequest, IdentifierList_UserList, Rule_Approver from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.approval_policy.create( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=ApprovalPolicyRequest( trigger=[], rule=Rule_Approver( num_approvers=2, identifier_list=IdentifierList_UserList( value=[ "usr_8545a84e-a45f-41bf-bdf1-33b42a55812c", "usr_21661ac1-a2a8-4465-a6c0-64474ba8181d", ] ), ), upstream_policy_id="root", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
ApprovalPolicyRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.approval_policy.get(...)
-
-
-
Retrieve an invoice approval policy associated with an entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.approval_policy.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", policy_id="apvl_5ce50275-1789-42ea-bc60-bb7e6d03635c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
policy_id:
ApprovalPolicyId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.approval_policy.update(...)
-
-
-
Update an invoice approval policy associated with an entity
-
-
-
from mercoa import ( ApprovalPolicyUpdateRequest, IdentifierList_UserList, Rule_Approver, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.approval_policy.update( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", policy_id="apvl_5ce50275-1789-42ea-bc60-bb7e6d03635c", request=ApprovalPolicyUpdateRequest( trigger=[], rule=Rule_Approver( num_approvers=2, identifier_list=IdentifierList_UserList( value=[ "usr_8545a84e-a45f-41bf-bdf1-33b42a55812c", "usr_21661ac1-a2a8-4465-a6c0-64474ba8181d", ] ), ), upstream_policy_id="root", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
policy_id:
ApprovalPolicyId
-
request:
ApprovalPolicyUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.approval_policy.delete(...)
-
-
-
Delete an invoice approval policy associated with Entity. BEWARE: Any approval policy deletion will result in all associated downstream policies also being deleted.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.approval_policy.delete( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", policy_id="apvl_5ce50275-1789-42ea-bc60-bb7e6d03635c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
policy_id:
ApprovalPolicyId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.find_payees(...)
-
-
-
Find payee counterparties. This endpoint lets you find vendors linked to the entity.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.find_payees( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", name="Big Box", payment_methods=True, invoice_metrics=True, )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
name:
typing.Optional[str]
— Filter by counterparty name
-
network_type:
typing.Optional[ typing.Union[ CounterpartyNetworkType, typing.Sequence[CounterpartyNetworkType] ] ]
— Filter by network type. By default, only ENTITY counterparties are returned.
-
payment_methods:
typing.Optional[bool]
— If true, will include counterparty payment methods as part of the response
-
invoice_metrics:
typing.Optional[bool]
— If true, will include counterparty invoice metrics as part of the response
-
counterparty_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter by counterparty ids
-
limit:
typing.Optional[int]
— Number of counterparties to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityId]
— The ID of the counterparties to start after. If not provided, the first page of counterparties will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.find_payors(...)
-
-
-
Find payor counterparties. This endpoint lets you find customers linked to the entity.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.find_payors( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", name="Big Box", payment_methods=True, invoice_metrics=True, )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
name:
typing.Optional[str]
— Filter by counterparty name
-
network_type:
typing.Optional[ typing.Union[ CounterpartyNetworkType, typing.Sequence[CounterpartyNetworkType] ] ]
— Filter by network type. By default, only ENTITY counterparties are returned.
-
payment_methods:
typing.Optional[bool]
— If true, will include counterparty payment methods as part of the response
-
invoice_metrics:
typing.Optional[bool]
— If true, will include counterparty invoice metrics as part of the response
-
counterparty_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter by counterparty ids
-
limit:
typing.Optional[int]
— Number of counterparties to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[EntityId]
— The ID of the counterparties to start after. If not provided, the first page of counterparties will be returned.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.add_payees(...)
-
-
-
Create association between Entity and a given list of Payees. If a Payee has previously been archived, unarchive the Payee.
-
-
-
from mercoa import ( CounterpartyCustomizationAccount, CounterpartyCustomizationRequest, EntityAddPayeesRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.add_payees( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=EntityAddPayeesRequest( payees=["ent_21661ac1-a2a8-4465-a6c0-64474ba8181d"], customizations=[ CounterpartyCustomizationRequest( counterparty_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", accounts=[ CounterpartyCustomizationAccount( account_id="85866843", postal_code="94105", name_on_account="John Doe", ) ], ) ], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityAddPayeesRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.hide_payees(...)
-
-
-
Marks Payees as unsearchable by Entity via Counterparty search. Invoices associated with these Payees will still be searchable via Invoice search.
-
-
-
from mercoa import EntityHidePayeesRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.hide_payees( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=EntityHidePayeesRequest( payees=["ent_21661ac1-a2a8-4465-a6c0-64474ba8181d"], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityHidePayeesRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.add_payors(...)
-
-
-
Create association between Entity and a given list of Payors. If a Payor has previously been archived, unarchive the Payor.
-
-
-
from mercoa import ( CounterpartyCustomizationAccount, CounterpartyCustomizationRequest, EntityAddPayorsRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.add_payors( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=EntityAddPayorsRequest( payors=["ent_21661ac1-a2a8-4465-a6c0-64474ba8181d"], customizations=[ CounterpartyCustomizationRequest( counterparty_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", accounts=[ CounterpartyCustomizationAccount( account_id="85866843", postal_code="94105", name_on_account="John Doe", ) ], ) ], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityAddPayorsRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.counterparty.hide_payors(...)
-
-
-
Marks Payors as unsearchable by Entity via Counterparty search. Invoices associated with these Payors will still be searchable via Invoice search.
-
-
-
from mercoa import EntityHidePayorsRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.counterparty.hide_payors( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=EntityHidePayorsRequest( payors=["ent_21661ac1-a2a8-4465-a6c0-64474ba8181d"], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityHidePayorsRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.customization.get(...)
-
-
-
Get entity customization.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.customization.get( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.customization.update(...)
-
-
-
Update entity customization. This lets you turn off metadata and payment methods for an entity.
-
-
-
from mercoa import ( EntityCustomizationRequest, MetadataCustomizationRequest, PaymentMethodCustomizationRequest, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.customization.update( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", request=EntityCustomizationRequest( metadata=[ MetadataCustomizationRequest( key="my_custom_field", disabled=True, ), MetadataCustomizationRequest( key="my_other_field", disabled=False, ), ], payment_source=[ PaymentMethodCustomizationRequest( type="bankAccount", disabled=True, ), PaymentMethodCustomizationRequest( type="custom", schema_id="cpms_7df2974a-4069-454c-912f-7e58ebe030fb", disabled=True, ), ], backup_disbursement=[ PaymentMethodCustomizationRequest( type="check", disabled=True, ) ], payment_destination=[ PaymentMethodCustomizationRequest( type="bankAccount", disabled=True, ), PaymentMethodCustomizationRequest( type="check", disabled=True, ), ], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
EntityCustomizationRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.document.get_all(...)
-
-
-
Get documents (1099/W9) associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.document.get_all( entity_id="ent_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", )
-
-
-
entity_id:
EntityId
-
type:
typing.Optional[typing.Union[DocumentType, typing.Sequence[DocumentType]]]
— Filter by document type
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.document.upload(...)
-
-
-
Upload documents associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.document.upload( entity_id="ent_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", document="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII", type="TEN_NINETY_NINE", )
-
-
-
entity_id:
EntityId
-
document:
str
— Base64 encoded image or PDF of document. PNG, JPG, WEBP, and PDF are supported. 10MB max.
-
type:
DocumentType
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.document.delete(...)
-
-
-
Delete a document associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.document.delete( entity_id="ent_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", document_id="doc_37e6af0a-e637-48fd-b825-d6947b38c4e2", )
-
-
-
entity_id:
EntityId
-
document_id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.external_accounting_system.get(...)
-
-
-
Get the external accounting system connected to an entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.external_accounting_system.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.external_accounting_system.create(...)
-
-
-
Create/Link an entity to an external accounting system like Codat or Rutter. If the entity is already linked to an external accounting system, this will return the existing connection.
-
-
-
from mercoa.client import Mercoa from mercoa.entity import ExternalAccountingSystemCompanyCreationRequest_Rutter client = Mercoa( token="YOUR_TOKEN", ) client.entity.external_accounting_system.create( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=ExternalAccountingSystemCompanyCreationRequest_Rutter( access_token="123", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
ExternalAccountingSystemCompanyCreationRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.external_accounting_system.connect(...)
-
-
-
Get a link to connect an entity to an external accounting system like Quickbooks or Xero
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.external_accounting_system.connect( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.external_accounting_system.sync(...)
-
-
-
Sync an entity with an external accounting system. Will sync customers/vendors and invoices.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.external_accounting_system.sync( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", vendors="pull", bills="push", gl_accounts="pull", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
vendors:
typing.Optional[SyncType]
— Sync vendors from external accounting system. Default is to pull vendors from external system.
-
bills:
typing.Optional[SyncType]
— Sync bills from external accounting system. Default is to not sync bills. Invoices that already exist in both systems will not be updated, only new invoices not present in the other system will be created.
-
gl_accounts:
typing.Optional[SyncType]
— Sync GL accounts from external accounting system. Default is to pull GL accounts from external system. Pushing GL accounts is not supported.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.invoice.find(...)
-
-
-
Get invoices for an entity with the given filters.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.invoice.find( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", exclude_receivables=True, order_by="CREATED_AT", order_direction="ASC", limit=10, )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
exclude_payables:
typing.Optional[bool]
— Return only invoices that are receivable by the entity.
-
exclude_receivables:
typing.Optional[bool]
— Return only invoices that are payable by the entity.
-
start_date:
typing.Optional[dt.datetime]
— Start date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
end_date:
typing.Optional[dt.datetime]
— End date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
date_type:
typing.Optional[InvoiceDateFilter]
— Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.
-
order_by:
typing.Optional[InvoiceOrderByField]
— Field to order invoices by. Defaults to CREATED_AT.
-
order_direction:
typing.Optional[OrderDirection]
— Direction to order invoices by. Defaults to asc.
-
limit:
typing.Optional[int]
— Number of invoices to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[InvoiceId]
— The ID of the invoice to start after. If not provided, the first page of invoices will be returned.
-
metadata:
typing.Optional[ typing.Union[InvoiceMetadataFilter, typing.Sequence[InvoiceMetadataFilter]] ]
— Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
-
line_item_metadata:
typing.Optional[ typing.Union[InvoiceMetadataFilter, typing.Sequence[InvoiceMetadataFilter]] ]
— Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.
-
line_item_gl_account_id:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
— Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.
-
search:
typing.Optional[str]
— Find invoices by vendor name, invoice number, or amount. Partial matches are supported.
-
payer_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by payer ID.
-
vendor_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by vendor ID.
-
approver_id:
typing.Optional[typing.Union[EntityUserId, typing.Sequence[EntityUserId]]]
— Filter invoices by assigned approver user ID.
-
approver_action:
typing.Optional[typing.Union[ApproverAction, typing.Sequence[ApproverAction]]]
— Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.
-
invoice_id:
typing.Optional[typing.Union[InvoiceId, typing.Sequence[InvoiceId]]]
— Filter invoices by invoice ID.
-
status:
typing.Optional[typing.Union[InvoiceStatus, typing.Sequence[InvoiceStatus]]]
— Invoice status to filter on.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.invoice.metrics(...)
-
-
-
Get invoice metrics for an entity with the given filters. Invoices will be grouped by currency. If none of excludePayables, excludeReceivables, payerId, vendorId, or invoiceId status filters are provided, excludeReceivables will be set to true.
-
-
-
import datetime from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.invoice.metrics( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", return_by_date="CREATION_DATE", exclude_receivables=True, created_date_start=datetime.datetime.fromisoformat( "2021-01-01 00:00:00+00:00", ), created_date_end=datetime.datetime.fromisoformat( "2021-01-31 23:59:59.999000+00:00", ), currency="USD", status="NEW", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
search:
typing.Optional[str]
— Find invoices by vendor name, invoice number, or amount. Partial matches are supported.
-
exclude_payables:
typing.Optional[bool]
— Only return invoices that are not payable by the entity. This will return only invoices that are receivable by the entity.
-
exclude_receivables:
typing.Optional[bool]
— Only return invoices that are not receivable by the entity. This will return only invoices that are payable by the entity.
-
return_by_date:
typing.Optional[InvoiceMetricsPerDateGroupBy]
— Return invoice metrics grouped by date.
-
payer_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by payer ID.
-
vendor_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Filter invoices by vendor ID.
-
approver_id:
typing.Optional[typing.Union[EntityUserId, typing.Sequence[EntityUserId]]]
— Filter invoices by assigned approver user ID.
-
invoice_id:
typing.Optional[typing.Union[InvoiceId, typing.Sequence[InvoiceId]]]
— Filter invoices by invoice ID.
-
status:
typing.Optional[typing.Union[InvoiceStatus, typing.Sequence[InvoiceStatus]]]
— Invoice status to filter on
-
start_date:
typing.Optional[dt.datetime]
— Start date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
end_date:
typing.Optional[dt.datetime]
— End date filter. Defaults to CREATED_AT unless specified the dateType is specified
-
date_type:
typing.Optional[InvoiceDateFilter]
— Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.
-
due_date_start:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. Start date for invoice dueDate filter.
-
due_date_end:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. End date for invoice dueDate filter.
-
created_date_start:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. Start date for invoice created on date filter.
-
created_date_end:
typing.Optional[dt.datetime]
— DEPRECATED. Use startDate, endDate, and dateType instead. End date for invoice created date filter.
-
currency:
typing.Optional[typing.Union[CurrencyCode, typing.Sequence[CurrencyCode]]]
— Currency to filter on
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.metadata.get_all(...)
-
-
-
Retrieve all metadata options associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.metadata.get_all( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.metadata.get(...)
-
-
-
Retrieve metadata associated with a specific key
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.metadata.get( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", key="projectId", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
key:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.metadata.update(...)
-
-
-
Update metadata associated with a specific key
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.metadata.update( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", key="projectId", request=["proj_123", "proj_456"], )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
key:
str
-
request:
typing.Sequence[str]
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.metadata.delete(...)
-
-
-
Delete all metadata associated with a specific key
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.metadata.delete( entity_id="ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced", key="propertyId", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
key:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.notification_policy.get_all(...)
-
-
-
Retrieve all notification policies associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.notification_policy.get_all( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.notification_policy.get(...)
-
-
-
Retrieve notification policy associated with this entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.notification_policy.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", notification_type="INVOICE_APPROVED", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
notification_type:
NotificationType
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.notification_policy.update(...)
-
-
-
Update notification policy associated with this entity
-
-
-
from mercoa import NotificationPolicyRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.notification_policy.update( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", notification_type="INVOICE_APPROVED", request=NotificationPolicyRequest( disabled=True, additional_roles=[], ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
notification_type:
NotificationType
-
request:
NotificationPolicyRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.get_all(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.get_all( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", type="bankAccount", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
type:
typing.Optional[ typing.Union[PaymentMethodType, typing.Sequence[PaymentMethodType]] ]
— Type of payment method to filter
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.create(...)
-
-
-
from mercoa import PaymentMethodRequest_Custom from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.create( entity_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", request=PaymentMethodRequest_Custom( foreign_id="DB_FOREIGN_ID", account_name="Vendor Wire Account", account_number="123456789", schema_id="cpms_4794d597-70dc-4fec-b6ec-c5988e759769", data={ "bankName": "Chase", "recipientName": "John Doe", "routingNumber": "123456789", "accountNumber": "99988767623", }, ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
PaymentMethodRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", payment_method_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.update(...)
-
-
-
Only custom payment methods can be updated.
-
-
-
from mercoa import PaymentMethodUpdateRequest_BankAccount from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.update( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", payment_method_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", request=PaymentMethodUpdateRequest_BankAccount( default_source=True, default_destination=True, ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
request:
PaymentMethodUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.delete(...)
-
-
-
Mark a payment method as inactive. This will not remove the payment method from the system, but will prevent it from being used in the future.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.delete( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", payment_method_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.initiate_micro_deposits(...)
-
-
-
Initiate micro deposits for a bank account
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.initiate_micro_deposits( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", payment_method_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.complete_micro_deposits(...)
-
-
-
Complete micro deposit verification
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.complete_micro_deposits( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", payment_method_id="pm_4794d597-70dc-4fec-b6ec-c5988e759769", amounts=[40, 2], )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
amounts:
typing.Sequence[int]
— The amounts of the micro deposits in cents
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.payment_method.get_balance(...)
-
-
-
Deprecated. Get the available balance of a payment method. Only bank accounts added with Plaid are supported. This endpoint will return a cached value and will refresh the balance when called.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.payment_method.get_balance( entity_id="string", payment_method_id="string", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
payment_method_id:
PaymentMethodId
— Payment Method ID or Payment Method ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.representative.get_all(...)
-
-
-
Get representatives for an entity
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.representative.get_all( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.representative.create(...)
-
-
-
from mercoa import ( Address, BirthDate, FullName, IndividualGovernmentId, PhoneNumber, RepresentativeRequest, Responsibilities, ) from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.representative.create( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", request=RepresentativeRequest( name=FullName( first_name="John", middle_name="Quincy", last_name="Adams", suffix="Jr.", ), phone=PhoneNumber( country_code="1", number="4155551234", ), email="john.doe@acme.com", address=Address( address_line_1="123 Main St", address_line_2="Unit 1", city="San Francisco", state_or_province="CA", postal_code="94105", country="US", ), birth_date=BirthDate( day="1", month="1", year="1980", ), government_id=IndividualGovernmentId( ssn="123-45-6789", ), responsibilities=Responsibilities( is_owner=True, ownership_percentage=40, is_controller=True, ), ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
request:
RepresentativeRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.representative.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.representative.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", representative_id="rep_7df2974a-4069-454c-912f-7e58ebe030fb", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
representative_id:
RepresentativeId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.representative.delete(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.representative.delete( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", representative_id="rep_7df2974a-4069-454c-912f-7e58ebe030fb", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
representative_id:
RepresentativeId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notification_policy.get_all(...)
-
-
-
Retrieve all notification policies associated with this entity user
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notification_policy.get_all( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notification_policy.get(...)
-
-
-
Retrieve notification policy associated with this entity user
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notification_policy.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", notification_type="INVOICE_PAID", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
notification_type:
NotificationType
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notification_policy.update(...)
-
-
-
Update notification policy associated with this entity user
-
-
-
from mercoa import UserNotificationPolicyRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notification_policy.update( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", notification_type="INVOICE_PAID", request=UserNotificationPolicyRequest( immediate=True, ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
notification_type:
NotificationType
-
request:
UserNotificationPolicyRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notifications.find(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notifications.find( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
start_date:
typing.Optional[dt.datetime]
— Start date for notification created on date filter.
-
end_date:
typing.Optional[dt.datetime]
— End date for notification created date filter.
-
order_direction:
typing.Optional[OrderDirection]
— Direction to order notifications by. Defaults to asc.
-
limit:
typing.Optional[int]
— Number of invoices to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[NotificationId]
— The ID of the notification to start after. If not provided, the first page of invoices will be returned.
-
notification_type:
typing.Optional[ typing.Union[NotificationType, typing.Sequence[NotificationType]] ]
— The type of notification to filter by.
-
status:
typing.Optional[NotificationStatus]
— The status of the notification to filter by.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notifications.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notifications.get( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", notification_id="notif_7df2974a-4069-454c-912f-7e58ebe030fb", )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
notification_id:
NotificationId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.entity.user.notifications.update(...)
-
-
-
Update the status of a notification.
-
-
-
from mercoa import NotificationUpdateRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.entity.user.notifications.update( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", notification_id="notif_7df2974a-4069-454c-912f-7e58ebe030fb", request=NotificationUpdateRequest( status="READ", ), )
-
-
-
entity_id:
EntityId
— Entity ID or Entity ForeignID
-
user_id:
EntityUserId
-
notification_id:
NotificationId
-
request:
NotificationUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.approval.add_approver(...)
-
-
-
Adds an approver to the invoice. Will select the first available approver slot that is not already filled and assign the approver to it. If no approver slots are available, an error will be returned. An explicit approver slot can be specified by setting the
approverSlot
field.
-
-
-
from mercoa import AddApproverRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.approval.add_approver( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", request=AddApproverRequest( approval_slot_id="inap_9bb311c9-7c15-4c9e-8148-63814e0abec6", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request:
AddApproverRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.approval.approve(...)
-
-
-
from mercoa import ApprovalRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.approval.approve( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", request=ApprovalRequest( text="This is a reason for my action", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request:
ApprovalRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.approval.reject(...)
-
-
-
from mercoa import ApprovalRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.approval.reject( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", request=ApprovalRequest( text="This is a reason for my action", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request:
ApprovalRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.comment.get_all(...)
-
-
-
Get all comments associated with this invoice
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.comment.get_all( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.comment.create(...)
-
-
-
Add a comment to this invoice
-
-
-
from mercoa import CommentRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.comment.create( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", request=CommentRequest( text="This is a comment", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request:
CommentRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.comment.get(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.comment.get( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", comment_id="ic_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
comment_id:
CommentId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.comment.update(...)
-
-
-
Edit a comment on this invoice
-
-
-
from mercoa import CommentRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.comment.update( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", comment_id="ic_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", request=CommentRequest( text="This is a comment", user_id="user_e24fc81c-c5ee-47e8-af42-4fe29d895506", ), )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
comment_id:
CommentId
-
request:
CommentRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.comment.delete(...)
-
-
-
Delete a comment on this invoice
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.comment.delete( invoice_id="inv_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", comment_id="ic_3d61faa9-1754-4b7b-9fcb-88ff97f368ff", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
comment_id:
CommentId
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.get_all(...)
-
-
-
Get attachments (scanned/uploaded PDFs and images) associated with this invoice
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.get_all( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.upload(...)
-
-
-
Upload documents (scanned/uploaded PDFs and images) associated with this Invoice
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.upload( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", document="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
document:
str
— Base64 encoded image or PDF of invoice document. PNG, JPG, WEBP, and PDF are supported. 10MB max.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.delete(...)
-
-
-
Delete an attachment (scanned/uploaded PDFs and images) associated with this invoice
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.delete( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", document_id="doc_37e6af0a-e637-48fd-b825-d6947b38c4e2", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
document_id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.generate_invoice_pdf(...)
-
-
-
Generate a PDF of the invoice. This PDF is generated from the data in the invoice, not from the uploaded documents.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.generate_invoice_pdf( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.generate_check_pdf(...)
-
-
-
Get a PDF of the check for the invoice. If the invoice does not have check as the disbursement method, an error will be returned. If the disbursement option for the check is set to 'MAIL', a void copy of the check will be returned. If the disbursement option for the check is set to 'PRINT', a printable check will be returned. If the invoice is NOT marked as PAID, the check will be a void copy.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.generate_check_pdf( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.document.get_source_email(...)
-
-
-
Get the email subject and body that was used to create this invoice.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.document.get_source_email( invoice_id="inv_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.payment_links.get_payer_link(...)
-
-
-
Get temporary link for payer to send payment
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.payment_links.get_payer_link( invoice_id="inv_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.payment_links.send_payer_email(...)
-
-
-
Trigger email to payer inviting them to make payment
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.payment_links.send_payer_email( invoice_id="inv_a0f6ea94-0761-4a5e-a416-3c453cb7eced", attach_invoice=True, )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
attach_invoice:
typing.Optional[bool]
— Whether to attach the invoice to the email
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.payment_links.get_vendor_link(...)
-
-
-
Get temporary link for vendor to accept payment
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.payment_links.get_vendor_link( invoice_id="inv_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.invoice.payment_links.send_vendor_email(...)
-
-
-
Trigger email to vendor inviting them into the vendor portal
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.invoice.payment_links.send_vendor_email( invoice_id="inv_a0f6ea94-0761-4a5e-a416-3c453cb7eced", )
-
-
-
invoice_id:
InvoiceId
— Invoice ID or Invoice ForeignID
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.ocr.ocr(...)
-
-
-
Run OCR on an Base64 encoded image or PDF. This endpoint will block until the OCR is complete.
-
-
-
from mercoa import OcrRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.ocr.ocr( request=OcrRequest( vendor_network="entity", entity_id="entity_8f86116b-3b4d-4ded-99ef-3bc929d8c33c", mime_type="image/png", image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII", ), )
-
-
-
request:
OcrRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.ocr.run_async_ocr(...)
-
-
-
Run OCR on an Base64 encoded image or PDF. This endpoint will return immediately and the OCR will be processed asynchronously.
-
-
-
from mercoa import OcrRequest from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.ocr.run_async_ocr( request=OcrRequest( vendor_network="entity", entity_id="entity_8f86116b-3b4d-4ded-99ef-3bc929d8c33c", mime_type="image/png", image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII", ), )
-
-
-
request:
OcrRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.ocr.get_async_ocr(...)
-
-
-
Get the status and results of an asynchronous OCR job.
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.ocr.get_async_ocr( job_id="ocr_8f86116b-3b4d-4ded-99ef-3bc929d8c33c", )
-
-
-
job_id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.notification_configuration.get_all()
-
-
-
Retrieve all notification configurations
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.notification_configuration.get_all()
-
-
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.notification_configuration.get(...)
-
-
-
Retrieve notification configuration for this notification type
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.notification_configuration.get( notification_type="INVOICE_APPROVAL_NEEDED", )
-
-
-
notification_type:
NotificationType
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.notification_configuration.update(...)
-
-
-
Update notification configuration for this notification type
-
-
-
from mercoa import NotificationConfigurationRequest_Invoice from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.notification_configuration.update( notification_type="INVOICE_APPROVAL_NEEDED", request=NotificationConfigurationRequest_Invoice( url="string", ), )
-
-
-
notification_type:
NotificationType
-
request:
NotificationConfigurationRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.organization.notification_configuration.reset(...)
-
-
-
Reset notification configuration for this notification type
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.organization.notification_configuration.reset( notification_type="INVOICE_APPROVAL_NEEDED", )
-
-
-
notification_type:
NotificationType
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.payment_methods.find(...)
-
-
-
from mercoa.client import Mercoa client = Mercoa( token="YOUR_TOKEN", ) client.payment_methods.find( entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", )
-
-
-
limit:
typing.Optional[int]
— Number of payment methods to return. Limit can range between 1 and 100, and the default is 10.
-
starting_after:
typing.Optional[PaymentMethodId]
— The ID of the payment method to start after. If not provided, the first page of payment methods will be returned.
-
type:
typing.Optional[ typing.Union[PaymentMethodType, typing.Sequence[PaymentMethodType]] ]
— Type of payment method to filter
-
entity_id:
typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]
— Entity ID to filter
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-