Skip to main content

sizeez API (2.0.0)

Authentication

To use the sizeez API, you need to authenticate your requests using the API key you receive from us.

To do so, ensure that the API key is included in the header field named x-api-key for every request.

Important: Please keep your API key secret. If you need use the API key to make API calls directly from frontend, consider implementing a proxy server to safeguard and conceal the API key for added security.

General HTTP Error Codes

HTTP Status Code Meaning Description
400 Bad Request Your request is invalid. A required parameter was missing or invalid.
403 Unauthorized Your API key is missing or invalid.
403 Forbidden The http path or verb is not supported. The API will respond with message: "Missing Authentication Token".
404 Not Found The requested resource is not found.
409 Conflict The operation is not allowed on a resource with the current status.
429 Quota exceeded Your API key's quota limit has been reached or too many requests per second.
500 Internal Server Error A server error occurred.

This list provides a general overview over the errors the API is returning. For detailed information, see the documentation of the individual endpoints.

Step 1 - Initiate Scan

/measurements/init

Call this endpoint to start the process of a new scan.

query Parameters
redirect-url
string

This query parameter is optional.

If you are using the sizeez companion app and want to redirect the user to a particular URL upon the completion of the photo uploading process, please provide the URL here in an URL-encoded format.

For instance, if your desired URL is "myshop.com/product1?color=blue&size=l", provide it in URL-encoded format as: "myshop.com%2Fproduct1%3Fcolor%3Dblue%26size%3Dl"

header Parameters
x-api-key
required
string

API key to access the endpoint

Responses

Request samples

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<your-api-key>");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.mobilescan.me/v2/measurements/init", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response samples

Content type
application/json
{
  • "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
  • "qrcode": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD1CAAAAACt2uy5AAADH0lEQVR42u3bS1IjMRAFQN//0rCfoOX3JCAGVXo1g2m3Uo6oVn14fUx8vaipqampqampqampqampqampqXv16/3r5Iqv/vvP7z1esb42WCk1NfU49XMADN8NNOvPC7Ztc6XU1NTj1OuVB8G4Oyh+cd/HUL25x9TU1NSrO63PiOknP8bw9fqoqampf0qdJs9BlA6s1NTU1If59cnvVVn1+pd/uapATU39x9RBR+E/+dcvd3yoqan/jrqq7lW7U3U3qtDfLZyamnqGOoiRwQmyp6fXVuujpqYerA56EOtRuyrgb+5JdXKlpqamLpqzwRXBtf15NV0VNTX1OHXfYE1T4a6m14CDnaCmph6nfgy31ZhKFfWrzeqjPjU19XR1eqc09w2KjOnNq7k8amrqmeq0QhdsQpVu923kYPOpqakHq9eGzTfSKmCwd1Ugp6amHqyuUuY0jQ6CbDXistlQoaamnqTuY2SwrONpvKCGeV5VoKamvkodzORWx8OgJds3WdKzMzU1NXVRtatieJVk9xMv5/k1NTX1fep+WLdaYFVzPBnOo6amnqnezG6remAfeIMjckqnpqYeok4Hc48Kdu/fCB4l1S2pqanHqYNu7PGyvnHobuOvLKipqWeoq3NeGoyDmFttx1EKTk1NPUO9WSisSOuHwOZTJP5CqKmpZ6iDoZO+iBekwkErOPhCzk+k1NTUt6j7vuxmXyIp7IXn2vSZQE1NPU6dGqrzar8T/TPhqPdBTU19lbqaMtks2AWfXG3vN82lUFNT36de36kKnn3UD0qL1XQfNTU1dRa0+8PjOh9eFwCDGx393Qc1NfV96qCdka78uG/Sr2r3REpNTX2LumqFBOG2P6CmHd/+Z9TU1JPUr/evk6ifHh6rx0aaWlNTU49TryN3lTfHo7zvk/afjuHU1NSXqqseRJpzx1nwXkaefCvU1NTUpfq4bxIk2WnHg5qamjrLkYNpt+qomo7CVKk1NTX1THX6blVGrJ4O6xulJ2FqaurB6ip/DXBBTa8fNamyampq6nHq61/U1NTU1NTU1NTU1NTU1NTU1NTr1yd+uI/Jo5bI3gAAAABJRU5ErkJggg==",
}

