Type | Name | Description | Auth | Function | Parameters | Return Type |
---|---|---|---|---|---|---|
GET | /users/get/:id | Retrieves the user from the database with the given ID. | API Key | GetUser | User ID | |
Type: Integer | User |
|||||
GET | /users/all | Retrieves all users from the database. | Private | GetAllUsers | none | User[] |
GET | /users/addresses/get/:id | Retrieves the address from the database with the given ID. | API Key | GetAddress | Address ID | |
Type: Integer | Address |
|||||
GET | /users/addresses/user/:user_id | Retrieves all addresses for a user from the database with the given user ID. | API Key | GetUserAddresses | User ID | |
Type: Integer | Address[] |
|||||
POST | /users/add | Inserts a user into the database. | API Key | AddUser | User object | User |
POST | /users/addresses/add | Inserts an address into the database. | API Key | AddAddress | Address object | Address |
PUT | /users/update | Updates a user in the database. | API Key | UpdateUser | User object | Object containing UserId |
PUT | /users/addresses/update | Updates an address in the database. | API Key | UpdateAddress | Address object | Object containing AddressId |
DELETE | /users/delete/:id | Deletes a user from the database. | API Key | DeleteUser | User ID | |
Type: Integer | Object containing UserId |
|||||
DELETE | /users/addresses/delete/:address_id/user/:user_id | Deletes an address from the database. | API Key | DeleteAddress | Address ID | |
Type: Integer | AddressId & UserId |
This section providers some helpers for designing the client-side code to consume the Users service from the Plamatio backend REST API.
Can use this as a prompt for a code-completion AI model.