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

Create a location from a connected account listing

Creates a new Listings API 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
inputobjectrequiredWrapper object. The entire request body must be nested under `input`.
input.connectedAccountIdstringrequiredID of the connected account (Google or Facebook) that owns the listing. Taken from `GET /connected-accounts`.
input.connectedAccountListingIdstringrequiredID of the listing to import into a new location. Taken from the `id` of a record returned by `POST /connected-accounts/connected-account-listings`.

Sample request

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

{
  "input": {
    "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",
    "connectedAccountListingId": "R21iQnVsa0RhdGFMYWtlOjU3NzU5MzRiLTUwOTgtNGQwYS04YjQ0LTNjY2ZlZmZkZmUzNw=="
  }
}

Responses

200Request accepted. `success` is `true` and `locationId` holds the new location's database ID; on failure `success` is `false`, `locationId` is `null`, and `errors` carries a structured, coded reason.
{
  "data": {
    "createLocationFromConnectedAccountListing": {
      "success": true,
      "locationId": 88277,
      "errors": null
    }
  }
}
400Bad request, the body was not wrapped in `input`, or a required field was omitted. The field is `connectedAccountListingId`, not `listingId` (the latter is rejected by the schema).
401Unauthenticated, missing or invalid API key.

Creates a new Listings API 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 POST /connected-accounts/connected-account-listings) and must not already be linked to another Listings API location.

Request shape. The body must be wrapped in an input object with two required fields: connectedAccountId (the account that owns the listing) and connectedAccountListingId (the specific listing to import). There is no listingId field, it is rejected by the schema.

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 Listings API. Rather than creating each location by hand, list the account's listings and call this endpoint once per connectedAccountListingId to spin up all 40 Listings API 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, locationId is null, and errors carries a structured, coded reason, for example { "code": "SY81067", "message": "Invalid connected account listing ID" } when the connectedAccountListingId does not resolve. Other common cases are a listing 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 '{
    "input": {
      "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",
      "connectedAccountListingId": "R21iQnVsa0RhdGFMYWtlOjU3NzU5MzRiLTUwOTgtNGQwYS04YjQ0LTNjY2ZlZmZkZmUzNw=="
    }
  }'