Image API

Version: 1.0
If you use the Product Library API to manage products, you can use the Image API to handle images that are displayed with products. Through the Image API, you can programmatically upload and associate images with products in the product library.

API base URL

EnvironmentURL
Productionhttps://image.izettle.com

Security

Zettle Oauth: Oauth2
For more information, see the OAuth API documentation.
Authorization Code OAuth Flow
Authorizations URL:https://oauth.zettle.com/authorize
Token URL: https://oauth.zettle.com/token
Scopes:
  • WRITE:PRODUCT
    : Access to write product library data

Upload image

Upload a single image as a file

Uploads a single image as a file. The image size must be smaller than 5 MB but larger than 50*50 pixels.
Request
PATH PARAMETERS
organizationUuid
required
string<UUID version 1>
Unique identifier for your organisation. You can use following options to fill in this value:
  • Use self as the value. This will retrieve your organizationUuid from the authentication token in the request.
  • Get it by using the users/self endpoint of OAuth API. For more information, see OAuth API.
REQUEST BODY SCHEMA:  multipart/form-data
object<FormDataBodyPart>
Responses
422
Returned when the image is too big or too small.
Request code samples
1
curl --request POST \
2
--url https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload \
3
--header 'content-type: multipart/form-data' \
4
--form 'file={"contentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0},"entity":{},"headers":{"property1":["string"],"property2":["string"]},"mediaType":{"type":"string","subtype":"string","parameters":{"property1":"string","property2":"string"},"wildcardType":true,"wildcardSubtype":true},"messageBodyWorkers":{},"parent":{"contentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0},"entity":{},"headers":{"property1":["string"],"property2":["string"]},"mediaType":{"type":"string","subtype":"string","parameters":{"property1":"string","property2":"string"},"wildcardType":true,"wildcardSubtype":true},"messageBodyWorkers":{},"parent":{},"providers":{},"bodyParts":[{}],"parameterizedHeaders":{"property1":[{"value":"string","parameters":{"property1":"string","property2":"string"}}],"property2":[{"value":"string","parameters":{"property1":"string","property2":"string"}}]}},"providers":{},"name":"string","value":"string","formDataContentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0,"name":"string"},"simple":true,"parameterizedHeaders":{"property1":[{"value":"string","parameters":{"property1":"string","property2":"string"}}],"property2":[{"value":"string","parameters":{"property1":"string","property2":"string"}}]}}'
1
const request = require('request');
2
3
const options = {
4
method: 'POST',
5
url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload',
6
headers: {'content-type': 'multipart/form-data'},
7
formData: {
8
file: '{"contentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0},"entity":{},"headers":{"property1":["string"],"property2":["string"]},"mediaType":{"type":"string","subtype":"string","parameters":{"property1":"string","property2":"string"},"wildcardType":true,"wildcardSubtype":true},"messageBodyWorkers":{},"parent":{"contentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0},"entity":{},"headers":{"property1":["string"],"property2":["string"]},"mediaType":{"type":"string","subtype":"string","parameters":{"property1":"string","property2":"string"},"wildcardType":true,"wildcardSubtype":true},"messageBodyWorkers":{},"parent":{},"providers":{},"bodyParts":[{}],"parameterizedHeaders":{"property1":[{"value":"string","parameters":{"property1":"string","property2":"string"}}],"property2":[{"value":"string","parameters":{"property1":"string","property2":"string"}}]}},"providers":{},"name":"string","value":"string","formDataContentDisposition":{"type":"string","parameters":{"property1":"string","property2":"string"},"fileName":"string","creationDate":"2019-08-24T14:15:22Z","modificationDate":"2019-08-24T14:15:22Z","readDate":"2019-08-24T14:15:22Z","size":0,"name":"string"},"simple":true,"parameterizedHeaders":{"property1":[{"value":"string","parameters":{"property1":"string","property2":"string"}}],"property2":[{"value":"string","parameters":{"property1":"string","property2":"string"}}]}}'
9
}
10
};
11
12
request(options, function (error, response, body) {
13
if (error) throw new Error(error);
14
15
console.log(body);
16
});
1
HttpResponse<String> response = Unirest.post("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload")
2
.header("content-type", "multipart/form-data")
3
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{},\"providers\":{},\"bodyParts\":[{}],\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}},\"providers\":{},\"name\":\"string\",\"value\":\"string\",\"formDataContentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0,\"name\":\"string\"},\"simple\":true,\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}}\r\n-----011000010111000001101001--\r\n")
4
.asString();
1
import http.client
2
3
conn = http.client.HTTPSConnection("image.izettle.com")
4
5
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{},\"providers\":{},\"bodyParts\":[{}],\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}},\"providers\":{},\"name\":\"string\",\"value\":\"string\",\"formDataContentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0,\"name\":\"string\"},\"simple\":true,\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}}\r\n-----011000010111000001101001--\r\n"
6
7
headers = { 'content-type': "multipart/form-data" }
8
9
conn.request("POST", "/v2/images/organizations/{organizationUuid}/products/upload", payload, headers)
10
11
res = conn.getresponse()
12
data = res.read()
13
14
print(data.decode("utf-8"))
1
package main
2
3
import (
4
"fmt"
5
"strings"
6
"net/http"
7
"io/ioutil"
8
)
9
10
func main() {
11
12
url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload"
13
14
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{},\"providers\":{},\"bodyParts\":[{}],\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}},\"providers\":{},\"name\":\"string\",\"value\":\"string\",\"formDataContentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0,\"name\":\"string\"},\"simple\":true,\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}}\r\n-----011000010111000001101001--\r\n")
15
16
req, _ := http.NewRequest("POST", url, payload)
17
18
req.Header.Add("content-type", "multipart/form-data")
19
20
res, _ := http.DefaultClient.Do(req)
21
22
defer res.Body.Close()
23
body, _ := ioutil.ReadAll(res.Body)
24
25
fmt.Println(res)
26
fmt.Println(string(body))
27
28
}
1
val client = OkHttpClient()
2
3
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
4
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{\"contentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0},\"entity\":{},\"headers\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"mediaType\":{\"type\":\"string\",\"subtype\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"wildcardType\":true,\"wildcardSubtype\":true},\"messageBodyWorkers\":{},\"parent\":{},\"providers\":{},\"bodyParts\":[{}],\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}},\"providers\":{},\"name\":\"string\",\"value\":\"string\",\"formDataContentDisposition\":{\"type\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"},\"fileName\":\"string\",\"creationDate\":\"2019-08-24T14:15:22Z\",\"modificationDate\":\"2019-08-24T14:15:22Z\",\"readDate\":\"2019-08-24T14:15:22Z\",\"size\":0,\"name\":\"string\"},\"simple\":true,\"parameterizedHeaders\":{\"property1\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}],\"property2\":[{\"value\":\"string\",\"parameters\":{\"property1\":\"string\",\"property2\":\"string\"}}]}}\r\n-----011000010111000001101001--\r\n")
5
val request = Request.Builder()
6
.url("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload")
7
.post(body)
8
.addHeader("content-type", "multipart/form-data")
9
.build()
10
11
val response = client.newCall(request).execute()
Response code samples
1
{
2
"imageLookupKey": "string",
3
"imageUrls": [
4
"string"
5
]
6
}

