API Rental Project
API Rental Project
authentication:
Endpoint
● Status
● Tools
○ Get all tools
○ Get a single tool
● Orders
○ Get all orders
○ Get a single order
○ Create a new order
○ Update an order
○ Delete an order
2/ Status codes
400 Bad Request Indicates that the parameters provided are invalid.
1/ Parameters
toolId integer path Specifies the id of the tool you wish to retrieve.
2/ Status codes
404 Not found Indicates that there is no tool with the specified id.
C. Orders
1/ Parameters
Bearer
token1
b5afc3917d2a8ac78aeebc9f19748a9be48b
85034cf4d41e57c79ed60742d82d
{
"toolId": 4643,
"customerName": "John Doe",
"comment": "This is QA03 class"
}
2/ Status codes
201 Created Indicates that the order has been created successfully.
400 Bad Request Indicates that the parameters provided are invalid.
GET /orders
1/ Parameters
Authorization string header Specifies the bearer token of the API client.
Bearer
2/ Status codes
401 Unauthorized Indicates that request has not been authenticated. Check the
response body for additional details.
1/ Parameters
2/ Status codes
401 Unauthorized Indicates that request has not been authenticated. Check the
response body for additional details.
404 Not found Indicates that there is no order with the specified id associated
with the API client.
Update an order
PATCH /orders/{orderId}
1/ Parameters
Specifies a comment.
{
"customerName": "Joe Doe",
"comment": "Joe Doe"
}
2/ Status codes
204 No Content Indicates that the order has been updated successfully.
400 Bad Request Indicates that the parameters provided are invalid.
401 Unauthorized Indicates that request has not been authenticated. Check the
response body for additional details.
404 Not found Indicates that there is no order with the specified id associated
with the API client.
Delete an order
DELETE /orders/{orderId}
1/ Parameters
Authorization string header Specifies the bearer token of the API client.
2/ Status codes
204 No Content Indicates that the order has been deleted successfully.
400 Bad Request Indicates that the parameters provided are invalid.
401 Unauthorized Indicates that request has not been authenticated. Check the
response body for additional details.
404 Not found Indicates that there is no order with the specified id associated to the
API client.