Products
REST| Method | Path | Description |
|---|---|---|
| GET | /products | Paginated list — query params |
| POST PUT PATCH | /products/list | Paginated list — page/offset/limit in body |
| POST | /products | Create product (fake) |
| GET | /products/{id} | Get one product |
| PUT | /products/{id} | Full update (fake) |
| PATCH | /products/{id} | Partial update (fake) |
| DELETE | /products/{id} | Delete (fake) |
Orders
REST| Method | Path | Description |
|---|---|---|
| GET | /orders | Paginated list — query params |
| POST PUT PATCH | /orders/list | Paginated list — page/offset/limit in body |
| POST | /orders | Create order (fake) |
| GET | /orders/{id} | Get one order |
| PUT | /orders/{id} | Full update (fake) |
| PATCH | /orders/{id} | Partial update (fake) |
| DELETE | /orders/{id} | Delete (fake) |
Pagination
All endpointsnext-link
links.next URL in every paginated response bodynext-link-header
Link: <url>; rel="next" response headerquery-page-parameter
?page=N&limit=N — Alumio increments pagequery-offset-parameter
?offset=N&limit=N — Alumio increments offsetbody-page-parameterPOST/PUT/PATCH
/list with {"page":N} in bodyDefault page size10 items. Override with
?limit=N or "limit":N in bodyoffset vs page
offset wins. When both are sent, page is ignoredURL vs bodyThe query string wins.
POST /products/list?page=3 with {"page":1} in the body serves page 3; body values apply when the URL omits themNext link strategyMirrors the request: an
?offset= request gets an ?offset= next link continuing from the first unseen item, anything else gets ?page=Failure simulation
All endpointsHow to triggerAppend
?fail=<status_code> to any requestExamples
?fail=500 ?fail=422 ?fail=429 ?fail=503REST formatJSON
{"error":{"code":N,"message":"..."}}GraphQL formatJSON
{"errors":[...]}SOAP formatSOAP Fault envelope with
soap:Server or soap:Client fault codeAuthentication
Auth| Scheme | Path | Credentials |
|---|---|---|
| BASIC | /auth/basic/products/auth/basic/orders |
Username alumio, password example |
| BEARER | /auth/bearer/products/auth/bearer/orders |
Authorization: Bearer example-bearer-token |
| OAUTH2 | POST /auth/oauth/token/auth/oauth/products/auth/oauth/orders |
Token endpoint: grant_type=client_credentials or refresh_token,
client example-client-id / example-client-secretResources: Authorization: Bearer example-access-token
|
| REQUEST | GET/POST /auth/request/token/auth/request/products/auth/request/orders |
Token endpoint returns example-request-token in the X-Example-Token
response header, in the JSON body under data.token, and as the
example_token cookieResources: X-Example-Token: example-request-token request header
or the example_token cookie
|
BehaviourAll
/products and /orders operations are available under each prefixFailuresMissing or invalid credentials return
401Example: OAuth 2 client_credentials grant
curl -X POST https://example-api.alumio.com/auth/oauth/token \
-d grant_type=client_credentials \
-d client_id=example-client-id \
-d client_secret=example-client-secret
{"access_token":"example-access-token","token_type":"Bearer","expires_in":3600,"refresh_token":"example-refresh-token"}
GraphQL
GraphQL| Method | Path | Description |
|---|---|---|
| POST | /graphql |
Queries: products, product, orders, orderMutations: createProduct, updateProduct, deleteProduct,
createOrder, updateOrder, deleteOrderPagination via page, offset, limit arguments or variables,
or via the same URL query params (?page=N&limit=N), so links.next
can be followed as-is. The query string takes precedence over the arguments.Responses include links.next and Link header.
|
Example request body — POST /graphql
{
"query": "query GetProducts($page: Int, $limit: Int) { products(page: $page, limit: $limit) { data { id name price category } links { next } meta { total page limit } } }",
"variables": { "page": 1, "limit": 10 }
}
SOAP
SOAP 1.1| Method | Path | Description |
|---|---|---|
| GET | /soap?wsdl | WSDL definition |
| POST | /soap |
GetProducts, GetProduct, CreateProduct, UpdateProduct, DeleteProductGetOrders, GetOrder, CreateOrder, UpdateOrder, DeleteOrder
|
Example request body — POST /soap (Content-Type: text/xml)
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://alumio.com/mockapi/">
<soap:Body>
<tns:GetProducts>
<tns:Page>1</tns:Page>
<tns:Limit>10</tns:Limit>
</tns:GetProducts>
</soap:Body>
</soap:Envelope>