Skip to main content

Commerce API workflow

After you've set up an integration, follow this process to use Codat's API to enable, link, and read your customers' commerce data

You'll need to:

  • Update your data type settings to enable commerce data types.
  • Create a companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. and data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. for your customer.
  • Read commerce data sets.

Enable and update commerce syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings

Update your commerce sync settings to automatically retrieve data from a companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. when they authorize your connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. to their data.

Create a companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. and data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform.

Create a Codat companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. and data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. for your customer.

  1. Open the Create a company endpoint.

  2. Enter a companyName and platformType and submit your request. The response returned includes:

    • The linkUrl which allows your customer to authorize your connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. to their data.
    • The data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. id which allows you to syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. the companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources.'s data.
  3. Copy the linkUrl and send it to your customer.

{
"name": "john",
"platformType": "woocommerce",
"createdByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
{
"id": "fc0043b0-8c40-4c5b-b92f-f155cb720451",
"name": "john",
"platform": "WooCommerce",
"redirect": "https://link-uat.codat.io/company/fc0043b0-8c40-4c5b-b92f-f155cb720451",
"status": "PendingAuth",
"dataConnections": [
{
"id": "f124c782-166a-4911-85c6-e5db8dd5c992",
"integrationId": "8cbe957a-8337-463b-9353-2186c372e083",
"sourceId": "1feb821a-cb05-4375-9b53-cd6367e9fb60",
"platformName": "WooCommerce",
"linkUrl": "https://link-api-uat.codat.io/companies/fc0043b0-8c40-4c5b-b92f-f155cb720451/connections/f124c782-166a-4911-85c6-e5db8dd5c992/start",
"status": "PendingAuth",
"created": "2021-05-04T15:28:09.3409951Z",
"sourceType": "Commerce"
}
],
"created": "2021-05-04T15:28:09.2805505Z"
}

Read commerce data sets

When your customer authorizes your connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. to their companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. data, Codat automatically fetches their datasets. You can read these datasets from the following endpoints. Use the companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. and data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. id that you've already created. See above.

GET /companies/{{companyId}}/connections/{{connectionId}}/data/commerce-customers

GET /.../commerce-disputes

GET /.../commerce-info

GET /.../commerce-orders

GET /.../commerce-payments

GET /.../commerce-products

GET /.../commerce-transactions

Sync status

Before you can view data using one of the commerce endpoints, you must wait for the data synchronization to complete. To check the status of any dataset, see the sync status documentation.


Was this page useful?
👏
👍
🤔
👎
😭