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 NameTypeDescription
ErrorStringError string if there was an issue with the request.
StepName
Required
StringCurrent Step name, if returned "UserConfig" it will assume that the wizard is complete.
AccountName
Required
StringAccount 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
StringDescription of the current wizard step.
WizardStepTitle
Required
StringUser visible title displayed on the integration wizard.
ConfigItems
Required
ConfigItem[]See Config Item table.

ConfigItem

Field NameTypeDescription
ConfigItemId
Required
StringUnique id of either the wizard item or config item.
Description
Required
StringDescription of the config item or wizard item. Will be displayed in tooltips .
GroupName
Required
StringUsed to group the config or wizard items.
ListValuesListValue[]See List Value table.
MustBeSpecifiedBooleanDefines if the user must enter this value in the wizard or config.
Name
Required
StringVisible name on the wizard or config.
ReadOnlyBooleanDefines if the field is a visible only field.
RegexErrorStringMessage that will be shown to the custmer if wizard field validation does not go through.
RegexValidationStringJavaScript Regex validation script.
SelectedValueStringSelected value either default value or value selected in the UI when sent back.
Sortorder
Required
IntOrder of config item to be displayed on the UI.
ValueType
Required
StringValid values:

- STRING
- INT
- DOUBLE
- BOOLEAN
- PASSWORD
- LIST
HidesHeaderAttributeBooleanDetermines 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 NameTypeDescription
Display
Required
StringUser friendly visible value.
Value
Required
StringKey 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"
		}
	]
}