ForSURE.settingspage.categorylist_labels.categorylist_labels_endpoints
Base URL for all requests
async def get_labels_categorylist()
Get the labels for the categorylist. For each label, the default value will be returned if it has not been changed yet.
Returns
Successful response
[ { "title": "SKU", "key": "skucat", "value": "Variant SKU", "info": "Unique Product Identifier(Column in the Orderlist)", "checkbox": null, "checkbox_info": "", "special": false }, { "title": "Weight", "key": "ProWei", "value": "Product Net Weight (g)", "info": "The Weight of the Product(Column in the Orderlist)", "checkbox": null, "checkbox_info": "", "special": false }, { "title": "Packaging", "key": "Packaging_needed", "value": true, "info": "Whether any products contain packaging", "checkbox": null, "checkbox_info": "If wanted check the box", "special": true }, { "title": "countries", "key": "countries", "value": { "DE": { "packaging": {
async def define_labels_categorylist()
Updates the labels for the categorylist. For each label, the default value will be used if it has not been changed.
Parameters
- category_list_columns:
{ "countries": { "DE": { "packaging": { "country": "DE", "Glass": "Glass", "Paper": "Paper", "Metals": "Metals", "Aluminium": "Aluminium", "Plastics": "Plastics", "Beverage": "Beverage", "Composite": "Composite", "Other": "Other" }, "batteries": { "batteries": "Batteries", "type_of_batteries": "Type of Batteries", "battery_weight": "Batt Weight (g)" }, "electro": { "pikachu": "Electro", "product_category": "DE" } }, "GB": { } }, "skucat": "Variant SKU", "ProWei": "Product Net Weight (g)", "HSTC_needed": true, "HSTC": "HS tariff code", "in_grams": true, "Packaging_needed": true, "Batteries_needed": true, "Electro_needed": true }
Returns
Successful response
{"message": "Labels defined successfully"}
async def get_countries()
Get a list of countries for which general settings are available for and if they are recommended for you based on the order data. Same format as for the general settings
Returns
List of countries
Successful response
[ { "country": "GB", "recommended": true, }, { "country": "NL", "recommended": true, }, ]
async def get_countrylabels()
Get the fields for a certain country to allow adding a new country to the category list labels.
Parameters
- country: Query parameter containing the country short code
Returns
Default settings for the given country
Successful response
{ "packaging": { "packaging_activity": "Packaging Activity", "packaging_type": "Packaging Type", "packaging_class": "Packaging Class", "country": "GB", "Paper": "Paper", "Glass": "Glass", "Aluminium": "Aluminium", "Steel": "Steel", "Plastic": "Plastic", "Wood": "Wood", "General Recycling": "General Recycling", "Fibre": "Fibre" }, "batteries": { "batteries": "Batteries", "type_of_batteries": "Type of Batteries", "battery_weight": "Batt Weight (g)", "battery_category": "Battery Category" }, "electro": { "pikachu": "Electro", "product_category": "GB" } }