POST api/AddOrUpdateBoxDimension_V1
Add/Replace User/Client Box Dimension
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Lists.AddOrUpdateBoxDimensionsRequestName | Description | Type | Additional information |
---|---|---|---|
WS_Key |
(Mandatory) Client Or User Webservice Key provided by 2ship support - the type of the ws_key should be set by WSKeyLevel field |
string |
None. |
WSKeyLevel |
(Mandatory) Specify the WS_Key type ( User or Client) |
WS_Repository.Models.Common.WSKeyLevelType |
None. |
BoxDimension |
(Mandatory) Box Dimension to add or update |
WS_Repository.Models.Requests.Lists.BoxDimensionToAddOrUpdate |
None. |
AddBoxDimensionAsGlobal |
(Optional) Specify to add the Box Dimension as global regardless of WS_Key type |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "WS_Key": "sample string 1", "WSKeyLevel": 0, "BoxDimension": { "ID": "sample string 1", "Name": "sample string 2", "Length": 3.0, "Width": 4.0, "Height": 5.0, "PieceWeight": 1.0, "BoxWeight": 1.0, "MeasurementsType": 0, "UseForFreight": true }, "AddBoxDimensionAsGlobal": true }
application/xml, text/xml
Sample:
<AddOrUpdateBoxDimensionsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Lists"> <AddBoxDimensionAsGlobal>true</AddBoxDimensionAsGlobal> <BoxDimension> <BoxWeight>1</BoxWeight> <Height>5</Height> <ID>sample string 1</ID> <Length>3</Length> <MeasurementsType>Imperial</MeasurementsType> <Name>sample string 2</Name> <PieceWeight>1</PieceWeight> <UseForFreight>true</UseForFreight> <Width>4</Width> </BoxDimension> <WSKeyLevel>User</WSKeyLevel> <WS_Key>sample string 1</WS_Key> </AddOrUpdateBoxDimensionsRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.Lists.AddOrUpdateBoxDimensionResponseName | Description | Type | Additional information |
---|---|---|---|
Success |
Specify if the import was successfully done |
boolean |
None. |
ErrorMessage |
The error message if the import get an error |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "Success": true, "ErrorMessage": "sample string 2" }
application/xml, text/xml
Sample:
<AddOrUpdateBoxDimensionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Lists"> <ErrorMessage>sample string 2</ErrorMessage> <Success>true</Success> </AddOrUpdateBoxDimensionResponse>