-
Notifications
You must be signed in to change notification settings - Fork 5
RESTful Service Endpoints
Duan Linpei edited this page Nov 1, 2020
·
8 revisions
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/addresses | get addresses | - |
Success: 200 Failure: 409 or 500 |
Get | api/address/{id} | get address | @PathVariable String id - The id of the address |
Success: 200 Failure: 409 or 500 |
Post | api/address | create address | @RequestParam("id")String id, @RequestParam("country")String country, @RequestParam("city")String city, @RequestParam("postcode")String postCode, @RequestParam("province")String province, @RequestParam("streetaddress")String streetaddress, @RequestParam("number")String number, @RequestParam("name")String name |
Success: 200 Failure: 409 or 500 |
Put | api/address/update | update street address | @PathVariable("id")String id - The id of the address, @RequestParam("address")String newaddress - new street address wants to update |
Success: 200 Failure: 409 or 500 |
Delete | api/address/{id} | delete address | @PathVariable String id - The id of the address |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Inputs | Response |
---|---|---|---|---|
Get | api/system/{id} | Get system by id | @PathVariable String id - The id of the system |
Success: 200 Failure: 409 or 500 |
Post | api/system/{id} | Create system | @PathVariable String id - The id of the new system |
Success: 200 Failure: 409 or 500 |
Delete | api/system/{id} | Delete system | @PathVariable String id - The id of the system |
Success: 200 Failure: 409 or 500 |
Put | api/system/setincome/{id} | Update the income of the system | @PathVariable String id - The id of the system @RequestParam double income - The new income |
Success: 200 Failure: 409 or 500 |
Put | api/system/increaseincome/{id} | Increase the income of the system | @PathVariable String id - The id of the system @RequestParam double incomeincrement - The increment of income |
Success: 200 Failure: 409 or 500 |
Put | api/system/adduser/{id} | Add a user to the system | @PathVariable String id - The id of the system @RequestParam String userid - The id of the user to be added |
Success: 200 Failure: 409 or 500 |
Put | api/system/addartpiece/{id} | Add an art piece to the system | @PathVariable String id - The id of the system @RequestParam String artpieceid - The id of the art piece to be added |
Success: 200 Failure: 409 or 500 |
Put | api/system/addpurchase/{id} | Add a purchase to the system | @PathVariable String id - The id of the system @RequestParam String purchaseid - The id of the purchase to be added |
Success: 200 Failure: 409 or 500 |
Put | api/system/addaddress/{id} | Add an address to the system | @PathVariable String id - The id of the system @RequestParam String addressid - The id of the address to be added |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/users | Get all users | - |
Success: 200 Failure: 409 or 500 |
Get | api/users/{name} | Get user by name | @PathVariable String name - The name of the user |
Success: 200 Failure: 409 or 500 |
Post | api/user | Create user | @RequestParam String name - The name of the user @RequestParam String email - The email of the user @RequestParam String password - The password of the user @RequestParam String avatar - The avatar of the user |
Success: 200 Failure: 409 or 500 |
Put | api/user/updateEmail/{name} | Update user email | @PathVariable String name - The name of the user @RequestParam String email - The new email of the user |
Success: 200 Failure: 409 or 500 |
Put | api/user/updatePassword/{name} | Update user password | @PathVariable String name - The name of the user @RequestParam String password - The new password of the user |
Success: 200 Failure: 409 or 500 |
Put | api/user/updateAvatar/{name} | Update user avatar | @PathVariable String name - The name of the user @RequestParam String avatar - The new avatar of the user |
Success: 200 Failure: 409 or 500 |
Delete | api/users/{name} | Delete user | @PathVariable String name - The name of the user |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/artPiece/artPieceList | Get art pieces | - |
Success: 200 Failure: 409 or 500 |
Get | api/artPiece/getArtPiece/{id} | Get art piece by id | @PathVariable String id - The id of the art piece |
Success: 200 Failure: 409 or 500 |
Post | api/artPiece/createArtPiece/{id} | Create art piece | @PathVariable String id - The id of the art piece @RequestParam String name - the name of the art piece @RequestParam String des - The description of the art piece @RequestParam String author - The author of the art piece @RequestParam double price - The price of the art piece @RequestParam Date date - The date of the art piece @RequestParam String status - The status of the art piece |
Success: 200 Failure: 409 or 500 |
Put | api/artPiece/updateArtPieceName/{id} | Update name | @PathVariable String id - The id of the art piece @RequestParam String name - The new name of the art piece |
Success: 200 Failure: 409 or 500 |
Put | api/artPiece/updateArtPieceDes/{id} | Update description | @PathVariable String id - The id of the art piece @RequestParam String des - The new description of the art piece |
Success: 200 Failure: 409 or 500 |
Put | api/artPiece/updateArtPiecePrice/{id} | Update price | @PathVariable String id - The id of the art piece @RequestParam double price - The new price of the art piece |
Success: 200 Failure: 409 or 500 |
Put | api/artPiece/updateArtPieceStatus/{id} | Update status | @PathVariable String id - The id of the art piece @RequestParam String status - The new status of the art piece |
Success: 200 Failure: 409 or 500 |
Put | api/artPiece/updateArtPieceAuthor/{id} | Update author | @PathVariable String id - The id of the art piece @RequestParam String author - The new author of the art piece |
Success: 200 Failure: 409 or 500 |
Delete | api/artPiece/deleteArtPiece/{id} | Delete art piece | @PathVariable String id - The id of the art piece |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/artist/artistList | Get artists | - |
Success: 200 Failure: 409 or 500 |
Get | api/artist/getArtist/{id} | Get artist by id | @PathVariable String id - The id of the artist |
Success: 200 Failure: 409 or 500 |
Post | api/artist/createArtist{id} | Create artist | @PathVariable String id - The id of the artist @RequestParam String user - The id of the user @RequestParam double credit - The credit of the artist |
Success: 200 Failure: 409 or 500 |
Put | api/artist/updateCredit/{id} | Update credit | @PathVariable String id - The id of the artist @RequestParam double credit - The new credit of the artist |
Success: 200 Failure: 409 or 500 |
Delete | api/artist/deleteArtist/{id} | Delete artist | @PathVariable String id - The id of the artist |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/customer/customerList | Get customers | - |
Success: 200 Failure: 409 or 500 |
Get | api/customer/customerList/{id} | Get customer by id | @PathVariable String id - The id of the customer |
Success: 200 Failure: 409 or 500 |
Post | api/customer/createCustomer/{id} | Create customer | @PathVariable String id - The id of the customer @RequestParam user - The id of the user @RequestParam double balance - The balance of the customer |
Success: 200 Failure: 409 or 500 |
Put | api/customer/updateBalance/{id} | Update balance | @PathVariabe String id - The id of the customer @RequestParam double balance - The new balance of the customer |
Success: 200 Failure: 409 or 500 |
Put | api/customer/addAddress/{id} | Add address | @PathVariabe String id - The id of the customer @RequestParam String adress - The id of the adding address |
Success: 200 Failure: 409 or 500 |
Delete | api/customer/deleteCustomer/{id} | Delete customer | @PathVariabe String id - The id of the customer |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/inStorePickUps/inStorPickUpList | get instore pickups | - |
Success: 200 Failure: 409 or 500 |
Get | api/inStorePickUp/inStorPickUpList/{pickUpReferenceNumber} | get instore pickup by pickUpReferenceNumber | @PathVariable("pickUpReferenceNumber") String pickUpReferenceNumber |
Success: 200 Failure: 409 or 500 |
Post | api/inStorePickUp/createInStorePickUp/{pickUpReferenceNumber} | create instore pickup | @RequestParam("deliveryid") String id,@RequestParam("pickUpReferenceNumber")String pickUpReferenceNumber @RequestParam("inStorePickUpStatus")String status @RequestParam("storeAddress")String storeAddress @RequestParam("purchaseid")String purid |
Success: 200 Failure: 409 or 500 |
Put | api/inStorePickUp/updateinStorePickUpStatus/{pickUpReferenceNumber} | update status | @PathVariable("pickUpReferenceNumber")String pickUpReferenceNumber @RequestParam("inStorePickUp")String newinStorePickUp--new status |
Success: 200 Failure: 409 or 500 |
Delete | api/inStorePickUp/deleteinStorePickUp/{pickUpReferenceNumber} | delete instore pickup | @PathVariable("pickUpReferenceNumber") String pickUpReferenceNumber |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/parcelDeliveries/parcelDeliveryList | get parcel deliveries | @PathVariable("trackingNumber")String trackingNumber |
Success: 200 Failure: 409 or 500 |
Get | api/parcelDelivery/parcelDelivery/{trackingNumber} | get parcel delivery | PathVariable & RequestParam |
Success: 200 Failure: 409 or 500 |
Post | api/parcelDelivery/createparcelDelivery/{trackingNumber} | create parcel delivery | @RequestParam("deliveryid")String deliveryid @RequestParam("trackingNumber")String trackingNumber @RequestParam("carrier")String carrier @RequestParam("parcelDeliveryStatus")String status @RequestParam("deliveryAddress")String deliveryAddress @RequestParam("purchaseid")String purid |
Success: 200 Failure: 409 or 500 |
Put | api/parcelDelivery/updateparcelDelivery/{trackingNumber} | update status | @PathVariable("trackingNumber")String trackingNumber @RequestParam("parcelDelivery")String newparcelDelivery--new status |
Success: 200 Failure: 409 or 500 |
Delete | api/parcelDelivery/deleteparcelDelivery/{trackingNumber} | delete parcel delivery | @PathVariable("trackingNumber") String trackingNumber |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/payments | get payments | - |
Success: 200 Failure: 409 or 500 |
Get | api/payments/{id} | get payment | @PathVariable String id - The id of the payment |
Success: 200 Failure: 409 or 500 |
Post | api/payment | create payment | @RequestParam("id")String id - id of the payment to be created, @RequestParam("method")String method - payment method, @RequestParam("success")String success, @RequestParam("purchaseid")String purchaseid - the id of related purchase |
Success: 200 Failure: 409 or 500 |
Put | api/payment/update/{id} | update payment | @PathVariable("id")String id - The id of the payment, @RequestParam("method")String method - the payment method to be updated |
Success: 200 Failure: 409 or 500 |
Delete | api/payments/{id} | delete payment | @PathVariable("id")String id - The id of the payment |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Inputs | Response |
---|---|---|---|---|
Get | api/purchases | Get all purchases | - |
Success: 200 Failure: 409 or 500 |
Post | api/purchase/{id} | Create a new purchase | @PathVariable String id - The id of the new purchase to be created @RequestParam String status - The status of the new purchase (Successful, Failed, Cancelled, or Pending) @RequestParam String date - The date of purchase (YYYY-MM-DD) @RequestParam String artpieceid - The id of the art piece purchased @RequestParam String customerid - The id of the customer who made the purchase |
Success: 200 Failure: 409 or 500 |
Get | api/purchase/{id} | Get purchase by id | @PathVariable String id - The id of the purchase |
Success: 200 Failure: 409 or 500 |
Get | api/purchasesbycustomer/{id} | Get purchases made by a customer | @PathVariable String id - The id of the customer |
Success: 200 Failure: 409 or 500 |
Delete | api/purchase/{id} | Delete a purchase | @PathVariable String id - The id of the purchase |
Success: 200 Failure: 409 or 500 |
Put | api/purchase/updatestatus/{id} | Update the status of purchase | @PathVariable String id - The id of the purchase @RequestParam String status - The new status (Successful, Failed, Cancelled, or Pending) |
Success: 200 Failure: 409 or 500 |
Put | api/purchase/setparceldelivery/{id} | Set up a parcel delivery | @PathVariable String id - The id of the purchase @RequestParam String deliveryid - The id of the delivery |
Success: 200 Failure: 409 or 500 |
Put | api/purchase/setinstorepickup/{id} | Set up an in-store pick-up | @PathVariable String id - The id of the purchase @RequestParam String deliveryid - The id of the delivery |
Success: 200 Failure: 409 or 500 |
Put | api/purchase/addpayment/{id} | Add a payment for the purchase | @PathVariable String id - The id of the purchase @RequestParam String paymentid - The id of the payment to be added |
Success: 200 Failure: 409 or 500 |
Request Type | URL | Method Description | Input | OutPut |
---|---|---|---|---|
Get | api/userRoles | Get all user roles | - |
Success: 200 Failure: 409 or 500 |
Get | api/userRoles/{id} | Get user role by id | @PathVariable String id - The id of the user role |
Success: 200 Failure: 409 or 500 |
Post | api/userRole | Create user role | @RequestParam String id - The id of the user role @RequestParam String userid - The id of the user |
Success: 200 Failure: 409 or 500 |
Delete | api/userRoles/{id} | Delete user role | @PathVariable String id - The id of the user role |
Success: 200 Failure: 409 or 500 |