POST api/AddOrUpdateRecipients_V1
Add User/Client Recipients
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.AddressBook.AddRecipientsRequestName | 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. |
RecipientsList |
(Mandatory) The List of Recipients to Add/Update |
Collection of WS_Repository.Models.Requests.AddressBook.RecipientToAdd |
None. |
AddRecipientAsGlobal |
(Optional) Specify to add the recipient as global regardless of WS_Key type |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "WS_Key": "sample string 1", "WSKeyLevel": 0, "RecipientsList": [ { "ID": "sample string 1", "Contact": "sample string 2", "Company": "sample string 3", "CountryCode": "sample string 4", "ProvinceOrState": "sample string 5", "City": "sample string 6", "Postal": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Tel": "sample string 11", "Extension": "sample string 12", "Fax": "sample string 13", "Email": "sample string 14", "IsResidential": true, "TaxID": "sample string 16", "Instructions": "sample string 17" }, { "ID": "sample string 1", "Contact": "sample string 2", "Company": "sample string 3", "CountryCode": "sample string 4", "ProvinceOrState": "sample string 5", "City": "sample string 6", "Postal": "sample string 7", "Address1": "sample string 8", "Address2": "sample string 9", "Address3": "sample string 10", "Tel": "sample string 11", "Extension": "sample string 12", "Fax": "sample string 13", "Email": "sample string 14", "IsResidential": true, "TaxID": "sample string 16", "Instructions": "sample string 17" } ], "AddRecipientAsGlobal": true }
application/xml, text/xml
Sample:
<AddRecipientsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.AddressBook"> <AddRecipientAsGlobal>true</AddRecipientAsGlobal> <RecipientsList> <RecipientToAdd> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <Company>sample string 3</Company> <Contact>sample string 2</Contact> <CountryCode>sample string 4</CountryCode> <Email>sample string 14</Email> <Extension>sample string 12</Extension> <Fax>sample string 13</Fax> <ID>sample string 1</ID> <Instructions>sample string 17</Instructions> <IsResidential>true</IsResidential> <Postal>sample string 7</Postal> <ProvinceOrState>sample string 5</ProvinceOrState> <TaxID>sample string 16</TaxID> <Tel>sample string 11</Tel> </RecipientToAdd> <RecipientToAdd> <Address1>sample string 8</Address1> <Address2>sample string 9</Address2> <Address3>sample string 10</Address3> <City>sample string 6</City> <Company>sample string 3</Company> <Contact>sample string 2</Contact> <CountryCode>sample string 4</CountryCode> <Email>sample string 14</Email> <Extension>sample string 12</Extension> <Fax>sample string 13</Fax> <ID>sample string 1</ID> <Instructions>sample string 17</Instructions> <IsResidential>true</IsResidential> <Postal>sample string 7</Postal> <ProvinceOrState>sample string 5</ProvinceOrState> <TaxID>sample string 16</TaxID> <Tel>sample string 11</Tel> </RecipientToAdd> </RecipientsList> <WSKeyLevel>User</WSKeyLevel> <WS_Key>sample string 1</WS_Key> </AddRecipientsRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.AddressBook.AddRecipientsResponseName | 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:
<AddRecipientsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.AddressBook"> <ErrorMessage>sample string 2</ErrorMessage> <Success>true</Success> </AddRecipientsResponse>