# Connect API

Manage companies and branches in your ISV workspace and retrieve document counts.

## Authentication

Base URL: `https://prod.gets.complyance.io`. Send your ISV workspace key in `X-API-Key`. See [authentication](https://docs.complyance.io/api-reference/authentication/).

## Operations

| Method and path | Purpose |
| - | - |
| `POST /v3/connect/companies` | [Onboard a UAE company](https://docs.complyance.io/api-reference/connect/companies/#create-a-uae-company) |
| `GET /v3/connect/companies` | [List company sources](https://docs.complyance.io/api-reference/connect/companies/#list-companies) |
| `GET /v3/connect/companies/{sourceName}` | [Retrieve a company source](https://docs.complyance.io/api-reference/connect/companies/#retrieve-update-or-archive-a-source) |
| `PATCH /v3/connect/companies/{sourceName}` | Update a company source |
| `DELETE /v3/connect/companies/{sourceName}` | Archive a company source |
| `POST /v3/connect/companies/{companyId}/branches` | [Add a branch](https://docs.complyance.io/api-reference/connect/companies/#add-branches) |
| `POST /v3/connect/companies/{companyId}/branches/bulk` | Add up to 100 branches |
| `POST /v3/connect/companies/onboarding-jobs` | [Onboard up to 500 rows](https://docs.complyance.io/partner-platform/isv/companies/bulk-onboarding/) |
| `GET /v3/connect/invoices/counts` | [Read document counts](https://docs.complyance.io/api-reference/connect/invoice-counts/) |

## Identifiers

| Value | Where to use it |
| - | - |
| `companyId` | Branch creation and company-level count filters |
| `sourceName` and `sourceVersion` | Identify your source; use `sourceName:sourceVersion` when submitting an invoice |
| `sourceId` | Identify a returned source where an operation explicitly accepts it |
| `branchId` | Identify a returned branch where an operation explicitly accepts it |
| `userGivenBranchId` | Share with suppliers as the buyer branch reference, `cbc:BuyerReference` |

Treat returned identifiers as opaque. Do not interchange them.

## Errors

See [Connect errors](https://docs.complyance.io/api-reference/connect/errors/). After a timeout during company creation, list existing companies before trying to create the company again.

Source: https://docs.complyance.io/api-reference/connect/