Step 2 - Upload 2 Photos

/measurements/upload

Call the /measurements/upload endpoint to retrieve two separate upload URLs for both the front and side photos. Then, upload both photos in binary format calling the obtained upload URLs using HTTP PUT method with valid Content-Type header, either image/jpeg or image/png.

header Parameters
x-api-key
required
string

API key to access the endpoint

Request Body schema: application/json
required
id
required
string

The job ID as returned by GET /measurements/init

height
required
string

Height of the person in the image in cm. Valid value should be between 100 and 225

gender
string

Optional: Gender of the person in the image. Valid options include: female, male, unisex. Default value is unisex. If invalid value is provided, gender will be set to its default value.

Responses

Request samples

Content type
application/json
{
  • "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
  • "height": "167",
  • "gender": "female"
}

Step 3 - Check Job State

/measurements/{id}/state

Retrieve the processing state of the scan associated with the provided job ID. Possible states include:

0: Measurement process is initiated, waiting for photos to be uploaded

1: Photos are uploaded and the measurement process has started

2: The measurement process is completed. Now you can call GET /measurements/{id} or GET /measurements/{id}/recommendation endpoint to get the result

-1: An error has occurred during processing

It might be necessary to call this endpoint repeatedly until state 2 or -1 is returned.

Important: Please make sure to implement a delay or sleep of at least two seconds between each call to reduce the load on our server.

path Parameters
id
required
string

The job ID as returned by GET /measurements/init

header Parameters
x-api-key
required
string

API key to access the endpoint

Responses

Request samples

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<your-api-key>");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.mobilescan.me/v2/measurements/job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529/state", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response samples

Content type
application/json
{
  • "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
  • "state": "1",
  • "err": ""
}

Step 4 - Get Results

/measurements/{id}

Retrieve the body measurement result of the scan associated with the provided job ID.

For the definition of each measurement included in the API response, please refer to this link: List of Body Measurements

path Parameters
id
required
string

The job ID as returned by GET /measurements/init

header Parameters
x-api-key
required
string

API key to access the endpoint

Responses

Request samples

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<your-api-key>");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.mobilescan.me/v2/measurements/job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response samples

Content type
application/json
{
  • "scanId": "dfk8",
  • "girths": {
    },
  • "lengths": {
    }
}

/measurements/{id}/recommendation

Retrieve the size recommendation result of a given scan and a given size chart.

Please Note: you are required to provide a size chart ID to receive size recommendation result. For further details, please refer to: Size Chart

path Parameters
id
required
string

The job ID as returned by GET /measurements/init

query Parameters
size-chart-id
required
string

Unique identifier for the size chart.

header Parameters
x-api-key
required
string

API key to access the endpoint

Responses

Request samples

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "<your-api-key>");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.mobilescan.me/v2/measurements/job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529/recommendation?size-chart-id=sizeChart_20220920_095339_1a2401b0-38ca-11ed-9e5b-179be3a648cd", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response samples

Content type
application/json
{
  • "chart": "Men's shirts and tops",
  • "gender": "male",
  • "scanGender": "male",
  • "primary": {
    },
  • "secondary": {
    },
  • "size_details": [
    ],
  • "fit_details": [
    ]
}

Optional - Reuse a Scan

/measurements/share

Reuse the body measurement result of an existing scan. The body measurement values will be copied from an old scan to a new scan.

header Parameters
x-api-key
required
string

API key to access the endpoint

Request Body schema: application/json
newJobId
required
string

The job ID of a newly initialized scan

oldId
required
string

The job ID or the 4-digit scan ID of an existing scan. This scan should be completed already.

Responses

Request samples

Content type
application/json
{
  • "newJobId": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
  • "oldId": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec545"
}

Response samples

Content type
application/json
{
  • "message": {
    }
}