{"openapi":"3.0.3","info":{"title":"Alumio Example API","version":"1.0.0","description":"Mock REST, GraphQL, and SOAP API providing 50 products and 50 orders.\nIntended for use in Alumio example templates and E2E testing.\n\n## Pagination\nAll `GET /{resource}` and `POST|PUT|PATCH /{resource}/list` endpoints support\nfour pagination strategies simultaneously on the same URL:\n- **next-link** — `links.next` URL in the response body\n- **next-link-header** — `Link: <url>; rel=\"next\"` response header\n- **query-page-parameter** — increment `?page=N` between requests\n- **query-offset-parameter** — increment `?offset=N` between requests\n- **body-page-parameter** — send `{\"page\":N}` or `{\"offset\":N}` in the request body (use `/list` endpoints)\n\n## Failure simulation\nAppend `?fail=<status_code>` to any request to receive that HTTP error response.\nExample: `GET /products?fail=503` returns a 503 with a JSON error body.\nGraphQL errors return the GraphQL error format; SOAP errors return a SOAP Fault."},"servers":[{"url":"https://example-api.alumio.com"}],"tags":[{"name":"Products","description":"Product catalogue operations"},{"name":"Orders","description":"Order operations"},{"name":"GraphQL","description":"GraphQL endpoint (products + orders, all CRUD)"},{"name":"SOAP","description":"SOAP endpoint (products + orders, all CRUD)"}],"paths":{"/products":{"get":{"operationId":"listProducts","summary":"List products (paginated)","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/fail"}],"responses":{"200":{"$ref":"#/components/responses/ProductPage"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createProduct","summary":"Create a product (fake — not stored)","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/ProductInput"},"responses":{"201":{"$ref":"#/components/responses/ProductItem"},"default":{"$ref":"#/components/responses/Error"}}}},"/products/list":{"post":{"summary":"List products — body pagination","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/ProductPage"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"List products — body pagination","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/ProductPage"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"List products — body pagination","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/ProductPage"},"default":{"$ref":"#/components/responses/Error"}}}},"/products/{id}":{"get":{"summary":"Get a single product","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"responses":{"200":{"$ref":"#/components/responses/ProductItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Full update","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/ProductInput"},"responses":{"200":{"$ref":"#/components/responses/ProductItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Partial update","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/ProductInput"},"responses":{"200":{"$ref":"#/components/responses/ProductItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete a product (fake)","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"responses":{"204":{"description":"Deleted successfully"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/orders":{"get":{"operationId":"listOrders","summary":"List orders (paginated)","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/fail"}],"responses":{"200":{"$ref":"#/components/responses/OrderPage"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createOrder","summary":"Create an order (fake — not stored)","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/OrderInput"},"responses":{"201":{"$ref":"#/components/responses/OrderItem"},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/list":{"post":{"summary":"List orders — body pagination","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/OrderPage"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"List orders — body pagination","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/OrderPage"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"List orders — body pagination","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/BodyPagination"},"responses":{"200":{"$ref":"#/components/responses/OrderPage"},"default":{"$ref":"#/components/responses/Error"}}}},"/orders/{id}":{"get":{"summary":"Get a single order","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"responses":{"200":{"$ref":"#/components/responses/OrderItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Full update","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/OrderInput"},"responses":{"200":{"$ref":"#/components/responses/OrderItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Partial update","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"requestBody":{"$ref":"#/components/requestBodies/OrderInput"},"responses":{"200":{"$ref":"#/components/responses/OrderItem"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete a order (fake)","tags":["Orders"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/fail"}],"responses":{"204":{"description":"Deleted successfully"},"404":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/graphql":{"post":{"operationId":"graphql","summary":"GraphQL endpoint","description":"Accepts standard GraphQL requests (`{\"query\":\"...\",\"variables\":{...}}`).\n\n**Queries:** `products`, `product`, `orders`, `order`\n**Mutations:** `createProduct`, `updateProduct`, `deleteProduct`, `createOrder`, `updateOrder`, `deleteOrder`\n\nPaginated queries accept `page`, `offset`, and `limit` arguments.\nResponses include `links.next` and a `Link` header for next-link pagination.\n\nAppend `?fail=<status_code>` to trigger a GraphQL-formatted error response.","tags":["GraphQL"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","example":"{ products(page: 1, limit: 5) { data { id name price } links { next } } }"},"variables":{"type":"object"}},"required":["query"]}}}},"responses":{"200":{"description":"GraphQL response (errors may appear inside the body even on HTTP 200)","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/soap":{"get":{"operationId":"soapWsdl","summary":"WSDL definition","tags":["SOAP"],"parameters":[{"name":"wsdl","in":"query","required":true,"schema":{"type":"string","enum":[""]},"description":"Must be present (value is empty)"}],"responses":{"200":{"description":"WSDL XML","content":{"text/xml":{"schema":{"type":"string"}}}}}},"post":{"operationId":"soapRequest","summary":"SOAP endpoint","description":"Accepts SOAP 1.1 envelopes. Supported operations:\n`GetProducts`, `GetProduct`, `CreateProduct`, `UpdateProduct`, `DeleteProduct`,\n`GetOrders`, `GetOrder`, `CreateOrder`, `UpdateOrder`, `DeleteOrder`.\n\nAppend `?fail=<status_code>` to trigger a SOAP Fault response.","tags":["SOAP"],"parameters":[{"$ref":"#/components/parameters/fail"}],"requestBody":{"required":true,"content":{"text/xml":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"SOAP response envelope","content":{"text/xml":{"schema":{"type":"string"}}}},"default":{"description":"SOAP Fault envelope","content":{"text/xml":{"schema":{"type":"string"}}}}}}}},"components":{"parameters":{"page":{"name":"page","in":"query","description":"Page number (1-based). Mutually exclusive with offset.","schema":{"type":"integer","minimum":1,"default":1,"example":1}},"offset":{"name":"offset","in":"query","description":"Zero-based item offset. When set, takes precedence over page.","schema":{"type":"integer","minimum":0,"example":20}},"limit":{"name":"limit","in":"query","description":"Number of items per page.","schema":{"type":"integer","minimum":1,"default":10,"example":10}},"fail":{"name":"fail","in":"query","description":"Force an error response with this HTTP status code (100–599). Leave empty for a normal response.","schema":{"type":"integer"}},"resourceId":{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}},"schemas":{"Product":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Wireless Headphones"},"price":{"type":"number","example":79.99},"category":{"type":"string","example":"Electronics"},"sku":{"type":"string","example":"ELEC-001"},"description":{"type":"string","example":"Over-ear wireless headphones with 30-hour battery life."},"stock":{"type":"integer","example":150}}},"ProductInput":{"type":"object","required":["name","price","category"],"properties":{"name":{"type":"string","example":"New Product"},"price":{"type":"number","example":19.99},"category":{"type":"string","example":"Electronics"},"sku":{"type":"string","example":"PROD-001"},"description":{"type":"string","example":"Product description."},"stock":{"type":"integer","example":100}}},"Order":{"type":"object","properties":{"id":{"type":"integer","example":1},"product_id":{"type":"integer","example":3},"quantity":{"type":"integer","example":2},"status":{"type":"string","example":"shipped","enum":["pending","processing","shipped","delivered","cancelled"]},"customer_name":{"type":"string","example":"Alice Johnson"},"customer_email":{"type":"string","format":"email","example":"alice.johnson@example.com"},"total":{"type":"number","example":259.98},"created_at":{"type":"string","format":"date-time","example":"2024-03-15T10:00:00.000Z"}}},"OrderInput":{"type":"object","required":["product_id","quantity","customer_name","customer_email"],"properties":{"product_id":{"type":"integer","example":1},"quantity":{"type":"integer","example":2},"status":{"type":"string","example":"pending","enum":["pending","processing","shipped","delivered","cancelled"]},"customer_name":{"type":"string","example":"Alice Johnson"},"customer_email":{"type":"string","format":"email","example":"alice.johnson@example.com"}}},"Links":{"type":"object","properties":{"next":{"type":"string","format":"uri","nullable":true,"example":"https://example-api.alumio.com/products?page=2&limit=10"}}},"Meta":{"type":"object","properties":{"total":{"type":"integer","example":50},"limit":{"type":"integer","example":10},"page":{"type":"integer","example":1}}},"ProductPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"links":{"$ref":"#/components/schemas/Links"},"meta":{"$ref":"#/components/schemas/Meta"}}},"OrderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"links":{"$ref":"#/components/schemas/Links"},"meta":{"$ref":"#/components/schemas/Meta"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer","example":500},"message":{"type":"string","example":"Internal Server Error"}}}}},"BodyPaginationInput":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"example":1},"offset":{"type":"integer","minimum":0,"example":20},"limit":{"type":"integer","minimum":1,"default":10,"example":10}}}},"requestBodies":{"ProductInput":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInput"}}}},"OrderInput":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInput"}}}},"BodyPagination":{"description":"Pagination parameters in the request body.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyPaginationInput"}}}}},"responses":{"ProductPage":{"description":"Paginated product list","headers":{"Link":{"description":"RFC 8288 next-page link","schema":{"type":"string","example":"<https://example-api.alumio.com/products?page=2&limit=10>; rel=\"next\""}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPage"}}}},"OrderPage":{"description":"Paginated order list","headers":{"Link":{"description":"RFC 8288 next-page link","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPage"}}}},"ProductItem":{"description":"Single product","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}}}}}},"OrderItem":{"description":"Single order","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"Error":{"description":"Error response (also returned when using ?fail=)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}