Skip to content

ProductType

A product type classifies a product (Album, Single, EP, etc.). This resource is read-only and has no exposed relationships.


Lists ProductTypes

GET https://domain.com/api/v1/product-types

Headers

Name Type Description
Authorization* String Bearer \
Content-Type* String application/vnd.api+json

Response — 200 OK

{
  "data": [
    {
      "type": "product-types",
      "id": "<ID>",
      "attributes": {
        "name": "Album"
      },
      "links": {
        "self": "https://domain.com/api/v1/product-types/<ID>"
      }
    },
    {
      "type": "product-types",
      "id": "<ID>",
      "attributes": {
        "name": "Single"
      },
      "links": {
        "self": "https://domain.com/api/v1/product-types/<ID>"
      }
    },
    {
      "type": "product-types",
      "id": "<ID>",
      "attributes": {
        "name": "EP"
      },
      "links": {
        "self": "https://domain.com/api/v1/product-types/<ID>"
      }
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Filters

Filter Example
Name /product-types?filter[name]=Album
ID /product-types?filter[id]=1,2,3

Get ProductType

GET https://domain.com/api/v1/product-types/:id

Path Parameters

Name Type Description
id* Number ProductType ID

Headers

Name Type Description
Authorization* String Bearer \
Content-Type* String application/vnd.api+json

Response — 200 OK

{
  "data": {
    "type": "product-types",
    "id": "<ID>",
    "attributes": {
      "name": "Album"
    },
    "links": {
      "self": "https://domain.com/api/v1/product-types/<ID>"
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://domain.com/api/v1/product-types/<ID>"
  }
}

Response — 404 Not Found

{
  "jsonapi": {
    "version": "1.0"
  },
  "errors": [
    {
      "status": "404",
      "title": "Not Found"
    }
  ]
}