Get Order
v1.0.0queriesQuery to fetch a single order by its identifier.
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "title": "GetOrder",
4 "description": "Query to fetch a single order by its identifier, and the order returned",
5 "type": "object",
6 "properties": {
7 "request": {
8 "description": "Parameters used to look up the order",
9 "type": "object",
10 "properties": {
11 "orderId": {
12 "description": "Unique identifier of the order to fetch",
13 "type": "string",
14 "format": "uuid"
15 }
16 },
17 "required": ["orderId"]
18 },
19 "response": {
20 "description": "The order returned by the query",
21 "type": "object",
22 "properties": {
23 "orderId": {
24 "type": "string",
25 "format": "uuid"
26 },
27 "customerId": {
28 "type": "string",
29 "format": "uuid"
30 },
31 "status": {
32 "type": "string",
33 "enum": ["CREATED", "COMPLETED", "CANCELLED"]
34 },
35 "items": {
36 "type": "array",
37 "items": {
38 "type": "object",
39 "properties": {
40 "productId": { "type": "string", "format": "uuid" },
41 "quantity": { "type": "integer", "minimum": 1 },
42 "unitPrice": { "type": "integer" }
43 },
44 "required": ["productId", "quantity", "unitPrice"]
45 }
46 },
47 "total": {
48 "type": "integer",
49 "description": "Order total in minor units (e.g. cents)"
50 },
51 "currency": {
52 "type": "string",
53 "pattern": "^[A-Z]{3}$"
54 },
55 "createdAt": {
56 "type": "string",
57 "format": "date-time"
58 }
59 },
60 "required": ["orderId", "customerId", "status", "items", "total", "currency"]
61 }
62 },
63 "required": ["request", "response"]
64}
65Details
- Format
- JSON Schema
- Resource
- queries
- Filename
- schema.json