POST/api/v4/connected-accounts/create-location-from-listing

Create a location from a connected account listing

Creates a new listingsAPI location from an existing Google Business Profile or Facebook listing in a connected account.

Requires an API key. See Authentication for header format and key rotation.

Parameters

Body

NameTypeRequiredDescription
listingIdstringrequiredID of the connected-account listing to import, taken from the fetch listings endpoint (e.g. a base64 GmbBulkDataLake:<uuid> or FbBulkDataLake:<uuid> value).

Sample request

Ready-to-paste body. Replace placeholder IDs and values with yours.

{
  "listingId": "R21iQnVsa0RhdGFMYWtlOjU3NzU5MzRiLTUwOTgtNGQwYS04YjQ0LTNjY2ZlZmZkZmUzNw=="
}

Responses

200Location created successfully.
{
  "data": {
    "createLocationFromConnectedAccountListing": {
      "success": true,
      "locationId": 88277,
      "errors": null
    }
  }
}
400Bad request — invalid listingId, or the listing is already linked to a location.
401Unauthenticated — missing or invalid API key.

Creates a new listingsAPI location by pulling business data from an existing listing in a connected Google Business Profile or Facebook account. The listing must already be present in the account (fetched via GET /connected-accounts/{connectedAccountId}/listings) and must not already be linked to another listingsAPI location.

For Google listings the API imports name, address, hours, categories, phone, photos, and attributes. For Facebook it imports name, location, hours, categories, description, and contact info. The new location is automatically linked back to the connected account it came from, so its listing stays in sync from creation.

Use case — bulk-provisioning locations during onboarding. An agency connects a client's Google account that manages 40 storefronts the agency has never entered into listingsAPI. Rather than creating each location by hand, list the account's listings and call this endpoint once per listingId to spin up all 40 listingsAPI locations pre-populated from Google — then bill and manage them normally.

success: true means the location was created and locationId is its database ID. On failure success is false and errors describes the reason — common cases are an invalid or unknown listingId, a listing that is already connected to another location, or an account whose credentials have expired and must be reconnected via the connect-google or connect-facebook endpoint. To attach a listing to an existing location instead of creating a new one, use the connect-listing endpoint.

curl -X POST 'https://listingsapi.com/api/v4/connected-accounts/create-location-from-listing' \
  -H "Authorization: API $LISTINGSAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "listingId": "<listingId>"
  }'