Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

OpenAPI Ecommerce API

Advanced OpenAPI

An OpenAPI 3.1 document for a minimal ecommerce API with products and orders. A realistic fixture for your own project or test suite.

{
  "openapi": "3.1.0",
  "info": {
    "title": "Ecommerce API",
    "version": "2.0.0"
  },
  "paths": {
    "/products": {
      "get": {
        "summary": "List products",
        "responses": {
          "200": { "description": "Product list" }
        }
      }
    },
    "/orders": {
      "post": {
        "summary": "Place an order",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": { "type": "string" },
                        "quantity": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": { "description": "Order placed" }
        }
      }
    }
  }
}

More Examples

JSON Examples