E-CommerceSquare Eyes

Square Eyes

These endpoints allow you to retrieve all products, or a single product by its id. The response will be an array of JSON objects if you request all products, or a single JSON object if you request a single product.

The Square Eyes model

PropTypeDefault
id
string
-
title
string
-
description
string
-
genre
string
-
rating
string
-
released
string
-
price
float
-
discountedPrice
float
-
onSale
boolean
-
image
object
-
tags
Array<string>
-
favorite
boolean
-

All products

GET/square-eyes

Retrieve all products.

Response
{
  "data": [
    {
      "id": "352ba432-5b5d-4ccc-9aba-f2704c500cf3",
      "title": "Hobbs & Shaw",
      "description": "Lawman Luke Hobbs (Dwayne 'The Rock' Johnson) and outcast Deckard Shaw (Jason Statham) form an unlikely alliance when a cyber-genetically enhanced villain threatens the future of humanity.",
      "genre": "Action",
      "rating": "6.5",
      "released": "2019",
      "price": 129.99,
      "discountedPrice": 119.99,
      "onSale": true,
      "image": {
        "url": "https://static.cloud.noroff.dev/api/square-eyes/0-hobbs-and-shaw.jpg",
        "alt": "A movie poster for the film Hobbs & Shaw"
      },
      "tags": ["gamehub", "game"],
      "favorite": true
    },
    {
      "id": "4696b9e6-ec6e-4672-a08d-3e3212a215c8",
      "title": "Godzilla: King of the Monsters",
      "description": "The crypto-zoological agency Monarch faces off against a battery of god-sized monsters, including the mighty Godzilla, who collides with Mothra, Rodan, and his ultimate nemesis, the three-headed King Ghidorah.",
      "genre": "Action",
      "rating": "9",
      "released": "2019",
      "price": 109.99,
      "discountedPrice": 109.99,
      "onSale": false,
      "image": {
        "url": "https://static.cloud.noroff.dev/api/square-eyes/1-godzilla-king-of-monsters.jpg",
        "alt": "A movie poster for the film Godzilla: King of the Monsters"
      },
      "tags": ["gamehub", "game"],
      "favorite": true
    }
    // ...
  ],
  "meta": {
    "isFirstPage": true,
    "isLastPage": true,
    "currentPage": 1,
    "previousPage": null,
    "nextPage": null,
    "pageCount": 1,
    "totalCount": 2
  }
}

Single product

GET/square-eyes/<id>

Retrieve a single product by its id.

Response
{
  "data": {
    "id": "352ba432-5b5d-4ccc-9aba-f2704c500cf3",
    "title": "Hobbs & Shaw",
    "description": "Lawman Luke Hobbs (Dwayne 'The Rock' Johnson) and outcast Deckard Shaw (Jason Statham) form an unlikely alliance when a cyber-genetically enhanced villain threatens the future of humanity.",
    "genre": "Action",
    "rating": "6.5",
    "released": "2019",
    "price": 129.99,
    "discountedPrice": 119.99,
    "onSale": true,
    "image": {
      "url": "https://static.cloud.noroff.dev/api/square-eyes/0-hobbs-and-shaw.jpg",
      "alt": "A movie poster for the film Hobbs & Shaw"
    },
    "tags": ["gamehub", "game"],
    "favorite": true
  },
  "meta": {}
}