Inventory Resources

This document specifies the API for accessing inventory data.

Resources Inventory

Retrieve Shop FontFamily List

Url .../v1/shops/{shopId}/fontFamilies
Sample http://api.spreadshirt.net/api/v1/shops/40000/fontFamilies
Type LIST
Method GET
Special Status Codes  

Response Representation:

<fontFamilies ...>
...
</fontFamilies>

See Font Family Representation

Retrieve Shop FontFamily Entity

Url .../v1/shops/{shopId}/fontFamilies/{fontFamilyId}
Sample http://api.spreadshirt.net/api/v1/shops/40000/fontFamilies/5
Type ENTITY
Method GET
Special Status Codes  

Response Representation:

<fontFamily ...>
    ...
</fontFamily>

See Font Family Representation

Retrieve Shop PrintTypes List

Url .../v1/shops/{shopId}/printTypes
Sample http://api.spreadshirt.net/api/v1/shops/40000/printTypes
Type LIST
Method GET
Special Status Codes  

Response Representation:

<printTypes ...>
  ...
</printTypes

See Print Type Representation

Retrieve Shop PrintType Entity

Url .../v1/shops/{shopId}/printTypes/{printTypeId}
Sample http://api.spreadshirt.net/api/v1/shops/40000/printTypes/5
Type ENTITY
Method GET
Special Status Codes  

Response Representation:

<printType ...>
   ...
</printType>

See Print Type Representation

Retrieve Shop ProductTypeDepartment List

Url .../v1/shops/{shopId}/productTypeDepartments
Sample http://api.spreadshirt.net/api/v1/shops/40000/productTypeDepartments
Type LIST
Method GET
Special Status Codes  

Response Representation:

<productTypeDepartments ...>
  ...
</productTypeDepartments>

See Product Type Department Representation

Retrieve Shop ProductTypeDepartment Entity

Url .../v1/shops/{shopId}/productTypeDepartments/{productTypeDepartmentId}
Sample http://api.spreadshirt.net/api/v1/shops/40000/productTypeDepartments/1
Type ENTITY
Method GET
Special Status Codes  

Response Representation:

<productTypeDepartment ...>
   ...
</productTypeDepartment>

See Product Type Department Representation

Retrieve Shop ProductType List

Url .../v1/shops/{shopId}/productTypes
Sample http://api.spreadshirt.net/api/v1/shops/40000/productTypes
Type LIST
Method GET
Special Status Codes  

Response Representation:

<productTypes ...>
  ..
</productTypes>

See Product Type Representation

Retrieve Shop ProductType Entity

Url .../v1/shops/{shopId}/productTypes/{productTypeId}
Sample http://api.spreadshirt.net/api/v1/shops/40000/productTypes/15
Type ENTITY
Method GET
Special Status Codes  

Response Representation:

<productType ...>
    ...
</productType>

See Product Type Representation

Retrieve Shop ProductType StockState List

Url .../v1/shops/{shopId}/productTypes/{productTypeId}/stockStates
Sample http://api.spreadshirt.net/api/v1/shops/205909/productTypes/6/stockStates
Type LIST
Method GET
Special Status Codes  
APIKey false
SessionId false

*Response Representation:*

<stockStates ...>
   ...
</stockStates>

See StockState Representation

Retrieve User FontFamily List

Url .../v1/users/{userId}/fontFamilies
Sample http://api.spreadshirt.net/api/v1/users/40000/fontFamilies
Type LIST
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<fontFamilies ...>
  ...
</fontFamilies>

See Font Family Representation

Retrieve User FontFamily Entity

Url .../v1/users/{userId}/fontFamilies/{fontFamilyId}
Sample http://api.spreadshirt.net/api/v1/users/40000/fontFamilies/5
Type ENTITY
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<fontFamily ...>
    ...
</fontFamily>

See Font Family Representation

Retrieve User PrintTypes List

Url .../v1/users/{userId}/printTypes
Sample http://api.spreadshirt.net/api/v1/users/40000/printTypes
Type LIST
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<printTypes ...>
  ...
</printTypes

See Print Type Representation

Retrieve User PrintType Entity

Url .../v1/users/{userId}/printTypes/{printTypeId}
Sample http://api.spreadshirt.net/api/v1/users/40000/printTypes/5
Type ENTITY
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<printType ...>
   ...
</printType>

See Print Type Representation

Retrieve User ProductTypeDepartment List

Url .../v1/users/{userId}/productTypeDepartments
Sample http://api.spreadshirt.net/api/v1/users/40000/productTypeDepartments
Type LIST
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<productTypeDepartments ...>
  ...
