API Reference
The MyOpcs API is organized around REST with predictable resource-oriented URLs, JSON request bodies, and standard HTTP response codes.
Base URL
All API requests should be made to:
https://api.myopcs.com/apiAPIs
Response Format
All API responses are returned in JSON format with a consistent structure:
Success Response
{}JSON
{
"data": {
"id": "prod_abc123",
"name": "My Product"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
}
}Paginated Response
{}JSON
{
"data": [...],
"pagination": {
"cursor": "next_page_cursor",
"hasMore": true
}
}Request Headers
The following headers are commonly used in API requests:
| Attribute | Type | Description |
|---|---|---|
Authorization | string | Bearer token for authentication (required) |
Content-Type | string | application/json for POST/PATCH requests |
Accept | string | Defaults to application/json |