Ця сторінка також доступна українською.
Overview
The new Connections endpoint provides a single API call to retrieve all of a user’s connected services — Google Ads accounts and Google Business Profile (GBP) locations — grouped by company. Before: the frontend had to call separate endpoints for Google Ads customers and GBP locations, often repeating requests per company (N+1 problem). After: oneGET /api/v1/companies/me/connections call returns everything.
Endpoints
| Endpoint | Returns | Use case |
|---|---|---|
GET /api/v1/companies/me/connections | list[CompanyWithConnections] | Dashboard / sidebar — fetch all connections across all companies at once |
GET /api/v1/companies/me/{company_id}/connections | CompanyWithConnections | Company detail page — fetch connections for a specific company |
Authorization: Bearer <token> header.
Response format
Both endpoints return the same shape — a company object with two connection arrays. The “all connections” endpoint wraps it in a list.CompanyWithConnections
The company ID.
The company name.
When the company was created.
When the company was last updated.
Connected Google Ads accounts. Empty array if none.
Connected GBP locations. Empty array if none.
Example request and response
200 OK):
Single-company endpoint
To fetch connections for a specific company, use the company ID in the path:What gets filtered out
The backend automatically excludes inactive or deleted resources. You do not need to filter on the frontend side. The following are excluded:| Excluded when… | Example |
|---|---|
| Company is soft-deleted | Company was removed by admin |
| User membership is inactive | User was removed from a company |
| Connection link is inactive | Google Ads account was unlinked |
| Resource itself is inactive / deleted | Google Ads account was suspended |
Caching
Responses are cached on the backend (Redis). You do not need to implement any caching logic on the frontend. The cache is automatically invalidated when:- A company is created, updated, or deleted
- A member is added to or removed from a company
- A Google Ads account or GBP location is linked / unlinked
Migration guide
If you are currently fetching Google Ads customers and GBP locations from separate endpoints:Replace multiple calls with one
Replace individual calls to Google Ads and GBP endpoints with a single call
to
GET /api/v1/companies/me/connections.Update your data model
The response groups connections under each company. Map your UI state
accordingly:
Remove client-side filtering
The backend already filters out inactive / deleted resources. Remove any
frontend
is_active / is_deleted checks.