Seller Orders
Update Status Seller Order

Update Status Seller Order

Update status Order for seller and customer

Endpoint

Base URL
http://localhost:8080
Method and Endpoint
PATCH /api/sellers/current/orders/{order_id}
Headers
Authorization: Bearer access_token

Route Param

order_id: string (required)

Query Param

product_id: string (required)

Responses

You will get responses like this:

200 (success)

Response Body
{
  "message": "Successfully Update the Order Status",
}

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 seller data

Response Body
{
  "error": "failed to find seller"
}

500 (server error - failed)

If query to database get troble while get the customer order data

Response Body
{
  "error": "failed to get the user order"
}

500 (server error - failed)

If the customer had not made payment yet

Response Body
{
  "error": "this order has not yet made payment"
}

500 (server error - failed)

If something went wrong while updating status order seller on database

Response Body
{
  "error": "failed to update the status seller order"
}

500 (server error - failed)

If something went wrong while updating status order customer on database

Response Body
{
  "error": "failed to update the status user order"
}