API:Product: Difference between revisions
From MCM Combat Operations
(Created page with " <nowiki> GET /products/20 Accept: application/hal+json -- response -- 200 OK Content-Type: application/hal+json { "_links": { "self": { "href": "\...") |
No edit summary |
||
Line 1: | Line 1: | ||
Returns product info suitable for use by a vendor application | |||
'''URI:''' /products/{productID} | |||
=== Example Request === | |||
<nowiki> | <nowiki> | ||
GET /products/ | GET http://testsu/mcm-api/products/30 | ||
Accept: application/hal+json | Accept: application/hal+json | ||
Line 10: | Line 15: | ||
"_links": { | "_links": { | ||
"self": { | "self": { | ||
"href": "\/products\/ | "href": "http:\/\/testsu\/mcm-api\/products\/30" | ||
}, | |||
"curies": [ | |||
{ | |||
"name": "mcm", | |||
"href": "http:\/\/wiki.mcm-systems.net\/index.php?title=api:{rel}", | |||
"templated": true | |||
} | |||
], | |||
"mcm:productsale": { | |||
"href": "http:\/\/testsu\/mcm-api\/products\/30\/sales" | |||
} | } | ||
}, | }, | ||
"prodID": " | "prodID": "30", | ||
"prodName": " | "prodName": "Fox", | ||
"prodPrice": " | "prodPrice": "130", | ||
"prodImage": " | "prodImage": "83ffffb5-7f0e-8a39-2d27-bfba7208563a" | ||
} | } | ||
</nowiki> | </nowiki> |
Revision as of 03:34, 25 January 2015
Returns product info suitable for use by a vendor application
URI: /products/{productID}
Example Request
GET http://testsu/mcm-api/products/30 Accept: application/hal+json -- response -- 200 OK Content-Type: application/hal+json { "_links": { "self": { "href": "http:\/\/testsu\/mcm-api\/products\/30" }, "curies": [ { "name": "mcm", "href": "http:\/\/wiki.mcm-systems.net\/index.php?title=api:{rel}", "templated": true } ], "mcm:productsale": { "href": "http:\/\/testsu\/mcm-api\/products\/30\/sales" } }, "prodID": "30", "prodName": "Fox", "prodPrice": "130", "prodImage": "83ffffb5-7f0e-8a39-2d27-bfba7208563a" }