API Reference - DanielAceroJuarez/TMSWebAPI GitHub Wiki
API Reference
Endpoints
GET /api/shipments
Retrieves all shipments.
Response
- 200 OK: Successfully retrieved the list of shipments.
- 404 Not Found: No shipments found.
GET /api/shipments/{id}
Retrieves a shipment by its ID.
Parameters
- id: The ID of the shipment to retrieve.
Response
- 200 OK: Successfully retrieved the shipment.
- 404 Not Found: Shipment not found.
POST /api/shipments
Creates a new shipment.
Request Body
- shipmentId: The ID of the shipment.
- origin: The origin of the shipment.
- destination: The destination of the shipment.
- shipmentDate: The date of the shipment.
- weight: The weight of the shipment.
Response
- 201 Created: Successfully created the shipment.
- 400 Bad Request: Invalid request body.
PUT /api/shipments/{id}
Updates an existing shipment.
Parameters
- id: The ID of the shipment to update.
Request Body
- shipmentId: The ID of the shipment.
- origin: The origin of the shipment.
- destination: The destination of the shipment.
- shipmentDate: The date of the shipment.
- weight: The weight of the shipment.
Response
- 204 No Content: Successfully updated the shipment.
- 404 Not Found: Shipment not found.
DELETE /api/shipments/{id}
Deletes a shipment by its ID.
Parameters
- id: The ID of the shipment to delete.
Response
- 204 No Content: Successfully deleted the shipment.
- 404 Not Found: Shipment not found.