</productTypeDepartments>

See Product Type Department Representation

Retrieve User ProductTypeDepartment Entity

Url .../v1/users/{userId}/productTypeDepartments/{productTypeDepartmentId}
Sample http://api.spreadshirt.net/api/v1/users/40000/productTypeDepartments/1
Type ENTITY
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<productTypeDepartment ...>
   ...
</productTypeDepartment>

See Product Type Department Representation

Retrieve User ProductType List

Url .../v1/users/{userId}/productTypes
Sample http://api.spreadshirt.net/api/v1/users/40000/productTypes
Type LIST
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<productTypes ...>
  ..
</productTypes>

See Product Type Representation

Retrieve User ProductType Entity

Url .../v1/users/{userId}/productTypes/{productTypeId}
Sample http://api.spreadshirt.net/api/v1/users/40000/productTypes/15
Type ENTITY
Method GET
Special Status Codes  
APIKey true
SessionId true

Response Representation:

<productType ...>
    ...
</productType>

See Product Type Representation

Representations

FontFamily

Field
Description
fontFamily
Represents a font family on our platform.
fontFamily/@weight
The weight of the fontFamily in a list. Used for sorting fontFamilies in a list.
fontFamily/name
The name of the fontFamily that should be used when displaying fonts in a web app.
fontFamily/deprecated
The deprecated flag tells you, whether this font can be used for creating new products or whether it is only allowed to use this fontFamily for displaying existing products. Will be checked on product creation, so stick to the rules!
fontFamily/printTypes
List of references to print types that can be used to print text with this fontFamily on product types.
fontFamily/printTypes/printType
 
fontFamily/fonts
List of fonts that belong to that fontFamily. Fonts means combinations of normal, bold and italic fonts.
fontFamily/fonts/font
Represents a font that can be used to print text on a product type.
fontFamily/fonts/font/name
The name of the font that can be used when creating new products. Please note, the font name matches the fontFamily attribute of SVG!
fontFamily/fonts/font/weight
Weight of the font tells you whether this is a normal or a bold font.
fontFamily/fonts/font/style
Style of the font tells you whether this is a normal or a italic font.
fontFamily/fonts/font/minimalSize
The minimal size in which that font can be printed on product types in points (pt). Will be checked on product creation so stick to the rules please!
fontFamily/fonts/font/resources
List of connected resources (aka images). Use the links in case you need to retrieve the swf font data for rendering fonts in Adobe Flash. Please note that we can't provide ttf files here for legal reasons.
fontFamily/fonts/font/resources/resource
 

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fontFamily xmlns:xlink="http://www.w3.org/1999/xlink"            
            xmlns="http://api.spreadshirt.net"            
            weight="2.0"
            xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/fontFamilies/25"
            id="25">
        <name>American Typewriter</name>
        <printTypes>
            <printType xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes/19" id="19"/>
            ...
        </printTypes>
        <fonts>
            <font id="46">
                <name>AmerType</name>
                <weight>normal</weight>
                <style>normal</style>
                <minimalSize>21.1667</minimalSize>
                <resources>
                    <resource xlink:href="http://image.spreadshirt.net/image-server/v1/fontFamilies/25/fonts/46" mediaType="swf"/>
                </resources>
            </font>
        </fonts>
        <deprecated>false</deprecated>
    </fontFamily>

PrintType

Field
Description
printType
Represents a print type on our platform that is used when printing text or designs on product types.
printType/@weight
The weight of the print type in a list. Used for sorting print types in a list.
printType/name
The i18n name of the print type that can be used for displaying that print type in a web app.
printType/description
The i18n description of the print type.
printType/size
The maximum size in which on color layer of a design or text can be printed on a product type in mm. Will be checked on product creation so stick to the rules please!
printType/dpi
The resolution in which designs and text will be printed on product types.
printType/colors
List of colors that this print type provides for print types with color space print_colors, e.g. for flock and flex print.
printType/colors/color
A color configured for the print type.
printType/colors/color/@weight
The weight of the print color in the list. Used for sorting print colors in a list.
printType/colors/color/@id
The identifier of the print color.
printType/colors/color/name
The i18n name of the print color.
printType/colors/color/fill
The rgb color of the print type, e.g. #000000.
printType/colors/color/price
The price of the print color in the currency of the shop. Price must be payed when using it.
printType/colors/color/restrictions
The restrictions tell you how the usage of the print color is restricted in context with other print types and print colors.
printType/colors/color/restrictions/printableAbovePrintColors
List of print colors on which the current print color can be printed in case you have different color layers of different text for example that is printed above each other.
printType/colors/color/restrictions/printableAbovePrintColors/printableAbovePrintColor
 
