Goto APIs

Images API

General:

Basics:

Base-URL: https://capi.lagerkoll.com/v1/images/
Parameters in the url should all be encoded and all data sent should be UTF-8

MAX number of requests per minute is set to 200.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.

Headers:

There are 2 ways to be authenticated when using this API. in both ways you add headers to the request.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
store: <<STORE>>
user_id: <<USER_ID>>
user_token: <<USER_TOKEN>>
api_key: <<API_KEY>>
Accept: application/json
Content-Type: application/json

Errors:

Code Description
900001 Credentials don't match
900101 Common error
900429 Too many requests
901501 Error getting barcode image
{
  "errorCode" : 900101,
  "errorMessage" : "Something went wrong on the server",
  "errorField" : null,
  "errorData" : null
}

Images API:

Article images

Get image for article

GETUrl: /{article_id : .+}
Headers:
Accept: image/png or application/json
Get image for article based on article-id

Valid parameters:

Parameter Description Default value Allowed values
default_url

Body:
Successfull response:

Get barcode for article

GETUrl: /barcode/{article_id : .+}
Headers:
Accept: image/png or application/json
Get barcode for article based on article-id. Returns 404 if no barcode is found on article

Valid parameters:

Parameter Description Default value Allowed values
width 200
height 100
measure px
default_url
barcode_type EAN,CODE128,QR,UPC

Body:
Successfull response:

Get barcode

POSTUrl: /barcode
Headers:
Accept: image/png or application/json
Get barcode
Body:

{ "measure": "px", "data": "data", "width": "200", "type": "type", "height": "100" }
Successfull response:

Upload image for article

POSTUrl: /{article_id : .+}
Headers:
Accept: application/json or application/xml
Content-type: multipart/form-data
Upload new image for article. If article had a previous image, it will be replaced. Max file size is 10Mb and the image will be scaled to max 300px x 300px

Valid parameters:

Parameter Description Default value Allowed values
file
file

Body:
Successfull response:

Delete image for article

DELETEUrl: /{article_id : .+}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Delete image for article based on article-id
Body:
Successfull response:

Feature images

Get image for feature

GETUrl: /feature/{id}
Headers:
Accept: image/png or application/json
Content-type: application/json
Get image for feature in Feature Store

Valid parameters:

Parameter Description Default value Allowed values
default_url

Body:
Successfull response:

Get screenshot for feature

GETUrl: /feature/{id}/screenshot/{screenshot : .+}
Headers:
Accept: image/png or application/json
Content-type: application/json
Get screenshot for feature in Feature Store
Body:
Successfull response:

Get icon for feature

GETUrl: /feature/icon/{id}
Headers:
Accept: image/png or application/json
Content-type: application/json
Get icon for feature

Valid parameters:

Parameter Description Default value Allowed values
default_url

Body:
Successfull response:

Store images

Get image for store

GETUrl: /store
Headers:
Accept: image/png or application/json
Get image for store

Valid parameters:

Parameter Description Default value Allowed values
default_url

Body:
Successfull response:

Get public image for store

GETUrl: /company/{company_id}/image.jpg
Headers:
Accept: image/png or application/json
Open request to get image for store, no credentials needed
Body:
Successfull response:

Upload image for store

POSTUrl: /store
Headers:
Accept: application/json or application/xml
Content-type: multipart/form-data
Upload new image for store. If store had a previous image, it will be replaced. Max file size is 10Mb and the image will be scaled to max 300px x 300px

Valid parameters:

Parameter Description Default value Allowed values
file
file

Body:
Successfull response:

Classes:

BarcodeRequest

Field Type Description Default Mandatory Accepted values Example values Access
data String Content of barcode Post R,W
type String Type of barcode Post EAN,CODE128,QR,UPC R,W
measure String Unit of measurements px px,mm R,W
width Double Width of barcode 200 R,W
height Double Height of barcode 100 R,W