Orange Collar Media
Orange Collar Media
DOCS
ORANGECOLLAR/MODULE-WORDPRESS-INTEGRATION · REST ENDPOINTS

REST API reference for the oc-bridge/v1 WordPress plugin endpoints

  • Magento
  • Adobe Commerce
  • Hyvä

All custom endpoints live under the oc-bridge/v1 namespace and require the X-OC-Bridge-Key authentication header. Standard WordPress REST API v2 endpoints (/wp-json/wp/v2/*) are also used by the Magento module and do not require authentication.

Authentication

TERMINAL
$ curl -H "X-OC-Bridge-Key: your-api-key" \
$   https://your-wordpress-site.com/wp-json/oc-bridge/v1/menus

Custom endpoints

GET /oc-bridge/v1/menus

Returns all registered WordPress navigation menus with their full item trees.

Response:

JSON
[
  {
    "id": 1,
    "name": "Primary Navigation",
    "slug": "primary",
    "items": [
      {
        "id": 10,
        "title": "Blog",
        "url": "https://blog.example.com/",
        "parent": 0,
        "children": []
      }
    ]
  }
]

GET /oc-bridge/v1/menu-locations

Returns all registered menu locations and the menu assigned to each.

GET /oc-bridge/v1/options

Returns general WordPress site options (site name, description, URL).

Response:

JSON
{
  "name": "My Blog",
  "description": "Just another WordPress site",
  "url": "https://blog.example.com"
}

GET /oc-bridge/v1/seo/{post_id}

Returns SEO metadata for a specific post. Pulls from Yoast SEO or RankMath if active, otherwise falls back to core WordPress data.

Response:

JSON
{
  "title": "My Post Title - My Blog",
  "description": "The post meta description",
  "robots": "index, follow",
  "og_title": "My Post Title",
  "og_description": "The post meta description",
  "og_image": "https://blog.example.com/wp-content/uploads/image.jpg",
  "twitter_card": "summary_large_image",
  "schema": { "@type": "Article", "headline": "My Post Title" }
}

GET /oc-bridge/v1/sidebar-widgets

Returns all registered sidebar widget areas and their widget data.

GET /oc-bridge/v1/sidebar-widgets/{sidebar_id}

Returns widgets for a specific sidebar.

GET /oc-bridge/v1/related/{post_id}

Returns related posts for a given post ID. Related posts are found by shared tags first, then shared categories as a fallback.

Query parameters:

ParameterDefaultDescription
count5Number of related posts to return

Response: Array of WP REST API v2 post objects.

Standard WordPress endpoints used

The Magento module also calls standard WP REST v2 endpoints directly. These do not require authentication:

EndpointUsage
GET /wp/v2/postsPost listing with pagination
GET /wp/v2/posts/{id}Single post by ID
GET /wp/v2/posts?slug={slug}Single post by slug
GET /wp/v2/categoriesCategory listing
GET /wp/v2/categories/{id}Single category
GET /wp/v2/tagsTag listing
GET /wp/v2/users/{id}Author data
GET /wp/v2/media/{id}Featured image data