Finish Order
Finish Order whhile product has been shipping by seller
Endpoint
Base URL
http://localhost:8080
Method and Endpoint
POST /api/users/current/order/{order_id}
Headers
Authorization: Bearer access_token
Route Param
order_id
: string (required)
Query Param
product_id
: string (required)
Request Body
Request Body
{
"status": "FINISHED"
}
Responses
You will get example responses like this:
200 (success)
Response Body
{
"message": "Successfully Finish status the Order",
}
400 (bad request)
Response Body
{
"error": "order status request is not 'FINISHED'"
}
401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}
401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}
500 (server error)
Response Body
{
"error": "Internal server error"
}
500 (server error - failed)
If query to database
get troble while get the order
data
Response Body
{
"error": "failed to get the order"
}
500 (server error - failed)
If the order status is not 'SHIPPED'
yet. So will make an error
Response Body
{
"error": "order status is not 'SHIPPED'"
}