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
Environment | URL |
---|---|
Production | https://image.izettle.com |
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: |
|
Upload image
post
/v2/images/organizations/{organizationUuid}/products/upload
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:
|
REQUEST BODY SCHEMA:
multipart/form-data
object<FormDataBodyPart>
object<ContentDisposition>
type
string
object
fileName
string
creationDate
string<date-time>
modificationDate
string<date-time>
readDate
string<date-time>
size
integer<int64>
object
object
object
type
string
subtype
string
object
wildcardType
boolean
wildcardSubtype
boolean
object<MessageBodyWorkers>
object<MultiPart>
object<ContentDisposition>
type
string
object
fileName
string
creationDate
string<date-time>
modificationDate
string<date-time>
readDate
string<date-time>
size
integer<int64>
object
object
object
type
string
subtype
string
object
wildcardType
boolean
wildcardSubtype
boolean
object<MessageBodyWorkers>
object
object
array of <object>
Array[object]
object
object
name
string
value
string
object<FormDataContentDisposition>
type
string
object
fileName
string
creationDate
string<date-time>
modificationDate
string<date-time>
readDate
string<date-time>
size
integer<int64>
name
string
simple
boolean
object
Responses
RESPONSE SCHEMA:
application/json
imageLookupKey
required
string
imageUrls
array of <string>
422
Returned when the image is too big or too small.
Request code samples
1curl --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"}}]}}'
1const request = require('request');23const options = {4method: 'POST',5url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload',6headers: {'content-type': 'multipart/form-data'},7formData: {8file: '{"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};1112request(options, function (error, response, body) {13if (error) throw new Error(error);1415console.log(body);16});
1HttpResponse<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();
1import http.client23conn = http.client.HTTPSConnection("image.izettle.com")45payload = "-----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"67headers = { 'content-type': "multipart/form-data" }89conn.request("POST", "/v2/images/organizations/{organizationUuid}/products/upload", payload, headers)1011res = conn.getresponse()12data = res.read()1314print(data.decode("utf-8"))
1package main23import (4"fmt"5"strings"6"net/http"7"io/ioutil"8)910func main() {1112url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/upload"1314payload := 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")1516req, _ := http.NewRequest("POST", url, payload)1718req.Header.Add("content-type", "multipart/form-data")1920res, _ := http.DefaultClient.Do(req)2122defer res.Body.Close()23body, _ := ioutil.ReadAll(res.Body)2425fmt.Println(res)26fmt.Println(string(body))2728}
1val client = OkHttpClient()23val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")4val 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")5val 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()1011val response = client.newCall(request).execute()
Response code samples
1{2"imageLookupKey": "string",3"imageUrls": [4"string"5]6}
post
/v2/images/organizations/{organizationUuid}/products
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:
|
REQUEST BODY SCHEMA:
application/json
ImageUploadRequest
imageFormat
required
string
Enums:
GIF
JPEG
PNG
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
RESPONSE SCHEMA:
application/json
imageLookupKey
required
string
imageUrls
array of <string>
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
1curl --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"}'
1const request = require('request');23const options = {4method: 'POST',5url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products',6headers: {'content-type': 'application/json'},7body: {8imageFormat: 'GIF',9imageData: ['string'],10imageUrl: 'string',11imageLookupKey: 'stringstringstringstringstringst'12},13json: true14};1516request(options, function (error, response, body) {17if (error) throw new Error(error);1819console.log(body);20});
1HttpResponse<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();
1import http.client23conn = http.client.HTTPSConnection("image.izettle.com")45payload = "{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}"67headers = { 'content-type': "application/json" }89conn.request("POST", "/v2/images/organizations/{organizationUuid}/products", payload, headers)1011res = conn.getresponse()12data = res.read()1314print(data.decode("utf-8"))
1package main23import (4"fmt"5"strings"6"net/http"7"io/ioutil"8)910func main() {1112url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products"1314payload := strings.NewReader("{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}")1516req, _ := http.NewRequest("POST", url, payload)1718req.Header.Add("content-type", "application/json")1920res, _ := http.DefaultClient.Do(req)2122defer res.Body.Close()23body, _ := ioutil.ReadAll(res.Body)2425fmt.Println(res)26fmt.Println(string(body))2728}
1val client = OkHttpClient()23val mediaType = MediaType.parse("application/json")4val body = RequestBody.create(mediaType, "{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}")5val 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()1011val response = client.newCall(request).execute()
Response code samples
1{2"imageLookupKey": "string",3"imageUrls": [4"string"5]6}
post
/v2/images/organizations/{organizationUuid}/products/bulk
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:
|
REQUEST BODY SCHEMA:
application/json
BulkProductImageUpload
array of <ImageUploadRequest>
Array[ImageUploadRequest]
ImageUploadRequest
imageFormat
required
string
Enums:
GIF
JPEG
PNG
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
RESPONSE SCHEMA:
application/json
array of <SingleBulkImageUploadResponse>
Array[SingleBulkImageUploadResponse]
imageLookupKey
required
string
imageUrls
array of <string>
source
string
invalid
array of <string>
unique
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
1curl --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"}]}'
1const request = require('request');23const options = {4method: 'POST',5url: 'https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk',6headers: {'content-type': 'application/json'},7body: {8imageUploads: [9{10imageFormat: 'GIF',11imageData: ['string'],12imageUrl: 'string',13imageLookupKey: 'stringstringstringstringstringst'14}15]16},17json: true18};1920request(options, function (error, response, body) {21if (error) throw new Error(error);2223console.log(body);24});
1HttpResponse<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();
1import http.client23conn = http.client.HTTPSConnection("image.izettle.com")45payload = "{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}"67headers = { 'content-type': "application/json" }89conn.request("POST", "/v2/images/organizations/{organizationUuid}/products/bulk", payload, headers)1011res = conn.getresponse()12data = res.read()1314print(data.decode("utf-8"))
1package main23import (4"fmt"5"strings"6"net/http"7"io/ioutil"8)910func main() {1112url := "https://image.izettle.com/v2/images/organizations/{organizationUuid}/products/bulk"1314payload := strings.NewReader("{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}")1516req, _ := http.NewRequest("POST", url, payload)1718req.Header.Add("content-type", "application/json")1920res, _ := http.DefaultClient.Do(req)2122defer res.Body.Close()23body, _ := ioutil.ReadAll(res.Body)2425fmt.Println(res)26fmt.Println(string(body))2728}
1val client = OkHttpClient()23val mediaType = MediaType.parse("application/json")4val body = RequestBody.create(mediaType, "{\"imageUploads\":[{\"imageFormat\":\"GIF\",\"imageData\":[\"string\"],\"imageUrl\":\"string\",\"imageLookupKey\":\"stringstringstringstringstringst\"}]}")5val 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()1011val 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
get
/v2/images/product/{identifier}
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
RESPONSE SCHEMA:
404
Returned when the product image is not found.
422
Returned when the image lookup key is invalid.
Request code samples
1curl --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'
1const request = require('request');23const options = {4method: 'GET',5url: 'https://image.izettle.com/v2/images/product/{identifier}',6qs: {7w: 'SOME_INTEGER_VALUE',8h: 'SOME_INTEGER_VALUE',9c: 'SOME_BOOLEAN_VALUE',10t: 'SOME_STRING_VALUE'11}12};1314request(options, function (error, response, body) {15if (error) throw new Error(error);1617console.log(body);18});
1HttpResponse<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();
1import http.client23conn = http.client.HTTPSConnection("image.izettle.com")45conn.request("GET", "/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE")67res = conn.getresponse()8data = res.read()910print(data.decode("utf-8"))
1package main23import (4"fmt"5"net/http"6"io/ioutil"7)89func main() {1011url := "https://image.izettle.com/v2/images/product/{identifier}?w=SOME_INTEGER_VALUE&h=SOME_INTEGER_VALUE&c=SOME_BOOLEAN_VALUE&t=SOME_STRING_VALUE"1213req, _ := http.NewRequest("GET", url, nil)1415res, _ := http.DefaultClient.Do(req)1617defer res.Body.Close()18body, _ := ioutil.ReadAll(res.Body)1920fmt.Println(res)21fmt.Println(string(body))2223}
1val client = OkHttpClient()23val 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()78val response = client.newCall(request).execute()
Response code samples
1{2"image/jpeg": null,3"image/png": null,4"image/gif": null5}