Additional information.
Code | Text | Description |
---|---|---|
200 | Success | The request was completed successfully. |
400 | Bad Request | The request is invalid or missing required data. |
401 | Unauthorized | The request requires a user to be authenticated or authorized. |
403 | Forbidden | The server recognized the request but user access was denied. |
404 | Not Found | The request could not be completed because the URL is not recognized. |
500 | Internal Server Error | An unexpected error occurred on the server. |
Parameter | Description |
---|---|
userId | One or more user IDs used to retrieve names. |
Response | Description |
---|---|
message | JSON object mapping user IDs to names. |
error | Message returned if invalid or missing. |
Parameter | Description |
---|---|
createCarpoolData | Object containing data for the carpool to be created. |
Response | Description |
---|---|
message | Success message |
joinCode | Unique carpool ID generated for the carpool |
error | Message returned if invalid or missing |
Parameter | Description |
---|---|
carpoolId | Unique ID of carpool to retrieve |
creatorId | ID of user who created carpool |
Response | Description |
---|---|
createCarpoolData | Carpool data retrieved from database |
error | Message returned if invalid or missing |
Parameter | Description |
---|---|
joinCarpoolData | Object containing data for the carpool to be joined (includes createCarpoolData, joinData, and userId) |
Response | Description |
---|---|
message | Success message |
joinCode | Unique carpool ID of carpool that user joined |
error | Message returned if invalid or missing |
Parameter | Description |
---|---|
userId | ID of user whose carpool data is being retrieved |
Response | Description |
---|---|
createCarpoolData | Carpool data retrieved from database |
error | Message returned if invalid or missing |
Parameter | Description |
---|---|
carpoolId | Unique ID of carpool whose optimization results are being retrieved |
Response | Description |
---|---|
results | Optimization results retrieved from the database |
updatedAt | Timestamp of when results were last updated |
error | Message returned if invalid or missing |
Parameter | Description |
---|---|
carpoolId | Unique ID of carpool whose optimization results are being saved |
results | Optimization results to be saved |
Response | Description |
---|---|
success | Boolean indicating successful save |
error | Message returned if invalid, missing, or unauthorized |
Parameter | Description |
---|---|
carpoolId | Unique ID of carpool whose optimization results are being saved |
carpoolData | New data to update the carpool with |
Response | Description |
---|---|
success | Boolean indicating successful save |
error | Message returned if invalid, missing, or unauthorized |
Parameter | Description |
---|---|
userId | Unique ID of user whose carpool data is being updated |
carpoolId | Unique ID of carpool whose optimization results are being saved |
userLocation | Updated user location |
carpoolData | New data to update the carpool with |
Response | Description |
---|---|
success | Boolean indicating successful save |
message | Success message |
error | Message returned if invalid, missing, or unauthorized |