API Documentation

vBETA

Authorization

Information

Type: Basic
User: Store's API user
Password: Store's API key
Header format: Authorization: Basic Encoded + base64 encoded user:password

Premiumprint\Api\Beta\Controllers\Controller

Shipping

/api/beta/shipping/rates
Calculate shipping rates

Returns a JSON representation of the calculated shipping rates for the given items and shipping info

Request (application/json)
{
    "shipping": {
        "country": 428
    },
    "items": [
        {
            "quantity": 4,
            "variant_id": 12
        },
        {
            "quantity": 5,
            "variant_id": 4
        }
    ]
}
Response 200 (application/json)
{
    "data": [
        {
            "code": "UPS",
            "name": "UPS",
            "price": "83.70",
            "price_details": {
                "currency": "EUR",
                "formatted": "83.70 \u20ac",
                "in_subunit": 8370
            }
        }
    ]
}

Orders

/api/beta/orders
Show a list of all orders

Get a JSON representation of all orders

Response 200 (application/json)
{
    "data": [
        {
            "id": "PPO00000008T",
            "external_id": "TEST2",
            "is_test": true,
            "shipping_method": {
                "code": "DHL",
                "name": "DHL"
            },
            "status": "CANCELLED",
            "status_label": "Cancelled (TEST)",
            "created_at": {
                "date": "2017-08-09 09:09:42.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "updated_at": {
                "date": "2017-08-09 09:39:11.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "invoice": {
                "id": "PPI00000008T",
                "status": "CANCELLED",
                "status_label": "Cancelled",
                "download_url": "http:\/\/premium.app\/invoices\/8\/download\/d08dba6f39553e8e7f06c29eeb5c0256",
                "total_amount": "47.62",
                "total_amount_details": {
                    "currency": "EUR",
                    "formatted": "47.62 \u20ac",
                    "in_subunit": 4762
                },
                "paid_amount": "47.62",
                "paid_amount_details": {
                    "currency": "EUR",
                    "formatted": "47.62 \u20ac",
                    "in_subunit": 4762
                },
                "unpaid_amount": "0.00",
                "unpaid_amount_details": {
                    "currency": "EUR",
                    "formatted": "0.00 \u20ac",
                    "in_subunit": 0
                }
            },
            "shipments": [],
            "items": [
                {
                    "id": 10,
                    "external_id": null,
                    "variant_id": 5,
                    "name": "Mug",
                    "quantity": 2,
                    "price": "9.31",
                    "price_details": {
                        "currency": "EUR",
                        "formatted": "9.31 \u20ac",
                        "in_subunit": 931
                    },
                    "file": "http:\/\/placehold.it\/5000x3000",
                    "options": [],
                    "retail_price": null,
                    "retail_price_details": null
                },
                {
                    "id": 11,
                    "external_id": null,
                    "variant_id": 6,
                    "name": "Blanket",
                    "quantity": 1,
                    "price": "3.00",
                    "price_details": {
                        "currency": "EUR",
                        "formatted": "3.00 \u20ac",
                        "in_subunit": 300
                    },
                    "file": "http:\/\/placehold.it\/5000x3000",
                    "options": [],
                    "retail_price": null,
                    "retail_price_details": null
                }
            ],
            "totals": {
                "subtotal_amount": "21.62",
                "subtotal_amount_details": {
                    "currency": "EUR",
                    "formatted": "21.62 \u20ac",
                    "in_subunit": 2162
                },
                "shipping_amount": "26.00",
                "shipping_amount_details": {
                    "currency": "EUR",
                    "formatted": "26.00 \u20ac",
                    "in_subunit": 2600
                },
                "total_amount": "47.62",
                "total_amount_details": {
                    "currency": "EUR",
                    "formatted": "47.62 \u20ac",
                    "in_subunit": 4762
                }
            },
            "retail_costs": []
        }
    ],
    "meta": {
        "pagination": {
            "total": 8,
            "count": 8,
            "per_page": 10,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}
/api/beta/orders/{order}
Show an order

Get a JSON representation of the given order

Response 200 (application/json)
{
    "data": {
        "id": "PPO00000008T",
        "external_id": "TEST2",
        "is_test": true,
        "shipping_method": {
            "code": "DHL",
            "name": "DHL"
        },
        "status": "ACCEPTED",
        "status_label": "Accepted (TEST)",
        "created_at": {
            "date": "2017-08-09 09:09:42.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": {
            "date": "2017-08-09 09:09:43.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "invoice": {
            "id": "PPI00000008T",
            "status": "PAID",
            "status_label": "Paid",
            "download_url": "http:\/\/premium.app\/invoices\/8\/download\/d08dba6f39553e8e7f06c29eeb5c0256",
            "total_amount": "47.62",
            "total_amount_details": {
                "currency": "EUR",
                "formatted": "47.62 \u20ac",
                "in_subunit": 4762
            },
            "paid_amount": "47.62",
            "paid_amount_details": {
                "currency": "EUR",
                "formatted": "47.62 \u20ac",
                "in_subunit": 4762
            },
            "unpaid_amount": "0.00",
            "unpaid_amount_details": {
                "currency": "EUR",
                "formatted": "0.00 \u20ac",
                "in_subunit": 0
            }
        },
        "shipments": [],
        "items": [
            {
                "id": 10,
                "external_id": null,
                "variant_id": 5,
                "name": "Mug",
                "quantity": 2,
                "price": "9.31",
                "price_details": {
                    "currency": "EUR",
                    "formatted": "9.31 \u20ac",
                    "in_subunit": 931
                },
                "file": "http:\/\/placehold.it\/5000x3000",
                "options": [],
                "retail_price": null,
                "retail_price_details": null
            },
            {
                "id": 11,
                "external_id": null,
                "variant_id": 6,
                "name": "Blanket",
                "quantity": 1,
                "price": "3.00",
                "price_details": {
                    "currency": "EUR",
                    "formatted": "3.00 \u20ac",
                    "in_subunit": 300
                },
                "file": "http:\/\/placehold.it\/5000x3000",
                "options": [],
                "retail_price": null,
                "retail_price_details": null
            }
        ],
        "totals": {
            "subtotal_amount": "21.62",
            "subtotal_amount_details": {
                "currency": "EUR",
                "formatted": "21.62 \u20ac",
                "in_subunit": 2162
            },
            "shipping_amount": "26.00",
            "shipping_amount_details": {
                "currency": "EUR",
                "formatted": "26.00 \u20ac",
                "in_subunit": 2600
            },
            "total_amount": "47.62",
            "total_amount_details": {
                "currency": "EUR",
                "formatted": "47.62 \u20ac",
                "in_subunit": 4762
            }
        },
        "retail_costs": []
    }
}
/api/beta/orders
Create an order

Creates an order and returns the JSON representation of it (if country has regions (for example, USA), pass region_id as well). The given shipping_method must be valid for the shipping country and items given in the order. Failure to chose a correct shipping method will result in an error message from the API.
Call the /api/beta/shipping/rates API to find out which shipping methods are valid for the given combination of values. external_id is an optional field, but if it's set, it must be unique in database.
shipping_method must be uppercase.
if the country has regions ( you can check this at /api/beta/regions/{country_id}), regions_id is an obligatory field (this field is a numeric field)

Request (application/json)
{
    "shipping_method": "GLS",
    "is_testing": false,
    "customs_shipping_costs": 0.22,
    "billing": {
        "email": "example@email.com",
        "firstname": "John",
        "lastname": "Doe",
        "company": "Company LTD",
        "street_primary": "JohnDoe Street 15",
        "street_secondary": "Apt 18",
        "city": "Example",
        "postcode": "12345",
        "country_id": 276,
        "telephone": "+111222333444"
    },
    "shipping": {
        "email": "example@email.com",
        "firstname": "John",
        "lastname": "Doe",
        "company": "Company LTD",
        "street_primary": "JohnDoe Street 15",
        "street_secondary": "Apt 18",
        "city": "Example",
        "postcode": "90987",
        "country_id": 276,
        "telephone": "+111222333444"
    },
    "items": [
        {
            "quantity": 1,
            "variant_id": 3,
            "customs_value": 10,
            "file": "http:\/\/via.placeholder.com\/350x150.png",
            "options": {
                "1": 3,
                "2": 6
            }
        }
    ]
}
Response 200 (application/json)
{
    "data": {
        "id": "PPO00004008",
        "external_id": null,
        "is_test": false,
        "shipping_method": {
            "code": "GLS",
            "name": "GLS"
        },
        "status": "ACCEPTED",
        "status_label": "Accepted",
        "created_at": {
            "date": "2017-11-14 15:39:06.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": {
            "date": "2017-11-14 15:39:07.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "shipments": [],
        "items": [
            {
                "id": 194,
                "external_id": null,
                "variant_id": 3,
                "name": "40x30 cm",
                "quantity": 1,
                "price": "7.70",
                "price_details": {
                    "currency": "EUR",
                    "formatted": "7.70 \\u20ac",
                    "in_subunit": 770
                },
                "file": "http:\\\/\\\/premium.app\\\/premiumprint\\\/testing\\\/orders\\\/PPO00004008\\\/1af125645f44aa43a9d72f0519e8e0b4.png",
                "options": [
                    {
                        "id": 1,
                        "name": "Canvas border",
                        "value": {
                            "id": 3,
                            "name": "Stretched"
                        }
                    },
                    {
                        "id": 2,
                        "name": "Stretcher frame",
                        "value": {
                            "id": 6,
                            "name": "2 cm"
                        }
                    }
                ],
                "retail_price": null,
                "retail_price_details": null
            }
        ],
        "totals": {
            "subtotal_amount": "7.70",
            "subtotal_amount_details": {
                "currency": "EUR",
                "formatted": "7.70 \\u20ac",
                "in_subunit": 770
            },
            "shipping_amount": "3.34",
            "shipping_amount_details": {
                "currency": "EUR",
                "formatted": "3.34 \\u20ac",
                "in_subunit": 334
            },
            "total_amount": "11.04",
            "total_amount_details": {
                "currency": "EUR",
                "formatted": "11.04 \\u20ac",
                "in_subunit": 1104
            },
            "customs_shipping_costs": "0.22",
            "customs_shipping_costs_details": {
                "currency": "EUR",
                "formatted": "0.22 \\u20ac",
                "in_subunit": 22
            }
        },
        "retail_costs": []
    }
}
/api/beta/orders/{order}
Cancel an order

Cancels an order and returns a JSON representation of the given order

Response 200 (application/json)
{
    "data": {
        "id": "PPO00004008",
        "external_id": null,
        "is_test": false,
        "shipping_method": {
            "code": "GLS",
            "name": "GLS"
        },
        "status": "CANCELLED",
        "status_label": "Cancelled",
        "created_at": {
            "date": "2017-11-14 15:39:06.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "updated_at": {
            "date": "2017-11-14 15:54:02.000000",
            "timezone_type": 3,
            "timezone": "UTC"
        },
        "shipments": [],
        "items": [
            {
                "id": 194,
                "external_id": null,
                "variant_id": 3,
                "name": "40x30 cm",
                "quantity": 1,
                "price": "7.70",
                "price_details": {
                    "currency": "EUR",
                    "formatted": "7.70 \\u20ac",
                    "in_subunit": 770
                },
                "file": "http:\\\/\\\/premium.app\\\/premiumprint\\\/testing\\\/orders\\\/PPO00004008\\\/1af125645f44aa43a9d72f0519e8e0b4.png",
                "options": [
                    {
                        "id": 1,
                        "name": "Canvas border",
                        "value": {
                            "id": 3,
                            "name": "Stretched"
                        }
                    },
                    {
                        "id": 2,
                        "name": "Stretcher frame",
                        "value": {
                            "id": 6,
                            "name": "2 cm"
                        }
                    }
                ],
                "retail_price": null,
                "retail_price_details": null
            }
        ],
        "totals": {
            "subtotal_amount": "7.70",
            "subtotal_amount_details": {
                "currency": "EUR",
                "formatted": "7.70 \\u20ac",
                "in_subunit": 770
            },
            "shipping_amount": "3.34",
            "shipping_amount_details": {
                "currency": "EUR",
                "formatted": "3.34 \\u20ac",
                "in_subunit": 334
            },
            "total_amount": "11.04",
            "total_amount_details": {
                "currency": "EUR",
                "formatted": "11.04 \\u20ac",
                "in_subunit": 1104
            },
            "customs_shipping_costs": "0.22",
            "customs_shipping_costs_details": {
                "currency": "EUR",
                "formatted": "0.22 \\u20ac",
                "in_subunit": 22
            }
        },
        "retail_costs": []
    }
}

Products

/api/beta/products
Show products

Get a JSON representation of all products

Response 200 (application/json)
{
    "data": [
        {
            "id": 3,
            "name": "Leonardo da vinci",
            "variants": 2,
            "dpi": 300,
            "type": "PRINT"
        },
        {
            "id": 4,
            "name": "Callendar",
            "variants": 1,
            "dpi": 300,
            "type": "PRINT"
        }
    ]
}
/api/beta/products/{product}
Show product's variants

Get a JSON representation of all of product's variants

Response 200 (application/json)
{
    "data": [
        {
            "id": 6,
            "name": "Blanket",
            "printfile": {
                "format_width": 200,
                "format_height": 511
            },
            "attributes": {
                "152": {
                    "name": "Broken",
                    "code": "152",
                    "value": "101"
                }
            },
            "price": "3.00",
            "price_details": {
                "currency": "EUR",
                "formatted": "3.00 \u20ac",
                "in_subunit": 300
            },
            "shipping_countries": [
                8,
                660,
                20,
                16,
                4,
                12,
                24,
                36,
                44
            ],
            "options": []
        },
        {
            "id": 5,
            "name": "Mug",
            "printfile": {
                "format_width": 300,
                "format_height": 200
            },
            "attributes": [],
            "price": "9.31",
            "price_details": {
                "currency": "EUR",
                "formatted": "9.31 \u20ac",
                "in_subunit": 931
            },
            "shipping_countries": [
                8,
                660,
                20,
                16,
                4,
                12,
                24,
                36,
                44
            ],
            "options": {
                "1": {
                    "name": "Border",
                    "description": null,
                    "is_required": false,
                    "values": [
                        {
                            "id": 4,
                            "name": "White",
                            "price": "10.00",
                            "price_details": {
                                "currency": "EUR",
                                "formatted": "10.00 \u20ac",
                                "in_subunit": 1000
                            }
                        }
                    ]
                }
            }
        }
    ]
}

Countries

/api/beta/countries
Get list of countries with name and country_id

Get a JSON representation of all countries

Response 200 (application/json)
{
    "data": [
        {
            "name": "Afghanistan",
            "country_id": 4
        },
        {
            "name": "Albania",
            "country_id": 8
        },
        {
            "name": "Antarctica",
            "country_id": 10
        },
        {
            "name": "Algeria",
            "country_id": 12
        },
        {
            "name": "American Samoa",
            "country_id": 16
        },
        {
            "name": "Andorra",
            "country_id": 20
        },
        {
            "name": "Angola",
            "country_id": 24
        },
        {
            "name": "Antigua and Barbuda",
            "country_id": 28
        },
        {
            "name": "Azerbaijan",
            "country_id": 31
        },
        {
            "name": "Argentina",
            "country_id": 32
        },
        {
            "name": "Australia",
            "country_id": 36
        },
        {
            "name": "Austria",
            "country_id": 40
        },
        {
            "name": "Bahamas",
            "country_id": 44
        },
        {
            "name": "Bahrain",
            "country_id": 48
        },
        {
            "name": "Bangladesh",
            "country_id": 50
        },
        {
            "name": "Armenia",
            "country_id": 51
        },
        {
            "name": "Barbados",
            "country_id": 52
        },
        {
            "name": "Belgium",
            "country_id": 56
        },
        {
            "name": "Bermuda",
            "country_id": 60
        },
        {
            "name": "Bhutan",
            "country_id": 64
        },
        {
            "name": "Bolivia, Plurinational State of",
            "country_id": 68
        },
        {
            "name": "Bosnia and Herzegovina",
            "country_id": 70
        },
        {
            "name": "Botswana",
            "country_id": 72
        },
        {
            "name": "Bouvet Island",
            "country_id": 74
        },
        {
            "name": "Brazil",
            "country_id": 76
        },
        {
            "name": "Belize",
            "country_id": 84
        },
        {
            "name": "British Indian Ocean Territory",
            "country_id": 86
        },
        {
            "name": "Solomon Islands",
            "country_id": 90
        },
        {
            "name": "Virgin Islands, British",
            "country_id": 92
        },
        {
            "name": "Brunei Darussalam",
            "country_id": 96
        },
        {
            "name": "Bulgaria",
            "country_id": 100
        },
        {
            "name": "Myanmar",
            "country_id": 104
        },
        {
            "name": "Burundi",
            "country_id": 108
        },
        {
            "name": "Belarus",
            "country_id": 112
        },
        {
            "name": "Cambodia",
            "country_id": 116
        },
        {
            "name": "Cameroon",
            "country_id": 120
        },
        {
            "name": "Canada",
            "country_id": 124
        },
        {
            "name": "Cape Verde",
            "country_id": 132
        },
        {
            "name": "Cayman Islands",
            "country_id": 136
        },
        {
            "name": "Central African Republic",
            "country_id": 140
        },
        {
            "name": "Sri Lanka",
            "country_id": 144
        },
        {
            "name": "Chad",
            "country_id": 148
        },
        {
            "name": "Chile",
            "country_id": 152
        },
        {
            "name": "China",
            "country_id": 156
        },
        {
            "name": "Taiwan, Province of China",
            "country_id": 158
        },
        {
            "name": "Christmas Island",
            "country_id": 162
        },
        {
            "name": "Cocos (Keeling) Islands",
            "country_id": 166
        },
        {
            "name": "Colombia",
            "country_id": 170
        },
        {
            "name": "Comoros",
            "country_id": 174
        },
        {
            "name": "Mayotte",
            "country_id": 175
        },
        {
            "name": "Congo",
            "country_id": 178
        },
        {
            "name": "Congo, the Democratic Republic of the",
            "country_id": 180
        },
        {
            "name": "Cook Islands",
            "country_id": 184
        },
        {
            "name": "Costa Rica",
            "country_id": 188
        },
        {
            "name": "Croatia",
            "country_id": 191
        },
        {
            "name": "Cuba",
            "country_id": 192
        },
        {
            "name": "Cyprus",
            "country_id": 196
        },
        {
            "name": "Czech Republic",
            "country_id": 203
        },
        {
            "name": "Benin",
            "country_id": 204
        },
        {
            "name": "Denmark",
            "country_id": 208
        },
        {
            "name": "Dominica",
            "country_id": 212
        },
        {
            "name": "Dominican Republic",
            "country_id": 214
        },
        {
            "name": "Ecuador",
            "country_id": 218
        },
        {
            "name": "El Salvador",
            "country_id": 222
        },
        {
            "name": "Equatorial Guinea",
            "country_id": 226
        },
        {
            "name": "Ethiopia",
            "country_id": 231
        },
        {
            "name": "Eritrea",
            "country_id": 232
        },
        {
            "name": "Estonia",
            "country_id": 233
        },
        {
            "name": "Faroe Islands",
            "country_id": 234
        },
        {
            "name": "Falkland Islands (Malvinas)",
            "country_id": 238
        },
        {
            "name": "South Georgia and the South Sandwich Islands",
            "country_id": 239
        },
        {
            "name": "Fiji",
            "country_id": 242
        },
        {
            "name": "Finland",
            "country_id": 246
        },
        {
            "name": "\u00c5land Islands",
            "country_id": 248
        },
        {
            "name": "France",
            "country_id": 250
        },
        {
            "name": "French Guiana",
            "country_id": 254
        },
        {
            "name": "French Polynesia",
            "country_id": 258
        },
        {
            "name": "French Southern Territories",
            "country_id": 260
        },
        {
            "name": "Djibouti",
            "country_id": 262
        },
        {
            "name": "Gabon",
            "country_id": 266
        },
        {
            "name": "Georgia",
            "country_id": 268
        },
        {
            "name": "Gambia",
            "country_id": 270
        },
        {
            "name": "Palestinian Territory, Occupied",
            "country_id": 275
        },
        {
            "name": "Germany",
            "country_id": 276
        },
        {
            "name": "Ghana",
            "country_id": 288
        },
        {
            "name": "Gibraltar",
            "country_id": 292
        },
        {
            "name": "Kiribati",
            "country_id": 296
        },
        {
            "name": "Greece",
            "country_id": 300
        },
        {
            "name": "Greenland",
            "country_id": 304
        },
        {
            "name": "Grenada",
            "country_id": 308
        },
        {
            "name": "Guadeloupe",
            "country_id": 312
        },
        {
            "name": "Guam",
            "country_id": 316
        },
        {
            "name": "Guatemala",
            "country_id": 320
        },
        {
            "name": "Guinea",
            "country_id": 324
        },
        {
            "name": "Guyana",
            "country_id": 328
        },
        {
            "name": "Haiti",
            "country_id": 332
        },
        {
            "name": "Heard Island and McDonald Islands",
            "country_id": 334
        },
        {
            "name": "Holy See (Vatican City State)",
            "country_id": 336
        },
        {
            "name": "Honduras",
            "country_id": 340
        },
        {
            "name": "Hong Kong",
            "country_id": 344
        },
        {
            "name": "Hungary",
            "country_id": 348
        },
        {
            "name": "Iceland",
            "country_id": 352
        },
        {
            "name": "India",
            "country_id": 356
        },
        {
            "name": "Indonesia",
            "country_id": 360
        },
        {
            "name": "Iran, Islamic Republic of",
            "country_id": 364
        },
        {
            "name": "Iraq",
            "country_id": 368
        },
        {
            "name": "Ireland",
            "country_id": 372
        },
        {
            "name": "Israel",
            "country_id": 376
        },
        {
            "name": "Italy",
            "country_id": 380
        },
        {
            "name": "C\u00f4te d'Ivoire",
            "country_id": 384
        },
        {
            "name": "Jamaica",
            "country_id": 388
        },
        {
            "name": "Japan",
            "country_id": 392
        },
        {
            "name": "Kazakhstan",
            "country_id": 398
        },
        {
            "name": "Jordan",
            "country_id": 400
        },
        {
            "name": "Kenya",
            "country_id": 404
        },
        {
            "name": "Korea, Democratic People's Republic of",
            "country_id": 408
        },
        {
            "name": "Korea, Republic of",
            "country_id": 410
        },
        {
            "name": "Kuwait",
            "country_id": 414
        },
        {
            "name": "Kyrgyzstan",
            "country_id": 417
        },
        {
            "name": "Lao People's Democratic Republic",
            "country_id": 418
        },
        {
            "name": "Lebanon",
            "country_id": 422
        },
        {
            "name": "Lesotho",
            "country_id": 426
        },
        {
            "name": "Latvia",
            "country_id": 428
        },
        {
            "name": "Liberia",
            "country_id": 430
        },
        {
            "name": "Libya",
            "country_id": 434
        },
        {
            "name": "Liechtenstein",
            "country_id": 438
        },
        {
            "name": "Lithuania",
            "country_id": 440
        },
        {
            "name": "Luxembourg",
            "country_id": 442
        },
        {
            "name": "Macao",
            "country_id": 446
        },
        {
            "name": "Madagascar",
            "country_id": 450
        },
        {
            "name": "Malawi",
            "country_id": 454
        },
        {
            "name": "Malaysia",
            "country_id": 458
        },
        {
            "name": "Maldives",
            "country_id": 462
        },
        {
            "name": "Mali",
            "country_id": 466
        },
        {
            "name": "Malta",
            "country_id": 470
        },
        {
            "name": "Martinique",
            "country_id": 474
        },
        {
            "name": "Mauritania",
            "country_id": 478
        },
        {
            "name": "Mauritius",
            "country_id": 480
        },
        {
            "name": "Mexico",
            "country_id": 484
        },
        {
            "name": "Monaco",
            "country_id": 492
        },
        {
            "name": "Mongolia",
            "country_id": 496
        },
        {
            "name": "Moldova, Republic of",
            "country_id": 498
        },
        {
            "name": "Montenegro",
            "country_id": 499
        },
        {
            "name": "Montserrat",
            "country_id": 500
        },
        {
            "name": "Morocco",
            "country_id": 504
        },
        {
            "name": "Mozambique",
            "country_id": 508
        },
        {
            "name": "Oman",
            "country_id": 512
        },
        {
            "name": "Namibia",
            "country_id": 516
        },
        {
            "name": "Nauru",
            "country_id": 520
        },
        {
            "name": "Nepal",
            "country_id": 524
        },
        {
            "name": "Netherlands",
            "country_id": 528
        },
        {
            "name": "Cura\u00e7ao",
            "country_id": 531
        },
        {
            "name": "Aruba",
            "country_id": 533
        },
        {
            "name": "Sint Maarten (Dutch part)",
            "country_id": 534
        },
        {
            "name": "Bonaire, Sint Eustatius and Saba",
            "country_id": 535
        },
        {
            "name": "New Caledonia",
            "country_id": 540
        },
        {
            "name": "Vanuatu",
            "country_id": 548
        },
        {
            "name": "New Zealand",
            "country_id": 554
        },
        {
            "name": "Nicaragua",
            "country_id": 558
        },
        {
            "name": "Niger",
            "country_id": 562
        },
        {
            "name": "Nigeria",
            "country_id": 566
        },
        {
            "name": "Niue",
            "country_id": 570
        },
        {
            "name": "Norfolk Island",
            "country_id": 574
        },
        {
            "name": "Norway",
            "country_id": 578
        },
        {
            "name": "Northern Mariana Islands",
            "country_id": 580
        },
        {
            "name": "United States Minor Outlying Islands",
            "country_id": 581
        },
        {
            "name": "Micronesia, Federated States of",
            "country_id": 583
        },
        {
            "name": "Marshall Islands",
            "country_id": 584
        },
        {
            "name": "Palau",
            "country_id": 585
        },
        {
            "name": "Pakistan",
            "country_id": 586
        },
        {
            "name": "Panama",
            "country_id": 591
        },
        {
            "name": "Papua New Guinea",
            "country_id": 598
        },
        {
            "name": "Paraguay",
            "country_id": 600
        },
        {
            "name": "Peru",
            "country_id": 604
        },
        {
            "name": "Philippines",
            "country_id": 608
        },
        {
            "name": "Pitcairn",
            "country_id": 612
        },
        {
            "name": "Poland",
            "country_id": 616
        },
        {
            "name": "Portugal",
            "country_id": 620
        },
        {
            "name": "Guinea-Bissau",
            "country_id": 624
        },
        {
            "name": "Timor-Leste",
            "country_id": 626
        },
        {
            "name": "Puerto Rico",
            "country_id": 630
        },
        {
            "name": "Qatar",
            "country_id": 634
        },
        {
            "name": "R\u00e9union",
            "country_id": 638
        },
        {
            "name": "Romania",
            "country_id": 642
        },
        {
            "name": "Russian Federation",
            "country_id": 643
        },
        {
            "name": "Rwanda",
            "country_id": 646
        },
        {
            "name": "Saint Barth\u00e9lemy",
            "country_id": 652
        },
        {
            "name": "Saint Helena, Ascension and Tristan da Cunha",
            "country_id": 654
        },
        {
            "name": "Saint Kitts and Nevis",
            "country_id": 659
        },
        {
            "name": "Anguilla",
            "country_id": 660
        },
        {
            "name": "Saint Lucia",
            "country_id": 662
        },
        {
            "name": "Saint Martin (French part)",
            "country_id": 663
        },
        {
            "name": "Saint Pierre and Miquelon",
            "country_id": 666
        },
        {
            "name": "Saint Vincent and the Grenadines",
            "country_id": 670
        },
        {
            "name": "San Marino",
            "country_id": 674
        },
        {
            "name": "Sao Tome and Principe",
            "country_id": 678
        },
        {
            "name": "Saudi Arabia",
            "country_id": 682
        },
        {
            "name": "Senegal",
            "country_id": 686
        },
        {
            "name": "Serbia",
            "country_id": 688
        },
        {
            "name": "Seychelles",
            "country_id": 690
        },
        {
            "name": "Sierra Leone",
            "country_id": 694
        },
        {
            "name": "Singapore",
            "country_id": 702
        },
        {
            "name": "Slovakia",
            "country_id": 703
        },
        {
            "name": "Viet Nam",
            "country_id": 704
        },
        {
            "name": "Slovenia",
            "country_id": 705
        },
        {
            "name": "Somalia",
            "country_id": 706
        },
        {
            "name": "South Africa",
            "country_id": 710
        },
        {
            "name": "Zimbabwe",
            "country_id": 716
        },
        {
            "name": "Spain",
            "country_id": 724
        },
        {
            "name": "South Sudan",
            "country_id": 728
        },
        {
            "name": "Sudan",
            "country_id": 729
        },
        {
            "name": "Western Sahara",
            "country_id": 732
        },
        {
            "name": "Suriname",
            "country_id": 740
        },
        {
            "name": "Svalbard and Jan Mayen",
            "country_id": 744
        },
        {
            "name": "Swaziland",
            "country_id": 748
        },
        {
            "name": "Sweden",
            "country_id": 752
        },
        {
            "name": "Switzerland",
            "country_id": 756
        },
        {
            "name": "Syrian Arab Republic",
            "country_id": 760
        },
        {
            "name": "Tajikistan",
            "country_id": 762
        },
        {
            "name": "Thailand",
            "country_id": 764
        },
        {
            "name": "Togo",
            "country_id": 768
        },
        {
            "name": "Tokelau",
            "country_id": 772
        },
        {
            "name": "Tonga",
            "country_id": 776
        },
        {
            "name": "Trinidad and Tobago",
            "country_id": 780
        },
        {
            "name": "United Arab Emirates",
            "country_id": 784
        },
        {
            "name": "Tunisia",
            "country_id": 788
        },
        {
            "name": "Turkey",
            "country_id": 792
        },
        {
            "name": "Turkmenistan",
            "country_id": 795
        },
        {
            "name": "Turks and Caicos Islands",
            "country_id": 796
        },
        {
            "name": "Tuvalu",
            "country_id": 798
        },
        {
            "name": "Uganda",
            "country_id": 800
        },
        {
            "name": "Ukraine",
            "country_id": 804
        },
        {
            "name": "Macedonia, the former Yugoslav Republic of",
            "country_id": 807
        },
        {
            "name": "Egypt",
            "country_id": 818
        },
        {
            "name": "United Kingdom",
            "country_id": 826
        },
        {
            "name": "Guernsey",
            "country_id": 831
        },
        {
            "name": "Jersey",
            "country_id": 832
        },
        {
            "name": "Isle of Man",
            "country_id": 833
        },
        {
            "name": "Tanzania, United Republic of",
            "country_id": 834
        },
        {
            "name": "United States",
            "country_id": 840
        },
        {
            "name": "Virgin Islands, U.S.",
            "country_id": 850
        },
        {
            "name": "Burkina Faso",
            "country_id": 854
        },
        {
            "name": "Uruguay",
            "country_id": 858
        },
        {
            "name": "Uzbekistan",
            "country_id": 860
        },
        {
            "name": "Venezuela, Bolivarian Republic of",
            "country_id": 862
        },
        {
            "name": "Wallis and Futuna",
            "country_id": 876
        },
        {
            "name": "Samoa",
            "country_id": 882
        },
        {
            "name": "Yemen",
            "country_id": 887
        },
        {
            "name": "Zambia",
            "country_id": 894
        }
    ]
}

Regions

/api/beta/regions/{country_id}
Get list of regions with name and country_id

Get a JSON representation of all regions

Response 200 (application/json)
{
    "data": [
        {
            "id": 1,
            "code": "AL",
            "name": "Alabama"
        },
        {
            "id": 2,
            "code": "AK",
            "name": "Alaska"
        },
        {
            "id": 3,
            "code": "AZ",
            "name": "Arizona"
        },
        {
            "id": 4,
            "code": "AR",
            "name": "Arkansas"
        },
        {
            "id": 5,
            "code": "CA",
            "name": "California"
        },
        {
            "id": 6,
            "code": "CO",
            "name": "Colorado"
        },
        {
            "id": 7,
            "code": "CT",
            "name": "Connecticut"
        },
        {
            "id": 8,
            "code": "DE",
            "name": "Delaware"
        },
        {
            "id": 9,
            "code": "DC",
            "name": "District of Columbia"
        },
        {
            "id": 10,
            "code": "FL",
            "name": "Florida"
        },
        {
            "id": 11,
            "code": "GA",
            "name": "Georgia"
        },
        {
            "id": 12,
            "code": "HI",
            "name": "Hawaii"
        },
        {
            "id": 13,
            "code": "ID",
            "name": "Idaho"
        },
        {
            "id": 14,
            "code": "IL",
            "name": "Illinois"
        },
        {
            "id": 15,
            "code": "IN",
            "name": "Indiana"
        },
        {
            "id": 16,
            "code": "IA",
            "name": "Iowa"
        },
        {
            "id": 17,
            "code": "KS",
            "name": "Kansas"
        },
        {
            "id": 18,
            "code": "KY",
            "name": "Kentucky"
        },
        {
            "id": 19,
            "code": "LA",
            "name": "Louisiana"
        },
        {
            "id": 20,
            "code": "ME",
            "name": "Maine"
        },
        {
            "id": 21,
            "code": "MD",
            "name": "Maryland"
        },
        {
            "id": 22,
            "code": "MA",
            "name": "Massachusetts"
        },
        {
            "id": 23,
            "code": "MI",
            "name": "Michigan"
        },
        {
            "id": 24,
            "code": "MN",
            "name": "Minnesota"
        },
        {
            "id": 25,
            "code": "MS",
            "name": "Mississippi"
        },
        {
            "id": 26,
            "code": "MO",
            "name": "Missouri"
        },
        {
            "id": 27,
            "code": "MT",
            "name": "Montana"
        },
        {
            "id": 28,
            "code": "NE",
            "name": "Nebraska"
        },
        {
            "id": 29,
            "code": "NV",
            "name": "Nevada"
        },
        {
            "id": 30,
            "code": "NH",
            "name": "New Hampshire"
        },
        {
            "id": 31,
            "code": "NJ",
            "name": "New Jersey"
        },
        {
            "id": 32,
            "code": "NM",
            "name": "New Mexico"
        },
        {
            "id": 33,
            "code": "NY",
            "name": "New York"
        },
        {
            "id": 34,
            "code": "NC",
            "name": "North Carolina"
        },
        {
            "id": 35,
            "code": "ND",
            "name": "North Dakota"
        },
        {
            "id": 36,
            "code": "OH",
            "name": "Ohio"
        },
        {
            "id": 37,
            "code": "OK",
            "name": "Oklahoma"
        },
        {
            "id": 38,
            "code": "OR",
            "name": "Oregon"
        },
        {
            "id": 39,
            "code": "PA",
            "name": "Pennsylvania"
        },
        {
            "id": 40,
            "code": "RI",
            "name": "Rhode Island"
        },
        {
            "id": 41,
            "code": "SC",
            "name": "South Carolina"
        },
        {
            "id": 42,
            "code": "SD",
            "name": "South Dakota"
        },
        {
            "id": 43,
            "code": "TN",
            "name": "Tennessee"
        },
        {
            "id": 44,
            "code": "TX",
            "name": "Texas"
        },
        {
            "id": 45,
            "code": "UT",
            "name": "Utah"
        },
        {
            "id": 46,
            "code": "VT",
            "name": "Vermont"
        },
        {
            "id": 47,
            "code": "VA",
            "name": "Virginia"
        },
        {
            "id": 48,
            "code": "WA",
            "name": "Washington"
        },
        {
            "id": 49,
            "code": "WV",
            "name": "West Virginia"
        },
        {
            "id": 50,
            "code": "WI",
            "name": "Wisconsin"
        },
        {
            "id": 51,
            "code": "WY",
            "name": "Wyoming"
        }
    ]
}

Shipment

When order will be fulfilled and shipped a notification to your email will be sent.
Additional you can specify store webhook URL in your store settings. The post to your webhook will made with following information

{
    "type": "shipment_sent",
    "created": "2017-01-01 12:00:00",
    "data": [
        "shipment": [
            "shipping_method": "BASIC",
            "tracking_number": "123456",
            "tracking_url": "http://example.com",
            "shipped_at": "2017-01-01 11:00:00",
            "items": [
                [
                    "item_id": 10,
                    "quantity": 1
                ],
                [
                    "item_id": 11,
                    "quantity": 2
                ]
            ]
        ],
        "order": [
            'id': 'PP10001111',
            'external_id': 'EX101999',
            'is_test': false,
            'shipping_method': ,
            'status': 'FULFILLED',
            'status_label': 'Fulfilled',
            'created_at': '2017-01-01 09:00:00',
            'updated_at': '2017-01-01 09:00:00',
            'invoice': [],
            'shipments': [],
            'items': [],
            'totals': [],
            'retail_costs': []
        ]
    ]
}
                            

Print Files

Providing print files

To provide a print file to the API, specify a path on a webserver in the JSON node "file" within the "items" dictionary. We recommend to use an obfuscated path which also contains an authentication token or session ID to make sure the files cannot be accessed freely on the internet. Also, make sure to set the path where the files are stored on the server to "noindex, nofollow" in your "robots.txt", to make sure search engines do not try to index it.

Example: https://www.example.com/download_print_data/12345/6789?token=XJRHAZQU76AU41KJNIHV1MQJ

The print file is downloaded as soon as the order is read into our system, but since processing is done asynchronously, we recommend to either calculate print files on demand by a server-side controller or, when you prepare them in advance, keep them on the server for a certain time to allow our systems to download and process them before you delete them from your server.

File format

Print files can be provided in JPEG or PNG format. JPEG files are preferred for better compression, except when transparency is required (e.g. for the T-Shirt product). We recommend to provide RGB files, preferably with an sRGB or AdobeRGB color profile attached. Other color profiles and color spaces can be handled, but loss of print quality might result when the files are converted for the print process.

Resolution and aspect ratio

Files need to be provided in sufficient resolution and correct aspect ratio. Some sanity checks are done by our systems to protect against the most common usage errors, but generally, the customer is responsible to provide correct print files for the orders.

Please note that the resolution/dpi value saved in the files is ignored by the system since the files are automatically scaled to fit the product. Instead the size, i.e. the width and height in pixels, needs to be sufficient to fulfill the minimum resolution for the product. Please use the "products" API to retrieve the information about the minimum resolution for each product, as well as the aspect ratio your files should have.

Example: The Puzzle product has a minimum resolution of 72 dpi (dots per inch) and the variant "20x27 cm - 88 Pieces" has a print file size of 270x200 millimeters. The minimum size of the image in pixels is therefore 765x567 (270 / 25.4 * 72, 200 / 25.4 * 72), but you can improve print quality by providing a larger file, but must make sure that the aspect ratio (ratio between width and height) always matches a ratio of 27:20.

A notable exception to this rule is the "Canvas" product when used in conjunction with the FOLDED border effect. The FOLDED border effect allows the customer to specify the portion of the image which is wrapped around the stretcher frame of the Canvas. This means that in this case the print file must include an image border to wrap around the stretcher frame. The border must be 25mm for the 2cm stretcher frame and 45mm for the 4cm stretcher frame. So for example, for a 40x30cm canvas, when using a FOLDED border effect with a 2cm stretcher frame, the effective size of the print file must be 45x35cm, which changes the required aspect ratio from 4:3 to 9:7 (45:35) and also increases the minimum pixel size. But this is only required when using the FOLDED border effect, not when using one of the other border effects like STRETCHED or MIRRORED, since, when using the latter, the border is created by the system automatically.

Depending on the product, files above a certain resolution only increase the storage space and load on the systems, but do not improve print quality. For practically all products, files with a resolution larger than 300dpi do not make sense in practice.