Type | Name | Description | Function | Auth | Parameters | Return Type |
---|---|---|---|---|---|---|
GET | /cart/get/:id | Retrieves the cart item from the database with the given ID. | GetCartItem | API Key | Cart Item ID | |
Type: Integer | Cart Item | |||||
GET | /cart/all/:user_id | Retrieves all cart items for a user from the database. | GetCartItems | API Key | User ID | |
Type: Integer | Cart Items | |||||
POST | /cart/add | Inserts a cart item into the database. | AddCartItem | API Key | Cart Object | Cart Item |
POST | /cart/add/all | Insert multiple cart items for a user. | AddCartItems | API Key | Cart Items | |
{ data } | Cart Items | |||||
{ data } | ||||||
PUT | /cart/update | Updates a cart item in the database. | UpdateCartItem | API Key | Cart Object | Cart ID |
Type: Integer | ||||||
DELETE | /cart/delete/:id/user/:user_id | Deletes a cart item from the database. | DeleteCartItem | API Key | Cart Item ID | |
Type: Integer | ||||||
User ID | ||||||
Type: String | Cart ID | |||||
Type: Integer |
This section providers some helpers for designing the client-side code to consume the Cart service from the Plamatio backend REST API.
Can use this as a prompt for a code-completion AI model.
GET
/cart/get/:id
Retrieves the cart item from the database with the given ID.
GET
/cart/all/:user_id
Retrieves all cart items for a user from the database.
POST
/cart/add
Inserts a cart item into the database.
PUT
/cart/update
Updates a cart item in the database.
DELETE
/cart/delete/:id
Deletes a cart item from the database.
Endpoint definitions to store Cart service endpoints in a central location.