Munchies User Service API (1.0)

Download OpenAPI specification:

Lightweight diagnostic endpoint that exercises the payment client.

Lightweight diagnostic endpoint that exercises the payment client. This method is not part of the user API contract. It appears to be a temporary or debugging-oriented endpoint that invokes the payment service with placeholder data and returns the raw payment response.

Responses

Response samples

Content type
application/json
{
  • "amount": 0,
  • "currency": "USD",
  • "paymentId": "string",
  • "status": "PENDING"
}

Login a user

Authenticates a user with the provided email and password.

Request Body schema: application/json
required

Login payload containing identifier (`email` or `username`) and `password`.

email
required
string
password
required
string
username
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": {
    }
}

Register a new user

Registers a new user with the provided information and credentials.

Request Body schema: application/json
required

Registration payload containing user data and credentials data.

hashedPassword
required
string
saltValue
required
string
required
object (UserDTO)

Responses

Request samples

Content type
application/json
{
  • "hashedPassword": "string",
  • "saltValue": "string",
  • "user": {
    }
}

Update user info

Updates the profile information for a user.

Request Body schema: application/json
required

Payload containing the updated user profile information.

required
object (UserDTO)

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": "string",
  • "msg": "string"
}

Update user password

Updates the password for a user with the provided old and new passwords.

Request Body schema: application/json
required

Password update payload containing user, old password, and new password.

email
required
string
id
required
string
newPassword
required
string
oldHashedPassword
required
string
username
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "id": "string",
  • "newPassword": "string",
  • "oldHashedPassword": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": "string",
  • "msg": "string"
}

Confirm a user's email address

The user inputs a specific otk received in the email

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": "string",
  • "msg": "string"
}

Get user by id

Retrieves a user by their unique identifier.

path Parameters
id
required
string

The user identifier received from the path.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": {
    }
}

Deletes a user.

Deletes a user from an id

path Parameters
id
required
string

The user identifier from the path.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "result": {
    },
  • "user": {
    }
}