Shop Resources

This document specifies the API of the shop service, that allows to retrieve shop data and manage shops.

Resources

Retrieve User Shop List

This resource returns the shops that the user with the given user Id owns.

Url .../v1/users/{userId}/shops
Sample http://api.spreadshirt.net/api/v1/users/40000/shops
Type List
Method GET
Special Status Codes  

Response Representation:

<shops ...>
    ...
</shops>

See Shop Representation

Retrieve Shop Entity

This resource returns the data for a Spreadshirt platform shop. It is the entry point in case you want to work in the shop context on the platform. So please use the references provided with the user data to access user related entities, such as user products. Don't hard code any URLs into your source code!

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

Response Representation:

<shop ...>
   ...
</shop>

See Shop Representation

Retrieve Shop Address

Returns the default shop address.

Url .../v1/shops/{shopId}/address
Sample http://api.spreadshirt.net/api/v1/shops/205909/address
Type ENTITY
Method GET
Special Status Codes  
APIKey false
SessionId false

Response Representation:

<address ...>
   ...
</address>

See Address Representation

Retrieve Shop Application Entity

Url .../v1/shops/{shopId}/applications/{applicationId}
Sample http://api.spreadshirt.net/api/v1/shops/205909/applications/1
Type Entity
Method GET
Special Status Codes  

Payload:

<application ...>
   ...
</application>

See Application Representation

Retrieve Shop Applications List

Url .../v1/shops/{shopId}/applications
Sample http://api.spreadshirt.net/api/v1/shops/205909/applications
Type List
Method GET
Special Status Codes  

Payload:

<applications...>
    <application...>
        <!-- see payload below -->
    </application>
    ...
</applications>

See Application Representation

Representations

Shop

Field Description
shop
Representation of a platform shop.
shop/name
The name of that shop on the platform, e.g. demoshop.
shop/user
Returns a reference of the user that owns that shop.
shop/country
The country configured for this shop.
shop/language
The language configured for this shop.
shop/currency
The currency configured for this shop.
shop/address The default shop address, e.g. for impress.
shop/passwordRestricted Tells you whether this shop is password protected.
shop/hidden Tells you whether this shop is hidden.
shop/discountSupported Defines whether articles/products of this shop are included into basket discount calculation.
shop/discountScale Reference to the default discount scale of this shop.
shop/defaultShippingType Reference to the default shipping type.
shop/productTypes
Reference to the shop's product types.
shop/printTypes
Reference to the shop's print types.
shop/fontFamilies
Reference to the shop's font families.
shop/productTypeDepartments
Reference to the shop's product type departments.
shop/designCategories
Reference to the shop's design categories.
shop/designs
Reference to the shop's designs.
shop/articleCategories
Reference to the shop's article categories.
shop/articles
Reference to the shop's articles.
shop/products
Reference to the shop's products.
shop/currencies
Reference to the platform currencies.
shop/languages
Reference to the platform languages.
shop/countries
Reference to the platform countries.
shop/baskets
Reference to the platform baskets.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shop xmlns:xlink="http://www.w3.org/1999/xlink" 
      xmlns="http://api.spreadshirt.net" 
      xlink:href="http://api.spreadshirt.net/api/v1/shops/205909" id="205909">
    <name>demoshop</name>
    <user xlink:href="http://api.spreadshirt.net/api/v1/users/40000" id="40000"/>
    <country xlink:href="http://api.spreadshirt.net/api/v1/countries/1" id="1"/>
    <language xlink:href="http://api.spreadshirt.net/api/v1/languages/1" id="1"/>
    <currency xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1"/>


    <address xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/address"/>
    <passwordRestricted>false</passwordRestricted>
    <hidden>true</hidden>
    <discountSupported>true</discountSupported>
    <discountScale id="1" xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/discountScales/1"/>
    <defaultShippingType id="1"/>

    <productTypes xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/productTypes"/>
    <printTypes xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/printTypes"/>
    <fontFamilies xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/fontFamilies"/>
    <productTypeDepartments xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/productTypeDepartments"/>
    <designCategories xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/designCategories"/>
    <designs xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/designs"/>
    <articleCategories xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/articleCategories"/>
    <articles xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/articles"/>
    <products xlink:href="http://api.spreadshirt.net/api/v1/shops/205909/products"/>
    <currencies xlink:href="http://api.spreadshirt.net/api/v1/currencies"/>
    <languages xlink:href="http://api.spreadshirt.net/api/v1/languages"/>
    <countries xlink:href="http://api.spreadshirt.net/api/v1/countries"/>
    <baskets xlink:href="http://api.spreadshirt.net/api/v1/baskets"/>
</shop>

Application

Field Description
application Representation of a shop application.
application/name Name of the application.
application/properties Application specific properties.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns:xlink="http://www.w3.org/1999/xlink" 
      xmlns="http://api.spreadshirt.net" 
      xlink:href="http://api.spreadshirt.net/api/v1/shops/591997" 
      id="1">
    <name>confomat7</name>
    <properties>
    	<property key="uploadMode">communityMode</property>
    	<property key="showProductTypeGallery">true</property>
    	<property key="showAddText">true</property>
    	<property key="showDesignGallery">true</property>
        <property key="showDesignSearch">true</property>
        <property key="showDesignUpload">true</property>        
        <property key="showMarketplaceDesigns">true</property>
    </properties>
    ...
</application>

Address

Example: 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<address xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns="http://api.spreadshirt.net"
         type="private">
    <company>BITBOOST SYSTEMS</company>
    <person>
        <firstName>John</firstName>
        <lastName>Smith</lastName>
    </person>
    <street>E DRACHMAN</street>
    <houseNumber>421</houseNumber>
    <streetAnnex>Appartment 2</streetAnnex>
    <city>Los Angeles</city>
    <state code="CA">California</state>
    <country code="US"/>
    <zipCode>85705</zipCode>
    <email>mbs@spreadshirt.net</email>
    <phone>+49 341 789 123</phone>
    <fax>+49 341 789 123</fax>
</address>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.