Skip to content

ACF Sync

import { Aside } from ‘@astrojs/starlight/components’;

The Loopress plugin exposes a REST API that the Loopress CLI uses to pull and push ACF field group definitions. The admin UI does not surface ACF features directly; use the CLI.

  • Advanced Custom Fields (free or Pro) installed and active
  • Loopress plugin installed and active
  • Administrator role (manage_options capability)

Returns all ACF field groups with their nested fields.

Response:

[
{
"key": "group_64abc123",
"title": "Product Details",
"fields": [
{
"key": "field_64abc124",
"label": "Price",
"name": "price",
"type": "number"
}
],
"location": [...]
}
]

Import a field group. The request body must be a valid ACF field group object with a key property. Equivalent to ACF’s own Tools → Import feature.

Request body:

{
"key": "group_64abc123",
"title": "Product Details",
"fields": [...],
"location": [...]
}

Response: The imported field group object as returned by ACF.

→ See ACF Field Groups (CLI) for the lps acf pull and lps acf push commands.

StatusCause
400ACF plugin is not active
400Missing key in POST body
403Caller does not have manage_options capability