Brikstore demo
curl -i -X POST -H "Content-Type:application/json" -d '' http://localhost:8080/order/create
Output
HTTP/1.1 400
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 21:45:42 GMT
Connection: close
{
"timestamp":"2022-10-24T21:45:42.345+00:00",
"status":400,
"error":"Bad Request",
"path":"/order/create"
}
curl -i -X POST -H "Content-Type:application/json" -d '{"amountx": 10 }' http://localhost:8080/order/create
Output
HTTP/1.1 406
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 21:48:05 GMT
{
"status":"NOT_ACCEPTABLE",
"message":"Invalid or Missing Parameter(s).",
"errors":["amount: must be greater than or equal to 1"],
"timestamp":"2022-10-24T21:48:05.608Z"
}
curl -i -X POST -H "Content-Type:application/json" -d '{"amount": 10 }' http://localhost:8080/order/create
Output
HTTP/1.1 201
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 21:42:23 GMT
{
"order_ref":"ORDER00002"
}
curl -i -X GET "http://localhost:8080/order/list?order_ref=ORDER00004343"
Output
HTTP/1.1 200
Content-Length: 0
Date: Mon, 24 Oct 2022 21:53:02 GMT
curl -i -X GET "http://localhost:8080/order/list?order_ref=ORDER00001"
Output
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 21:52:15 GMT
{
"order_ref":"ORDER00001",
"amount":10
}
curl -i -X PATCH -H "Content-Type:application/json" -d '{"order_refx":"ORDER00001", "amountx": 20 }' http://localhost:8080/order/update
Output
HTTP/1.1 406
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 22:04:50 GMT
{
"status":"NOT_ACCEPTABLE",
"message":"Invalid or Missing Parameter(s).",
"errors":[
"amount: must be greater than or equal to 1",
"orderRef: Invalid order refrence"
],
"timestamp":"2022-10-24T22:04:50.140Z"
}
curl -i -X PATCH -H "Content-Type:application/json" -d '{"order_ref":"ORDER00001", "amount": 20 }' http://localhost:8080/order/update
Output
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 22:03:19 GMT
{
"order_ref":"ORDER00001"
}
curl -i -X PATCH -H "Content-Type:application/json" -d '{"order_ref":"ORDER00001", "status": "DISPATCHED" }' http://localhost:8080/order/fullfill
Output
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 22:07:21 GMT
{
"order_ref":"ORDER00001"
}
curl -i -X PATCH -H "Content-Type:application/json" -d '{"order_ref":"ORDER00001", "amount": 20 }' http://localhost:8080/order/update
HTTP/1.1 400
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 24 Oct 2022 22:08:49 GMT
Connection: close
{
"status":"BAD_REQUEST",
"message":"Order update not allowed.",
"errors":[],
"timestamp":"2022-10-24T22:08:49.578Z"
}