printType/colors/color/resources
List of connected resources (aka images). Use the links in case you need to display an image for the print color.
printType/colors/color/resources/resource
 
printType/restrictions
The restrictions tell you how the usage of the print type is restricted in context with other print types.
printType/restrictions/colorSpace
The color space defines, with which colors you can print on product types with this print type.
  • rgb - RGB means you can use all colors from rgb space. Use rgb values, such as #000000 in SVG.
  • cmyk - CMYK means you can use all colors from cmyk space. Use rgb values, such as #000000 in SVG.
  • print_colors - Print colors you can use the print colors configured for this print type only. Use print color ids, such as 5 in SVG.
printType/restrictions/whiteSupported
Is true if white can be printed with this print type.
printType/restrictions/transparencySupported
Is true if transparency can be printed with this print type.
printType/restrictions/scaleability
 
printType/restrictions/printableAlongWithPrintTypes
Print types that can also be used for printing other text or design on the print area when printing text or design with this print area. Reason is that you can't print on product types with arbitrary print steps because the mechanical wear of the product type.
printType/restrictions/printableAlongWithPrintTypes/printableAlongWithPrintType
 
printType/restrictions/printableAbovePrintTypes
Print types with which text and design can be printed above text and designs printed with this print type. Reason is that different print types don't work well together when washing it several times.
printType/restrictions/printableAbovePrintTypes/printableAbovePrintType
 
printType/restrictions/maxPrintColorLayers
The maximum number of print color layers that can be printed above each other.
printType/price
The price of the print type in the currency of the shop. Price that must be payed when using it.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<printType xmlns:xlink="http://www.w3.org/1999/xlink"           
           xmlns="http://api.spreadshirt.net"           
           weight="4.0"
           xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes/14"
           id="14">
        <name>Flex Print</name>
        <description>Print Technology: With flex printing, a large computerised blade is used to cut designs out of a smooth, thin material. This design is then pressed onto the fabric, using high pressure and temperatures. This print type is suitable for almost all fabric types and due to its sleek and shiny surface, looks and feels amazing.
Nylon flex retains its colours long throughout a life of regular washing at 40°C. As with all printed fabrics, please wash and iron inside-out.</description>
        <size unit="mm">
            <width>301.0</width>
            <height>301.0</height>
        </size>
        <dpi>120.0</dpi>
        <colors>
            <color weight="1.0" id="13">
                <name>black</name>
                <fill>#000000</fill>
                <price>
                    <vatExcluded>2.50</vatExcluded>
                    <vatIncluded>2.50</vatIncluded>
                    <vat>0</vat>
                    <currency xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1"/>
                </price>
                <restrictions>
                    <canOverlap>true</canOverlap>
                    <printableAbovePrintColors>
                        <printableAbovePrintColor id="12"/>
                        ...
                    </printableAbovePrintColors>
                </restrictions>
                <resources>
                    <resource xlink:href="http://image.spreadshirt.net/image-server/v1/printColors/13" mediaType="png"/>
                </resources>
            </color>
        </colors>
        <restrictions>
            <colorSpace>print_colors</colorSpace>
            <whiteSupported>true</whiteSupported>
            <transparencySupported>true</transparencySupported>
            <canOverlap>true</canOverlap>
            <scaleability>enlargeable</scaleability>
            <printableAlongWithPrintTypes>
                <printableAlongWithPrintType xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes/2" id="2"/>
                ...
            </printableAlongWithPrintTypes>
            <printableAbovePrintTypes>
                <printableAbovePrintType xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes/14" id="14"/>
                ...
            </printableAbovePrintTypes>
            <maxPrintColorLayers>3</maxPrintColorLayers>
        </restrictions>
        <price>
            <vatExcluded>0.50</vatExcluded>
            <vatIncluded>0.50</vatIncluded>
            <vat>0</vat>
            <currency xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1"/>
        </price>
    </printType>

ProductTypeDepartment

