Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This resource will list all available ProductType Departments of the given shop. It is recommended to use the fullData query parameter to avoid unnecessary requests for each ProductType Department. A Department can be seen as a group of ProductType Categories that themself group one or more ProductTypes. This results in a tree where all leaves are on the 3rd level. You can use this categorization to build a navigation tree or filterfilters.


Code Block
languagejs
titleExample Payload
{
   "offset":0,
   "limit":50,
   "count":1,
   "productTypeDepartments":[
      {
         "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypeDepartments/1",
         "id":"1",
         "lifeCycleState":"ACTIVATED",
         "name":"Men",
         "weight":1.0,
         "categories":[
            {
               "id":"24",
               "name":"T-Shirts",
               "nameSingular":"T-Shirt",
               "productTypes":[
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/812",
                     "id":"812"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/6",
                     "id":"6"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/1183",
                     "id":"1183"
                  },
               ]
            },
            {
               "id":"25",
               "name":"Long sleeve shirts",
               "nameSingular":"Long Sleeve Shirt",
               "productTypes":[
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/1287",
                     "id":"1287"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/875",
                     "id":"875"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/36",
                     "id":"36"
                  }
               ]
            },
            {
               "id":"27",
               "name":"Hoodies & Sweatshirts",
               "nameSingular":"Hoodie",
               "productTypes":[
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/20",
                     "id":"20"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/1388",
                     "id":"1388"
                  }
               ]
            },
            {
               "id":"28",
               "name":"Jackets & Vests",
               "nameSingular":"Jacket",
               "productTypes":[
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/1215",
                     "id":"1215"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/93",
                     "id":"93"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/1114",
                     "id":"1114"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/644",
                     "id":"644"
                  }
               ]
            },
         ]
      },
   ],
   "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypeDepartments"
}

...