Create products

Products can be created from the Zettle user interface, or programmatically through the Product Library API as described in the following. You can also import products from an external system into the product library in Zettle.

Prerequisites

  • Authorisation setup with the correct scope, and a valid authorisation token. See Product library concept.
  • Required access right: READ:PRODUCT, WRITE:PRODUCT.

Create a product

This request adds a single product to the Zettle product library for a specific merchant's organisation. The organisation UUID is provided through the access token in the request header.

1
POST /organizations/self/products

Example: This request creates a single product "scarf" without variants. The costPrice and price are set in smallest units of the currency defined for the merhant's account. The response returns a 201 for a succesfully created product. The product will only be included in the response if returnEntity is true.

Request body

1
{
2
"uuid": "{{randomUUIDv1}}",
3
"name": "Scarf",
4
"variants": [
5
{
6
"uuid": "{{randomUUIDv1x2}}",
7
"name": "Scarf",
8
"description": "Grey knitted scarf, one size",
9
"sku": 12334455,
10
"barcode": null,
11
"price": {
12
"amount": 10000,
13
"currencyId": "SEK"},
14
"costPrice": {
15
"amount": 5000,
16
"currencyId": "SEK"},
17
"vatPercentage": 20,
18
"options": null,
19
"presentation": null
20
}
21
],
22
"variant_option_definitions": null
23
}

Example: This request creates a fashion product in the "clothing" category. Properties include two size variants, small and medium, and price, and tax rate. The request also inlcudes a link to a presentation image, uploaded and stored in Zettle.

Request body

1
{
2
"uuid": "{{randomUUIDv1x2}}",
3
"name": "Jeans",
4
"description": "Description of product.",
5
"presentation": {
6
"imageUrl": "https://image.izettletest.com/product/sTop9DEqEemOix6FMP9b9Q-JsvDJPuJEequ57W3cjPOlg.png"
7
},
8
"variants": [
9
{
10
"uuid": "{{randomUUIDv1x2}}",
11
"name": "small",
12
"description": "Small pants.",
13
"sku": "SKU",
14
"barcode": "Barcode",
15
"price": {
16
"amount": 10000,
17
"currencyId": "SEK"
18
},
19
"costPrice": {
20
"amount": 500,
21
"currencyId": "SEK"
22
},
23
"vatPercentage": "25",
24
"options": [
25
{
26
"name": "SizeOption",
27
"value": "small"
28
}
29
]
30
},
31
{
32
"uuid": "{{randomUUIDv1x2}}",
33
"name": "medium",
34
"description": "Medium pants.",
35
"sku": "SKU",
36
"barcode": "Barcode",
37
"price": {
38
"amount": 10000,
39
"currencyId": "SEK"
40
},
41
"costPrice": {
42
"amount": 500,
43
"currencyId": "SEK"
44
},
45
"vatPercentage": "25",
46
"options": [
47
{
48
"name": "SizeOption",
49
"value": "medium"
50
}
51
]
52
}
53
],
54
"vatPercentage": "25",
55
"variantOptionDefinitions": {
56
"definitions": [
57
{
58
"name": "SizeOption",
59
"properties": [
60
{
61
"value": "small"
62
},
63
{
64
"value": "medium"
65
}
66
]
67
}
68
]
69
},
70
"category": {
71
"uuid": "1ee20a82-fb8a-11ea-adc1-0242ac120002",
72
"name": "clothing"
73
}
74
}

Bulk import of products

Bulk imports are typically useful during first-time setup of a shop, when you need to create a large number of products. An import can be done from the Zettle user interface using an Excel or CSV file. With some limitations, you can also do a bulk import programmatically.

The import endpoint can be used for bulk actions such as creating or updating products in bulk.

1
POST /organizations/self/import/v2

You can add up to 2,000 products per request. The endpoint should only be used for smaller libraries, with less than 10,000 daily changes.