POST api/Customer/Create/Customer

สร้างข้อมูลลูกค้า

Request Information

URI Parameters

None.

Body Parameters

m_createCustomer
NameDescriptionTypeAdditional information
firstname

string

None.

lastname

string

None.

cust_type

string

None.

cust_address

Collection of md_createCustAddress

None.

ctry

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "firstname": "sample string 1",
  "lastname": "sample string 2",
  "cust_type": "sample string 3",
  "cust_address": [
    {
      "company": "sample string 1",
      "address": "sample string 2",
      "district": "sample string 3",
      "province": "sample string 4",
      "country": "sample string 5",
      "zip": "sample string 6",
      "tel1": "sample string 7",
      "tel2": "sample string 8",
      "fax": "sample string 9"
    },
    {
      "company": "sample string 1",
      "address": "sample string 2",
      "district": "sample string 3",
      "province": "sample string 4",
      "country": "sample string 5",
      "zip": "sample string 6",
      "tel1": "sample string 7",
      "tel2": "sample string 8",
      "fax": "sample string 9"
    }
  ],
  "ctry": true
}

application/xml, text/xml

Sample:
<m_createCustomer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MRP.WebAPI.Models">
  <ctry>true</ctry>
  <cust_address xmlns:d2p1="http://schemas.datacontract.org/2004/07/MRP.Domain.Models.Customer">
    <d2p1:md_createCustAddress>
      <d2p1:address>sample string 2</d2p1:address>
      <d2p1:company>sample string 1</d2p1:company>
      <d2p1:country>sample string 5</d2p1:country>
      <d2p1:district>sample string 3</d2p1:district>
      <d2p1:fax>sample string 9</d2p1:fax>
      <d2p1:province>sample string 4</d2p1:province>
      <d2p1:tel1>sample string 7</d2p1:tel1>
      <d2p1:tel2>sample string 8</d2p1:tel2>
      <d2p1:zip>sample string 6</d2p1:zip>
    </d2p1:md_createCustAddress>
    <d2p1:md_createCustAddress>
      <d2p1:address>sample string 2</d2p1:address>
      <d2p1:company>sample string 1</d2p1:company>
      <d2p1:country>sample string 5</d2p1:country>
      <d2p1:district>sample string 3</d2p1:district>
      <d2p1:fax>sample string 9</d2p1:fax>
      <d2p1:province>sample string 4</d2p1:province>
      <d2p1:tel1>sample string 7</d2p1:tel1>
      <d2p1:tel2>sample string 8</d2p1:tel2>
      <d2p1:zip>sample string 6</d2p1:zip>
    </d2p1:md_createCustAddress>
  </cust_address>
  <cust_type>sample string 3</cust_type>
  <firstname>sample string 1</firstname>
  <lastname>sample string 2</lastname>
</m_createCustomer>

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 'm_createCustomer'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.