Upload a single image from a U R L

Uploads a single image from a URL. The image size must be smaller than 5 MB but bigger than 50*50 pixels.
Request
PATH PARAMETERS
organizationUuid
required
string<UUID version 1>
Unique identifier for your organisation. You can use following options to fill in this value:
  • Use self as the value. This will retrieve your organizationUuid from the authentication token in the request.
  • Get it by using the users/self endpoint of OAuth API. For more information, see OAuth API.
REQUEST BODY SCHEMA:  application/json
ImageUploadRequest
imageFormat
required
string
Enums: GIFJPEGPNG
Image format of the picture is GIF, JPEG, or PNG.
imageData
array of <string>
[0...5120000] items
The image as a byte array
imageUrl
string<url>
URL to an existing image
imageLookupKey
string
Responses
422
Returned when one of the following happens:
  • The image URL format or protocol is not HTTPS.
  • The image is too big or too small.
  • The image at the URL doesn't match the image format.
Request code samples
1
curl --request POST \
2
--url https://image.izettle.com/v2/images/organizations/{organizationUuid}/products \
3
--header 'content-type: application/json' \
4
--data '{"imageFormat":"GIF","imageData":["string"],"imageUrl":"string","imageLookupKey":"stringstringstringstringstringst"}'
1
const request = require('request');
2
3
const options = {
4
method: 'POST',
5
url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products',
6
headers: {'content-type': 'application/json'},
7
body: {
8
imageFormat: 'GIF',
9
imageData: ['string'],
10
imageUrl: 'string',
11
imageLookupKey: 'stringstringstringstringstringst'
12
},
13
json: true
14
};
15
16
request(options, function (error, response, body) {
17
if (error) throw new Error(error);
18
19
console.log(body);
20
});
1
HttpResponse<String> response = Unirest.post("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products")
2
.header("content-type", "application/json")
3
.body("{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}")
4
.asString();
1
import http.client
2
3
conn = http.client.HTTPSConnection("image.izettle.com")
4
5
payload = "{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}"
6
7
headers = { 'content-type': "application/json" }
8
9
conn.request("POST", "/v2/images/organizations/{organizationUuid}/products", payload, headers)
10
11
res = conn.getresponse()
12
data = res.read()
13
14
print(data.decode("utf-8"))
1
package main
2
3
import (
4
"fmt"
5
"strings"
6
"net/http"
7
"io/ioutil"
8
)
9
10
func main() {
11
12
url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products"
13
14
payload := strings.NewReader("{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}")
15
16
req, _ := http.NewRequest("POST", url, payload)
17
18
req.Header.Add("content-type", "application/json")
19
20
res, _ := http.DefaultClient.Do(req)
21
22
defer res.Body.Close()
23
body, _ := ioutil.ReadAll(res.Body)
24
25
fmt.Println(res)
26
fmt.Println(string(body))
27
28
}
1
val client = OkHttpClient()
2
3
val mediaType = MediaType.parse("application/json")
4
val body = RequestBody.create(mediaType, "{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}")
5
val request = Request.Builder()
6
.url("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products")
7
.post(body)
8
.addHeader("content-type", "application/json")
9
.build()
10
11
val response = client.newCall(request).execute()
Response code samples
1
{
2
"imageLookupKey": "string",
3
"imageUrls": [
4
"string"
5
]
6
}

