How-to import products
Access Token
In order to create a customer through Scalefast API, you need to get an access token first.
You can see how to get an access token here or see the oauth API reference here
Once you have the access token, you are allowed to use POST customers endpoint to create a user in our platform.
Create products
In order to create products in Scalefast platform, you have to do a POST API call to products endpoint. In the following table, you will find at least the required parameters.
If you need more info about product endpoint, click here
Field | Description |
---|---|
type | Different types of product |
refID | Internal reference identifier to distinguish products |
privacy | Privacy of product |
categories.categoryIDs | Internal identifier from the category |
categories.type | Type of the product category |
descriptions.lang | Language in ISO code format from the product |
descriptions.title | Title of the product |
permissions.action | Action to apply in this product |
permissions.type | The conditions are rather simple: a customer can be either blacklisted or whitelisted. Blacklisted means that if customer is IN the target list, the action (block, hide,…) will occur. Whitelisted means that if customer is NOT IN the target list, the action (block, hide) will occur |
permissions.ugroupIDs | Internal identifier about the users groups |
price_info.country | Country in ISO code format |
price_info.currency_prices.currency | Currency of the product |
price_info->currency_prices->price | Price of the product |
price_info->tax_included | Declare if the tax is included in the price or not |
price_info->tax_type | Type of the tax |
Example:
curl --request POST \
--url 'https://api.scalefast.com/products?access_token=ACCESS_TOKEN' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data request_data=%7B%22categories%22%3A%20%7B%22categoryIDs%22%3A%20%5B%22123456%22%5D%2C%22type%22%3A%20%22internal%22%7D%2C%22descriptions%22%3A%20%5B%7B%22lang%22%3A%20%22EN%22%2C%22title%22%3A%20%22My%20Product%22%7D%5D%2C%22permissions%22%3A%20%5B%7B%22action%22%3A%20%22NONE%22%2C%22type%22%3A%20%22IN%22%2C%22ugroupIDs%22%3A%20%22GUEST%22%7D%5D%2C%22price_hide%22%3A%20%22false%22%2C%22price_info%22%3A%20%5B%7B%22country%22%3A%20%22US%22%2C%22currency_prices%22%3A%20%5B%7B%22currency%22%3A%20%22USD%22%2C%22price%22%3A%20%2225.00%22%7D%5D%2C%22tax_included%22%3A%20%22false%22%2C%22tax_type%22%3A%20%22default%22%7D%5D%2C%22privacy%22%3A%20%22PUBLIC%22%2C%22refID%22%3A%20%22MyReference%22%2C%22type%22%3A%20%22PHYSICAL%22%7D
Response:
{
"result": {
"status": "OK",
"errcode": "0",
"msg": ""
},
"response_data": {
"success": [
{
"refID": "MyReference",
"country": "US",
"productID": "1234567890"
}
]
}
}
Updated over 4 years ago