Pattern Design API Technical Documentation

Via the Pattern Design API you can interact with the Pattern Design Platform. There are three ways you can make use of our designs in your website/system.
  • embedding the API widget in your website
  • using the API methods that provide live data (such as pattern/getCategories and pattern/search) and presenting the result on your website
    • either on your server and embedding the results in your pages
    • or from Javascript (for which we recommend the use of an access token)
  • downloading the data as a package, and importing them into your system (this works with the pattern/export method)

In all cases, you work with watermarked preview images until your customers actually order a pattern'ed product, and only then you retrieve the production-grade image from Pattern Design.

In the following diagram you get an overview what a typical API integration involves, embedded within an order workflow (relevant API calls are in monospace font)

General Information

The Pattern Design API is a REST API which can be accessed via HTTP. In compliance with REST convention, querying calls use the HTTP GET method. Calls that create, modify or delete data use POST, PUT, PATCH or DELETE.

The API calls go to https://patterndesigns.com/api/rest/1.0/apiKey/group/action. The apiKey has to be provided with every call. The group is only used for structuring the api. The action is the actual name of the call that is performed.

The result depends the type of the call.

  • For normal operations (login, report a sale etc.) the success result is JSON
  • For operations that retrieve data (download a file), the success result is a stream of the requested data
  • If an operation is unsuccessful, there's always a JSON result
  • The JSON result consists of a result status and the actual returned values. If a call succeeds, the result status is "SUCCESS", in case of an error the result status is "ERROR". If a call is unsuccessful, also the HTTP response status is different from 200 (e.g. 401 when authentication fails).

    All data are exchanged in UTF8 encoding. Monetary amount numbers are formatted in English locale, e.g. "8.99".

    Only whitelisted IPs are allowed to make API calls. In your API account's technical settings, you can manage the whitelisted IPs for your account. If IP whitelisting in unsuitable for you (e.g. you are in a cloud setting with no fixed IP addresses), take a look a the HMAC authentication section

    Test Environment

    For testing purposes, please make use of apitest.patterndesigns.com (https://apitest.patterndesigns.com/api/rest/1.0/). This is a mirror of the production environment, which is updated each day on 01:00am CET. Thus changes made to the test system will be reset each day. Pattern sales reported to the test environment will not be billed.

    Thus you can either use your production account credentials on the test system, or create a new account (which will be purged when the system is updated. You will receive your API key for the test system immediately after registering at the test system.)

    Example

    Request (try in your browser)

    https://apitest.patterndesigns.com/api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/test?name=Tom

    Response

    {
      "result":"SUCCESS",
      "greeting":"Tom, have a nice day"
    }
    

    Error response

    {
      "result":"ERROR",
      "errorCode":"3",
      "error":"The IP address of the server/client that issued the REST call is not on the whitelist",
      "details":"195.70.113.209"
    }
    

    Details

    Required Authentication Information

    In order to have access to the API, you need to have your API and HMAC key (and the API username and password for logging in to the account, where you can see your API and HMAC key).

    Languages

    Several methods take a language parameter. Specify the language using the two-letter ISO 639 alpha-2 code (e.g. 'en' for Englisch). If the language is not specified or the specified language is not supported, the language defaults to English.

    All major languages are supported (e.g. for getCountries), but the designs' texts (title etc.) are currently available only in English and German. Keywords are to a reduced extent also available in French, Spanish and Japanese

    Currencies

    Methods dealing with monetary amounts always include the currency of the amount as the ISO 4217 currency code

    When returned as JSON, monetary values are in the following format:

    { "amount": 0.12,  "currency": "EUR", "symbol": "€" }

    Image formats

    Several methods will provide you with images, which have the following specifics:
    • repeat: small 150px image (repeatable)
    • gallery: small 150px x 150px image, square (not repeatable)
    • small: small 200px x 200px image, square (not repeatable)
    • medium: medium 400px image, with watermark (repeatable)
    • xlarge: xlarge 1000px image, with watermark (repeatable)
    • xlargeDiscreet: xlarge 1000px image with very lightweight watermark (repeatable)

    For the repeat and medium images, the smaller dimension is the pixels specified above. E.g. for medium there are images that are 400x600 and 600x400.

    For the xlarge and xlargeDiscreet images, the width is always 1000px. E.g. there are files with 1000x1500 and 1000x700.

    Metadata

    Some methods provide metadata about designs, which are described here in detail.

    horizontalRapportsPostcard

    The value horizontalRapportsPostcard (a floating point value between 1.5 and 5) describes how often design should be repeated to look good.

    There's designs which look good in a single repeat, e.g. 1336, and ones that need to be repeated to look good, e.g. 557. With the horizontalRapportsPostcard you have a (initial) value how often the design should be repeated. The name of the parameter derives from how often a design needs to be repeated on a postcard to look good. For other products, you can use the horizontalRapportsPostcard as a basis and multiply this with a product-specific factor. E.g for wallpaper we have found that a repeat of horizontalRapportsPostcard * 3 is fine.

    containsText

    Whether a design contains text (not in the sense of embedded fonts, but that the image contains letters, symbols, numbers etc.), symbols or concrete objects . This is relevant for mirroring/flipping the design, which makes text illegible

    HMAC authentication

    A HMAC can be used to access the Pattern Design API without IP restriction. This works by signing additional request parameters with a secret key. You can get the secret key from the technical settings page in your account.

    For using HMAC authentication, you need to include the following additional request parameters:

    ParameterExampleDescription
    timestamp2014-04-10T05:31ZISO 8601 formatted UTC timestamp (with hours and minutes only) of the current moment with +/- 5 minutes tolerance for compensating for small differences in server times
    noncelAJUCaY1G8A random string as a salt for the hash, at least 10 characters
    signature49ac271988bdea9d19e833db3348d28b9a32f534e3b8fed75eefa79401f271f0lowercase hex encoded HMAC hash signature
    The signature is calculated as follows:
        HMAC-SHA256(secretKey, apiKey + timestamp + nonce)
    

    The encoding used for the strings is UTF-8. For practical purposes at this point this is it the same as ASCII as there are only ASCII characters in the timestamp, nonce and signature parameters (unless you include non-ASCII characters in the nonce).

    If the HMAC authentication is successful, the request will be processed normally. If HMAC authentication fails, an error is returned:

    {
        "result": "ERROR",
        "errorCode": "21",
        "error": "The HMAC authentication failed"
    }
    

    Example request

    https://apitest.patterndesigns.com/api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/test?name=Tom&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688

    Hmac example

    E.g. in PHP the signature calculation would look like this:
        $apiKey = 'h3vaT57GWThxW79HbLLosp6g';
        $timestamp = '2014-04-10T05:31Z';
        $nonce = 'lAJUCaY1G8';
    
        $stringToSign = $apiKey . $timestamp . $nonce;
        $key = '7803683af19135a91403a5d59b5d59613c63be448d4e7603924b7229f934e372';
        echo hash_hmac('sha256', $stringToSign, $key );
        // result: 49ac271988bdea9d19e833db3348d28b9a32f534e3b8fed75eefa79401f271f0
    
    The following listing shows the complete code for making a test call with an API key and HMAC key
        $apiKey = '*your API key*';
        $key = '*your HMAC secret key from the technical settings page of your account*';
    
        $timestamp = gmdate("Y-m-d")."T".gmdate("H:i")."Z";
        $nonce = md5(time() + rand());
    
        $stringToSign = $apiKey . $timestamp . $nonce;
        $signature = hash_hmac('sha256', $stringToSign, $key );
    
        $curl = curl_init();
        $url = 'https://patterndesigns.com/api/rest/1.0/'.$apiKey.'/user/test?name=Tom&nonce='.$nonce.'&timestamp='.$timestamp.'&signature='.$signature;
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    
        echo curl_exec($curl);
    

    Support for HTTPS/SSL image urls and CORS

    All methods which return image urls have a useSecureUrls parameter which causes the returned image urls to use https.

    Images have CORS support, i.e. can be requested from Javascript from any domain. Please note that in Chrome you need to work around image caching if you need CORS for the images (see this Stackoverflow post).

    Methods overview

    API Methods

    pattern/getCategories

    Get the categories by which the patterns are organized

    The designs are organized in categories, which themselves are organized in top-level categories:
    Floral
        Leaves
        Mille Fleurs
        ...
    Shapes
        Circles
        Stars
        ...
    My Own Pattern Collection
    ...
    
    Thus Floral and Shapes are top-level categories with the respective categories beneath them. There's two modes for using this method
    • retrieve the top-level categories first, and retrieve the categories beneath the top-level category afterwards (e.g. if you offer a user a drill-down selection)
    • retrieve the top-level categories and the categories all at once (e.g. for a menu where you present top-level categories and categories at once

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    topLevelCategoryId string no if specified, the result is a list of the categories under the specified top-level category
    includeSubcategories boolean no determines whether the categories beneath the top-level categories are included in the result json. Applies only if no topLevelCategoryId is specified. Valid values are true and false
    collectionsOnly boolean no return only pattern collections, default false. This parameter doesn't apply if a topLevelCategoryId is specified or if includeCollections is set to "belowCollectionsCategory". The result contains only active collections.
    includeCollections string no specify "true" to include your pattern collections in the result. Specify "belowCollectionsCategory" to put the collections into a dedicated top-level category. The collectionsOnly and includeCollections parameters, if set, override the collections setting from the collections administration UI. This parameter doesn't apply if a topLevelCategoryId is specified. The result contains only active collections.
    language string no see the languages section
    useSecureUrls boolean no if specified and set to true, the thumbnails urls are https urls
    thumbnailType string no small (150x150px, this is the default), medium (400x400px), repeat (same as the "repeat" image format)

    Return values

    Name Type Details
    categories json object a list of categories with id, title and a thumbnail image url (thumbnails are 150x150 pixels)

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/getCategories?includeSubcategories=true&useSecureUrls=true&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "SUCCESS",
      "categories":
      [
        {
          "id": 2,
          "title": "Trends",
          "longTitle": "Trends",
          "thumbnail": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/categories/thumbnails/2.jpg",
          "isCollection": false,
          "containsPatterns": false,
          "categories":
          [
            {
              "id": 6,
              "title": "Miami Beach",
              "longTitle": "Miami Beach - trendy seamless pattern designs and vector ornaments",
              "thumbnail": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/categories/thumbnails/6.jpg",
              "isCollection": false,
              "containsPatterns": true
            },
            (...snip...)
          ]
        },
        {
          "id": 255,
          "title": "Timeless",
          "longTitle": "Timeless",
          "thumbnail": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/categories/thumbnails/255.jpg",
          "isCollection": false,
          "containsPatterns": false,
          "categories":
          [
            {
              "id": 4,
              "title": "Tasty",
              "longTitle": "Tasty - seamless pattern designs and ornaments in strong, lively colours",
              "thumbnail": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/categories/thumbnails/4.jpg",
              "isCollection": false,
              "containsPatterns": true
            },
           (...snip...)
          ]
        },
        {
          "id": 10001,
          "title": "My Own Pattern Collection",
          "longTitle": "My Own Pattern Collection",
          "thumbnail": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/2530.jpg",
          "isCollection": true,
          "containsPatterns": true
        }
      ]
    }
    

    pattern/getDesignerInfo

    Get details about a designer

    If you want to display more details about a designer (such as the profile image), this method if for you.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    designerIds integer yes Ids of the designers for which the details should be returned (you get the designer id via the designer.id result field from pattern/search)
    language string no see the languages section
    useSecureUrls boolean no if specified and set to true, the profile image is returned as a https url

    Return values

    Name Type Details
    designer json object information about the designer, see the example for details. The profileImage image is 220px in width, the height is not fixed.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/getDesignerInfo?designerId=2&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "SUCCESS",
      "designer": {
        "id": 2,
        "name": "Martina Stadler",
        "display": "Martina Stadler, patterndesigns.com",
        "profileUrl": "https://www.patterndesigns.com/en-designer-2/Martina-Stadler",
        "profileImage": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/designers/2-Martina-Stadler.jpg",
        "country": {
          "id": "AT",
          "name": "Austria"
        }
      }
    }
        

    Live search on all available patterns

    Get a list patterns filtered by various criteria. None of the filter criteria is mandatory, and most can be combined. Use of multiple criteria will result in the set intersection of the results (e.g. if you specify a category and a color, you get the designs of that color in that category).

    Only the ids parameter cannot be combined with other criteria as is explicitly fetches the designs with exactly the specified ids.

    For the parameters that take ids, use the values you received from this or other methods - passing in other numbers will just yield no result

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    categoryIds string no comma-separated list of numbers. Any top-level/non-top-level categories or collection from pattern/getCategories can be used. Specifying multiple categoryIds yields the union set of designs in these categories
    designerIds string no comma-separated list of numbers. Restricts the result to the specified designer's patterns. At the moment you can only get the designer ids from the result of this call (the designer.id resultField)
    text string no search the patterns for this text. The title, tag, description, and the categories a design appears are used in the search. You'll want perform a text search when a user has entered a sufficient amount of text (e.g. 3 letters), as otherwise the results will be quite meaningless
    colors string no comma-separated list of colors in 6 digit hex notation (e.g. c0ffee). At the moment, only the first color from the list is used for search
    aspectRatio string no specify "square" to get only square patterns (1:1 in width-height)
    recolorable boolean no specify true to get only designs that are recolorable
    ids string no comma-separated list of numbers. This criterion overrules all other criteria, restricting the search result to the designs with exactly these ids
    moreLikeThis number no a design id for which similar designs should be returned. If you just want to get the most similar deisgns, add little other search restrictions, as the similarity will of course decline when restricting the search to a portion of designs (which will exclude designs with higher similarity from the excluded portion)
    language string no determines both the language in which the content is searched for the text search and the language that is used for the result (title etc.), see the languages section
    limit number no maximum number of returned designs, must be greater than zero. If you specify more than 100, at most 101 will be returned, defaults to 20
    offset number no offset into the search result, defaults to 0
    useSecureUrls boolean no if specified and set to true, the thumbnails urls are https urls
    tags text no show only patterns with the specified tags. Currently there is only the tag suited-for-wallpaper. Filtering by it retrieves only the patterns which we deem specifically suited for wallpaper. (the tags are not the same as the keywords)
    maxFineElementsDisruptionResolution number no see the corresponding resultField for a more detailed description. Valid values are between and including 25 and 2400
    sort string no sort criterion when no other sort is present. Specify newestFirst to get the most recently published designs listed first.
    resultFields string no comma-separated list of fields that are included in the result. Defaults to id,title,thumbnailGallery. For details about the images, see the section image formats.

    The available fields are listed below.

    resultFields available fields

    NameResult data
    idid of the design
    titletitle of the design
    descriptionprose description of the design
    detailsUrla url pointing to the details page of the design on patterndesigns.com
    keywordskeywords for the design
    thumbnails.repeatthumbnail, see image formats
    thumbnails.gallerythumbnail, see image formats
    thumbnails.smallthumbnail, see image formats
    thumbnails.mediumthumbnail, see image formats
    thumbnails.xlargethumbnail, see image formats
    thumbnails.xlargeDiscreetthumbnail, see image formats
    thumbnails.pdfthumbnail, see image formats
    thumbnailDimensionsinclude width and height for each thumbnail
    metadata. horizontalRapportsPostcardhorizontalRapportsPostcard of design, a heuristic how often a design should be repeated to look good, see the respective metadata description
    metadata.recolorablewhether the design can be recolored. Only designs that are recolorable can be used for the pattern/getColors and pattern/recolor methods
    metadata. fineElementsDisruptionResolutiona heuristic at which downsampling resolution (without interpolation, i.e. nearest neighbour) the design starts to deteriorate (fine elements break up into single pixels, thus the name). It is an indicator for the robustness of the design when the size is reduced, an can be used for limiting the minimum tile size. This is a very specific value, which you likely don't need in normal use cases.
    designer.iddesigner's id
    designer.namedesigner's name
    designer.displaycorrect display of designer as the creator of a design
    designer.profileUrlurl of the designer's profile
    priceOnlineShopthe Vector Unlimited license price in the patterndesigns.com online shop as the following property of the pattern result object: "priceOnlineShop": { "EUR": 40.0 }
    customImageTypeId/paletteIdif you are an API user who has custom images types and palettes, you can specify the custom image types and palettes like this: resultFields=customImageTypeId.1,paletteId.1,paletteId.2,... The result is available as a field on the pattern result object:
        "customImages":
          [
            {
              "customImageTypeId": 1,
              "paletteId": 1,
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/users/12345/custom..."
            },
            {
              "customImageTypeId": 1,
              "paletteId": 2,
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/users/12345/custom..."
            }
          ]
        

    Return values

    Name Type Details
    patterns json object a list of the designs matching the filter criteria containing the specified result fields, for details see the exhaustive example

    Example

    Request
    GET api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/search?categoryIds=2&limit=1&offset=253&language=en&resultFields=id,title,description,keywords,metadata.horizontalRapportsPostcard, designer.id,designer.name,designer.profileUrl,designer.display, thumbnails.repeat,thumbnails.gallery,thumbnails.small,thumbnails.medium,thumbnails.xlarge,thumbnailDimensions&useSecureUrls=true&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    The totalHits value is the total number of results that was found for the search, independend of the offset/limit parameters, and can be used for determining the number of pages for pagination.
    {
      "result": "SUCCESS",
      "totalHits": 312,
      "patterns":
      [
        {
          "id": 3136,
          "title": "Dekora Blue",
          "description": "Sweet design in classic blue and white colors.",
          "keywords": "Cottage, Fantasy, Floral, Flowers, Blue, White, Tile",
          "metadata": {
            "horizontalRapportsPostcard": 2.5
          },
          "designer": {
            "id": "162",
            "name": "Leska Hamaty",
            "profileUrl": "https://www.patterndesigns.com/en-designer-162/Leska-Hamaty",
            "display": "Leska Hamaty, patterndesigns.com"
          },
          "thumbnails": {
            "gallery": {
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/3136.jpg",
              "width": 150,
              "height": 150
            },
            "repeat": {
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/repeat/3136.jpg",
              "width": 150,
              "height": 150
            },
            "small": {
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/small/3136.jpg",
              "width": 200,
              "height": 200
            },
            "medium": {
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/medium/3136.jpg",
              "width": 400,
              "height": 400
            },
            "xlarge": {
              "url": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/xlarge/3136.png",
              "width": 1000,
              "height": 1000
            }
          }
        }
      ]
    }
    

    pattern/getColors

    Get the different colors in the vector image of the design

    Returns colors in the vector image for use with the pattern/recolor method.

    Please note that the colors do not always completely correspond to the colors in the final rendered image, as due to gradients or transparency in some patterns the colors can be mixed or overlaid (e.g. this pattern consists of overlaid transparent shapes that result in many more colors in the final rendered image compared to the colors you receive by this method)

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    id integer yes id of a design

    Return values

    Name Type Details
    colors json object a list of RGB-colors in six-digit hex notation (red = ff0000). Roughly 80% of the patterns have less than different 10 colors. The maximum number of colors returned is 200 (designs with more colors are not recolorable). For most of the patterns the first color is the background color, so even if a pattern has lots of colors, manual recoloring can make sense by changing the most significant ones
    If the design is not recolorable, you'll receive a specific error code, see the example responses for details. You can find out upfront whether a design is recolorable via the corresponding result field in the pattern/search method.

    Example

    Request
    GET api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/getColors?id=527&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    If the design is recolorable, a list of colors is returned:
    {
      "result": "SUCCESS",
      "colors":
      [
        "504e2a",
        "b18048",
        "f19426",
        "ece24b",
        "7b753f",
        "e41270",
        "c10048",
        "5eb693"
      ]
    }
        

    If the design is not recolorable, an error is returned:

    { "result": "ERROR", "errorCode": "4000", "error": "The specified design is not recolorable", "details": "id:2987" }
        

    pattern/getPalettes

    Get the predefined palettes

    Returns predefined palettes applicable for the pattern/recolor and sale/download methods.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    This method currently has no parameters.

    Return values

    Name Type Details
    color palettes json object A list of color palettes for use with the method

    Example

    Request
    GET api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/getPalettes?nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    If the design is recolorable, a list of colors is returned:
            {
            "result": "SUCCESS",
            "palettes":
            [
                { "id": : "hue_red", "previewColor": "ff0000" },
                { "id": : "hue_blue", "previewColor": "aaaaff" },
                (... snip ...)
            ]
            }
        

    pattern/recolor

    Get a recolored version of a design. The new colors can be created on the basis of the colors retrieved with pattern/getColors

    This generic method lets you implement all thinkable color manipulation tools, e.g. single color picking, applying predefined palettes or color space operations such as changing saturation.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    id integer yes id of a design
    colors string no Comma-separated list of colors in six-digit hex format. The order corresponds to the colors as returned by pattern/getColors. If you specify more colors, the superfluous colors are ignored. If you specify less colors then the rest of the colors remains the same as in the original designs. Specifying no colors allows you to get an image even for non-recolorable designs. Only either the colors or the palette parameter can be for used in the same method call
    palette string no One of the palettes returned by the getPalettes method. Only either the colors or the palette parameter can be for used in the same method call
    resolution integer no the width of the returned image in pixels, defaults to 400
    watermarkType string no specify "discreet" to get a lightweight watermark corresponding to the xlargeDiscreet image format, otherwise the normal watermark is used
    antialiasing boolean no whether the downloaded image file has antialiasing applied. The default value is true. Useful if you do color reduced printing (where antialiasing produced unwanted additional colors). Don't use this parameter unless you know what you're doing, because turning off antialiasing will result in a lower perceived image quality
    scale floating point number no optionally indicates the scale of the image. The default value is 1.0. Valid values are between and including 0.05 (pattern is repeated 20 times) and 5.0 (only one fifth of the pattern will be visible). The aspect-ratio of the resulting image is the same as of the original pattern, i.e. it's repeated the same number of times in both dimensions

    Return values

    The recolor method will return a PNG image. If you specify the colors parameter, these colors will be used. Without specifying the colors parameter, for all designs (even non-recolorable ones) an image in the original colors is returned

    If the design is not recolorable and you specify colors, you'll receive a specific error code, see the example responses for details. You can find out upfront whether a design is recolorable via the corresponding result field in the pattern/search method.

    Example

    Request
    GET api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/recolor?id=527&colors=00aa00,00ff00&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response

    A PNG image if the design is recolorable.

    If the design is not recolorable, an error is returned:

    { "result": "ERROR", "errorCode": "4000", "error": "The specified design is not recolorable", "details": "id:2987" }
        

    pattern/renderAsProduct

    Get a 3D rendered product preview with the specified design on it.

    This method is only available if you have activated the respective subscription.

    Regarding recoloring usage, please see the pattern/recolor method.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    id integer yes id of a design
    colors string no Comma-separated list of colors in six-digit hex format. The order corresponds to the colors as returned by pattern/getColors. If you specify more colors, the superfluous colors are ignored. If you specify less colors then the rest of the colors remains the same as in the original designs. Specifying no colors allows you to get an image even for non-recolorable designs. Only either the colors or the palette parameter can be for used in the same method call
    palette string no One of the palettes returned by the getPalettes method. Only either the colors or the palette parameter can be for used in the same method call
    width integer no the width of the returned image in pixels, defaults to 400, 1000 at most
    height integer no the height of the returned image in pixels, defaults to width * 0.5625 (16:9), 1000 at most
    scale floating-point no the scale at which the pattern is applied to the model. Defaults to 1. Values large than 1 lead to the pattern repeating more often on the model, values smaller than 1 repeat the pattern less often
    model string yes identifier of your model. If not specified, our default pillow model will be rendered
    watermarkType string no specify "discreet" to get a lightweight watermark corresponding to the xlargeDiscreet image format, otherwise the normal watermark is used

    Return values

    A PNG image with the specified model and design. If colors are specified, the same constraints apply as for the pattern/recolor method

    Example

    Request
    GET api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/renderAsProduct?id=527&colors=00aa00,00ff00&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response

    A PNG image, or a JSON result with error details if there were problems.

    pattern/export

    Download an export of all patterns (or patterns above a specified id)

    This call might not return instantly but take some time depending on the amount of requested patterns. The export call is not intended for use as a live source of all patterns (for this it also take too long), but rather for getting the pattern data on a regular basis (e.g. once per day). For live data, see the pattern/getCategories and pattern/search methods.

    If you use this method to import the patterns into your system, you will need to update the data at regular intervals in order to get new patterns and delete the ones we have taken offline at a designer's request

    This call is allowed only once per minute per user, as it takes some time and resources to assemble the relevant data.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    aboveId integer no if specified, the export will only include patterns with an id higher than this value (useful for getting only newly added patterns instead of the full export). The disadvantage is that changes to existing patterns (e.g. use in new categories) will be missed if this option is used
    belowId integer no if specified, the export will only include patterns with an id lower than this value (can be used in conjunction with aboveId to get the export in several parts)
    format string no specify the value 'xml' if you prefer to directly get the xml file instead of a zip file with an xml file with it. Specify 'csv' to get a CSV file (in a zip file)
    useSecureUrls boolean no if specified and set to true, the thumbnails urls are https urls
    columns string no comma-separated list of the columns you want to appear in the csv file, only relevant for csv export, defaults to all available columns. For the column names, see the full csv file. An example is id,categories.nameEN,data.titleEN,data.descriptionEN,thumbnails.detail.medium.path

    Return values

    When the call succeeds, the result is, depending wether you specify the format parameter
    • a zipped file with a file named "patterns.xml" in it.
    • if format=xml is set, the requested data directly as xml
    In case of an error, the result is (as with all other calls) a JSON string with error details. The xml file structure is as in the following example.
            <patternData>
    <generalData>
    <agency displayName='Pattern Design' name='Pattern Design GmbH' email='info@patterndesigns.com' cowner='Pattern Design GmbH' cblz='34284' cknr='19638' cbank='Raika Lohnsburg' cbic='RZOOAT2L284' ciban='AT813428400000072371' street='Haidermuehle' city='Mondsee' zip='5310' country='Austria' streetNumber='52' ustid='ATU65824334' phone='+43 699 197 85 410' fax='+43 6232 90 30 310 30' />
    <designers>
    <designer id='2' firstname='Martina' name='Stadler' sex='female' display='Martina Stadler, patterndesigns.com' profilePageDE='www.patterndesigns.com/designer-2/MartinaStadler' profilePageEN='www.patterndesigns.com/en-designer-2/MartinaStadler' />
    </designers>
    <categories>
    <category id='2' nameDE='Trends' nameEN='Trends' shortNameDE='Trends' shortNameEN='Trends'>
    <category id='6' nameDE='Miami Beach - trendige Designmuster und Ornamente' nameEN='Miami Beach - trendy seamless pattern designs and vector ornaments' shortNameDE='Miami Beach' shortNameEN='Miami Beach'/>
    </category>
    </categories>
    </generalData>
    <patterns>
    <pattern id='527'>
    <data>
    <titleDE>Pfauenaugen</titleDE>
    <titleEN>Peacock</titleEN>
    <descriptionDE>Das moderne, orientalisch wirkende Muster bildet einen spannenden Kontrast zum dunklen Hintergrund.</descriptionDE>
    <descriptionEN>The modern and orientalistic appearing design builds an exciting contrast to the dark background.</descriptionEN>
    <keywordsDE>Ethno, Federn, Pfau, Orientalisch</keywordsDE>
    <keywordsEN>Ethno, Feathers, Peacock, Orientalistic</keywordsEN>
    <designer id='2' />
    </data>
    <metaData>
    <hasColorGradient>false</hasColorGradient>
    <containsText>false</containsText>
    <badSilhouetteAgainstBlack>false</badSilhouetteAgainstBlack>
    <badSilhouetteAgainstWhite>false</badSilhouetteAgainstWhite>
    <horizontalRapportsPostcard>2.0</horizontalRapportsPostcard>
    </metaData>
    <thumbnails>
    <repeat width='150' height='177'>
    <path>https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/repeat/527.jpg</path>
    </repeat>
    <gallery width='150' height='150'>
    <path>https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/527.jpg</path>
    </gallery>
    <detail>
    <small width='200' height='200'>
    <path>https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/small/527.jpg</path>
    </small>
    <medium width='400' height='472'>
    <path>https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/medium/527.jpg</path>
    </medium>
    <xlarge width='1000' height='1179'>
    <path>https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/detail/xlarge/527.png</path>
    </xlarge>
    </detail>
    </thumbnails>
    <patternToCategory>
    <category id='315' />
    <category id='263' />
    <category id='311' />
    </patternToCategory>
    </pattern>
    </patterns>
    </patternData>
    For details about the images, see the section image formats

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/export?nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    (zip file as stream)

    sale/report

    Report the sale of one pattern'ed product in order to subsequently download it via the sale/download call.

    If your order contains several products with patterns, you need to call sale/report for each product (order item). This also applies for several identical products (for each of which you need an individual call), as outlined in the licensing conditions.

    Please note that the sale/report method only prepares the sale. Only when the actual download is performed the license fee is charged and the sale shows up in the list of purchases. The reason for this is that when the sale/report return value cannot be received or processed for whatever cause, no costs are incurred. This also matches the business definition - if you don't get anything, you don't pay.

    Authentication

    HMAC required

    HTTP Method

    POST

    Parameters

    Parameter Type Required Details
    orderReference string yes reference to the order with which the product was purchased (i.e. the order id from your system), between 1 and 100 characters. Needed for associating the sale in your system with the sale of the patterns (e.g. if there's a problem with a pattern sale, we can tell you for which of your orders it was). You can have multipe calls with the same orderReference (just as you can have multiple product sales within one order)
    designIds string yes comma-separated list of design ids of the designs used on this product (e.g. for different front/back side of a pattern'ed pillow you specify both designs in designIds)
    productPriceNet monetary yes the product price net (all the prices in this method with a comma as the decimal mark, e.g. 3,14) of the sold product without the license costs for the designs
    productName string no a textual description of the sold product
    currency string no the currency of the productPriceNet parameter, i.e. the currency in which you billed this sale. For the format see the currencies section. This parameter is optional and defaults to the sales currency of your API account (which is shown in the technical settings of your API account). Please contact us if you're not sure if you should specify a currency here.
    sessionToken string no (only required when not using HMAC authentication) session token returned by login call - (obsolete - please use HMAC authentication instead)

    Return values

    Name Type Details
    saleReference integer the reference of the reporting of this sale with the Pattern Design Platform. Allows to associate this call with a sale in your system
    downloadReferences list of integers references to be used for downloading the patterns used for the sale
    In case there's insufficient funds, the sale will not be performed and an error will be returned (errorCode 2006, message "Reporting the sale failed - there is insufficient credits for the user").

    Example

    Here's two examples for a better understanding of the submitted amount.

    One product that costs 100 without the pattern, so the productPriceNet is 100. You will then charge the customer 100 plus the licenseFee (which is 12%) of this price.

    If you charge a fixed amount, e.g. EUR 200, for your product, the price (net of the license fee) you report to us is 200 / 1.12, thus 178.57

    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/sale/report?sessionToken=Rqk3Cfd2YSTvXkc8nmuzaZD9&orderReference=1234&designIds=593%2C593%2C594&productPriceNet=10.99& productName=Table&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688

    (url encoded %2C = comma)

    Response
            {
            "result":"SUCCESS",
            "saleReference":37,
            "downloadReferences":[98,99,100]
            }
        
    In case of insufficient funds
            {
            "result":"ERROR",
            "errorCode":"2006",
            "error":"Reporting the sale failed - there is insufficient credits for the user",
            "details":"credits 100.00 vs. license fee 360.00"
            }
        

    sale/download

    Download the production image file for a pattern that was part of a sale reported via sale/report.

    Besides SVG (which is our base format) we also offer the image in the PDF and JPG formats. Please do not rasterize the SVGs with imagemagick or rsvg-convert, this results in white/transparent borders for a signification portion of SVG files. If you can work with the jpeg version, use it (for tiling the jpeg images imagemagick is fine, though). If you have special requirements, just contact us.

    Please note that downloading a design from a sale reported with sale/report actually commits/finalizes the sale and thus deducts the license fee from the balance and adds the sale to the list of purchases.

    Authentication

    HMAC required

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    downloadReference integer yes a download reference returned by the sale/report call
    fileType string no one of svgz, pdf, jpg, png, (not specifying the fileType defaults to svgz). Click the link on the filetype to download a sample. Here is one for a repeat pdf with the pattern repeated twice (with 1000 PDF units size, i.e. 352.8mm).
    resolution number no
    • JPG: the width of the jpg file that is being downloaded, a number between 1 and 10000. This parameter applies only for raster (jpg or png) downloads. Please note that at high resolution the image processing and download may take a while (up to 2 minutes for complex designs at high resolutions)
    • PDF: decimal (e.g. 103.52) - width of the PDF in PDF units (1/72 inch). If the resolution is specified, height and scale need to be specified, too.
    antialiasing boolean no whether the downloaded image file has antialiasing applied. The default value is true. This parameter applies only for png downloads. Useful if you do color reduced printing (where antialiasing produced unwanted additional colors). Don't use this parameter unless you know what you're doing, because turning off antialiasing will result in a lower perceived image quality
    colors string no comma-separated list of six-digit hex colors that will be applied to the design that is downloaded. See the pattern/getColors and pattern/recolor methods. Only either the colors or the palette parameter can be for used in the same method call
    palette string no One of the palettes returned by the getPalettes method. Only either the colors or the palette parameter can be for used in the same method call.
    sessionToken string no (only required when not using HMAC authentication) session token returned by login call - (obsolete - please use HMAC authentication instead)
    height number no height of the PDF in PDF units (1/72 inch) as a decimal number (e.g. 103.52). Only applicable for PDF. If the height is specified, scale and resolution need to be specified, too.
    scale number no float - scale of the pattern tile in the PDF. Only applicable for PDF. If the height is specified, scale and resolution need to be specified, too. 1 = pattern tile fills the full width, 0.5 = tile width is half the width, i.e. the pattern is shown 2 times horizontally etc., 2 = pattern is zoomed in by factor 2
    offsetX number no float - offset of the pattern in the PDF for the left border in PDF units (1/72 inch). Only applicable for PDF with specified resolution, height and scale.
    offsetY number no float - offset of the pattern in the PDF from the top border in PDF units (1/72 inch). Only applicable for PDF with specified resolution, height and scale.

    Return values

    When the call succeeds, the result is the requested file directly as a stream. In case of an error, the result is (as with all other calls) a JSON string with error details.

    Depending on the fileType parameter, the following content is returned

    • svgz or no fileType: the design as a svgz file (a gzipped svg)
    • pdf: a vector pdf
    • jpg: the design in jpg format with the specified width, without watermark. The height will depend on the aspect-ratio of the design and might be smaller or larger than the width.

    In case there's insufficient funds, the download will not be performed and an error will be returned (errorCode 2006, message "Reporting the sale failed - there is insufficient credits for the user"). Normally, if you sucessfully call sale/report, the sale will also be downloadable. But because only the download of a design of a sale actually finalizes/commits that sale, if the balance is low and concurrent purchases are made, report might succeed while download then fails because of another download call that was faster.

    Note: Note that on the test system, only designs up to id 540 will download normally. For all others you will receive the files of the same design (https://www.patterndesigns.com/en-shop-527-pfauenaugen.html) for all calls. (we can't give away all designs on the test system)

    If you specify colors for a design that is not recolorable, you will receive an error.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/sale/download?sessionToken=45vxypa1JD7WJofWbb7gM9u6&downloadReference=110&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response

    (requested file as stream)

    See the note in the return values section for special handling on the test system.

    In case of insufficient funds, an error is returned.

            {
            "result":"ERROR",
            "errorCode":"2006",
            "error":"Reporting the sale failed - there is insufficient credits for the user",
            "details":"credits 100.00 vs. license fee 360.00"
            }
        

    sale/cancel

    Cancel a sale previously reported via sale/report.

    Can only be called by API users who have an arrangement with Pattern Design that allows them to cancel the sales up to a certain age.

    Authentication

    HMAC required

    HTTP Method

    POST

    Parameters

    Parameter Type Required Details
    saleReference integer yes the sale reference returned by the sale/report call.

    Return values

    When the call succeeds, the result is a JSON object with result set to SUCCESS. In case of an error, the result is (as with all other calls) a JSON string with error details. Possible errors are an invalid saleReference and the attempt to cancel a sale which is already too old and thus can't be canceled anymore.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/sale/cancel?saleReference=123456&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    Success:
            {
            "result": "SUCCESS",
            }
        
    In case of a sale whose age exceeds the timespan during which sales can be canceled an error is returned:
            {
            "result":"ERROR",
            "errorCode":"2022",
            "error":"Canceling the sale failed - the sale is older than the timespan during which sales can be canceled",
            "details":"Sale 123456 cannot be canceled because it is already older (103 days since 2018-11-23 23:35:15) than the cancelable timespan (42 days)"
            }
        

    user/getAccessToken

    Get the access token for the API widget or access from Javascript

    This method provides you with the access token you need to pass to the API widget. The token is valid for 1 month (which should be enough so that it lasts for the timespan a user uses a website).

    The access token is then used in the API calls in place of the API key. The access token (which works only for public methods) allows to keep your API key private to your server, so anyone inspecting your website will only see the limited token.

    Calls (from Javascript) with the access token will have wildcard CORS header. You can also use JSONP which has no CORS restriction. For using JSONP specify a 'callback' parameter.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    None

    Return values

    The access token.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/getAccessToken?nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
            {
            "result": "SUCCESS",
            "token": "152-1402985214238-0112652451-490289479d235363121825431dce1bb917f28047a9a9a317c2451a1e6806f937"
            }
        

    user/login

    Retrieves a session token for calls requiring authentication.

    This method is obsolete - please use HMAC authentication, because it provides a stronger protection, and makes the session token (and thus the user/login call) obsolete for all methods that require authentication.

    The login method can be used to retrieve the session token for subsequent calls that require authentication. The session token is valid for 30 minutes.

    Authentication

    None

    HTTP Method

    POST

    Parameters

    Parameter Type Required Details
    username string yes your API username
    password string yes your API password

    Return values

    Name Type Details
    sessionToken string the session token for subsequent authenticated calls
    apiKey string the API key for the user that was logged in

    For referral partners there are two specific error codes:

    • 1003 ("The login failed - the API key of the user does not match the provided API key of the request"). In this case the API user was not associated with your referral partner account.
    • 1004 ("The login failed - the user is a website user and does not have an API account"). In this case the user has only an account on the Pattern Design website, but not for the API

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/login?username=test&password=test&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
            {
            "result":"SUCCESS",
            "sessionToken":"LVFXFueEDiI88AzKiFruJkTC",
            "apiKey":"h3vaT57GWThxW79HbLLosp6g"
            }
        

    user/signUp

    Signs up a new api user

    This method is only available to referral partners.

    Upon sign-up, the user will also receive a welcome mail confirming the registration.

    Authentication

    None

    HTTP Method

    POST

    Parameters

    Parameter Type Required Details
    username string yes username (not yet in use) for login, 6 to 255 characters
    password string yes password for login, 8 to 50 characters, must contain at least one number, one uppercase letter and one lowercase letter
    company string yes name of the company, between 3 and 50 characters
    vatNumber string no between 8 and 25 characters, not required at all for users from non-EU countries. Users from EU countries should specify it (otherwise they will be charged VAT). The validity of the VAT ID for users from EU countries will be validated using the EU VAT ID validation service
    street string yes street of the user's address, 5 to 50 characters
    zipCode string yes zip code of the user's address, 3 to 11 characters
    city string yes city of the user's address, 3 to 40 characters
    country string yes user's country - two-letter country code according to ISO 3166-1 alpha-2, as also returned by pattern/getCountries
    website string yes user's website - a valid URL in https://test.com format (at least 12 characters, maximum 250 characters)
    shopSystem string yes user's shop system (between 3 and 50 characters)
    salutation string yes Mr. or Ms.
    firstName string yes user's first name, between 2 and 30 characters
    lastName string yes user's last name, between 2 and 30 characters
    position string yes user's position in the company, between 2 and 50 characters
    email string yes user's email address, a valid email address, maximum 255 characters
    phone string yes user's phone number, between 5 and 255 characters
    mobile string no user's mobile phone number, between 5 and 255 characters
    newsletter boolean yes whether the user wants to receive the Pattern Design newsletter - false for no, true for yes
    billingEmail string no separate address for receiving billing invoices. Must be a valid email address, maximum 255 characters. If not specified, the address from the email parameter is used
    language string no The language used for validation messages. see the languages section. Currently for this method only English is supported.
    userId string no The id in your system of the user that's being signed up

    Validation details

    The parameters are validated, and all validation failures are reported.

    The validation information is contained in a JSON object named validationErrors, and contains objects composed of the field name and the error code plus a human-readable validation message. The language of the message is determined by the language parameters. See the example response for details. The HTTP status for validation errors is 200 (OK) because the request as such is valid, but the JSON response's result field is set to VALIDATION_ERROR and the errorCode field is set to 19

    There can also be multiple validation errors per field (e.g. the password can be weak and too long at the same time). Advanced validations (such as the VAT number check) are only performed after basic validation (not blank) succeeded. Please note that invalid values for the salutation, country and newsletter fields don't result in a validation error but in a regular error, because the user can only choose from pre-supplied values.

    The following error codes can occur, depending on the field.

    • tooShort - if the supplied value is shorter than the minimum allowed length
    • tooLong - if the supplied value is longer than the maximum allowed length
    • blank - if a required field is empty
    • weakPassword - if the password is too weak (see the field for details)
    • urlInvalid - if the url is not valid
    • emailInvalid - when an email is not valid
    • unique - when the username is already in use
    • invalidVatNumberFormat - when the vat number's format is invalid
    • invalidVatNumber - when the vat number is invalid

    Return values

    Name Type Details
    apiKey string the api key for the user that was signed up if the signup was successful
    validationErrors object a list of validation errors if the signup failed due to validation errors

    Example

    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/signUp?username=testuser&password=neverguess&company=PatternFun,Inc&vatNumber=DE999999MN&street=Strada%20del%20Sol&zipCode=1234& city=Springfield&country=AT&website=http%3A%2F%2Fwww.test.com&shopSystem=joomshopping&salutation=Mr.&firstName=Bart&lastName=Simpson& position=CFO&email=bart%40test.com&phone=555-234-444&mobile=00453345&newsletter=true&billingEmail=invoice%40test.com&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    Success:
        {
        "result": "SUCCESS",
        "apiKey": "0ncdiFRMbdbrFWWukHzN78yc"
        }
    
    Validation failure:
        {
        "result": "VALIDATION_ERROR",
        "errorCode": "19",
        "error": "The specified input failed validation",
        "validationErrors":
        [
        {
        "password": "tooShort",
        "validationMessage": "The password is too short."
        },
        {
        "password": "weakPassword",
        "validationMessage": "The password must contain at least a number, an uppercase and a lowercase letter."
        },
        {
        "email": "blank",
        "validationMessage": "The email cannot be blank."
        },
        {
        "firstName": "blank",
        "validationMessage": "The first name cannot be blank."
        },
        {
        "lastName": "blank",
        "validationMessage": "The last name cannot be blank."
        }
        ]
        }
    

    user/getUserData

    Retrieves the data for the currently logged in user

    Authentication

    HMAC required

    HTTP Method

    GET

    Parameters

    This method takes no parameters.

    Return values

    Name Type Details
    userData json object jon object which contains the same values as the parameters for user/signup, except for the password.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/getUserData?sessionToken=E6laAlYttSOINiezNjoc5QPo&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
            {
            "result": "SUCCESS",
            "userData": {
            "username": "testuser",
            "company": "PatternFun,Inc",
            "vatNumber": "DE999999MN",
            "street": "Strada del Sol",
            "zipCode": "1234",
            "city": "Springfield",
            "country": "AT",
            "website": "https://www.test.com",
            "shopSystem": "joomshopping",
            "salutation": "Mr.",
            "firstName": "Bart",
            "lastName": "Simpson",
            "position": "CFO",
            "email": "bart@test.com",
            "phone": "555-234-444",
            "mobile": 00453345,
            "newsletter": "true",
            "billingEmail": "invoice@test.com"
            "credits": { "amount": 0, "currency": "EUR", "symbol": "€" }
            }
            }
        

    user/listPurchases

    List the past purchases of the API user

    Allows to retrieve a list of the purchases that the API user made, either all purchases or aggregated by month. The result list is sorted newest first.

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    groupBy String no If "month" is specified, the results will be grouped by month
    limit integer no Limits the number of retrieved sales, the maximum value is 100, the default is 50
    offset integer no Offset into the list of sales, the default value is 0

    Return values

    Depending on the groupBy parameter, the result is in one of the two formats (see the examples for the exact json format).
    • a list of all individual purchases with order reference, license costs and date (the date is in ISO 8601 including seconds
    • a list of the purchases aggregated by month with the aggregate license costs
    For the representation of monatary values see also the currencies section.

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/user/listPurchases?nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    Individual sales
            {
            "result": "SUCCESS",
            "purchases":
            [
            {
            "date": "2014-04-25T03:58:50Z",
            "orderReference": "1235",
            "quantity": 42,
            "licenseCosts": { "amount": 0.12,  "currency": "EUR", "symbol": "€" },
            "productName": "Towel",
            "designs": [ { "id": 4212 } ]
            },
            {
            "date": "2014-04-25T03:43:50Z",
            "orderReference": "1234",
            "quantity": 1,
            "licenseCosts": { "amount": 0.12, "currency": "EUR", "symbol": "€" },
            "productName": "Towel",
            "designs": [ { "id": 4212 } ]
            }
            }
        
    Grouped sales
            {
            "result": "SUCCESS",
            "purchases":
            [
            {
            "year": 2014,
            "month": 4,
            "totalLicenseCosts": { "amount": 273.24, "currency": "EUR", "symbol": "€" }
            },
            {
            "year": 2014,
            "month": 3,
            "totalLicenseCosts": { "amount": 123.73, "currency": "EUR", "symbol": "€" }
            }
            ]
            }
        

    general/getCountries

    Get a list of available countries

    Lists the countries that can be used for methods that take a country as a parameter

    Authentication

    None

    HTTP Method

    GET

    Parameters

    Parameter Type Required Details
    language string no see the languages section

    Return values

    Name Type Details
    countries json object the list of countries with the two-letter country code according to ISO 3166-1 alpha-2 as id and the name in the specified language

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/general/getCountries?language=es&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "SUCCESS",
      "countries":
      [
        {
          "id": "AF",
          "name": "Afganistán",
          "isEuCountry": false
        },
        (... snip ...)
        {
          "id": "ZW",
          "name": "Zimbabue"
          "isEuCountry": false
        }
      ]
    }
    

    pattern/collections

    Gets a list of available collections of the authenticated user.

    Lists metadata about all collections of this user. The metadata includes the ID property of a collection that defines the URL to obtain the patterns contained in a collection. Also, a display design is provided, which can be used as a preview image.

    The contents of a collection can be either maintained in the settings section of the API page or through custom functionality in the client application by using API calls.

    Authentication

    HMAC required

    HTTP Method

    GET

    Return values

    Name Type Details
    collections json object array of collection metadata objects

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "SUCCESS",
      "collections":
      [
        {
          "id": 4242,
          "title": "1920s",
          "displayDesign": 3761,
          "displayDesignUrl": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/3761.jpg"
        },
        (... snip ...)
        {
          "id": 4243,
          "title": "Miami Beach Party",
          "displayDesign": 3763,
          "displayDesignUrl": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/3763.jpg"
        }
      ]
    }
    

    pattern/collections/:collectionID

    Gets an existing collection by ID.

    The contents of a collection can be either maintained in the settings section of the API page or through custom functionality in the client application by using API calls.

    Authentication

    HMAC required

    HTTP Method

    GET

    Return values

    Name Type Details
    id integer ID of the retrieved collection
    title string Collection title
    displayDesign integer or null Either the ID of a design to serve as the preview image of the collection or null if no displayDesign has been set
    displayDesignUrl string or null Either an absolute URL to a non-tilable, square preview image for the collection or null if no displayDesign has been set
    patterns array Array of unique integers each being the ID of one contained pattern

    Example

    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/4242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "SUCCESS",
      "collection": {
        "id": 4242,
        "title": "1920s",
        "displayDesign": 1024,
        "displayDesignUrl": "https://d1biw2rz2h5h5w.cloudfront.net/images/patterns/api/gallery/3761.jpg"
        "patterns": [ 1024, 311, 314 ]
      }
    }
    
    With malformed ID
    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/elvis42&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "Resource ID could not be parsed to an integer: elvis42"
     }
    
    With non-existent ID
    Request
    GET /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/999999&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "107",
      "error": "The specified collection does not exist"
    }
    

    pattern/collections

    Creates a new collection using the data sent in the request body.

    The data must be a JSON object defining the properties "title" (must be non-empty), "displayDesign" (nullable) and "patterns". Failing to provide all properties makes the API call yield an error and not create a new collection.

    Responds with a JSON object containing "id" and "location" of the newly created collection. "location" contains an absolute URL addressing the newly created resource. This location is also sent with the HTTP header Location.

    Authentication

    HMAC required

    HTTP Method

    POST

    Return values

    Name Type Details
    id integer ID of the newly created collection
    location string Relative URL to the newly created collection

    Example

    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Retro Pixelart",
      "displayDesign": null,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    HTTP/1.1 200 OK
    [...]
    Location: https://patterndesigns.com/api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/42
    
    {
      "result": "SUCCESS",
      "id": 42,
      "location": "https://patterndesigns.com/api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/42"
    }
    
    with missing properties
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Futristic LED art",
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "106",
      "error": "The sent resource does not contain all required properties",
      "details": "Missing properties: [displayDesign]"
    }
    
    with non-existing pattern ID in displayDesign or patterns
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Han Dynasty Vases",
      "displayDesign": 9898989,
      "patterns": [
        807,
        9898989
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "100",
      "error": "The specified design does not exist"
    }
    
    with wrong type of title property
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": true,
      "displayDesign": 1414,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "25",
      "error": "The given parameter is not a string",
      "details": "title must be a string"
    }
    
    with empty title property
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "",
      "displayDesign": 1414,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "109",
      "error": "The specified string is empty",
      "details": "title may not be empty"
    }
    
    with wrong type of displayDesign
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Yodeling",
      "displayDesign": "1414",
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "displayDesign is required and needs to be either null or a valid integer, instead got: \"1414\""
    }
    
    with wrong type of patterns or design IDs contained in patterns
    Request
    POST /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Victorian",
      "displayDesign": 1414,
      "patterns": [
        807,
        "x"
      ]
    }
    
    Response
    {
      "result":"ERROR",
      "errorCode": "26",
      "error": "The given parameter is not a list of pattern IDs",
      "details": "list:[807, x]"
    }
    

    pattern/collections/:collectionID

    Performs a full update of an existing collection using the data sent in the request body.

    The data must be a JSON object defining the properties "title" (non-empty), "displayDesign" (nullable) and "pattterns".

    If the given data does not define all collection properties, the API call yields an error and the collection is left in its previous state.

    Authentication

    HMAC required

    HTTP Method

    PUT

    Example

    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/424242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Retro Pixelart",
      "displayDesign": null,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    HTTP/1.1 200 OK
    [...]
    
    {
      "result": "SUCCESS"
    }
    
    with missing properties
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Futristic LED art",
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "106",
      "error": "The sent resource does not contain all required properties",
      "details": "Missing properties: [displayDesign]"
    }
    
    with non-existing pattern ID in displayDesign or patterns
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Han Dynasty Vases",
      "displayDesign": 9898989,
      "patterns": [
        807,
        9898989
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "100",
      "error": "The specified design does not exist"
    }
    
    with wrong type of title property
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": true,
      "displayDesign": 1414,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "25",
      "error": "The given parameter is not a string",
      "details": "title must be a string"
    }
    
    with empty title property
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "",
      "displayDesign": 1414,
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "109",
      "error": "The specified string is empty",
      "details": "title may not be empty"
    }
    
    with wrong type of displayDesign
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Yodeling",
      "displayDesign": "1414",
      "patterns": [
        1414,
        353252,
        7,
        42
      ]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "displayDesign is required and needs to be either null or a valid integer, instead got: \"1414\""
    }
    
    with wrong type of patterns or design IDs contained in patterns
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/123&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "title": "Victorian",
      "displayDesign": 1414,
      "patterns": [
        807,
        "x"
      ]
    }
    
    Response
    {
      "result":"ERROR",
      "errorCode": "26",
      "error": "The given parameter is not a list of pattern IDs",
      "details": "list:[123, asdf]"
    }
    
    With malformed ID
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/elvis42&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "Resource ID could not be parsed to an integer: elvis42"
    }
    
    With non-existent ID
    Request
    PUT /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/999999&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "107",
      "error": "The specified collection does not exist"
    }
    

    pattern/collections/:collectionID

    Performs a partial update of a collection by sending an update object in the request body.

    An update object contains a "method" and a "data"-property, depending on the operation to perform.

    method usage data
    add Appends patterns to the end of the collection. If a pattern is already present in the collection, it is silently ignored. An array of pattern IDs.
    remove Removes patterns from the collection. If attempting to remove an ID that is not present in the collection, or when the list to remove contains duplicate IDs, the API yields an error and the collection is left in its previous state. An array of pattern IDs.
    set Replaces any or all of "title", "displayDesign" or "patterns" with a new value. An object with any, some or all of the properties "title", "displayDesign" or "patterns" defined. The value of "title" is expected to be a string, "displayDesign" is an integer and "patterns" is expected to be an array of pattern IDs.

    Authentication

    HMAC required

    HTTP Method

    PATCH

    Example

    Request
    PATCH /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/424242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "method": "add",
      "data": [ 420, 512, 1024 ]
    }
    
    Response
    HTTP/1.1 200 OK
    [...]
    
    {
      "result": "SUCCESS"
    }
    
    with invalid method
    Request
    PATCH /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/424242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
      "method": "eat",
      "data": "paprika"
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "11",
      "error": "The value of the given parameter is invalid",
      "details": "method:eat"
    }
    
    with invalid pattern list in add or remove
    Request
    PATCH /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/424242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    {
        "method": "add",
        "data": [123, "asdf"]
    }
    
    Response
    {
      "result": "ERROR",
      "errorCode": "26",
      "error": "The given parameter is not a list of pattern IDs",
      "details": "list:[123, asdf]"
    }
    
    With malformed ID
    Request
    PATCH /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/elvis42&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "Resource ID could not be parsed to an integer: elvis42"
    }
    
    With non-existent ID
    Request
    PATCH /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/999999&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "107",
      "error": "The specified collection does not exist"
    }
    

    pattern/collections/:collectionID

    Deletes the collection located at the URL.

    Authentication

    HMAC required

    HTTP Method

    DELETE

    Example

    Request
    DELETE /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/424242&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    HTTP/1.1 200 OK
    [...]
    
    {
      "result": "SUCCESS"
    }
    
    With malformed ID
    Request
    DELETE /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/elvis42&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "12",
      "error": "The value of the given parameter cannot be interpreted as an integer",
      "details": "Resource ID could not be parsed to an integer: elvis42"
    }
    
    With non-existent ID
    Request
    DELETE /api/rest/1.0/h3vaT57GWThxW79HbLLosp6g/pattern/collections/999999&nonce=83fad183e7740e820df9c3f1853f4480&timestamp=2014-04-10T06:22Z&signature=747e4c9ead23313011aed5902bbd6b100a419cbdb196d0e8e1ca9c611b4c1688
    Response
    {
      "result": "ERROR",
      "errorCode": "107",
      "error": "The specified collection does not exist"
    }