Upload multiple images from U R Ls

Uploads multiple images from URLs. The image size must be smaller than 5 MB but bigger than 50*50 pixels.
Request
PATH PARAMETERS
organizationUuid
required
string<UUID version 1>
Unique identifier for your organisation. You can use following options to fill in this value:
  • Use self as the value. This will retrieve your organizationUuid from the authentication token in the request.
  • Get it by using the users/self endpoint of OAuth API. For more information, see OAuth API.
REQUEST BODY SCHEMA:  application/json
BulkProductImageUpload
array of <ImageUploadRequest>
Responses
422
Returned when one of the following happens:
  • The image URL format or protocol is not HTTPS.
  • The image is too big or too small.
  • The image at the URL doesn't match the image format.
Request code samples
1
curl --request POST \
2
--url https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk \
3
--header 'content-type: application/json' \
4
--data '{"imageUploads":[{"imageFormat":"GIF","imageData":["string"],"imageUrl":"string","imageLookupKey":"stringstringstringstringstringst"}]}'
1
const request = require('request');
2
3
const options = {
4
method: 'POST',
5
url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk',
6
headers: {'content-type': 'application/json'},
7
body: {
8
imageUploads: [
9
{
10
imageFormat: 'GIF',
11
imageData: ['string'],
12
imageUrl: 'string',
13
imageLookupKey: 'stringstringstringstringstringst'
14
}
15
]
16
},
17
json: true
18
};
19
20
request(options, function (error, response, body) {
21
if (error) throw new Error(error);
22
23
console.log(body);
24
});
1
HttpResponse<String> response = Unirest.post("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk")
2
.header("content-type", "application/json")
3
.body("{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}")
4
.asString();
1
import http.client
2
3
conn = http.client.HTTPSConnection("image.izettle.com")
4
5
payload = "{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}"
6
7
headers = { 'content-type': "application/json" }
8
9
conn.request("POST", "/v2/images/organizations/{organizationUuid}/products/bulk", payload, headers)
10
11
res = conn.getresponse()
12
data = res.read()
13
14
print(data.decode("utf-8"))
1
package main
2
3
import (
4
"fmt"
5
"strings"
6
"net/http"
7
"io/ioutil"
8
)
9
10
func main() {
11
12
url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk"
13
14
payload := strings.NewReader("{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}")
15
16
req, _ := http.NewRequest("POST", url, payload)
17
18
req.Header.Add("content-type", "application/json")
19
20
res, _ := http.DefaultClient.Do(req)
21
22
defer res.Body.Close()
23
body, _ := ioutil.ReadAll(res.Body)
24
25
fmt.Println(res)
26
fmt.Println(string(body))
27
28
}
1
val client = OkHttpClient()
2
3
val mediaType = MediaType.parse("application/json")
4
val body = RequestBody.create(mediaType, "{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}")
5
val request = Request.Builder()
6
.url("https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk")
7
.post(body)
8
.addHeader("content-type", "application/json")
9
.build()
10
11
val response = client.newCall(request).execute()
Response code samples
1
{
2
"uploaded": [
3
{
4
"imageLookupKey": "string",
5
"imageUrls": [
6
"string"
7
],
8
"source": "string"
9
}
10
],
11
"invalid": [
12
"string"
13
]
14
}

