ForSURE.settingspage.general_settings.general_settings_endpoints
Base URL for all requests
async def get_settings()
Retrieves the available general settings including the country-specific settings for countries that have already been added.
Returns
Successful response
[ { "title": "Annual Turnover", "key": "annual_turnover", "value": 0, "info": "Revenue of the last year in Euros", "checkbox": null, "checkbox_info": "", "special": false }, { "title": "countries", "key": "countries", "value": { "GB": { "packaging": [ { "title": "Organisation ID", "key": "organisation_id", "value": "100001", "info": "ID as registered for packaging in the UK", "checkbox": null, "checkbox_info": "", "special": false }
async def define_settings()
Updates the general settings to the data that is posted.
Parameters
- body:
{ "countries": { "GB": { "packaging": { "organisation_id": "100001", "subsidiary_id": "Not set", "organisation_size": "L", "office_country": "EN" } } }, "annual_turnover": "0", "compliance_scheme": false }
Returns
Successful response
{"message": "Labels defined successfully"}
async def get_countries()
Get a list of countries for which general settings are available and if they are recommended for you based on the order data (default true).
Returns
List of countries
Successful response
[ { "country": "GB", "recommended": true, }, { "country": "NL", "recommended": true, }, ]
async def get_countrysettings()
Get the fields for a certain country to allow adding a new country to the general settings.
Parameters
- country: Query parameter containing the country short code
Returns
Default settings for the given country
Successful response
{ "packaging": [ { "title": "Organisation ID", "key": "organisation_id", "value": "100001", "info": "ID as registered for packaging in the UK", "checkbox": null, "checkbox_info": "", "special": false },