Endpoint - User Config

This request is used in two scenarios:

  1. During Channel Integration

When a customer uses the integration wizard to connect the courier, Linnworks calls this endpoint to retrieve all availableConfigItemswithisConfigActiveset 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 returnisConfigActive=True
  1. Loading Dynamic Configurations

When the completed config is loaded, this endpoint retrieves any dynamicConfigItemsrequired 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

Field NameTypeDescription
AuthorizationTokenStringToken that you generated for this customer.

Sample

{
	"AuthorizationToken": "a8e53e86eead4b69beaa0afcc29b67fb",
}

Response

UserConfigResponse

Field NameTypeDescription
IsConfigActiveBooleanIdentifies whether the integration profile is in Active mode. Meaning the customer completed the integration wizard and can use the integration
ConfigStatusStringConfiguration stage name. You must provide the same name to the UpdateConfig endpoint
ConfigStageConfigStageConfig stage class. See Endpoint - User Config - ConfigState
WizardStepDescriptionStringDescription of the current wizard step.
IsErrorBooleanIndicates if there is an error
ErrorMessageString / nullError message

ConfigStage

Field NameTypeDescription
WizardStepDescriptionStringDescription of the configuration stage
WizardStepTitleStringTitle of the configuration stage
ConfigItemsConfigItem[]List of ConfigItems. See Endpoint - User Config - 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

Field NameTypeDescription
DisplayStringUser friendly visible value.
ValueStringDrop 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
}