Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/hypermedia.json Secret

Last active Apr 7, 2021
Embed
What would you like to do?
{
"sku": "abc123",
"price": 85.0,
"forSale": false,
"freeShipping": false,
"quantity": 10,
"links": [
{
"rel": "Images",
"href": "/sales/products/abc123/images"
}
],
"actions": [
{
"name": "IncreasePrice",
"href": "/sales/products/abc123/increasePrice",
"method": "POST"
},
{
"name": "DecreasePrice",
"href": "/sales/products/abc123/decreasePrice",
"method": "POST"
},
{
"name": "AvailableForSale",
"href": "/sales/products/abc123/availableForSale",
"method": "POST"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment