POST api/Address/InsertAddress

Request Information

URI Parameters

None.

Body Parameters

W_CustomerAddress
NameDescriptionTypeAdditional information
AddressNickName

string

Required

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 4 and 50

AddressStreetAddress1

string

Required

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 2 and 50

AddressStreetAddress2

string

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

String length: inclusive between 0 and 50

AddressCity

string

Required

Matching regular expression pattern: ^[^\%\/\\\&\@\#\$\*\?\,\'\;\:\!\-]+$

AddressState

string

Required

Matching regular expression pattern: ^(?-i:A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$

String length: inclusive between 2 and 20

AddressZipCode

string

Required

Matching regular expression pattern: ^\d{5}(-\d{4})?$

AddressCountry

string

Required

String length: inclusive between 3 and 40

Request Formats

application/json, text/json

Sample:
{
  "addressNickName": "sample string 1",
  "addressStreetAddress1": "sample string 2",
  "addressStreetAddress2": "sample string 3",
  "addressCity": "sample string 4",
  "addressState": "sample string 5",
  "addressZipCode": "sample string 6",
  "addressCountry": "sample string 7"
}

application/xml, text/xml

Sample:
<W_CustomerAddress xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <AddressCity>sample string 4</AddressCity>
  <AddressCountry>sample string 7</AddressCountry>
  <AddressState>sample string 5</AddressState>
  <AddressStreetAddress1>sample string 2</AddressStreetAddress1>
  <AddressStreetAddress2>sample string 3</AddressStreetAddress2>
  <AddressZipCode>sample string 6</AddressZipCode>
  <AddressNickName>sample string 1</AddressNickName>
</W_CustomerAddress>

multipart/form-data

Sample:
<W_CustomerAddress xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><AddressCity>sample string 4</AddressCity><AddressCountry>sample string 7</AddressCountry><AddressState>sample string 5</AddressState><AddressStreetAddress1>sample string 2</AddressStreetAddress1><AddressStreetAddress2>sample string 3</AddressStreetAddress2><AddressZipCode>sample string 6</AddressZipCode><AddressNickName>sample string 1</AddressNickName></W_CustomerAddress>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'W_CustomerAddress'.

Response Information

Resource Description

DBStatus
NameDescriptionTypeAdditional information
Type

DBOperation

None.

Message

Collection of DBMessageType

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "type": "ERROR",
  "message": [
    "SUCCESSFULLY_DATA_INSERTED",
    "SUCCESSFULLY_DATA_INSERTED"
  ],
  "innerException": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<DBStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </InnerException>
  <Message xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure">
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
  </Message>
  <Type>ERROR</Type>
</DBStatus>

multipart/form-data

Sample:
<DBStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><d2p1:string>sample string 1</d2p1:string><d2p1:string>sample string 2</d2p1:string></InnerException><Message xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure"><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType></Message><Type>ERROR</Type></DBStatus>