How to hit the DummyJSON API

DummyJSON at https://dummyjson.com is a fake REST API with products, carts, users, posts, and more — plus fake auth that issues real-looking JWTs. Writes are simulated, never saved.

Authentication

None for data. The /auth/login endpoint returns fake tokens for testing login flows, using the sample users' usernames and passwords.

Full reference: https://dummyjson.com/docs

Get a product

curl https://dummyjson.com/products/1
Run in PostTaco
Example response (trimmed)
{
  "id": 1,
  "title": "Essence Mascara Lash Princess",
  "description": "The Essence Mascara Lash Princess is a popular mascara known for its volumizing and lengthening effects. Achieve dramatic lashes with this long-lasting and cruelty-free formula.",
  "category": "beauty",
  "price": 9.99,
  "discountPercentage": 10.48,
  "rating": 2.56,
  "stock": 99,
  "tags": [
    "beauty",
    "mascara"
  ],
  "brand": "Essence",
  "sku": "BEA-ESS-ESS-001",
  "weight": 4,
  "dimensions": {
    "width": 15.14,
    "height": 13.08,
    "depth": 22.99
  },
  "warrantyInformation": "1 week warranty",
  "shippingInformation": "Ships in 3-5 business days"
}

Add a product (simulated)

Returns the new object with an id; nothing is stored.

curl -X POST https://dummyjson.com/products/add \
  -H "Content-Type: application/json" \
  -d '{"title": "Taco Truck"}'
Run in PostTaco
Example response (trimmed)
{
  "id": 195,
  "title": "Taco Truck"
}

Log in (fake JWT)

Uses one of DummyJSON's sample users.

curl -X POST https://dummyjson.com/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "emilys", "password": "emilyspass"}'
Run in PostTaco
Example response (trimmed)
{
  "id": 1,
  "username": "emilys",
  "email": "[email protected]",
  "firstName": "Emily",
  "lastName": "Johnson",
  "gender": "female",
  "image": "https://dummyjson.com/icon/emilys/128"
}