Sports Inventory Quickstart
This quickstart creates one complete branch of sports inventory, from Category to Selection.
Before you begin
Obtain these two values from your Optimove implementation team:
| Placeholder | Meaning |
|---|---|
{{service_api_key}} | Service API key authorized for Sports Inventory |
{{brand_key}} | Brand identifier assigned to the integration |
The base URL is https://api.opti-x.optimove.net/sports-inventory/v1. Your Optimove onboarding contact confirms the base URL that applies to your brand.
All requests use HTTPS and JSON.
Send a complete hierarchy
curl --request POST \
--url 'https://api.opti-x.optimove.net/sports-inventory/v1/records' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{service_api_key}}' \
--header 'x-brand-key: {{brand_key}}' \
--data-binary @- <<'JSON'
[
{
"categoryKey": "football",
"categoryName": "Football",
"displayOrder": 1,
"displayStatus": "Displayed"
},
{
"classKey": "england",
"className": "England",
"categoryKey": "football",
"displayOrder": 1,
"displayStatus": "Displayed"
},
{
"typeKey": "premier-league",
"typeName": "Premier League",
"classKey": "england",
"categoryKey": "football",
"displayOrder": 1,
"displayStatus": "Displayed"
},
{
"eventKey": "arsenal-chelsea-2026-08-15",
"eventName": "Arsenal v Chelsea",
"eventDateTime": "2026-08-15T15:00:00Z",
"eventEndDateTime": "2026-08-15T17:00:00Z",
"typeKey": "premier-league",
"classKey": "england",
"categoryKey": "football",
"homeName": "Arsenal",
"awayName": "Chelsea",
"isEventStarted": false,
"isEventFinished": false,
"eventStatus": "Active",
"displayOrder": 1,
"displayStatus": "Displayed"
},
{
"marketKey": "arsenal-chelsea-match-result",
"marketName": "Match Result",
"eventKey": "arsenal-chelsea-2026-08-15",
"typeKey": "premier-league",
"classKey": "england",
"categoryKey": "football",
"marketStatus": "Active",
"displayOrder": 1,
"displayStatus": "Displayed"
},
{
"selectionKey": "arsenal-chelsea-home-win",
"selectionName": "Arsenal",
"marketKey": "arsenal-chelsea-match-result",
"eventKey": "arsenal-chelsea-2026-08-15",
"selectionStatus": "Active",
"displayStatus": "Displayed",
"displayOrder": 1,
"numPrice": 1,
"denPrice": 1
}
]
JSONThe order matters: parents appear before children.
Check the acceptance response
A successful default response is:
HTTP/1.1 202 Accepted
Content-Type: application/json{
"success": true
}This confirms acceptance, not completion of downstream processing.
Always parse the body. A request can return 202 with:
{
"success": false
}When success is false, retry the same request using the policy in Reliability and troubleshooting.
Request an acceptance reference
The versioned response media type adds an acceptance reference:
curl --request POST \
--url 'https://api.opti-x.optimove.net/sports-inventory/v1/records' \
--header 'Content-Type: application/json' \
--header 'Accept: application/vnd.optimove.optix.inventory.records.v2+json' \
--header 'x-api-key: {{service_api_key}}' \
--header 'x-brand-key: {{brand_key}}' \
--data-binary '[{"categoryKey":"football","categoryName":"Football"}]'Example:
{
"success": true,
"records": [
"rcpt-3f9a2c7e14b8"
]
}The request array is accepted as a single unit, so records normally contains one reference for the whole HTTP batch, not one per entity. Treat it as an opaque string—retain it with your request logs for support diagnostics, but do not parse or depend on its format.
Only treat the reference as a successful acceptance when success is true. A failed result can contain "unknown"; retain the complete failure response and retry the whole batch.
Verify your integration behavior
Before increasing volume, verify these cases with your implementation team:
- One complete parent-to-child hierarchy is accepted.
- A PUT changes an existing field without clearing omitted fields.
- A safe odds PUT sends all three price fields together.
- A single parent DELETE removes the intended hierarchy branch.
- Authentication failures and validation failures are captured in your logs without exposing credentials.
- Your client inspects the JSON
successvalue on every 202 response.
Next steps
- Understand the model in Hierarchy: concepts and conventions, and see the API Reference for the field-by-field contract.
- Implement POST, PUT, and DELETE from the Sports Inventory API Reference (operation semantics, expiry, and cascade rules).
- Add retry and diagnostics behavior from Reliability and troubleshooting.
Updated about 2 hours ago
