Skip to main content
A connection links one of your customers to one of their software packages. This page walks through creating one, from an empty consumer to a link your end-user can open. New to the model? Read How it works first. It defines connector, consumer, and connection in two minutes.

Prerequisites

  1. An API key, and a bearer token obtained from it — see Authenticate with Chift API.
  2. At least one active connector on your account — see Activate a connector. Connectors you have not activated are invisible to the API and cannot be connected.

Two ways to present the choice

The one thing that differs is who shows your end-user the list of connectors to choose from. Everything else in the flow is the same. It is a trade-off between a native experience and how much you build. Embedded marketplace — you show the connector choice inside your own product. The most seamless, on-brand experience for your end-user, but you build and maintain that screen.
Connector choice shown inside your own product

Embedded marketplace: your end-user picks their software inside your product.

Chift marketplace — Chift hosts the connector picker. Nothing to build on your side, but your end-user briefly leaves your interface for a Chift-hosted page.
Connector picker on the Chift-hosted marketplace

Chift marketplace: your end-user picks their software on a Chift-hosted page.

Both end the same way: a link you send your end-user. The mechanics differ only slightly. The embedded path uses the fetch-connectors step and passes an integrationid; the Chift path skips both.

The flow

1

Create the consumer (once per customer)

Only if you don’t already have a consumerid for this customer.
Store the returned consumerid on your customer record.API reference: Create new consumer ↗
2

Fetch the connectors (embedded marketplace only)

Skip this step if you use the Chift marketplace.
status=active returns only the connectors you have activated. Each entry gives you:
  • integrationid — an integer, the value you send in step 5. Note it is not a uuid, unlike most Chift identifiers.
  • name, description, api — for display and grouping.
  • logo_url, icon_url — ready-to-use image URLs. A base64 endpoint also exists if you prefer to proxy them.
  • supported_countries, local_agent — useful for filtering or warning the user upfront.
API reference: Get list of integrations ↗
3

Let the user pick a connector

Render the list in your UI. To narrow it, filter on supported_countries, or on api if this part of your product only needs one Unified API.
4

Check for an existing connection

This tells you whether to create or update, and lets you show current state in your UI. A consumer can have only one connection per connector, so creating a duplicate returns 400.Check the status on each entry — only an active connection can serve Unified API calls.API reference: Get connections ↗
5

Create or update the connection

No connection yetPOST:
Connection already exists (expired credentials, or activation never finished) — PATCH it instead of deleting and recreating:
Never delete and recreate a connection to fix expired credentials. PATCH issues a fresh activation link while preserving the connection and its history.
Both calls return a single field: url.Add new connection ↗ · Update an existing connection ↗
6

Send the user to the activation link

Redirect your end-user to the returned url, or email it to them.
The link is secured by a token that expires after 30 minutes. Generate it when the user is about to click it, not in advance. If it expires, PATCH the connection for a fresh one.
With integrationid set, the link goes straight to that connector; without it, your end-user first picks their software on the Chift marketplace (see Two ways to present the choice).What the user then sees depends on the connector: an OAuth2 consent screen, a credentials form, or instructions to install the local agent. Some connectors then ask follow-up questions — which accounting folder, which POS location.
7

Handle the return

When the user finishes, reload their connections and confirm at least one is active. Then you can call the Unified API for that consumer.Do not rely on the redirect alone — a user who abandons the flow never triggers it. See Monitoring & updating connections for the webhook, polling, and redirect-parameter options, and which combination to use.

Next steps

Monitor connections

Confirm activation, then keep connections healthy.

Activation links and redirects

Control where the user lands afterwards.

Error codes

Every code the endpoints above can return.