Fetch image

Fetch an image

Fetch an image using a known identifier.
Request
PATH PARAMETERS
identifier
required
string
Unique identifier for the image. It's the value of imageLookupKey in the response to image uploading. It's used to add the image to a product using the Product Library API.
QUERY PARAMETERS
w
integer<int32>
MIN: 20
MAX: 4096
Requested width in pixels
h
integer<int32>
MIN: 20
MAX: 4096
Requested height in pixels
c
boolean
Crop image (true) or fit in box (false). Fit in box is default.
t
string
Image format. The supported image format is jpeg, png, or gif. The default is jpeg.
Responses
404
Returned when the product image is not found.
422
Returned when the image lookup key is invalid.
Request code samples
1
curl --request GET \
2
--url 'https://image.izettle.com/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE'
1
const request = require('request');
2
3
const options = {
4
method: 'GET',
5
url: 'https://image.izettle.com/v2/images/product/{identifier}',
6
qs: {
7
w: 'SOME_INTEGER_VALUE',
8
h: 'SOME_INTEGER_VALUE',
9
c: 'SOME_BOOLEAN_VALUE',
10
t: 'SOME_STRING_VALUE'
11
}
12
};
13
14
request(options, function (error, response, body) {
15
if (error) throw new Error(error);
16
17
console.log(body);
18
});
1
HttpResponse<String> response = Unirest.get("https://image.izettle.com/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE")
2
.asString();
1
import http.client
2
3
conn = http.client.HTTPSConnection("image.izettle.com")
4
5
conn.request("GET", "/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE")
6
7
res = conn.getresponse()
8
data = res.read()
9
10
print(data.decode("utf-8"))
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
"io/ioutil"
7
)
8
9
func main() {
10
11
url := "https://image.izettle.com/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE"
12
13
req, _ := http.NewRequest("GET", url, nil)
14
15
res, _ := http.DefaultClient.Do(req)
16
17
defer res.Body.Close()
18
body, _ := ioutil.ReadAll(res.Body)
19
20
fmt.Println(res)
21
fmt.Println(string(body))
22
23
}
1
val client = OkHttpClient()
2
3
val request = Request.Builder()
4
.url("https://image.izettle.com/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE")
5
.get()
6
.build()
7
8
val response = client.newCall(request).execute()
Response code samples
1
{
2
"image/jpeg": null,
3
"image/png": null,
4
"image/gif": null
5
}
;