Field Description
productTypeDepartment
Represents a product type department on the platform, e.g. man, woman, kids.
productTypeDepartment/@weight
The weight of the department in a list. Used for sorting departments in a list.
productTypeDepartment/name
The i18n name of the department.
productTypeDepartment/categories
List of product type categories assigned to the department.
productTypeDepartment/categories/category
Represents one product type category to which product types are assigned.
productTypeDepartment/categories/category/@id
The identifier of the category.
productTypeDepartment/categories/category/name
The i18n name of the category.
productTypeDepartment/categories/category/productTypes
List of product types assigned to this category.
productTypeDepartment/categories/category/productTypes/productType
 

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<productTypeDepartment xmlns:xlink="http://www.w3.org/1999/xlink"
                       xmlns="http://api.spreadshirt.net"
                       weight="1.0"
                       xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/productTypeDepartments/1"
                       id="1">
    <name>Men</name>
    <categories>
        <category id="24">
            <name>Men's T-Shirts</name>
            <productTypes>
                <productType xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/productTypes/6" id="6"/>
                ...
            </productTypes>
        </category>
        ...
    </categories>
</productTypeDepartment>

ProductType

Field Description
productType
Represents a product type on the platform, e.g. a shirt you can print on.
productType/@weight
The weight of the product type in a list. Used for sorting product types in a list.
productType/name
The i18n name of the product type.
productType/description
The i18n description of the product type.
productType/brand
The brand of this product type, e.g. american apparel.
productType/discountSupported Defines whether this product type or articles/products based on this product type are included into basket discount calculation.
productType/price
The price of the product type in the currency of the shop.
productType/defaultValues
Default values for product type display or display of products or articles created based on it.
productType/defaultValues/defaultView
The default view of the product type, e.g. front or back.
productType/defaultValues/defaultAppearance
The default appearance (aka color) of the product type, e.g. white or red.
productType/appearances
List of appearances (aka colors) in which this product type is available, e.g. white or red.
productType/appearances/appearance
A specific appearance (pattern/ color combination) of this product type.
productType/appearances/appearance/@id
The identifier of the appearance.
productType/appearances/appearance/name
The i18n name of the appearance.
productType/appearances/appearance/colors
List of rgb colors that ar present on this appearance. Could be one color or multiple colors for camouflage for example.
productType/appearances/appearance/colors/color
Representation of one color assigned to the appearance.
productType/appearances/appearance/colors/color/@index
 
productType/appearances/appearance/printTypes
List of print types that can be used to print on this appearance. Different print types might be allowed for white or black product types for example.
productType/appearances/appearance/printTypes/printType
 
productType/appearances/appearance/resources
List of connected resources (aka images). Use the links in case you need to display appearance selectors in you web application for example.
productType/appearances/appearance/resources/resource
 
productType/sizes
List of sizes in which this product type is available.
productType/sizes/size
Represents on product type size.
productType/sizes/size/@id
The identifier of the product type size.
productType/sizes/size/name
The i18n name of the product type size, e.g. XL.
productType/views
List of views that are available for the product type, i.e. perspectives from which a customer can look at the product type.
productType/views/view
Represents on view of the product type.
productType/views/view/@id
The identifier of the view.
productType/views/view/name
The name of the view, e.g. front or back.
productType/views/view/size
The size of the view in mm.
productType/views/view/perspective
The identifier of the viewers perspective for that view:
  • front
  • back
  • left
  • right
  • hood_right
  • hood_left
productType/views/view/viewMaps
List of view maps that map one to n print areas to the view.
productType/views/view/viewMaps/viewMap
Represent a view map that maps one print area to the view.
productType/views/view/viewMaps/viewMap/printArea
Reference to the print area that is mapped on the view.
productType/views/view/viewMaps/viewMap/offset
 
productType/views/view/viewMaps/viewMap/printAreaClippingShape A shape definition that describes which part of the linked print area is actually mapped to the view. See Shape for further details.
productType/views/view/viewMaps/viewMap/transformations
A list of SVG transform statements. See SVG Transform Specification .
productType/views/view/resources
List of connected resources (aka images). Use the links in case you need to display an image for a product type view or as template to do so.
productType/views/view/resources/resource
 
productType/printAreas
List of print areas assigned to this product type.
productType/printAreas/printArea
A print area is an area on the product type on which text and designs can be printed.
productType/printAreas/printArea/@id
The identifier of the print area.
productType/printAreas/printArea/appearanceColorIndex
Defines which of the colors defined in the appearance is below this print area.
productType/printAreas/printArea/defaultView
The default view on which this print area belongs to. Reason is that a print area might be visible from different perspectives, e.g. a print area on a shirt arm is visible from front as well as from left.
productType/printAreas/printArea/restrictions
The restrictions tell you how the usage of the print area is restricted.
productType/printAreas/printArea/restrictions/excludedPrintTypes
List of print types that can't be used on this specific print area. Think on a white shirt with black arms.
productType/printAreas/printArea/restrictions/excludedPrintTypes/excludedPrintType
 
