Endpoint - Save Config

Endpoint used for either saving the user config or on every wizard step

This request is made in two situations:

At the end of every config wizard step as a customer enters / edits the fields and on the config screen if custom config items are supplied back when the step name is "UserConfig".

Linnworks will provide the entire object that was provided back with the only field ever changing being the SelectedValue. This is passed back cast as string as fields may be of many different types.

Request

POST

SaveConfigRequest

Field NameTypeDescription
AuthorizationTokenStringAuthorization Token from the customers integration.
ConfigItemsConfigItem[]See: Endpoint - User Config - ConfigItem
StepNameStringThe step name Linnworks thinks it’s on. It’s good to check this field incase wizards get out of sync for any reason.

Sample

{
	"StepName": "AddCredentials",
	"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"
		}
	],
	"AuthorizationToken": "1fdea65984c54a91ae8549de68844ca9"
}

Response

UserConfigResponse

Field Name

Type

Description

Error

String

Error string if there was an issue with the request.

StepName Required

String

Current Step name, if returned "UserConfig" it will assume that the wizard is complete.

AccountName Required

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 Required

String

Description of the current wizard step.

WizardStepTitle Required

String

User visible title displayed on the integration wizard.

ConfigItems Required

ConfigItem[]

See Config Item table.

ConfigItem

Field Name

Type

Description

ConfigItemId Required

String

Unique id of either the wizard item or config item.

Description Required

String

Description of the config item or wizard item. Will be displayed in tooltips .

GroupName Required

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 Required

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 Required

Int

Order of config item to be displayed on the UI.

ValueType Required

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

Field Name

Type

Description

Display Required

String

User friendly visible value.

Value Required

String

Key value that Linnworks will then send back in the SelectedValue field on the SaveConfigEndpont.

Sample

{
	"Error": null,
	"StepName": "OrderSetup",
	"WizardStepDescription": "Definition of tax settings and items to return",
	"WizardStepTitle": "Order Setup",
	"ConfigItems": [
		{
			"ConfigItemId": "PriceIncTax",
			"Name": "Price Includes Tax",
			"Description": "Defines if the price of an item includes tax",
			"GroupName": "Tax",
			"SortOrder": 1,
			"SelectedValue": "False",
			"RegExValidation": null,
			"RegExError": null,
			"MustBeSpecified": true,
			"ReadOnly": false,
			"ListValues": [],
			"ValueType": "BOOLEAN"
		},
		{
			"ConfigItemId": "DownloadVirtualItems",
			"Name": "Download Virtual Items",
			"Description": "Check to allow the download of virtual items",
			"GroupName": "Items",
			"SortOrder": 2,
			"SelectedValue": "False",
			"RegExValidation": null,
			"RegExError": null,
			"MustBeSpecified": false,
			"ReadOnly": false,
			"ListValues": [],
			"ValueType": "BOOLEAN"
		}
	]
}