Skip to main content

API Documentation

The Faslet API gives you direct access to provide data, without having to go through third party services.

tip

Access to our APIs is available to customers on certain tiers. If you're in doubt, please reach out to your Faslet representative.

API Base Url

The base url for the API is

https://api.faslet.net/public/v1

If you'd like sandbox/staging environment to test against, please reach out to support, so we can create a test store.

Authorization

Include the custom header faslet-shopid set to your Faslet Shop ID. Your API token can be found in the Faslet Partner Portal. This needs to be included as a Bearer token with the authorization header.

Endpoints

All formats, request and response are JSON. Be sure to include the application/json content header.

Example headers:
"Content-Type" "application/json",
"faslet-shopid": "MY_SHOP_ID",
"authorization": "Bearer MY_API_TOKEN"

POST /returns

https://api.faslet.net/public/v1/returns

Request Body

An Array of Product Info

Product Info
FieldRequiredTypeDescription
orderIdYESstringThe identifier of the order
productIdYESstringThe identifier of the product. This should match the product id send to Faslet with the orders and the button
skuYESstringThe variant SKU
returnDateYESstringISO8601 Date Time
returnReasonYESstringThe return reason value as described below
returnReasonMessageNOstringA message for the return reason. This can be the message sent by the customer
externalIdNOstringThe ID of the return in your system
Example Request
[{
"orderId": "1234",
"productId": "1234",
"sku": "1234",
"returnReason": "1",
"returnDate": "2022-02-05T18:40:00.000Z",
"externalId": "o-123"
}, {
"orderId": "3456",
"productId": "3456",
"sku": "3456",
"returnReason": "3",
"returnDate": "2022-09-05T18:40:00.000Z",
"externalId": "o-345"
}]
Return reasons
ReasonValue
Too big1
Too small2
Product is damaged3
Product isn’t as expected4
Wrong article/ size5
Color isn’t as expected6
Quality isn’t as expected7
Other reason8
Multiple sizes ordered9

Response

StatusCodes
StatusDescription
202The request was accepted.
Body
FieldRequiredType
errorsYESArray of Return Error
Return Error
FieldTypeDescription
messagestringThe error message
Example Response
{
"errors": [
{
"message": "returnDate is invalid for order 1234"
}
]
}

POST /size-specs

https://api.faslet.net/public/v1/size-specs/MY_BRAND

Request Parameters

FieldRequiredTypeDescription
brandYESstringThen name of the brand for this size specification

Request Body

An Array of Product Size Descriptors

Product Size Descriptor
FieldRequiredTypeDescription
productNameYESstringThe name or title of the product.
productIdYESstringThe identifier of the product. This should match the product id send to Faslet with the orders and the button
genderYESstringThe gender of the product. Must be male, female or unisex
productUrlYESstringThe url of the product as found on the store
sizeChartSpecificationsYESstringAn array of size specifications
Size Chart Specification
FieldRequiredTypeDescription
sizeLabelYESstringThe size label of the variant.
useDefaultsNObooleanWhether this variant should use default size charts as provided by Faslet.
waistNOnumberThe minimum measurement of the waist for this size label.
hipsNOnumberThe minimum measurement of the hips for this size label.
chestNOnumberThe minimum measurement of the chest for this size label.
innerLegNOnumberThe minimum measurement of the innerLeg for this size label.
lengthNOnumberThe minimum measurement of the length for this size label.
sleeveNOnumberThe minimum measurement of the sleeve for this size label.
thighNOnumberThe minimum measurement of the thigh for this size label.
shoulderNOnumberThe minimum measurement of the shoulder for this size label.
waistStretchedNOnumberThe maximum measurement of the waist for this size label.
hipsStretchedNOnumberThe maximum measurement of the hips for this size label.
chestStretchedNOnumberThe maximum measurement of the chest for this size label.

If you choose not to use defaults, please provide as much of this information as possible in order to get the most accurate size charts. Our algorithms will process these and optimize them based on how much information is given.

Example Request
[{
"productName": "Jacket",
"productId": "11",
"gender": "male",
"productUrl": "https://mywebstore.com/en/jacket.html",
"sizeChartSpecifications": [{
"useDefaults": false,
"waist": 60,
"waistStretched": 70,
"hips": 50,
"hipsStretched": 56,
"chest": 65,
"sizeLabel": "S"
}, {
"waist": 63,
"hips": 53,
"chest": 68,
"sizeLabel": "M"
}, {
"waist": 68,
"hips": 58,
"chest": 73,
"sizeLabel": "XL",
"useDefaults": false
}]
}]

Response

StatusCodes
StatusDescription
201New size specifications were created.
200Existing size specifications were updated.
Body
FieldRequiredType
errorsNOArray of Return Error. In the case of a 2xx response, with some (or all) size specifications skipped, a list of errors will be provided
errorNOA Return Error. In the case of a 4xx response, a single error will be returned and nothing will be processed
Return Error
FieldTypeDescription
messagestringThe error message
Example Response
{
"errors": [
{
"message": "[Item 42] No Product URL, ignoring"
},
{
"message": "[Item 76] No Product ID, ignoring"
}
]
}
info

Errors in individual Size Chart Specifications will not prevent everything from processing. The error will list the index of the descriptor that failed. These will return a 2xx status code and can be safely retried after fixing the errors.

Errors in the Product Size Descriptors will prevent processing and will return a 4xx status code.

Help

In case of any questions, please don’t hesitate to contact us on support@faslet.me