Endpoint - User Config
This request is used in two scenarios:
- During Channel Integration
When a customer uses the integration wizard to connect the courier, Linnworks calls this endpoint to retrieve all availableConfigItems
withisConfigActive
set toFalse
.
- After the user fills in the required details and clicks Next, the UpdateConfigEndpoint is called, followed by another call to this endpoint.
- To complete the wizard, the second call should return
isConfigActive=True
- Loading Dynamic Configurations
When the completed config is loaded, this endpoint retrieves any dynamicConfigItems
required to be displayed in the config UI.
The UpdateConfigEndpoint is called at each step of the wizard and when the configuration is saved.
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 |
---|---|---|
IsConfigActive | Boolean | Identifies whether the integration profile is in Active mode. Meaning the customer completed the integration wizard and can use the integration |
ConfigStatus | String | Configuration stage name. You must provide the same name to the UpdateConfig endpoint |
ConfigStage | ConfigStage | Config stage class. See Endpoint - User Config - ConfigState |
WizardStepDescription | String | Description of the current wizard step. |
IsError | Boolean | Indicates if there is an error |
ErrorMessage | String / null | Error message |
ConfigStage
ConfigStage
Field Name | Type | Description |
---|---|---|
WizardStepDescription | String | Description of the configuration stage |
WizardStepTitle | String | Title of the configuration stage |
ConfigItems | ConfigItem[] | List of ConfigItems. See Endpoint - User Config - ConfigItem |
ConfigItem
ConfigItem
Field Name | Type | Description |
---|---|---|
ConfigItemId | String | Unique name for the config item (MAX 40 chars) |
Name | String | Value displayed on the user interface (MAX 50 chars) |
Description | string | Tooltip text for the config item (MAX 100 chars) |
GroupName | String | Config item group name. Config item will be rendered on the UI grouped by this value |
SortOrder | Integer | Sort order of the config item. Config items will be rendered on the screen in this order |
SelectedValue | String | Selected value |
RegExValidation | String/null | RegEx validation |
RegExError | String/null | Error message that will be displayed when RegEx validation fails |
MustBeSpecified | Boolean | Identifies whether the config item must have value specified |
ReadOnly | Boolean | Identifies whether the field is read only |
ListValues | ConfgItemListItem[] | List of ConfigItemListItem. The config item ValueType =5 (LIST) can have a list of available values the user can select from the drop down list. See Endpoint - User Config - ConfigListItem |
ValueType | Integer | String = 0, Integer = 1, Double = 2, Boolean = 3, Password = 4, List = 5 |
ConfigListItem
ConfigListItem
Field Name | Type | Description |
---|---|---|
Display | String | User friendly visible value. |
Value | String | Drop down item value. |
Sample
{
"IsConfigActive": false,
"ConfigStatus": "StageStatusName",
"ConfigStage": {
"WizardStepDescription": "Description of the stage.",
"WizardStepTitle": "Title of the wizard Stage",
"ConfigItems": [
{
"ConfigItemId": "ITEM1",
"Name": "Config Item 1",
"Description": "Description Item 1",
"GroupName": "Group item",
"SortOrder": 1,
"SelectedValue": "",
"RegExValidation": null,
"RegExError": null,
"MustBeSpecified": true,
"ReadOnly": false,
"ListValues": [
{
"Display": "List Value 1",
"Value": "1"
}
],
"ValueType": 5
}
]
},
"IsError": false,
"ErrorMessage": null
}
Updated 8 days ago