https://pokestore-ovzh.onrender.com/
POST
/api/auth/
{
"id": INT,
"first_name": STRING,
"last_name": STRING,
"email": STRING,
"username": STRING,
"address": STRING,
"city": STRING,
"state": STRING,
"zip": INT,
"created_at": DATE,
}
{
'errors': 'Unauthorized'
}
POST
/api/auth/unauthorized
{
'errors': 'Unauthorized'
}
POST
/api/auth/signup
{
"id": INT,
"first_name": STRING,
"last_name": STRING,
"email": STRING,
"username": STRING,
"address": STRING,
"city": STRING,
"state": STRING,
"zip": INT,
"created_at": DATE,
}
{
'errors': ARRAY_OF_STRINGS
}
POST
/api/auth/login
{
"id": INT,
"first_name": STRING,
"last_name": STRING,
"email": STRING,
"username": STRING,
"address": STRING,
"city": STRING,
"state": STRING,
"zip": INT,
"created_at": DATE,
}
{
'errors': ARRAY_OF_STRINGS
}
POST
/api/auth/logout
{
'message': 'User logged Out'
}
{
'errors': 'No session'
}
GET
/api/products/
{
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
}
{
'errors': 'Not Found'
}
GET
/api/products/<int:product_id>
Successful Response: HTTP Status 200
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
}
* Error Response: HTTP Status 404
```python
{
'errors': 'Not Found'
}
GET
/api/cart
{
"id": INTEGER,
"updated_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
}
* Error Response: HTTP Status 404
```python
{
'errors': 'Not Found'
}
Purpose: This fetch will clear all products in the current user's cart.
Method: DELETE
URL: /api/cart/clear
Successful Response: HTTP Status 200
{
"message": "Cleared your cart"
}
Error Response: HTTP Status 404
{
'errors': 'Not Found'
}
Purpose: This fetch will remove a product from the current user's cart based on amount.
Method: PUT
URL: /api/cart/remove/<int:product_id>
Body:
{
'amount': INTEGER
}
Successful Response: HTTP Status 200
{
"message": f"Removed {amount} {product} to your cart"
}
Error Response: HTTP Status 404
{
'errors': 'Not Found'
}
Purpose: This fetch will add a product to the current user's cart based on amount.
Method: PUT
URL: /api/cart/update/<int:product_id>
Body:
{
'amount': INTEGER
}
Successful Response: HTTP Status 200
{
"message": f"Updated {amount} {product} to your cart"
}
Error Response: HTTP Status 404
{
'errors': 'Not Found'
}
Purpose: This fetch will remove all of a product from the current user's cart.
Method: PUT
URL: /api/cart/remove/<int:product_id>/all
Successful Response: HTTP Status 200
{
"message": f"Removed {product} from your cart"
}
Error Response: HTTP Status 404
{
'errors': 'Not Found'
}
Purpose: This fetch will purchase the contents from the current user's cart.
Method: POST
URL: `/api/cart`/purchase
Successful Response: HTTP Status 200
{
"id": INTEGER,
"status": STRING,
"total_cost": INTEGER,
"delivery_date": DATE,
"delivery_address": STRING,
"user_id": INTEGER,
"created_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
}
* Error Response: HTTP Status 404
```python
{
'errors': 'Not Found'
}
GET
/api/lists/
{
[
{
"name": STRING,
"id": INTEGER,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
"updated_at": DATE,
},
...
]
}
{
'errors': 'Not Found'
}
POST
/api/lists/create
{
'name': STRING
}
{
"name": STRING,
"id": INTEGER,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
"updated_at": DATE,
}
{
'errors': 'Not Found'
}
PUT
/api/lists/edit/<int:id>
{
'name': STRING
}
{
"message": "Submitted edit"
}
{
'errors': 'Not Found'
}
PUT
/api/lists/add/<int:id>
{
'product_id': INTEGER
}
{
"messages": f"Added {product} to {list}"
}
{
'errors': 'Not Found'
}
PUT
/api/lists/remove-from-list/<int:id>
{
'product_id': INTEGER
}
{
"message": f"Removed {product} from {list}"
}
{
'errors': 'Not Found'
}
PUT
/api/lists/remove/<int:id>
{
"message": "Successfully deleted the list"
}
{
'errors': 'Not Found'
}
GET
/api/orders/
{
[
{
"id": INTEGER,
"status": STRING,
"total_cost": INTEGER,
"delivery_date": DATE,
"delivery_address": STRING,
"user_id": INTEGER,
"created_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
},
...
]
}
{
'errors': 'Not Found'
}
GET
/api/orders/<int:id>
Successful Response: HTTP Status 200
{
{
"id": INTEGER,
"status": STRING,
"total_cost": INTEGER,
"delivery_date": DATE,
"delivery_address": STRING,
"user_id": INTEGER,
"created_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
}
}
* Error Response: HTTP Status 404
```python
{
'errors': 'Not Found'
}
PUT
/api/orders/<int:id>
{
'status': STRING
}
Successful Response: HTTP Status 200
{
{
"id": INTEGER,
"status": STRING,
"total_cost": INTEGER,
"delivery_date": DATE,
"delivery_address": STRING,
"user_id": INTEGER,
"created_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
}
}
* Error Response: HTTP Status 404
```python
{
'errors': 'Not Found'
}
DELETE
/api/orders/<int:id>/cancel
{
"message": "Order cancelled"
}
{
'errors': 'Not Found'
}
GET
/api/reviews/<int:id>
{
"id": INTEGER,
"name": STRING,
"description": STRING,
"updated_at": DATE,
"product_id": DATE,
"owner":
{
"id": INTEGER,
"username": STRING,
"first_name": STRING,
"last_name": STRING,
},
"rating": INTEGER,
}
{
'errors': 'Not Found'
}
GET
/api/reviews/<int:product_id>
Successful Response: HTTP Status 200
{
[
{
"id": INTEGER,
"status": STRING,
"total_cost": INTEGER,
"delivery_date": DATE,
"delivery_address": STRING,
"user_id": INTEGER,
"created_at": DATE,
"products":
[
{
"category": STRING,
"description": STRING,
"effect": STRING,
"id": INTEGER,
"image": STRING,
"name": STRING,
"price": INTEGER,
},
...
]
},
...
]
}
{
'errors': 'Not Found'
}
PUT
/api/reviews/<int:id>/edit
{
"name": STRING,
"description": STRING,
"rating": INTEGER
}
{
"messagese": "Updated review"
}
{
'errors': 'Not Found'
}
DELETE
/api/reviews/<int:id>/delete
{
"message": "Review has been deleted"
}
{
'errors': 'Not Found'
}