Slide 5
Slide 5 text
Dmitry Petrov
GET /api/orders/12/items/fg45sf54
The server response:
{
"id": "fg45sf54",
"url": "http://localhost/api/orders/12/items/fg45sf54",
"product": "business cards",
"quantity": 1000,
"previews": {
"front": {
"large": "http://localhost/large/front.jpg",
"medium": "http://localhost/medium/front.jpg",
"small": "http://localhost/small/front.jpg",
},
"back": {
"large": "http://localhost/large/back.jpg",
"medium": "http://localhost/medium/back.jpg",
"small": "http://localhost/small/back.jpg",
}
}
}
GET /api/orders/12
The server response:
{
"id": 12,
"url": "http://localhost/api/orders/12",
"client": {
"firstname": "Dmitry",
"lastname": "Petrov",
"email": "",
"phone": null,
"address": {
"country": "Russia",
"city": "Saratov",
"zip": 123456,
"street": "Vavilova",
"residentional": false
}
}
}
RESTful API, examples GET