Firmas - TAIS2020/Laurel GitHub Wiki
POST /item/<id_item>/reviews
{
"item_id": 1,
"score": 5,
"comment": "Free text upt to 120 characters"
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
POST /item/<id_item>/questions/<id_question>/answer
{
"message": "Up to 120 characters",
"user_id": 461549
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
POST /item PUT /item/<id_item>
{
"name": "Item name up to 50 characters",
"description" : "description up to 1000 characters",
"price": 100.00,
"in_stock": 50,
"photos": [
{
"url": "https://image-host/idphoto1"
},
{
"url": "https://image-host/idphoto2"
}
]
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
DELETE /item/<id_item>
Status code: 200 / 404 / 500
{
"message": "ok"
}
GET /item/<id_item>
Status code: 200 / 404 / 500
{
"item_id": 451239,
"name": "Item name up to 50 characters",
"description" : "description up to 1000 characters",
"price": 100.00,
"in_stock": 50,
"photos": [
{
"url": "https://image-host/idphoto1"
},
{
"url": "https://image-host/idphoto2"
}
]
}
GET /items?q=search%20terms
Status code: 200 / 404 / 500
{
"items": [
{
"item_id": 451239,
"name": "Item name up to 50 characters",
"description" : "description up to 1000 characters",
"price": 100.00,
"in_stock": 50,
"photos": [
{
"url": "https://image-host/idphoto1"
},
{
"url": "https://image-host/idphoto2"
}
]
},
{
"item_id": 451240,
"name": "Item name up to 50 characters",
"description" : "description up to 1000 characters",
"price": 100.00,
"in_stock": 50,
"photos": [
{
"url": "https://image-host/idphoto3"
},
{
"url": "https://image-host/idphoto4"
}
]
}
]
}
PUT /users/<id_user>/cart
{
"item": 456741,
"quantity": 5
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
DELETE /users/<id_user>/cart/item/<id_item>
Status code: 200 / 404 / 500
{
"message": "ok"
}
GET /users/<id_user>/cart
Status code: 200 / 404 / 500
{
"items": [
{
"item_id": 46776,
"quantity": 2,
"unit_price": 5000
},
{
"item_id": 46777,
"quantity": 1,
"unit_price": 200
},
]
}
POST /payments
{
"user_id": 7861241,
"payment_method": "cc",
"quotas": 12,
"address_number": "calle 80 No. 65 - 75"
}
Status code: 200 / 500
POST /mock-payment-service?callback=https:///payments/landing/<id_user>
{
"card_number": 4654654564,
"card_holder": "jane doe",
"card_expiration_date": "08/23",
"cvv": 999
}
Status code: 301 / 500
POST /payments/landing/<id_user>
{
"transaction_id": 635473,
"result": "ok"
}
Status code: 200 / 500
GET /users/<id_user>
Status code: 200 / 404 / 500
{
"user_id": 654132,
"name": "jane",
"last_name": "doe",
"document_type": "cc",
"document_number": "12345",
"email": "[email protected]",
"phone": "573015574489"
}
GET /shipping/price?from_lat=999&from_long=999&to_lat=888&to_long=888
Status code: 200 / 404 / 500
25
POST /shipping
{
"paymentId": 48732,
"items": [
{
"id": 1,
"quantity": 2
},
{
"id": 2,
"quantity": 1
}
],
"address": "address line"
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
POST /users/<id_user>/shipping-request
{
"shipping_id": 23423,
"payment_id": 46782
}
Status code: 200 / 404 / 500
{
"message": "ok"
}
PUT /shippings/<id_shipping>/confirm
{
"carrier": "Deprisa",
"sendingTimestamp": "2020-11-12 16:30:05",
"trackingCode": "abc-123",
"expectedDeliveryDate": "2020-11-13"
}
Status code: 200 / 404 / 500
{
"id": 2,
"paymentId": 2167,
"address": "some address",
"carrier": "Deprisa",
"trackingCode": "abc-123",
"sendingTimestamp": "2020-11-12T16:30:05",
"expectedDeliveryDate": "2020-11-13",
"items": [
{
"id": 1,
"quantity": 2
},
{
"id": 2,
"quantity": 20
}
]
}
POST /notification
{
"idUser": 1,
"message": "Se envia la notificacion al usuario",
}
Status code: 200 / 404 / 500
{
"message": "ok"
}