Endpoint - User Config
This request is made in two situations:
Firstly when a customer is going through the integration wizard to integrate the channel. To complete the wizard returns "UserConfig" as the step name and this will indicate the wizard is complete.
The second instance is when the config is loaded the call is made to load any dynamic ConfigItems that may be required to show on the Linnworks config UI. SaveConfigEndpoint will be called on each wizard step and when the config is saved.
If the config is loaded and the StepName is not "UserConfig" it will load the config wizard and take them through the stages until "UserConfig" is returned. This can be especially useful if the user is required to go through additional steps down the line such as updating an auth token.
Request
Post
UserConfigRequest
UserConfigRequest
Field Name | Type | Description |
---|---|---|
AuthorizationToken | String | Token that you generated for this customer. |
Sample
{
"AuthorizationToken": "a8e53e86eead4b69beaa0afcc29b67fb",
}
Response
UserConfigResponse
UserConfigResponse
Field Name | Type | Description |
---|---|---|
Error | String | Error string if there was an issue with the request. |
StepName | String | Current Step name, if returned "UserConfig" it will assume that the wizard is complete. |
AccountName | String | Account name being integrated into the system. Will never change and on integration it is suggest that duplicates are checked for. Nb. Customers may expect to have multiple integrations of the same channel in Linnworks. |
WizardStepDescription | String | Description of the current wizard step. |
WizardStepTitle | String | User visible title displayed on the integration wizard. |
ConfigItems | ConfigItem[] | See Config Item table. |
ConfigItem
ConfigItem
Field Name | Type | Description |
---|---|---|
ConfigItemId | String | Unique id of either the wizard item or config item. |
Description | String | Description of the config item or wizard item. Will be displayed in tooltips . |
GroupName | String | Used to group the config or wizard items. |
ListValues | ListValue[] | See List Value table. |
MustBeSpecified | Boolean | Defines if the user must enter this value in the wizard or config. |
Name | String | Visible name on the wizard or config. |
ReadOnly | Boolean | Defines if the field is a visible only field. |
RegexError | String | Message that will be shown to the custmer if wizard field validation does not go through. |
RegexValidation | String | JavaScript Regex validation script. |
SelectedValue | String | Selected value either default value or value selected in the UI when sent back. |
Sortorder | Int | Order of config item to be displayed on the UI. |
ValueType | String | Valid values: - STRING - INT - DOUBLE - BOOLEAN - PASSWORD - LIST |
HidesHeaderAttribute | Boolean | Determines whether a header-level attribute (e.g. InventorySync) should be hidden from the config. Used in conjunction with the Name property, where Name identifies the attribute to hide. |
ListValue
ListValue
Field Name | Type | Description |
---|---|---|
Display | String | User friendly visible value. |
Value | String | Key value that Linnworks will then send back in the SelectedValue field on the SaveConfigEndpont. |
Sample
{
"Error": null,
"StepName": "AddCredentials",
"WizardStepDescription": "This is where you add your website credentials",
"WizardStepTitle": "Add Credentials",
"ConfigItems": [
{
"ConfigItemId": "APIKey",
"Name": "API Key",
"Description": "Website API Key",
"GroupName": "API Credentials",
"SortOrder": 1,
"SelectedValue": "AnApiKeyGoesHere",
"RegExValidation": null,
"RegExError": null,
"MustBeSpecified": true,
"ReadOnly": false,
"ListValues": [],
"ValueType": "PASSWORD"
},
{
"ConfigItemId": "APISecretKey",
"Name": "API Secret Key",
"Description": "Website API Secret Key",
"GroupName": "API Credentials",
"SortOrder": 2,
"SelectedValue": "MYSuperSecretKey",
"RegExValidation": null,
"RegExError": null,
"MustBeSpecified": true,
"ReadOnly": false,
"ListValues": [],
"ValueType": "PASSWORD"
},
{
"ConfigItemId": "IsOauth",
"Name": "Is Oauth",
"Description": "Defines if the authentication type is Oauth",
"GroupName": "API Settings",
"SortOrder": 3,
"SelectedValue": "False",
"RegExValidation": null,
"RegExError": null,
"MustBeSpecified": true,
"ReadOnly": false,
"ListValues": [],
"ValueType": "BOOLEAN"
},
{
"ConfigItemId": "Version",
"Name": "Version",
"Description": "Version of the API",
"GroupName": "API Settings",
"SortOrder": 3,
"SelectedValue": "False",
"RegExValidation": null,
"RegExError": null,
"MustBeSpecified": true,
"ReadOnly": false,
"ListValues": [
{
"Display": "1.6 - Stable",
"Value": "1.6.0"
},
{
"Display": "1.6 - Beta",
"Value": "1.6.1"
},
{
"Display": "1.5 - Stable",
"Value": "1.5.0"
}
],
"ValueType": "LIST"
}
]
}
Updated over 1 year ago