https://tenflix-ardianto.web.app/
Request:
- body:
{ "email": "[email protected]", "password": "12345" }
Response (201 - Created)
{
"id": 3,
"email": "[email protected]"
}
Response (400 - Bad Request)
{
"message": string
}
- body:
{ "email": "[email protected]", "password": "12345" }
Response (200 - OK)
{
"access_token": "JWT TOKEN"
}
Response (400 - Bad Request)
{
"message": string
}
- body:
{
"googleToken": "Google Token"
}
Response (200 - OK)
{
"access_token": "JWT TOKEN"
}
Response (400 - Bad Request)
{
"message": string
}
-
Description: To accept response from midtrans and give back 200
-
Header:
{
"authentication": "Bearer <JWT TOKEN>"
}
- body:
{
"transaction_status":string,
"fraud_status":string,
"order_id":string
}
Response (200 - OK)
-
Description: To get midtrans token and create new order
-
Header:
{
"authentication": "Bearer <JWT TOKEN>"
}
- body:
{
"price": 1000,
"title": string,
"movie_id": 1,
"imgUrl": string,
"description": string,
"duration": 0,
}
Response (200 - OK)
{
"response":{
"token": string
}
}
-
Description: To get transaction done by user
-
Header:
{
"authentication": "Bearer <JWT TOKEN>"
}
Response (200 - OK)
[
{
"order_id": string,
"UserId": integer,
"orderTime": date,
"price": number,
"title": string,
"movie_id": number,
"imgUrl": string,
"description": string,
"duration": number,
"trailerUrl": string,
"paymentStatus": string
}
...
]
- Header:
{
"authorization": "Bearer <JWT TOKEN>"
}
- path parameter:
{
"id": 1
}
Response (200 - OK)
{
"id": 1,
"order_id": string,
"UserId": integer,
"orderTime": date,
"price": number,
"title": string,
"movie_id": number,
"imgUrl": string,
"description": string,
"duration": number,
"trailerUrl": string,
"paymentStatus": string
}
Response (404 - Not Found)
{
"message": "Data with id <id> is not found"
}
- Header:
{
"authorization": "Bearer <JWT TOKEN>"
}
- path parameter:
{
"id": 1
}
Response (200 - OK)
{
"order_id": string,
"UserId": integer,
"orderTime": date,
"price": number,
"title": string,
"movie_id": number,
"imgUrl": string,
"description": string,
"duration": number,
"trailerUrl": string,
"paymentStatus": string
}
Response (404 - Not Found)
{
"message": "Data with id <id> is not found"
}
Response (401 - Unauthorized)
{
"message": "Invalid token"
}
Response (500 - Internal Server Error)
{
"message": "Internal server error"
}