POST api/purchase/suppliers

Request Information

URI Parameters

None.

Body Parameters

m_supplier_insert
NameDescriptionTypeAdditional information
company_name

string

Required

tax_id

string

None.

province

string

Required

district

string

Required

sub_district

string

Required

zip_code

string

Required

Matching regular expression pattern: ^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$

address

string

Required

tels

Collection of m_purchase_tel2

Required

faxes

Collection of m_purchase_faxes

None.

contact_name

string

None.

cnt_code

string

Required

country

string

Required

MoreInfo

Collection of m_AddField

None.

Request Formats

application/json, text/json

Sample:
{
  "company_name": "sample string 1",
  "tax_id": "sample string 2",
  "province": "sample string 3",
  "district": "sample string 4",
  "sub_district": "sample string 5",
  "zip_code": "sample string 6",
  "address": "sample string 7",
  "tels": [
    {
      "country_code": "sample string 1",
      "phone_number": "sample string 2"
    },
    {
      "country_code": "sample string 1",
      "phone_number": "sample string 2"
    }
  ],
  "faxes": [
    {
      "country_code": "sample string 1",
      "fax": "sample string 2"
    },
    {
      "country_code": "sample string 1",
      "fax": "sample string 2"
    }
  ],
  "contact_name": "sample string 8",
  "cnt_code": "sample string 9",
  "country": "sample string 10",
  "MoreInfo": [
    {
      "FieldName": "sample string 1",
      "TextDetail": "sample string 2"
    },
    {
      "FieldName": "sample string 1",
      "TextDetail": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<m_supplier_insert xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MRP.Domain.Models.Purchase">
  <MoreInfo>
    <m_AddField>
      <FieldName>sample string 1</FieldName>
      <TextDetail>sample string 2</TextDetail>
    </m_AddField>
    <m_AddField>
      <FieldName>sample string 1</FieldName>
      <TextDetail>sample string 2</TextDetail>
    </m_AddField>
  </MoreInfo>
  <address>sample string 7</address>
  <cnt_code>sample string 9</cnt_code>
  <company_name>sample string 1</company_name>
  <contact_name>sample string 8</contact_name>
  <country>sample string 10</country>
  <district>sample string 4</district>
  <faxes>
    <m_purchase_faxes>
      <country_code>sample string 1</country_code>
      <fax>sample string 2</fax>
    </m_purchase_faxes>
    <m_purchase_faxes>
      <country_code>sample string 1</country_code>
      <fax>sample string 2</fax>
    </m_purchase_faxes>
  </faxes>
  <province>sample string 3</province>
  <sub_district>sample string 5</sub_district>
  <tax_id>sample string 2</tax_id>
  <tels>
    <m_purchase_tel2>
      <country_code>sample string 1</country_code>
      <phone_number>sample string 2</phone_number>
    </m_purchase_tel2>
    <m_purchase_tel2>
      <country_code>sample string 1</country_code>
      <phone_number>sample string 2</phone_number>
    </m_purchase_tel2>
  </tels>
  <zip_code>sample string 6</zip_code>
</m_supplier_insert>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.