Page tree

Versions Compared

Key

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


MethodURLExample
GET/api/v1/shops/<shopId>/
productTypeDetpartments
productTypeDepartmentshttps://api.spreadshirt.net/api/v1/shops/100488332/
productTypeDetpartments
productTypeDepartments?mediaType=json&fullData=true


This resource is probably only relevant for somewhat generic implementations because it allows them to access a shop's name and localization settingswill 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.


Code Block
languagejs
titleExample Payload
{
   "offset":0,
   "href" : "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":"10048833224",
               "name":"T-Shirts",
               "nameSingular":"T-Shirt",
               "productTypes":[
                  {
        "shop-api-migration-example",
   "descriptionName" : "shop-api-migration-example",
   "country" :
             "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/countriesproductTypes/1875",
                     "id":"875"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/36",
                     "id":"136"
                  }
               ]
            },
   "language" :
         {
               "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/languagesproductTypes/11388",
                     "id":"1388"
                  }
               ]
            },
            {
               "id":"28",
               "1"
"name":"Jackets & Vests",
               },
   "currency" :
"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/currenciesproductTypes/11114",
                     "id":"1114"
                  },
                  {
                     "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypes/644",
                     "id":"1"644"
                  }
               ]
            },
         ]
      },
   ],
   "href":"https://api.spreadshirt.net/api/v1/shops/100488332/productTypeDepartments"
}