NAV Navbar
  • Introduction
  • Media
  • Products
  • Variants
  • Checkouts
  • Orders
  • Introduction

    Introduction

    API Endpoint

    https://api.smake.io/v2/apps/{APP_ID_HERE}
    

    Welcome to the Smake Api documentation.

    The Smake API is organized by REST. The API allows you to create orders in a simple programmatic way with conventional HTTP requests.

    Basic terms

    Term Description
    Resource An object (for example, a product variant)
    Collection Listing of objects (for example, all variants of a product)

    Note about the API Endpoint

    Authentication

    Example Request

    GET /orders HTTP/1.1
    Authorization: Bearer API_KEY_HERE
    

    In order to use the API, you must authenticate each request by including your API key as a bearer token value:

    Authorization: Bearer API_KEY_HERE

    Headers

    Example Request

    GET /orders HTTP/1.1
    Accept: application/json
    Content-Type: application/json
    

    The API only supports the data format JSON.

    Therefore, make sure that you set the following headers for each request:

    Accept: application/json

    Content-Type: application/json

    Testing

    Example Response

    HTTP/1.1 200 OK
    
    {
        "id": 1,
        "is_test": true,
        "external_identifier": null,
        "project_name": "et",    
        "state": "delivered",
        "customer_locale": "en",
        "currency": "EUR",    
        ...
    }
    

    You will get a test application which works similar to your later live application. Here you can also create an API key.

    The test application allows you to implement your processes in a secure way before the live connection. You can test the API extensively. You don't cause any costs or side effects.

    Once you have completed your implementation, all you have to do is exchange the Test Api Key for the Live Api Key.

    If a resource was created in the test application, the response contains the field is_test.

    Field Type Description
    is_test boolean Shows whether the resource was created in a test application or in a live application

    Requests

    Any tool that can communicate with HTTP can communicate with the API by requesting the correct resource URL. The interface reacts to different methods depending on the desired action.

    Method Use
    GET For a simple query that displays information about a resource or collection, use the GET method. The information is returned as a JSON object. Any request that uses the GET method is read-only and does not affect any of the objects you request.
    DELETE To delete a resource, use the DELETE method. This will remove the specified object if it is found. If the resource does not exist, the operation returns the corresponding response.
    PUT The PUT method is available to update the information of a resource. The PUT request contains all attributes that are to be updated for an object.
    POST To create a new object, use the POST method. The POST request contains all the attributes required to create a new object.

    HTTP-Status

    Example Error Response

    HTTP/1.1 401 Unauthenticated
    
    {
      "status_code": 401,
      "message":  "API Key is invalid.",
      "errors": []
    }
    

    Example Response for Validation Errors

    HTTP/1.1 422 Unprocessable Entity
    
    {
        "status_code": 422,
        "message": "The request data you sent is not valid.",
        "errors": {
            "shipping_address": {
                "first_name": [
                    "The firstname field is required."
                ]
            },
            "items": [
                {
                    "quantity": [
                        "The items.0.quantity must be at least 1."
                    ]
                }
            ]
        }
    }
    

    Together with the HTTP methods to which the API reacts, standard HTTP status codes are also used.

    In the case of a problem, the status contains the error code, while the response body usually contains additional information about the problem that has occurred.

    Successful

    In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered.

    Client error

    Status codes in the 400 range indicate that there was a problem with the request sent. Among other things, this could mean that you have not authenticated yourself correctly, that you request an action for which you have no authorization, that the object you are requesting does not exist, or that your request is incorrect.

    Server Error

    If you get a status code in the 500 range, this usually indicates a server-side problem. This means that we have a problem on our site and we cannot currently fulfill your request.

    The following table summarizes the typical status codes:

    Code Description
    200 - OK Everything works as expected.
    201 - Created The resource was created successfully.
    202 - Accepted The request was accepted and is processed in the background.
    204 - No Content The resource was successfully deleted.
    400 - Bad Request Valid data was specified, but the request failed.
    401 - Unauthorized No valid Api Key has been specified.
    404 - Not Found The requested resource does not exist.
    422 - Unprocessable Entity The payload has missing required parameters or invalid data.
    429 - Too Many Requests Too many requests in a short time.
    500 - Internal Server Error Request failed because of an internal error in Smake.
    503 - Service Unavailable Smake is offline for maintenance reasons.

    Responses

    Response Body for a Collection

    {
        "data": [
            {
                "id": 1,
                "is_test": true,
                "first_name": "John",
                "last_name": "Doe",
                "company": null,
                "addresses": [],
                "created_at": "2017-09-28T08:40:44+00:00",
                "updated_at": "2017-09-28T08:40:44+00:00",
                ....
            }            
        ]  
    }
    

    Response Body for a Resource

    {
      "id": 1,
      "is_test": true,
      "first_name": "John",
      "last_name": "Doe",
      "company": null,
      "addresses": [],
      "created_at": "2017-09-28T08:40:44+00:00",
      "updated_at": "2017-09-28T08:40:44+00:00",
      ...
    }
    

    If a request is successful, a response body is typically returned in the form of a JSON object.

    Two exceptions to this are when a DELETE request is processed or the request is processed asynchronously. In these two cases you will receive an empty response body. The DELETE request returns a 204 No Content and returns the asynchronous request to 202 Accepted.

    Collections / Resourcen / Attribute

    If you call up a collection of resources, this will be displayed within data. If you call up a resource, you will receive it directly.

    Empty fields are contained as zero instead of being omitted if there is a resource (e. g. company). If it is a collection of resources, this is done using an empty array (e. g. adresses).

    Timestamp

    All timestamps are available in ISO 8601 format: YYYYY-MM-DDTHH: MM: SSZ.

    Pagination

    Example Request

    GET /media?per_page=2&page=4 HTTP/1.1
    

    Example Response

    {
         "data": [
             {
                 "id": 1005,
                 "is_test": true,
                 "file_name": "39b8196929f742e7bccab01a643b6524.jpeg",
                 "size": 42840,
                 "mime_type": "image/jpeg",
                 "download_url": "https://api.smake.io/v2/media/1005/download",
                 "created_at": "2017-09-28T08:40:44+00:00",
                 "updated_at": "2017-09-28T08:40:44+00:00"
             },
             {
                 "id": 1006,
                 "is_test": true,
                 "file_name": "5d9de455299a4c369fcf719b677cf4cd.jpeg",
                 "size": 42840,
                 "mime_type": "image/jpeg",
                 "download_url": "https://api.smake.io/v2/media/1006/download",
                 "created_at": "2017-09-28T08:46:21+00:00",
                 "updated_at": "2017-09-28T08:46:21+00:00"
             }
         ],
         "links": {
             "first": "https://api.smake.io/v2/media?page=1&per_page=2",
             "last": "https://api.smake.io/v2/media?page=9&per_page=2",
             "prev": "https://api.smake.io/v2/media?page=3&per_page=2",
             "next": "https://api.smake.io/v2/media?page=2&per_page=2"
         },
         "meta": {
             "current_page": 4,
             "from": 1,
             "last_page": 9,
             "path": "https://api.smake.io/v2/media",
             "per_page": 2,
             "to": 2,
             "total": 17
         }
     }
    

    Each collection always has a meta and links key with information about the paginator.

    Meta

    meta contains the complete information of the paginator, such as the current page or the number of results.

    links contains the direct URLs for navigating through the result set (first, last, prev and next).

    Parameter

    By default, 25 results are returned per page.

    You can specify a different limit by using ? per_page query string parameters to enforce how many results you want per page. For example, if you want to have only two results per page, add ?? per_page=2 at the end of the query string. The maximum number of results per page is 100.

    By default, page 1 of the found set is returned.

    You can use the URLs listed under links to browse through the pages or directly select a page using ? page query string parameters. With ? page=4 you can e. g. go directly to page 4.

    Filter Collection

    Example Request

    GET /orders?filter[items.quantity]=4&filter[state]=delivered&filter[customer.first_name]=like:*hon* HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "data": [
            {
                "id": 1,
                "is_test": true,
                "external_identifier": null,            
                "project_name": "et",            
                "state": "delivered",
                "customer_locale": "de",
                "currency": "EUR",
                "total": 87.76,
                "subtotal": 86.63,
                "total_tax": 1.13,
                "total_items_price": 82.98,
                "shipping_line": {
                    "title": "DHL World Business",
                    "price": 4.47,
                    "total": 4.78,
                    "tax": 0.31
                },
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:11:03+00:00",
                "cancelled_at": null,
                "items": [
                    {
                        "id": 1,
                        "quantity": 4,
                        "total": 82.98,
                        "price": 20.54,
                        "total_tax": 0.82,
                        "tax_rate": 1,
                        "variant": {
                            "id": 27,
                            "total": 186.58,
                            "price": 174.37,
                            "tax": 12.21,
                            "tax_rate": 7,
                            "code": "4490824589755",
                            "attributes": [
                                {
                                    "name": "color",
                                    "value": "Khaki"
                                },
                                {
                                    "name": "size",
                                    "value": "XL"
                                }
                            ],
                            "media_id": 251,
                            "views": [],
                            "created_at": "2017-09-27T10:10:38+00:00",
                            "updated_at": "2017-09-27T10:10:38+00:00"
                        },
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00",
                        "cancelled_at": null
                    }
                ],
                "customer": {
                    "id": 40,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com",
                    "phone": "12345 67890",
                    "addresses": [
                        {
                            "id":  10,  
                            "default": true,
                            "company": null,
                            "first_name": "John",
                            "last_name": "Doe",
                            "city": "Anytown",
                            "street1": "123 Main St",
                            "street2": null,
                            "street3": null,
                            "zip": "12345",                
                            "email": "john@example.com",
                            "phone": "12345 67890",
                            "province_code": "NW",
                            "country_code": "DE",
                            "vat_in": null,
                            "created_at": "2017-09-27T10:10:59+00:00",
                        },
                        {
                            "id":  11,  
                            "default": false,
                            "company": null,
                            "first_name": "John",
                            "last_name": "Doe",
                            "city": "Anytown",
                            "street1": "123 Main St",
                            "street2": null,
                            "street3": null,
                            "zip": "12345",                
                            "email": "john@example.com",
                            "phone": "12345 67890",
                            "province_code": "NW",
                            "country_code": "DE",
                            "vat_in": null,
                            "created_at": "2017-09-27T10:10:59+00:00",
                            "updated_at": "2017-09-27T10:10:59+00:00"
                        }
                    ],
                    "default_address": {
                       "id":  10,  
                       "default": true,
                       "company": null,
                       "first_name": "John",
                       "last_name": "Doe",
                       "city": "Anytown",
                       "street1": "123 Main St",
                       "street2": null,
                       "street3": null,
                       "zip": "12345",                
                       "email": "john@example.com",
                       "phone": "12345 67890",
                       "province_code": "NW",
                       "country_code": "DE",
                       "vat_in": null,
                       "created_at": "2017-09-27T10:10:59+00:00",
                       "updated_at": "2017-09-27T10:10:59+00:00"
                   },
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "shipping_address": {
                    "id": 45,
                    "default": true,
                    "company": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",                
                    "email": "john@example.com",
                    "phone": "12345 67890",
                    "province_code": "NW",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "billing_address": {
                    "id": 44,
                    "default": true,
                    "company": null,
                    "first_name": "John",
                    "last_name": "Doe",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",                
                    "email": "john@example.com",
                    "phone": "12345 67890",
                    "province_code": "NW",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "whitelabel_address": null,
                "transactions": [
                    {
                        "amount": 87.76,
                        "title": "Invoice"
                    }
                ],
                "fulfillments": [
                    {
                        "id": 1,
                        "order_id": 1,
                        "tracking_number": "2229446017085",
                        "created_at": "2017-09-27T10:11:02+00:00",
                        "updated_at": "2017-09-27T10:11:02+00:00"
                    }
                ],
                "id_tags": [
                    {
                        "id": 1,
                        "order_item_id": 1,
                        "current_state": "Goods booked in",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 2,
                        "order_item_id": 1,
                        "current_state": "Released to production stage",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 3,
                        "order_item_id": 1,
                        "current_state": "Shipped",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 4,
                        "order_item_id": 1,
                        "current_state": "Scanned on machine (DTG)",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    }
                ]
            }
        ],
        "links": {
            "first": "https://api.smake.io/v2/orders?filter%5Bitems.quantity%5D=4&filter%5Bstate%5D=delivered&filter%5Bcustomer.first_name%5D=like%3A%2Aendr%2A&page=1",
            "last": "https://api.smake.io/v2/orders?filter%5Bitems.quantity%5D=4&filter%5Bstate%5D=delivered&filter%5Bcustomer.first_name%5D=like%3A%2Aendr%2A&page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "https://api.smake.io/v2/orders",
            "per_page": 25,
            "to": 1,
            "total": 1
        }
    }
    

    You can search within a collection using ?filter[field] query string parameters. Here you have the possibility to query a value directly or to restrict the result set with the help of an operator.

    URL Syntax

    Operator Description
    like Value of field contains comparison
    ge Value of field is greater than or equal to comparison
    gt Value of field is greater than comparison
    le Value of field is less than or equal to comparison
    lt Value of field is less than comparison

    Rate Limit

    Example Rate Limit Header

    GET /orders HTTP/1.1 200 OK
    X-RateLimit-Limit: 5000
    X-RateLimit-Remaining: 4954
    

    Example rate limit consumed

    GET /orders HTTP/1.1 429 Too Many Requests
    X-RateLimit-Limit: 5000
    X-RateLimit-Remaining: 0
    X-RateLimit-Reset: 1377013266
    
    {    
        "message": "Too many attempts."
    }
    

    The number of requests that can be made via the API is currently set to 5000 requests per hour**.

    The rate limiting information is contained in the response headers of the relevant request. The corresponding headers are:

    Header Name Description
    X-RateLimit-Limit The maximum number of requests you can make per hour.
    X-RateLimit-Remaining The number of requests that still exist before your requests are restricted.
    X-RateLimit-Reset The time in which the current rate limit is reset in UTC epoch seconds.

    If the X-RateLimit-Remaining 0 is reached, subsequent requests receive a 429 error code until the X-RateLimit-Reset is reached.

    Conditional Requests

    Example Response before If-None-Match

    GET /orders HTTP/1.1 200 OK
    ETag: "644b5b0155e6404a9cc4bd9d8b1ae730"
    

    Example Request

    GET /orders HTTP/1.1
    If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"
    

    Example Response after If-None-Match

    GET /orders HTTP/1.1 304 Not Modified
    

    All responses always return an ETag header. For all successful GET requests you can use the ETag value of the header, to create subsequent requests with the If-None-Match header. If the resource has not changed, the server returns a 304 Not Modified.

    Polling

    Example Request from a request that would last longer

    POST /variant/1/design HTTP/1.1
    

    Example response from a request that would last longer

    HTTP/1.1 202 Accepted
    Location: https://api.smake.io/v2/jobs/1
    

    Example Request to check the status of the job

    GET /jobs/1 HTTP/1.1
    

    Example Response if the job is not finished yet

    HTTP/1.1 202 Accepted
    Location: https://api.smake.io/v2/jobs/1
    
    {
        "id": 1,
        "is_test": true,
        "resource_url": null,
        "state": "queued"
    }
    

    Example Response when the job is completed

    HTTP/1.1 200 OK
    
    {
        "id": 1,
        "is_test": true,
        "resource_url": "https://api.smake.io/v2/variant/2",
        "state": "finished"
    }
    

    If a task takes longer than the request timeout limit, the request is acknowledged with a 202 Accepted and handled as a background job.

    You don't get the requested resource directly, instead you get the URL of the background job in the Location header, which shows you the background job status.

    Query job status

    You need to check this URL periodically to check when the background job is finished.

    When the background job is completed, a 200 OK is returned and the response body fills the resource_url to complete the next step. If not, a 202 Accepted will still be returned and the resource_url will remain empty.

    Request-Id

    Example Response

    GET /orders HTTP/1.1 200 OK
    X-Request-Id: d312517c-7ac9-402d-87c5-0a6b9da92a4d
    

    Each API request has an assigned request ID. You can find the value X-Request-Id in the response header.

    Localization

    Example Request for Display with Accept-Language Header

    GET /variants/1 HTTP/1.1
    Accept-Language: 'de'
    

    Example Response

    {        
        "id": 1,    
        "attributes": [
            {
                "name": "color",
                "value": "Gelb"
            }        
        ]
        ...    
    }           
    

    Example Request for Display Without Accept-Language Header

    GET /variants/1 HTTP/1.1
    

    Example Response

    {        
        "id": 1,    
        "attributes": [
            {
                "name": "color",
                "value": "Yellow"
            }        
        ]
        ...    
    }           
    

    Example Request for saving with Accept-Language

    POST /orders HTTP/1.1
    Accept-Language: 'de'
    
    {
       "email": "customer@example.com",
       "items": [
          {
             "variant_id": 1,
             "quantity": 1
          }
       ],
       "shipping_address": {
          "first_name": "John",
          "last_name": "Doe",
          "street1": "123 Main St",
          "zip": "12345",
          "city": "Anytown",
          "country_code": "DE",
          "province_code": "NW",
          "phone": "12345 67890",
          "email": "shipping@example.com"
       }
    }
    

    Example Response

    {        
        "id": 1,
        "external_identifier": null,    
        "project_name": null,    
        "state": "incompleted",
        "customer_locale": "de",
        ...
    }           
    

    Example Request for saving without Accept-Language

    POST /orders HTTP/1.1
    
    {
       "email": "customer@example.com",
       "items": [
          {
             "variant_id": 1,
             "quantity": 1
          }
       ],
       "shipping_address": {
          "first_name": "John",
          "last_name": "Doe",
          "street1": "123 Main St",
          "zip": "12345",
          "city": "Anytown",
          "country_code": "DE",
          "province_code": "NW",
          "phone": "12345 67890",
          "email": "shipping@example.com"
       }
    }
    

    Example Response

    {        
        "id": 1,
        "external_identifier": null,    
        "project_name": null,    
        "state": "incompleted",
        "customer_locale": "en",
        ...
    }           
    

    Display

    By default, a resource is presented in english. You can also display the resource in another language.

    The resource is localized by means of the Accept-Language header. However, this has no effect on validation messages or any errors. These are still displayed in English.

    The following locales are currently available for Accept-Language:

    en, de, nl, fr, ar, sv, pl and tk

    Saving

    In some cases, you can also save a resource localized. With the Checkout Api for example, this is used to save an order in a specified language. By default it is stored in english, using the Accept-Language header you can control how it is stored.

    This is important if, for example, the delivery note is to be displayed in a certain language.

    Media

    Under Media you can store image files for different areas and reuse them several times with reference to the Media Id.

    Currently, media IDs are required for the following areas:

    Area Attributes Description
    Variante designen composite_media_id Product picture with customization
    Variante designen production_media_id production file for customization

    Upload media

    Example Request

    POST /media HTTP/1.1
    
    raw content
    

    Example Response

    HTTP/1.1 201 Created
    
    {
        "id": 1,
        "is_test": true,
        "file_name": "39b8196929f742e7bccab01a643b6524.jpeg",
        "size": 42840,
        "mime_type": "image/jpeg",
        "download_url": "https://api.smake.io/v2/media/1/download",
        "created_at": "2017-09-28T08:40:44+00:00",
        "updated_at": "2017-09-28T08:40:44+00:00"
    }
    

    The following file formats are currently supported:

    Type Options
    JPG/JPEG RGB, 300dpi
    PNG RGB, 300dpi, transparencies

    The maximum file size is 10MB.

    In PHP, for example, you can send raw content with file_get_contents('/path/to/file').

    List media

    Example Request

    GET /media HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "data": [
            {
                "id": 1005,
                "is_test": true,
                "file_name": "39b8196929f742e7bccab01a643b6524.jpeg",
                "size": 42840,
                "mime_type": "image/jpeg",
                "download_url": "https://api.smake.io/v2/media/1005/download",
                "created_at": "2017-09-28T08:40:44+00:00",
                "updated_at": "2017-09-28T08:40:44+00:00"
            },
            {
                "id": 1006,
                "is_test": true,
                "file_name": "5d9de455299a4c369fcf719b677cf4cd.jpeg",
                "size": 42840,
                "mime_type": "image/jpeg",
                "download_url": "https://api.smake.io/v2/media/1006/download",
                "created_at": "2017-09-28T08:46:21+00:00",
                "updated_at": "2017-09-28T08:46:21+00:00"
            },
            {
                "id": 1007,
                "is_test": true,
                "file_name": "4efd66336f274163b6ef8c34a9c77570.jpeg",
                "size": 42840,
                "mime_type": "image/jpeg",
                "download_url": "https://api.smake.io/v2/media/1007/download",
                "created_at": "2017-09-28T08:46:26+00:00",
                "updated_at": "2017-09-28T08:46:26+00:00"
            },
            {
                "id": 1008,
                "is_test": true,
                "file_name": "391f3972c2bd473ba186752555b74cab.jpeg",
                "size": 42840,
                "mime_type": "image/jpeg",
                "download_url": "https://api.smake.io/v2/media/1008/download",
                "created_at": "2017-09-28T08:46:27+00:00",
                "updated_at": "2017-09-28T08:46:27+00:00"
            },
            {
                "id": 1009,
                "is_test": true,
                "file_name": "f868b1172fb74d0dbd6877f3e02f3386.jpeg",
                "size": 42840,
                "mime_type": "image/jpeg",
                "download_url": "https://api.smake.io/v2/media/1009/download",
                "created_at": "2017-09-28T08:46:28+00:00",
                "updated_at": "2017-09-28T08:46:28+00:00"
            },
           ...
        ],
        "links": {
            "first": "https://api.smake.io/v2/media?page=1",
            "last": "https://api.smake.io/v2/media?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "https://api.smake.io/v2/media",
            "per_page": 25,
            "to": 16,
            "total": 16
        }
    }
    

    Returns a collection of uploaded images.

    Get Media

    Example Request

    GET /media/1 HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "id": 1,
        "is_test": true,
        "file_name": "39b8196929f742e7bccab01a643b6524.jpeg",
        "size": 42840,
        "mime_type": "image/jpeg",
        "download_url": "https://api.smake.io/v2/media/1/download",
        "created_at": "2017-09-28T08:40:44+00:00",
        "updated_at": "2017-09-28T08:40:44+00:00"
    }
    

    Returns the resource for the uploaded image with id = x.

    Media download

    Example Request

    GET /media/1/download HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    Content-Type: image/jpeg
    
    raw content
    

    Returns the image data for the uploaded image with the id = x as download.

    For example, in PHP you can read the raw content with file_get_contents('php://input');.

    Products

    List products

    Example Request

    GET /products HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "data": [
            {
                "is_test": false,
                "id": 1,
                "title": "qui ut nemo",
                "description": "Autem nesciunt ipsam excepturi non distinctio quas ullam placeat. Quam quidem rerum veniam corrupti velit aperiam non. Repudiandae rem incidunt atque optio vero et voluptatem. Fuga et quos in ipsa.",
                "created_at": "2017-11-15T08:07:48+00:00",
                "updated_at": "2017-11-15T08:07:48+00:00",
                "variants": [
                    {
                        "id": 90,
                        "total": 101.7,
                        "price": 85.46,
                        "tax": 16.24,
                        "tax_rate": 19,
                        "code": "0635579894134",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "RoyalBlue"
                            },
                            {
                                "name": "size",
                                "value": "S"
                            }
                        ],
                        "media_id": 607,
                        "views": {
                            "back": {
                                "composite_media_id": 609,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 610,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 608,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 611,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:48+00:00",
                        "updated_at": "2017-11-15T08:07:50+00:00"
                    },
                    {
                        "id": 92,
                        "total": 185.21,
                        "price": 173.09,
                        "tax": 12.12,
                        "tax_rate": 7,
                        "code": "6904687103174",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "DarkCyan"
                            },
                            {
                                "name": "size",
                                "value": "L"
                            }
                        ],
                        "media_id": 617,
                        "views": {
                            "back": {
                                "composite_media_id": 619,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 620,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 618,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 621,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:49+00:00",
                        "updated_at": "2017-11-15T08:07:50+00:00"
                    },
                    {
                        "id": 94,
                        "total": 24.52,
                        "price": 20.61,
                        "tax": 3.91,
                        "tax_rate": 19,
                        "code": "1243574262255",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "Blue"
                            },
                            {
                                "name": "size",
                                "value": "L"
                            }
                        ],
                        "media_id": 627,
                        "views": {
                            "back": {
                                "composite_media_id": 629,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 630,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 628,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 631,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:50+00:00",
                        "updated_at": "2017-11-15T08:07:50+00:00"
                    }
                ]
            },
            {
                "is_test": false,
                "id": 30,
                "title": "ut",
                "description": "Et voluptatem quas neque praesentium qui harum. Ea occaecati perferendis inventore tempore nemo. Nobis perferendis voluptas sed tempore at.",
                "created_at": "2017-11-15T08:07:51+00:00",
                "updated_at": "2017-11-15T08:07:51+00:00",
                "variants": [
                    {
                        "id": 96,
                        "total": 168.98,
                        "price": 142,
                        "tax": 26.98,
                        "tax_rate": 19,
                        "code": "9410671772396",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "DarkRed"
                            },
                            {
                                "name": "size",
                                "value": "M"
                            }
                        ],
                        "media_id": 642,
                        "views": {
                            "back": {
                                "composite_media_id": 644,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 645,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 643,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 646,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:51+00:00",
                        "updated_at": "2017-11-15T08:07:55+00:00"
                    },
                    {
                        "id": 98,
                        "total": 95.92,
                        "price": 80.61,
                        "tax": 15.31,
                        "tax_rate": 19,
                        "code": "0473312504175",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "BlanchedAlmond"
                            },
                            {
                                "name": "size",
                                "value": "L"
                            }
                        ],
                        "media_id": 652,
                        "views": {
                            "back": {
                                "composite_media_id": 654,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 655,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 653,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 656,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:52+00:00",
                        "updated_at": "2017-11-15T08:07:55+00:00"
                    },
                    {
                        "id": 100,
                        "total": 121.2,
                        "price": 101.85,
                        "tax": 19.35,
                        "tax_rate": 19,
                        "code": "6122944008004",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "Pink"
                            },
                            {
                                "name": "size",
                                "value": "XL"
                            }
                        ],
                        "media_id": 662,
                        "views": {
                            "back": {
                                "composite_media_id": 664,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 665,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 663,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 666,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:53+00:00",
                        "updated_at": "2017-11-15T08:07:55+00:00"
                    },
                    {
                        "id": 102,
                        "total": 125.17,
                        "price": 116.98,
                        "tax": 8.19,
                        "tax_rate": 7,
                        "code": "5897554102930",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "Ivory"
                            },
                            {
                                "name": "size",
                                "value": "S"
                            }
                        ],
                        "media_id": 672,
                        "views": {
                            "back": {
                                "composite_media_id": 674,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 675,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 673,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 676,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:54+00:00",
                        "updated_at": "2017-11-15T08:07:55+00:00"
                    },
                    {
                        "id": 104,
                        "total": 64.28,
                        "price": 54.02,
                        "tax": 10.26,
                        "tax_rate": 19,
                        "code": "0899276696853",
                        "attributes": [
                            {
                                "name": "color",
                                "value": "DarkSalmon"
                            },
                            {
                                "name": "size",
                                "value": "XL"
                            }
                        ],
                        "media_id": 682,
                        "views": {
                            "back": {
                                "composite_media_id": 684,
                                "customizations": []
                            },
                            "left": {
                                "composite_media_id": 685,
                                "customizations": []
                            },
                            "front": {
                                "composite_media_id": 683,
                                "customizations": []
                            },
                            "right": {
                                "composite_media_id": 686,
                                "customizations": []
                            }
                        },
                        "created_at": "2017-11-15T08:07:55+00:00",
                        "updated_at": "2017-11-15T08:07:55+00:00"
                    }
                ]
            }
            ...        
        ],
        "links": {
            "first": "https://api.smake.io/v2/products?page=1",
            "last": "https://api.smake.io/v2/products?page=2",
            "prev": null,
            "next": "https://api.smake.io/v2/products?page=2"
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 2,
            "path": "https://api.smake.io/v2/products",
            "per_page": 25,
            "to": 25,
            "total": 28
        }
    }
    

    Returns a collection of products.

    Get product

    Example Request

    GET /products/1 HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "is_test": false,
        "id": 1,
        "title": "qui ut nemo",
        "description": "Autem nesciunt ipsam excepturi non distinctio quas ullam placeat. Quam quidem rerum veniam corrupti velit aperiam non. Repudiandae rem incidunt atque optio vero et voluptatem. Fuga et quos in ipsa.",
        "created_at": "2017-11-15T08:07:48+00:00",
        "updated_at": "2017-11-15T08:07:48+00:00",
        "variants": [
            {
                "id": 90,
                "total": 101.7,
                "price": 85.46,
                "tax": 16.24,
                "tax_rate": 19,
                "code": "0635579894134",
                "attributes": [
                    {
                        "name": "color",
                        "value": "RoyalBlue"
                    },
                    {
                        "name": "size",
                        "value": "S"
                    }
                ],
                "media_id": 607,
                "views": {
                    "back": {
                        "composite_media_id": 609,
                        "customizations": []
                    },
                    "left": {
                        "composite_media_id": 610,
                        "customizations": []
                    },
                    "front": {
                        "composite_media_id": 608,
                        "customizations": []
                    },
                    "right": {
                        "composite_media_id": 611,
                        "customizations": []
                    }
                },
                "created_at": "2017-11-15T08:07:48+00:00",
                "updated_at": "2017-11-15T08:07:50+00:00"
            },
            {
                "id": 92,
                "total": 185.21,
                "price": 173.09,
                "tax": 12.12,
                "tax_rate": 7,
                "code": "6904687103174",
                "attributes": [
                    {
                        "name": "color",
                        "value": "DarkCyan"
                    },
                    {
                        "name": "size",
                        "value": "L"
                    }
                ],
                "media_id": 617,
                "views": {
                    "back": {
                        "composite_media_id": 619,
                        "customizations": []
                    },
                    "left": {
                        "composite_media_id": 620,
                        "customizations": []
                    },
                    "front": {
                        "composite_media_id": 618,
                        "customizations": []
                    },
                    "right": {
                        "composite_media_id": 621,
                        "customizations": []
                    }
                },
                "created_at": "2017-11-15T08:07:49+00:00",
                "updated_at": "2017-11-15T08:07:50+00:00"
            },
            {
                "id": 94,
                "total": 24.52,
                "price": 20.61,
                "tax": 3.91,
                "tax_rate": 19,
                "code": "1243574262255",
                "attributes": [
                    {
                        "name": "color",
                        "value": "Blue"
                    },
                    {
                        "name": "size",
                        "value": "L"
                    }
                ],
                "media_id": 627,
                "views": {
                    "back": {
                        "composite_media_id": 629,
                        "customizations": []
                    },
                    "left": {
                        "composite_media_id": 630,
                        "customizations": []
                    },
                    "front": {
                        "composite_media_id": 628,
                        "customizations": []
                    },
                    "right": {
                        "composite_media_id": 631,
                        "customizations": []
                    }
                },
                "created_at": "2017-11-15T08:07:50+00:00",
                "updated_at": "2017-11-15T08:07:50+00:00"
            }
        ]
    }
    

    Returns the product with the id = x.

    Variants

    Here you can view a product variant or design a new one from an existing product variant.

    During the design process, design information (e. g. customizations, dimensions, files, etc.) is received. Connecting you will receive a new product variant, which can be ordered.

    Get variant

    Example Request

    GET /variants/1 HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "id": 1,
        "is_test": true,
        "total": 259.98,
        "price": 218.47,
        "tax": 41.51,
        "tax_rate": 19,
        "code": null,
        "attributes": [
            {
                "name": "color",
                "value": "LightYellow"
            },
            {
                "name": "size",
                "value": "XL"
            }
        ],
        "media_id": 1094,
        "views": {
            "back": {
                "composite_media_id": 10680,
                "customizations": [
                    {
                        "type": "dtg",
                        "production_media_id": 1,
                        "preview_media_id": 1001,
                        "dimension": {
                            "width": 100.55,
                            "height": 200.66
                        }
                    },
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "preview_media_id": 1002,
                        "dimension": {
                            "width": 100.66,
                            "height": 200.12
                        }
                    }
                ]
            },
            "front": {
                "composite_media_id": 1093,
                "customizations": [
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "preview_media_id": 1003,
                        "dimension": {
                            "width": 100.55,
                            "height": 200.66
                        }
                    },
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "preview_media_id": 1004,
                        "dimension": {
                            "width": 1001.55,
                            "height": 2000.66
                        }
                    },
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "preview_media_id": 1095,
                        "dimension": {
                            "width": 100.55,
                            "height": 200.66
                        }
                    },
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "preview_media_id": 1096,
                        "dimension": {
                            "width": 1001.55,
                            "height": 2000.66
                        }
                    }
                ]
            }
        },    
        "created_at": "2017-09-28T14:48:05+00:00",
        "updated_at": "2017-09-28T14:48:05+00:00"
    }
    

    Returns the product variant with the id = x.

    Design variant

    Example Request

    POST /variants/136/design HTTP/1.1
    
    {
        "views": {
            "front": {
                "composite_media_id": 1,
                "customizations": [
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "dimension": {
                            "width": 100.55,
                            "height": 200.66
                        }
                    },
                    {
                        "type": "dtg",
                        "production_media_id": 2,
                        "dimension": {
                            "width": 1001.55,
                            "height": 2000.66
                        }
                    }
                ]
            }
    
        }
    }
    

    Example Response

    HTTP/1.1 202 Accepted
    Location https://api.smake.io/jobs/1
    

    When you design a product variant, this happens asynchronously and you have to use Polling.

    It is not possible to order this product version before.

    Designing a product variant is made possible by placing customizations on the corresponding view (e. g. front or back).

    Field Type Description Required
    views object Contains the views on which customizations are placed. Allowed are front, back, left and right. Views Object yes

    Views Object

    Field Type Description Required
    front.composite_media_id integer The media ID that represents the product image with customizations. See Media yes
    front.customizations array Contains all customizations to be placed for the view. An array of Customizations Objects yes

    Customizations Object

    Field Type Description Required
    type string Processing format of the customizations. Allowed is dtg yes
    production_media_id integer The media ID that contains the production file of the customizations. See Media yes
    dimension object Dimension Object yes

    Dimension Object

    Field Type Description Required
    width float The width of the customization in millimetres (mm) yes
    height float The height of the customization in millimetres (mm) yes

    Checkouts

    A checkout must be created so that you can order a product variant.

    Create Checkout

    Example Request

    POST /checkouts HTTP/1.1
    
    {
       "email": "customer@example.com",
       "items": [
          {
             "variant_id": 1,
             "quantity": 1
          }
       ],
       "shipping_address": {
          "first_name": "John",
          "last_name": "Doe",
          "street1": "123 Main St",
          "zip": "12345",
          "city": "Anytown",
          "country_code": "DE",
          "province_code": "NW",
          "phone": "12345 67890",
          "email": "shipping@example.com"
       }
    }
    

    Example Response

    HTTP/1.1 201 Created
    
    {
        "id": 1,
        "is_test": true,
        "external_identifier": null,
        "project_name": null,   
        "state": "incompleted",
        "customer_locale": "en",
        "currency": "EUR",
        "total": 123.75,
        "subtotal": 103.99,
        "total_tax": 19.76,
        "total_items_price": 123.75,
        "shipping_line": [],
        "created_at": "2017-09-29T09:14:11+00:00",
        "updated_at": "2017-09-29T09:14:11+00:00",
        "cancelled_at": null,
        "items": [
            {
                "id": 75,
                "quantity": 1,
                "total": 123.75,
                "price": 103.99,
                "total_tax": 19.76,
                "tax_rate": 19,
                "variant": {
                    "id": 1,
                    "total": 123.75,
                    "price": 103.99,
                    "tax": 19.76,
                    "tax_rate": 19,
                    "code": "2032095419441",
                    "attributes": [
                        {
                            "name": "color",
                            "value": "LightPink"
                        },
                        {
                            "name": "size",
                            "value": "M"
                        }
                    ],
                    "media_id": 81,
                    "views": [],
                    "state": "finished",
                    "created_at": "2017-09-27T10:10:33+00:00",
                    "updated_at": "2017-09-27T10:10:34+00:00"
                },
                "created_at": "2017-09-29T09:14:11+00:00",
                "updated_at": "2017-09-29T09:14:11+00:00",
                "cancelled_at": null
            }
        ],
        "customer": {
            "id": 98,
            "first_name": null,
            "last_name": null,
            "email": "customer@example.com",
            "phone": null,
            "addresses": [],
            "default_address": null,
            "created_at": "2017-09-29T09:14:11+00:00",
            "updated_at": "2017-09-29T09:14:11+00:00"
        },
        "shipping_address": {
            "id": 190,
            "default": true,
            "company": null,
            "first_name": "John",
            "last_name": "Doe",
            "city": "Anytown",
            "street1": "123 Main St",
            "street2": null,
            "street3": null,
            "zip": "12345",
            "phone": "12345 67890",
            "email": "shipping@example.com",
            "province_code": "NW",
            "country_code": "DE",
            "vat_in": null,
            "created_at": "2017-09-29T09:14:11+00:00",
            "updated_at": "2017-09-29T09:14:11+00:00"
        },
        "billing_address": {
            "id": 191,
            "default": true,
            "company": null,
            "first_name": "John",
            "last_name": "Doe",
            "city": "Anytown",
            "street1": "123 Main St",
            "street2": null,
            "street3": null,
            "zip": "12345",
            "phone": "12345 67890",
            "email": "shipping@example.com",
            "province_code": "NW",
            "country_code": "DE",
            "vat_in": null,
            "created_at": "2017-09-29T09:14:11+00:00",
            "updated_at": "2017-09-29T09:14:11+00:00"
        },
        "whitelabel_address": null,
        "transactions": [],
        "fulfillments": [],
        "id_tags": []
    }
    

    Attribute

    Field Type Description Required
    project_name string project name
    external_identifier string The external identifier is an optional field for the order ID from your system. The external identifier must be unique.
    email string E-mail. RFC3696/5321 compliant yes
    items array Items. An array of Item Objects yes
    shipping_address object Shipping address. Address Object yes
    billing_address object Billing address. If you do not specify this address, it corresponds to the shipping address. Address Object
    whitelabel_address object White label / sender address. Address Object

    Item Object

    Back to Attributes

    Field Type Description Required
    variant_id integer Id of the product variant yes
    quantity integer The quantity to be ordered yes

    Address Object

    Back to Attributes

    Field Type Description Required
    company string company
    first_name string first name yes
    last_name string last name yes
    street1 string First street line. Limited to 35 characters yes
    street2 string Second street line. Limited to 35 characters
    street3 string Third street line. Limited to 35 characters
    zip string zip code yes
    city string city yes
    province_code string Requires a two-digit code. Example: 'NW' (North Rhine-Westphalia), 'AL' (Alabama) yes
    country_code ISO 3166-1-alpha-2 code (ISO 2 country code) Example: 'US' or 'DE'. All accepted values can be found on the Official ISO website. yes
    email string Contact person's e-mail address, RFC3696/5321 compliant. yes
    phone string So that, for example, the parcel service can call the address/dispatcher of the parcel in case of problems with shipping. yes
    vat_in string sales tax

    Check shipping rates

    Example Request

    GET /checkouts/1/shipping-rates HTTP/1.1
    

    Example Response

    HTTP/1.1 202 Accepted
    Location https://api.smake.io/jobs/1
    

    Example Request as soon as the task is completed

    GET /checkouts/1/shipping-rates HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "data": [
            {
                "is_test": true,
                "handle": "pickup",
                "title": "Abholung",
                "price": 22
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "/",
            "per_page": 15,
            "to": 1,
            "total": 1
        }
    }
    

    To be able to send the order, it is necessary to query the shipping rates and select the appropriate shipping method. This happens asynchronously and you have to use Polling.

    If the response is 200 OK, you have to update the shipping_line in the checkout with the desired shipment handle.

    Update Checkout

    Example request to update the items

    PUT /checkouts/1 HTTP/1.1
    
    {  
        "items": [  
            {  
                "variant_id": 3,
                "quantity": 1
            },
            {  
                 "variant_id": 4,
                 "quantity": 5
            }
        ]
    }
    

    Example Response

    HTTP/1.1 200 OK
    
    {    
        ...
        "items": [
            {
                "id": 77,
                "quantity": 1,
                ...
                "variant": {
                    "id": 3,
                    ...
                },            
            },
            {
                "id": 78,
                "quantity": 5,
                ...
                "variant": {
                    "id": 4,
                    ...
                },            
            }
        ],
        ...        
    }
    

    Example request to update shipping_line

    PUT /checkouts/1 HTTP/1.1
    
    {  
        "shipping": {
            "handle": "pickup"  
        }
    }
    

    Example Response

    HTTP/1.1 200 OK
    
    {    
        ...
        "shipping_line": {
            "title": "Pickup",
            "price": 22.06,
            "total": 26.25,
            "tax": 4.19
        },
        ...        
    }
    

    It is possible to update the checkout process during the entire checkout process.

    Complete checkout

    Example request to complete a checkout

    POST /checkouts/1/complete HTTP/1.1
    
    {
        "payment": {
          "handle": "invoice",
          "amount": 150.0
        }
    }
    

    In order to complete the checkout, the following must be transferred as payment.handle invoice. and the request must contain the total amount of the order.

    You can then use the Orders endpoint to list and filter your orders.

    Orders

    An order is created when the checkout process is complete.

    List order

    Example Request

    GET /orders HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "data": [
            {
                "id": 1,
                "is_test": true,
                "external_identifier": null,
                "project_name": "et",            
                "state": "delivered",
                "customer_locale": "en",
                "currency": "EUR",
                "total": 87.76,
                "subtotal": 86.63,
                "total_tax": 1.13,
                "total_items_price": 82.98,
                "shipping_line": {
                    "title": "Pickup",
                    "price": 4.47,
                    "total": 4.78,
                    "tax": 0.31
                },
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:11:03+00:00",
                "cancelled_at": null,
                "items": [
                    {
                        "id": 1,
                        "quantity": 4,
                        "total": 82.98,
                        "price": 20.54,
                        "total_tax": 0.82,
                        "tax_rate": 1,
                        "variant": {
                            "id": 27,
                            "total": 186.58,
                            "price": 174.37,
                            "tax": 12.21,
                            "tax_rate": 7,
                            "code": "4490824589755",
                            "attributes": [
                                {
                                    "name": "color",
                                    "value": "Khaki"
                                },
                                {
                                    "name": "size",
                                    "value": "XL"
                                }
                            ],
                            "media_id": 251,
                            "views": [],
                            "created_at": "2017-09-27T10:10:38+00:00",
                            "updated_at": "2017-09-27T10:10:38+00:00"
                        },
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00",
                        "cancelled_at": null
                    }
                ],
                "customer": {
                    "id": 40,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "John@example.com",
                    "phone": "12345 67890",
                    "addresses": [],
                    "default_address": {
                        "id": 122,
                        "default": true,
                        "company": null,
                        "first_name": "John",
                        "last_name": "Doe",
                        "city": "Anytown",
                        "street1": "123 Main St",
                        "street2": null,
                        "street3": null,
                        "zip": "12345",
                        "phone": "12345 67890",
                        "email": "John@example.com",
                        "province_code": "NW",
                        "country_code": "DE",
                        "vat_in": null,
                        "created_at": "2017-09-27T10:11:01+00:00",
                        "updated_at": "2017-09-27T10:11:01+00:00"
                    },
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "shipping_address": {
                    "id": 45,
                    "default": true,
                    "company": "MyCompany",
                    "first_name": "John",
                    "last_name": "John",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",
                    "phone": "12345 67890",
                    "email": "john@example.net",
                    "province_code": "NW",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "billing_address": {
                    "id": 44,
                    "default": true,
                    "company": "MyCompany", 
                    "first_name": "John",
                    "last_name": "Doe",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",
                    "phone": "12345 67890",
                    "email": "john@example.net",
                    "province_code": "NW",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "whitelabel_address": null,
                "transactions": [
                    {
                        "amount": 87.76,
                        "title": "Invoice"
                    }
                ],
                "fulfillments": [
                    {
                        "id": 1,
                        "order_id": 1,
                        "tracking_number": "2229446017085",
                        "created_at": "2017-09-27T10:11:02+00:00",
                        "updated_at": "2017-09-27T10:11:02+00:00"
                    }
                ],
                "id_tags": [
                    {
                        "id": 1,
                        "order_item_id": 1,
                        "current_state": "Goods booked in",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 2,
                        "order_item_id": 1,
                        "current_state": "Released to production stage",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 3,
                        "order_item_id": 1,
                        "current_state": "Shipped",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    },
                    {
                        "id": 4,
                        "order_item_id": 1,
                        "current_state": "Scanned on machine (DTG)",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    }
                ]
            },
            {
                "id": 2,
                "is_test": true,
                "external_identifier": null,
                "project_name": "dicta",            
                "state": "incompleted",
                "customer_locale": "en",
                "currency": "EUR",
                "total": 9.46,
                "subtotal": 8.94,
                "total_tax": 0.52,
                "total_items_price": 5.44,
                "shipping_line": {
                    "title": "German Post Maxibrief",
                    "price": 3.76,
                    "total": 4.02,
                    "tax": 0.26
                },
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00",
                "cancelled_at": null,
                "items": [
                    {
                        "id": 2,
                        "quantity": 1,
                        "total": 5.44,
                        "price": 5.18,
                        "total_tax": 0.26,
                        "tax_rate": 5,
                        "variant": {
                            "id": 53,
                            "total": 144.78,
                            "price": 135.31,
                            "tax": 9.47,
                            "tax_rate": 7,
                            "code": "0729845433827",
                            "attributes": [
                                {
                                    "name": "color",
                                    "value": "LightCyan"
                                },
                                {
                                    "name": "size",
                                    "value": "S"
                                }
                            ],
                            "media_id": 436,
                            "views": [],
                            "created_at": "2017-09-27T10:10:43+00:00",
                            "updated_at": "2017-09-27T10:10:43+00:00"
                        },
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00",
                        "cancelled_at": null
                    }
                ],
                "customer": {
                    "id": 41,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com",
                    "phone": "12345 67890",
                    "addresses": [],
                    "default_address": {
                        "id": 124,
                        "default": true,
                        "company": null,
                        "first_name": "John",
                        "last_name": "Doe",
                        "city": "Anytown",
                        "street1": "123 Main St",
                        "street2": null,
                        "street3": null,
                        "zip": "12345",
                        "phone": "12345 67890",
                        "email": "John@example.org",
                        "province_code": "NW",
                        "country_code": "DE",
                        "vat_in": null,
                        "created_at": "2017-09-27T10:11:01+00:00",
                        "updated_at": "2017-09-27T10:11:01+00:00"
                    },
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "shipping_address": {
                    "id": 47,
                    "default": true,
                    "company": "MyComapny",
                    "first_name": "John",
                    "last_name": "Doe",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",
                    "phone": "12345 67890",
                    "email": "John@example.org",
                    "province_code": "BW",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "billing_address": {
                    "id": 46,
                    "default": true,
                    "company": "MyCompany",
                    "first_name": "John",
                    "last_name": "Doe",
                    "city": "Anytown",
                    "street1": "123 Main St",
                    "street2": null,
                    "street3": null,
                    "zip": "12345",
                    "phone": "12345 67890",
                    "email": "John@example.org",
                    "province_code": "BY",
                    "country_code": "DE",
                    "vat_in": null,
                    "created_at": "2017-09-27T10:10:59+00:00",
                    "updated_at": "2017-09-27T10:10:59+00:00"
                },
                "whitelabel_address": null,
                "transactions": [
                    {
                        "amount": 9.46,
                        "title": "Invoice"
                    }
                ],
                "fulfillments": [
                    {
                        "id": 2,
                        "order_id": 2,
                        "tracking_number": "2229446017086",
                        "created_at": "2017-09-27T10:11:02+00:00",
                        "updated_at": "2017-09-27T10:11:02+00:00"
                    }
                ],
                "id_tags": [
                    {
                        "id": 5,
                        "order_item_id": 2,
                        "current_state": "Production stages combined (stitching)",
                        "created_at": "2017-09-27T10:10:59+00:00",
                        "updated_at": "2017-09-27T10:10:59+00:00"
                    }
                ]
            }
            ...        
        ],
        "links": {
            "first": "https://api.smake.io/v2/orders?page=1",
            "last": "https://api.smake.io/v2/orders?page=2",
            "prev": null,
            "next": "https://api.smake.io/v2/orders?page=2"
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 2,
            "path": "https://api.smake.io/v2/orders",
            "per_page": 25,
            "to": 25,
            "total": 28
        }
    }
    

    Returns a collection of created orders.

    Get order

    Example Request

    GET /order/1 HTTP/1.1
    

    Example Response

    HTTP/1.1 200 OK
    
    {
        "id": 1,
        "is_test": true,
        "external_identifier": null,
        "project_name": "et",    
        "state": "delivered",
        "customer_locale": "en",
        "currency": "EUR",
        "total": 87.76,
        "subtotal": 86.63,
        "total_tax": 1.13,
        "total_items_price": 82.98,
        "shipping_line": {
            "title": "Pickup",
            "price": 4.47,
            "total": 4.78,
            "tax": 0.31
        },
        "created_at": "2017-09-27T10:10:59+00:00",
        "updated_at": "2017-09-27T10:11:03+00:00",
        "cancelled_at": null,
        "items": [
            {
                "id": 1,
                "quantity": 4,
                "total": 82.98,
                "price": 20.54,
                "total_tax": 0.82,
                "tax_rate": 1,
                "variant": {
                    "id": 27,
                    "total": 186.58,
                    "price": 174.37,
                    "tax": 12.21,
                    "tax_rate": 7,
                    "code": "4490824589755",
                    "attributes": [
                        {
                            "name": "color",
                            "value": "Khaki"
                        },
                        {
                            "name": "size",
                            "value": "XL"
                        }
                    ],
                    "media_id": 251,
                    "views": [],
                    "created_at": "2017-09-27T10:10:38+00:00",
                    "updated_at": "2017-09-27T10:10:38+00:00"
                },
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00",
                "cancelled_at": null
            }
        ],
        "customer": {
            "id": 40,
            "first_name": "John",
            "last_name": "Doe",
            "email": "John@example.com",
            "phone": "12345 67890",
            "addresses": [],
            "default_address": {
                "id": 122,
                "default": true,
                "company": null,
                "first_name": "John",
                "last_name": "Doe",
                "city": "Anytown",
                "street1": "123 Main St",
                "street2": null,
                "street3": null,
                "zip": "12345",
                "phone": "12345 67890",
                "email": "John@example.com",
                "province_code": "NW",
                "country_code": "DE",
                "vat_in": null,
                "created_at": "2017-09-27T10:11:01+00:00",
                "updated_at": "2017-09-27T10:11:01+00:00"
            },
            "created_at": "2017-09-27T10:10:59+00:00",
            "updated_at": "2017-09-27T10:10:59+00:00"
        },
        "shipping_address": {
            "id": 45,
            "default": true,
            "company": "MyCompany",
            "first_name": "John",
            "last_name": "Doe",
            "city": "Anytown",
            "street1": "123 Main St",
            "street2": null,
            "street3": null,
            "zip": "12345",
            "phone": "12345 67890",
            "email": "John@example.net",
            "province_code": "NW",
            "country_code": "DE",
            "vat_in": null,
            "created_at": "2017-09-27T10:10:59+00:00",
            "updated_at": "2017-09-27T10:10:59+00:00"
        },
        "billing_address": {
            "id": 44,
            "default": true,
            "company": "MyCompany", 
            "first_name": "John",
            "last_name": "Doe",
            "city": "Anytown",
            "street1": "123 Main St",
            "street2": null,
            "street3": null,
            "zip": "12345",
            "phone": "12345 67890",
            "email": "John@example.net",
            "province_code": "NW",
            "country_code": "DE",
            "vat_in": null,
            "created_at": "2017-09-27T10:10:59+00:00",
            "updated_at": "2017-09-27T10:10:59+00:00"
        },
        "whitelabel_address": null,
        "transactions": [
            {
                "amount": 87.76,
                "title": "Invoice"
            }
        ],
        "fulfillments": [
            {
                "id": 1,
                "order_id": 1,
                "tracking_number": "2229446017085",
                "created_at": "2017-09-27T10:11:02+00:00",
                "updated_at": "2017-09-27T10:11:02+00:00"
            }
        ],
        "id_tags": [
            {
                "id": 1,
                "order_item_id": 1,
                "current_state": "Goods booked in",
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00"
            },
            {
                "id": 2,
                "order_item_id": 1,
                "current_state": "Released to production stage",
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00"
            },
            {
                "id": 3,
                "order_item_id": 1,
                "current_state": "Shipped",
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00"
            },
            {
                "id": 4,
                "order_item_id": 1,
                "current_state": "Scanned on machine (DTG)",
                "created_at": "2017-09-27T10:10:59+00:00",
                "updated_at": "2017-09-27T10:10:59+00:00"
            }
        ]
    }
    

    Returns the order with id = x.