productType/printAreas/printArea/boundary
Describes the boundaries of the print area.
productType/printAreas/printArea/boundary/size
The size of the print area in mm.
productType/printAreas/printArea/boundary/hard
The hard boundary describes the area inside which designs and text can be placed. No design or text can be placed outside this boundary. See Shape for further details.
productType/printAreas/printArea/boundary/soft
The soft boundary describes the areas inside the hard boundary on which can not be printed (buttons, zipper). In case you place design or text there, soft boundary areas will be cut out. See Shape for further details.
productType/stockStates
List of stock states (aka availability information) that describe in which appearance size combinations the product type is available.
productType/resources
List of connected resources (aka images). Use the links in case you need to display product type images.
productType/resources/resource
 

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<productType xmlns:xlink="http://www.w3.org/1999/xlink"
             xmlns="http://api.spreadshirt.net"
             weight="0.0"
             xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/productTypes/101"
             id="101">
    <name>Women's AA Long Sleeve Hoodie</name>
    <description>This modern long sleeve shirt with hoodie from American Apparel is the idea top when it is too warm for a sweatshirt, yet too cold for a t-shirt. It is made from 100% cotton, is form-fitting and has a comfortable fabric weight of 207g/m².</description>
    <brand>american_apparel</brand>
    <discountSupported>true</discountSupported>
    <price>
        <vatExcluded>21.90</vatExcluded>
        <vatIncluded>21.90</vatIncluded>
        <vat>0</vat>
        <currency xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1"/>
    </price>
    <defaultValues>
        <defaultView id="1"/>
        <defaultAppearance id="1"/>
    </defaultValues>
    <appearances>
        <appearance id="1">
            <name>white</name>
            <colors>
                <color index="0">#FFFFFF</color>
            </colors>
            <printTypes>
                <printType xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes/2" id="2"/>
                ...
            </printTypes>
            <resources>
                <resource xlink:href="http://image.spreadshirt.net/image-server/v1/appearances/1" mediaType="png"/>
            </resources>
        </appearance>
        ...
    </appearances>
    <sizes>
        <size id="2">
            <name>S</name>
        </size>
        ...
    </sizes>
    <views>
        <view id="1">
            <name>Front</name>
            <size unit="mm">
                <width>784.1234840132304</width>
                <height>784.1234840132304</height>
            </size>
            <perspective>front</perspective>
            <montage>
                <backgroundImage>true</backgroundImage>
            </montage>
            <viewMaps>
                <viewMap>
                    <printArea id="170"/>
                    <offset unit="mm">
                        <x>229.636</x>
                        <y>98.0154</y>
                    </offset>
                </viewMap>
            </viewMaps>
            <resources>
                <resource xlink:href="http://image.spreadshirt.net/image-server/v1/productTypes/101/views/1/appearances/1" mediaType="png"/>
            </resources>
        </view>
        ...
    </views>
    <printAreas>
        <printArea id="170">
            <appearanceColorIndex>0</appearanceColorIndex>
            <defaultView id="1"/>
            <restrictions>
                <textAllowed>true</textAllowed>
                <designAllowed>true</designAllowed>
                <excludedPrintTypes/>
            </restrictions>
            <boundary>
                <size unit="mm">
                    <width>327.6515986706</width>
                    <height>565.6890848756</height>
                </size>
                <hard>
                   <content unit="mm">
                      <svg>
                         <rect .../>
                      </svg>
                   </content>
                </hard>
                <soft>
                   <content unit="mm">
                      <svg>
                         <path .../>
                      </svg>
                   </content>
                </soft>
            </boundary>
        </printArea>
        ...
    </printAreas>
    <stockStates>        
       ...
    </stockStates>
    <resources>
        <resource xlink:href="http://image.spreadshirt.net/image-server/v1/productTypes/101/views/1/appearances/1,width=42,height=42" type="preview" mediaType="png"/>
        <resource xlink:href="http://image.spreadshirt.net/image-server/v1/productTypes/101/variants/size" type="size" mediaType="png"/>
        <resource xlink:href="http://image.spreadshirt.net/image-server/v1/productTypes/101/variants/detail" type="detail" mediaType="png"/>
    </resources>
</productType>

StockState

Field Description
stockState
Represents on stock state for the product type.
stockState/appearance
Reference to the appearance in which the product type is available.
stockState/size
Reference to the size in which the product type is available.
stockState/available
Availability information for the appearance/ size combination.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<stockState xmlns:xlink="http://www.w3.org/1999/xlink"
             xmlns="http://api.spreadshirt.net">
   <appearance id="1"/>
   <size id="2"/>
   <available>true</available>
</stockState>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.