Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Order Tracking Schema and CRUD API #870

Closed
IkkiOcean opened this issue Nov 8, 2024 · 2 comments · Fixed by #879
Closed

Add Order Tracking Schema and CRUD API #870

IkkiOcean opened this issue Nov 8, 2024 · 2 comments · Fixed by #879
Assignees

Comments

@IkkiOcean
Copy link
Contributor

Description:

Implement the Order Tracking schema and associated CRUD API to allow users and administrators to track the status of their orders.

Requirements:

  • Schema: Create an order tracking schema to store tracking information related to each order.
  • CRUD Operations: Implement APIs for creating, updating, retrieving, and deleting tracking information for orders.

Tasks:

  1. Create Order Tracking Schema:

    • Fields:
      • orderId: The unique identifier for the order (reference to the Order schema).
      • trackingNumber: The tracking number provided by the shipping carrier.
      • status: The current status of the order (e.g., 'Pending', 'Shipped', 'Delivered').
      • carrier: The name of the carrier (e.g., 'UPS', 'FedEx').
      • estimatedDelivery: The estimated delivery date.
      • updatedAt: Timestamp of when the tracking information was last updated.
  2. Create CRUD API Endpoints:

    • POST /order-tracking: Create new order tracking information.
    • GET /order-tracking/{orderId}: Retrieve the tracking information for a specific order.
    • PUT /order-tracking/{orderId}: Update tracking information for an order (e.g., change status, update carrier).
    • DELETE /order-tracking/{orderId}: Delete tracking information for an order.
  3. Validation:

    • Ensure tracking data is valid and follows the correct format for status, tracking number, and carrier.
    • Include appropriate error messages for invalid inputs (e.g., missing order ID, invalid status).
  4. Integrate with Order Schema:

    • Link the orderId field to the Order schema so that tracking information is associated with a specific order.
Copy link
Contributor

github-actions bot commented Nov 8, 2024

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Hello @IkkiOcean! Your issue #870 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants