Skip to content

sebastianmontandon/API-Shoes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API with FastApi

Description:

In this case im try FastApi Framework to practice, with a API make it to administrate shoes with CRUD

All endpoint:

1- Create

Endpoint:

POST
https://api-url.test/shoes

Body(aplication/json):

{
    "sku": "E0Q1L7XW",
    "name": "NMD_R1 PRIMEBLUE SHOES",
    "description": "Description",
    "size": ["5","5.5","6","6.5","7"],
    "availability": true,
    "price": 160,
    "reviews": "Nice too",
    "images": []
}

Response:

{
    "http status": 201
}

2- Read/List

Endpoint:

GET
https://api-url.test/shoes

Response:

[
    {
        "id": "_id",
        "sku": "E0Q1L7XW",
        "name": "NMD_R1 PRIMEBLUE SHOES",
        "size": ["5","5.5","6","6.5","7"],
        "availability": true,
        "price": 160,
        "reviews": ["Nice too"],
        "images": []
    }
]

3- Update

Endpoint:

PUT
https://api-url.test/shoes

Body(aplication/json):

{
    "id": "642a3b13ac850b27cecdf81e",
    "sku": "E0Q1L7XW",
    "name": "NMD_R1 PRIMEBLUE SHOES",
    "description": "Pack your bag, lace up and get going. City adventures beckon in these NMD_R1 shoes.",
    "size": ["5","5.5","6","6.5","7"],
    "availability": true,
    "price": 260,
    "reviews": "Nice too",
    "images": []
}

Response:

{
    "http status": 202
}

4- Delete

Endpoint:

DELETE
https://api-url.test/shoes/${id}

Response:

{
    "http status": 204
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages