Upload

Smake

API

For printing (DTG) & fulfillment

Print and send products with a simple API request.

  • Order from our entire product catalog - at manufacturer prices.
  • No intermediate trade.
  • Competitive wholesale prices, regardless of the quantity.
  • A simple and inexpensive process, fully integrated via our API.
  • After the integration, you can get started right away and take advantage of all the features, including white label shipping and order/dispatch verification.

First steps for developers

We take care of everything - from product creation to order follow-up and production.

Upload images

Upload product preview

Upload the thumbnail of your finished product. This is placed on your product as a logo.

Upload logos

Upload all print files as PNG / JPG.

Documentation - Upload images

For the developer

Upload the image data directly as a binary file. In response, you will immediately receive the media object with the required IDs and other information.

Example of a request

POST /media
Content-Type: image/jpeg
Content-Length: 42840
                            

raw content
                            
Example of a response

{
    "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"
}
                            

Design product

Select product

To design your product, you will first need a product variant. You can select a product variant in the product pool.

Documentation - Select product
Create product

Add the product view, the media ID of the product preview, and the media IDs of the desired logos.

Documentation - Create product

For the developer

The ID of the designed product variant will be required in the next step for the order.

Example of a request

POST /variants/1/design
                            

{
    "views": {
        "front": {
            "composite_media_id": 1,
            "customizations": [
                {
                    "type": "dtg",
                    "production_media_id": 2,
                    "dimension": {
                        "width": 100.55,
                        "height": 200.66
                    }
                },
                ...
            ]
        }

    }
}
                            
Example of a response

{
    "id": 2,
    "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": {
        ...
        "front": {
            "composite_media_id": 1,
            "customizations": [
                {
                    "type": "dtg",
                    "production_media_id": 2,
                    "preview_media_id": 3,
                    "dimension": {
                        "width": 100.55,
                        "height": 200.66
                    }
                },
            ]
        },
        ...
    },
    "created_at": "2017-09-28T14:48:05+00:00",
    "updated_at": "2017-09-28T14:48:05+00:00"
}
                            

Create order

Products

Add the IDs of the designed product variants and the quantities desired.

Documentation - Products
Shipping address

Add the shipping address. Unless otherwise indicated, the shipping address will also be used as the billing address.

Documentation - Create order

For the developer

The shipping address attributes must be entered in their entirety. Among other things, these attributes will be necessary for the calculation of shipping costs.

Example of a request

POST /checkouts
                            

{
    "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 of a response

{
    "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": 2,
                ...
            },
            "created_at": "2017-09-29T09:14:11+00:00",
            "updated_at": "2017-09-29T09:14:11+00:00",
            "cancelled_at": null
        }
    ],
    "customer": {
        "id": 98,
        ...
    },
    "shipping_address": {
        "id": 190,
        ...
    },
    "billing_address": {
        "id": 191,
        ...
    },
    "whitelabel_address": null,
    "transactions": [],
    "fulfillments": [],
    "id_tags": []
}
                            

Calculate shipping costs

Shipping costs are calculated on the basis of size, weight, and the delivery address, according to the rates of the shipping providers on file.

Documentation - Calculate shipping costs

For the developer

The delivery method "handle" will be required in the next step of the order.

Example of a request

GET /checkouts/1/shipping-rates
                            
Example of a response

{
    "data": [
        {
            "is_test": true,
            "handle": "pickup",
            "title": "Abholung",
            "price": 22
        }
    ],
    ...
}
                            

Specify delivery method

Select the desired delivery method from previously determined delivery options.

Documentation - Specify delivery method

For the developer

Update the "shipping.handle" attribute with the desired "handle" from the previous step.

Example of a request

PUT /checkouts/1
                            

{
    "shipping": {
        "handle": "pickup"
    }
}
                            
Example of a response

{
    ...
    "shipping_line": {
        "title": "Pickup",
        "price": 22.06,
        "total": 26.25,
        "tax": 4.19
    },
    ...
}
                            

Complete order

Payment method

Payment by invoice is currently the only payment method that is available.

Documentation - Complete order

For the developer

Update the "payment.handle" attribute with "invoice." The total amount is calculated from the product prices and the price of delivery.

Example of a request

POST /checkouts/1/complete
                            

{
    "payment": {
      "handle": "invoice",
      "amount": 150.0
    }
}
                            
Example of a response

{
    "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,
                ...
            },
            "created_at": "2017-09-27T10:10:59+00:00",
            "updated_at": "2017-09-27T10:10:59+00:00",
            "cancelled_at": null
        }
    ],
    "customer": {
        "id": 40,
        ...
    },
    "shipping_address": {
        "id": 45,
        ...
    },
    "billing_address": {
        "id": 44,
        ...
    },
    "whitelabel_address": null,
    "transactions": [
        ...
    ],
    "fulfillments": [
        ...
    ],
    "id_tags": [
        ...
    ]
}