POST api/AddGLDepartments_V1
Add User/Client GL Department
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Lists.AddGLDepartmentsRequestName | 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. |
GLDepartmentsList |
(Mandatory) The List of GL departments to Add/Update |
Collection of WS_Repository.Models.Requests.Lists.GLDepartmentToAdd |
None. |
Request Formats
application/json, text/json
Sample:
{ "WS_Key": "sample string 1", "WSKeyLevel": 0, "GLDepartmentsList": [ { "DepartmentName": "sample string 1", "GLDepartmentStoresList": [ { "StoreName": "sample string 1", "GLCode": "sample string 2", "Store3": "sample string 3", "Store4": "sample string 4", "Store5": "sample string 5", "ApprovalGroupID": 6 }, { "StoreName": "sample string 1", "GLCode": "sample string 2", "Store3": "sample string 3", "Store4": "sample string 4", "Store5": "sample string 5", "ApprovalGroupID": 6 } ] }, { "DepartmentName": "sample string 1", "GLDepartmentStoresList": [ { "StoreName": "sample string 1", "GLCode": "sample string 2", "Store3": "sample string 3", "Store4": "sample string 4", "Store5": "sample string 5", "ApprovalGroupID": 6 }, { "StoreName": "sample string 1", "GLCode": "sample string 2", "Store3": "sample string 3", "Store4": "sample string 4", "Store5": "sample string 5", "ApprovalGroupID": 6 } ] } ] }
application/xml, text/xml
Sample:
<AddGLDepartmentsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Lists"> <GLDepartmentsList> <GLDepartmentToAdd> <DepartmentName>sample string 1</DepartmentName> <GLDepartmentStoresList> <GLDepartmentStore> <ApprovalGroupID>6</ApprovalGroupID> <GLCode>sample string 2</GLCode> <Store3>sample string 3</Store3> <Store4>sample string 4</Store4> <Store5>sample string 5</Store5> <StoreName>sample string 1</StoreName> </GLDepartmentStore> <GLDepartmentStore> <ApprovalGroupID>6</ApprovalGroupID> <GLCode>sample string 2</GLCode> <Store3>sample string 3</Store3> <Store4>sample string 4</Store4> <Store5>sample string 5</Store5> <StoreName>sample string 1</StoreName> </GLDepartmentStore> </GLDepartmentStoresList> </GLDepartmentToAdd> <GLDepartmentToAdd> <DepartmentName>sample string 1</DepartmentName> <GLDepartmentStoresList> <GLDepartmentStore> <ApprovalGroupID>6</ApprovalGroupID> <GLCode>sample string 2</GLCode> <Store3>sample string 3</Store3> <Store4>sample string 4</Store4> <Store5>sample string 5</Store5> <StoreName>sample string 1</StoreName> </GLDepartmentStore> <GLDepartmentStore> <ApprovalGroupID>6</ApprovalGroupID> <GLCode>sample string 2</GLCode> <Store3>sample string 3</Store3> <Store4>sample string 4</Store4> <Store5>sample string 5</Store5> <StoreName>sample string 1</StoreName> </GLDepartmentStore> </GLDepartmentStoresList> </GLDepartmentToAdd> </GLDepartmentsList> <WSKeyLevel>User</WSKeyLevel> <WS_Key>sample string 1</WS_Key> </AddGLDepartmentsRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.Lists.AddGLDepartmentsResponseName | 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:
<AddGLDepartmentsResponse 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> </AddGLDepartmentsResponse>