Skip to content

Create Order Backend API Endpoint #10

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

Open
5 tasks
ysun209 opened this issue Apr 11, 2025 · 0 comments
Open
5 tasks

Create Order Backend API Endpoint #10

ysun209 opened this issue Apr 11, 2025 · 0 comments

Comments

@ysun209
Copy link
Contributor

ysun209 commented Apr 11, 2025

User Story

As a system,
I want to create an order when a user submits a ticket purchase or reservation,
So that the order is processed, stored, and can be retrieved for future reference.

Description

This backend issue focuses on creating an API endpoint to handle order creation. The endpoint will accept user input, validate the order details, and save the order to the database.

Motivation

No response

Acceptance Criteria

  • Given a valid order request with user details and selected items (e.g., tickets, seats), When the request is sent to the backend, Then the system should create a new order in the database.
  • Given the order is successfully created, When the order is saved in the database, Then a unique order ID should be generated and returned as part of the response.
  • Given the order creation request contains invalid or missing information, When the request is processed, Then the system should return a clear error message (e.g., missing fields or invalid data).
  • Given the order has been successfully created, When the user requests the status of the order, Then the system should return the current status and details of the order.
  • Given an order is successfully processed, When the payment is completed, Then the system should update the order status to "Paid" and notify the user.

Additional context

No response

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

No branches or pull requests

2 participants