OMSCourse Search API
Getting started

Quickstart

From API key to rendered results in four steps.

1. Get your API key

OMS issues keys privately (for example OMS Website — Staging and OMS Website — Production). Store it as a server environment variable or in wp-config.php. Never put it in browser JavaScript.

2. Send a search

curl https://oms-api.mainconsulting.co.uk/api/public/v1/search \
  -H "Authorization: Bearer $OMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "I need first aid training for my staff."}'

3. Read the response

This is a real response, shortened to two courses. See Response schema for every field.

"request_id": "req_RRcfY89zFzXCEAfXjy0f",
"api_version": "2026-10-01",
"status": "results",
"confidence": "high",
"answer": "These look like the most relevant first aid options for staff training. The course data shows both in-person and open/waiting list sessions in Leicester, with durations ranging from 1 to 3 days. If you need a basic option, Emergency First Aid at Work is available; if you need a fuller workplace qualification, First Aid at Work and the requalification course are also listed. Mental Health First Aid (England) is included as a related staff course if you also want mental health support training.",
"follow_up_question": null,
"topic": "first aid",
"location": null,
"delivery": null,
"date_from": null,
"date_to": null,
"date_label": null,
"max_price_inc_vat": null,
"max_price_ex_vat": null,
"available_only": false,
"notes": []
},
],
"online_activities": [],
],
"unavailable_facts": [],
"context": "eyJwIjp7InYiOjEsInR1cm4iOjEsImxhc3QiOnsi…"
}

4. Render it

  • Show answer as the headline text.
  • Render each item in courses as a card, with its events as dates and a Book button linking to booking_url.
  • Show supporting_content as "Related reading".
  • If follow_up_question is set, show it and send the visitor's reply with context.
Next: WordPress / PHP guide for a complete drop-in integration.