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.
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.
Call this endpoint to start the process of a new scan.
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 complete URL including protocol here in an URL-encoded format. For instance, if your desired URL is "https://myshop.com/product1?color=blue&size=l", provide it in URL-encoded format as: "https%3A%2F%2Fmyshop.com%2Fproduct1%3Fcolor%3Dblue%26size%3Dl" |
x-api-key required | string API key to access the endpoint |
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));
{- "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==",
}
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
.
x-api-key required | string API key to access the endpoint |
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 |
gender | string Optional: Gender of the person in the image. Valid options include: |
{- "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
- "height": "167",
- "gender": "female"
}
{- "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
- "scanId": "fk42",
}
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.
id required | string The job ID as returned by GET /measurements/init |
x-api-key required | string API key to access the endpoint |
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));
{- "id": "job_20190430_141019_af9b3be0-6b51-11e9-a6bd-35ce92fec529",
- "state": "1",
- "err": ""
}
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
id required | string The job ID as returned by GET /measurements/init |
x-api-key required | string API key to access the endpoint |
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));
{- "scanId": "dfk8",
- "girths": {
- "head": {
- "neck_girth": 35.5
}, - "torso": {
- "bust_girth": 91.5,
- "waist_girth": 85.5,
- "hip_girth": 92
}, - "arms": {
- "upperarm_girth": 29.5,
- "elbow_girth": 24.5,
- "wrist_girth": 16.5
}, - "legs": {
- "thigh_girth": 53,
- "calf_girth": 36,
- "ankle_girth": 24
}
}, - "lengths": {
- "height": 179,
- "torso": {
- "across_back_shoulder_width": 43,
- "shoulder_length": 15,
- "torso_height": 76
}, - "arms": {
- "arm_length": 62,
- "upperarm_length": 35.5,
- "lowerarm_length": 26.5
}, - "legs": {
- "inside_leg_height": 78.5
}
}
}
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
id required | string The job ID as returned by GET /measurements/init |
size-chart-id required | string Unique identifier for the size chart. |
x-api-key required | string API key to access the endpoint |
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));
{- "chart": "Men's shirts and tops",
- "gender": "male",
- "scanGender": "male",
- "primary": {
- "sizes": [
- {
- "int": "L"
}
], - "indices": [
- "3"
], - "perfectFit": false
}, - "secondary": {
- "sizes": [
- {
- "int": "XL"
}
], - "indices": [
- "4"
]
}, - "size_details": [
- [
- {
- "index": "2",
- "ranges": {
- "waist_girth": [
- 81,
- 88
], - "hip_girth": [
- 92,
- 99
], - "bust_girth": [
- 93,
- 100
]
}, - "sizes": {
- "int": "M"
}
}, - {
- "index": "3",
- "ranges": {
- "waist_girth": [
- 89,
- 96
], - "hip_girth": [
- 100,
- 107
], - "bust_girth": [
- 101,
- 108
]
}, - "sizes": {
- "int": "L"
}
}, - {
- "index": "4",
- "ranges": {
- "waist_girth": [
- 97,
- 106
], - "hip_girth": [
- 108,
- 116
], - "bust_girth": [
- 109,
- 118
]
}, - "sizes": {
- "int": "XL"
}
}
]
], - "fit_details": [
- [
- [
- {
- "body_measurement_name": "waist_girth",
- "body_measurement_value": 101,
- "index": "4"
}, - {
- "body_measurement_name": "hip_girth",
- "body_measurement_value": 103,
- "index": "3"
}, - {
- "body_measurement_name": "bust_girth",
- "body_measurement_value": 100.5,
- "index": "2"
}
]
]
]
}