json icon

Get Product

v1.0.0queries

Query to fetch a single product by its identifier.

1{
2  "$schema": "http://json-schema.org/draft-07/schema#",
3  "title": "GetProduct",
4  "description": "Query to fetch a single product by its identifier, and the product returned",
5  "type": "object",
6  "properties": {
7    "request": {
8      "description": "Parameters used to look up the product",
9      "type": "object",
10      "properties": {
11        "productId": {
12          "description": "Unique identifier of the product to fetch",
13          "type": "string",
14          "format": "uuid"
15        }
16      },
17      "required": ["productId"]
18    },
19    "response": {
20      "description": "The product returned by the query",
21      "type": "object",
22      "properties": {
23        "productId": {
24          "type": "string",
25          "format": "uuid"
26        },
27        "sku": {
28          "type": "string"
29        },
30        "name": {
31          "type": "string"
32        },
33        "description": {
34          "type": "string"
35        },
36        "price": {
37          "description": "Price in minor units (e.g. cents)",
38          "type": "integer"
39        },
40        "currency": {
41          "type": "string",
42          "pattern": "^[A-Z]{3}$"
43        },
44        "category": {
45          "type": "string"
46        },
47        "status": {
48          "type": "string",
49          "enum": ["DRAFT", "ACTIVE", "ARCHIVED"]
50        }
51      },
52      "required": ["productId", "sku", "name", "price", "currency", "status"]
53    }
54  },
55  "required": ["request", "response"]
56}
57

Details

Format
JSON Schema
Resource
queries
Filename
schema.json

Versions