Our API is a stable and fast way of delivery of return risks and insights. We maintain high availability and stability across regions and constantly working on improvements to provide you with best experience. More information about performance is available here.
The link to our API is https://api.easysize.me/v1/
, followed by your unique app id. The app id will be provided by Easysize.
In order to be authenticated you need to add a secret key (provided by Easysize) to request header:
Secret-key: 44c62c6e9cde3bef188c7aa337a67bbfda621c65
Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The various HTTP status codes we might return are listed below.
Code | Title | Description |
---|---|---|
200 | OK | The request was successful. |
201 | Created | The resource was successfully created. |
400 | Bad request | Bad request |
401 | Unauthorized | Your Secret-key is invalid. |
404 | Not found | The resource does not exist. |
50X | InternalServer Error | An error occurred with our API. |
POST
https://api.easysize.me/v1//return_score/
Parameter | Type | Description |
---|---|---|
user_id* | String | Your local ID of the user |
session_id* | String | User’s current session ID (used together with tracking data) |
cart* | Array of items | All items currently in a cart |
Attribute | Type | Description |
---|---|---|
product_id* | String | Your local ID of the item. |
quantity* | Integer | Added quantity |
discount | Float | Discount that applies on the item in % |
coupon_used | Boolean | Whether a coupon was used for this item |
stock | Object | Sizes that are avaialble in stock |
{
"user_id": "12315324124ksdf52",
"session_id": "czEyMzEyNDEyMzFhc2Rhc2FzZDEyMzEy"
cart: [
{
"product_id": "123123123",
"quantity": 2,
"discount": 50,
"coupon_used": true
"stock": {"Small": 0, "Medium": 11, "Large": 21, "XLarge": 12}
},
{
"product_id": "234234234",
"quantity": 1
}
]
}
Note The score is provided on per-item basis. In addition to it we also score the whole cart for returs such as RTO.
Status | Description |
---|---|
HIGH | The risk is high and action is required |
MEDIUM | The risk is moderate |
INCONCLUSIVE | Not enough information or uncertain results |
Reason | Description |
---|---|
HIGH | The risk is high and action is required |
MEDIUM | The risk is moderate |
UNKNOWN | Unknown reason |
Size related returns
{
"overall": {
"return_risk": "INCONCLUSIVE",
"reason": "UNKNOWN"
},
cart: {
"<product_id_you_provided>": {
"return_risk": "HIGH",
"reason": "size_related",
"recommendation": {
"tight_fit": "Medium",
"normal_fit": "Large",
"loose_fit": "Large"
}
}
}
}
RTO
{
"overall": {
"return_risk": "HIGH",
"reason": "RTO"
},
cart: {}
}
User was not found
{
"status_code": 404,
"error": "Sorry, we couldn't find this user"
}