Skip to content

Instantly share code, notes, and snippets.

@mgryszko
Last active March 19, 2021 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgryszko/43b1483adaa1ad7ae95d1cfbcf491668 to your computer and use it in GitHub Desktop.
Save mgryszko/43b1483adaa1ad7ae95d1cfbcf491668 to your computer and use it in GitHub Desktop.
{
"description": "get cart total",
"request": {
"method": "POST",
"path": "/cart/total",
"body": {
"items": [{
"quantity": 4,
"sku": "croissants"
}, {
"quantity": 5,
"sku": "baguettes"
}
]}
},
"response": {
"status": 200,
"headers": { "Content-Type": "application/json" },
"body": {
"items": [{
"quantity": 3,
"sku": "croissants",
"totalPrice": 2.65,
"unitPrice": 1.10
},
{
"quantity": 5,
"sku": "baguettes",
"totalPrice": 3.00,
"unitPrice": 0.75
}],
"total": 5.65
}
},
"providerStates": [{ "name": "cart with existing SKUs" }]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment