Connect an integration partner (POS, reservations, delivery, or any CDP) to a Rulrr account.
The Rulrr OAuth API lets an integration partner connect a merchant's system to Rulrr so that the merchant can run automated, targeted advertising and measure its impact on real sales.
A partner is most commonly a Point-of-Sale (POS) system, but the same flow applies to any source of customer and transaction data — reservation systems, delivery platforms, e-commerce backends, or a Customer Data Platform (CDP). Throughout this guide we say "partner" to mean any such system; POS is simply the most common case today.
Once a merchant connects a partner to their Rulrr account, the partner can:
The integration is a server-to-server OAuth-style handshake combined with a short, hosted consent screen the merchant completes in their browser:
client_id / client_secret.connect.rulrr.com, passing that integration token.The next sections walk through each step with exact endpoints, parameters and responses.
Integration credentials are issued by Rulrr. To become an official Rulrr Integrated Partner, submit the partner application; once approved you receive a unique client_id and client_secret, required to create any request in this flow. If you already operate your own OAuth server and want a deeper, bi-directional integration, contact us through Developer Support.
Base URL. All endpoints below are served under the API base path/v1(for examplePOST /v1/auth/integration). Use the environment base URL provided to you with your credentials.
The end-to-end connection has four server-side calls around one hosted consent screen. All parameters in this flow are passed as query parameters.
Partner backend Rulrr Merchant browser
│ │ │
1. │── POST /v1/auth/integration ─────────▶│ create token (status: pending)
│◀────────────── { integrationToken } ──│
│ │ │
2. │── redirect merchant ─────────────────────────────────▶ connect.rulrr.com
│ │ sign in, pick profile, confirm
│ │◀── connectLegacyPos ──────────── (status: finished)
│ │ │
3. │── GET /v1/auth/integration (poll) ───▶│ status: pending | finished | cancelled
│◀──────────────────── { status } ──────│
│ │ │
4. │── GET /v1/auth/integration/token ────▶│ one-time issue of access + refresh tokens
│◀── { accessToken, refreshToken, expiration } ─────────────────────────┘Identifies the partner and starts a pending integration.
POST /v1/auth/integration?client_id={client_id}&client_secret={client_secret}| Parameter | Required | Description |
|---|---|---|
client_id | yes | The ID Rulrr issued to your integration. Identifies the partner. |
client_secret | yes | The secret Rulrr issued to your integration. Verifies the partner. |
Response 200
{ "integrationToken": "a1b2c3…" }The token is created with status pending and expires after 1 hour.
Errors: 403 invalid client_id/client_secret, 400 malformed request.
Open the hosted consent screen in a browser/IFrame, passing the integration token and your client id:
https://connect.rulrr.com/?client_id={client_id}&integration_token={integrationToken}The merchant signs in, chooses the Rulrr profile (and, when relevant, a specific store) to connect, sets their preferences, and confirms. On confirmation, Rulrr marks the integration finished. See The Rulrr-Connect screen for what the merchant sees.
Poll until the status becomes finished (the merchant has confirmed) — or stops being pending.
GET /v1/auth/integration?client_id={client_id}&client_secret={client_secret}&integration_token={integrationToken}Response 200
{ "status": "pending" } // → "finished" once confirmed, or "cancelled" if expired/declinedErrors: 403 invalid credentials, 404 unknown integration_token.
Call only when status is finished. This returns the tokens once — store them securely.
GET /v1/auth/integration/token?client_id={client_id}&client_secret={client_secret}&integration_token={integrationToken}Response 200
{
"accessToken": "…",
"refreshToken": "…",
"expiration": "2027-06-28T12:00:00.000Z"
}Errors: 400 integration not finished / missing target, 403 invalid credentials, 404 unknown integration_token, 410 token already exchanged (tokens are returned only once).
The partner is now connected and can call the Integration Endpoints with the access token. See Tokens & lifecycle for expiry and refresh.
connect.rulrr.com is Rulrr's hosted consent experience. It is where the merchant authorises the connection — the partner never handles Rulrr credentials. Open it in a browser window or an embedded IFrame, passing the two required parameters from Step 2.
https://connect.rulrr.com/?client_id={client_id}&integration_token={integration_token}Both parameters are required and validated on load; an invalid or expired link shows an error state.
handled by Rulrr — the partner never sees these credentials.
(SMS receipts at checkout). This option only appears when the integration is configured for it.
finished, recording the chosen profile/store and preferences against the integration token.
After confirmation the merchant sees a success screen and can return to the partner application. The partner detects the change by polling Step 3 and then performs the token exchange.
pointed at connect.rulrr.com and never collect Rulrr passwords yourself.
integration_token you created in Step 1; it ties the consent to your pendingintegration and is single-use.
cancelled — create a fresh integration token and start again.
The flow involves three credentials: the short-lived integration token, and the long-lived access token + refresh token issued at the end.
POST /v1/auth/integration.pending → finished (merchant confirmed) or cancelled (expired/declined).cancelled.(a second attempt returns 410).
GET /v1/auth/integration/token.access_token queryparameter).
POST /v1/auth/token?client_id={client_id}&client_secret={client_secret}&code={refreshToken}&grant_type=refresh_token| Parameter | Required | Description |
|---|---|---|
client_id | yes | Your integration ID. |
client_secret | yes | Your integration secret. |
code | yes | The refresh token received during the exchange. |
grant_type | yes | Must be the literal string refresh_token. |
Response 200
{ "accessToken": "…", "expiration": "2027-06-29T12:00:00.000Z" }Errors: 400 wrong/absent grant_type, 403 invalid credentials or unknown refresh token.
| Credential | Issued by | Lifetime | Reusable |
|---|---|---|---|
| Integration token | POST /v1/auth/integration | 1 hour | No (single-use for exchange) |
| Access token | GET /v1/auth/integration/token | 1 year | Yes (until expiry/revocation) |
| Refresh token | GET /v1/auth/integration/token | Until revoked | Yes |
Lost your refresh token? Because it is returned only once, if you lose both tokens you must run the full authorisation flow again to reconnect.
A quick reference for the constraints that govern the integration flow.
client_id and client_secret, issued byRulrr on partner approval. Keep the secret server-side; never embed it in client apps.
| Item | Value |
|---|---|
| Integration token validity | 1 hour from creation |
| Integration token exchange | single-use — tokens are returned only once |
| Access token validity | 1 year |
| Refresh token validity | non-expiring (until access is revoked) |
The integration token moves through exactly these states:
pending — created; waiting for the merchant to confirm on connect.rulrr.com.finished — merchant confirmed; ready to exchange for access/refresh tokens.cancelled — expired (past the 1-hour window) or declined.seconds) while the merchant completes the consent screen, and stop once it is finished or cancelled.
store's profile, customers and orders. Treat them like passwords.
there is no downtime if you refresh ahead of the 1-year expiry.
full flow again.
For partner onboarding, custom OAuth-to-OAuth integrations, or anything not covered here, reach Developer Support and leave your details — our integrations team will follow up.