POST api/OpenSGRN

Request Information

URI Parameters

None.

Body Parameters

OpenSGRN_Models
NameDescriptionTypeAdditional information
SGRN_Id

integer

None.

SGRN_No

string

None.

SGRN_Date

date

None.

SGRN_SK_Id_FK

integer

None.

PartnerDetails

PartnerSpeedSearchModels

Required

SGRN_Note

string

Required

ProductListForOpenSGRN

Collection of OpenSGRN_DetailsModels

Required

SGRN_TotalAmount

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "SGRN_Id": 1,
  "SGRN_No": "sample string 2",
  "SGRN_Date": "2019-10-23T03:06:09.8205935+05:30",
  "SGRN_SK_Id_FK": 4,
  "PartnerDetails": {
    "P_Id": 1,
    "P_Partner_Name": "sample string 2"
  },
  "SGRN_Note": "sample string 5",
  "ProductListForOpenSGRN": [
    {
      "SGRND_Id": 1,
      "SGRND_SGRN_Id_FK": 2,
      "Open_SGRND_P_Id_FK": 3,
      "Open_SGRND_PA_Id_FK": 4,
      "Open_SGRND_Qty": 5,
      "Open_SGRND_Price": 6.0,
      "Open_SGRND_TaxRate": 7.0,
      "PacksizeCode": "sample string 8",
      "PA_Barcode": "sample string 9",
      "ProductName": "sample string 10",
      "PackSize": "sample string 11",
      "PackUOM": "sample string 12",
      "PackType": "sample string 13"
    },
    {
      "SGRND_Id": 1,
      "SGRND_SGRN_Id_FK": 2,
      "Open_SGRND_P_Id_FK": 3,
      "Open_SGRND_PA_Id_FK": 4,
      "Open_SGRND_Qty": 5,
      "Open_SGRND_Price": 6.0,
      "Open_SGRND_TaxRate": 7.0,
      "PacksizeCode": "sample string 8",
      "PA_Barcode": "sample string 9",
      "ProductName": "sample string 10",
      "PackSize": "sample string 11",
      "PackUOM": "sample string 12",
      "PackType": "sample string 13"
    }
  ],
  "SGRN_TotalAmount": 6.0
}

application/xml, text/xml

Sample:
<OpenSGRN_Models xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eDairyWebAPI.Models">
  <PartnerDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/eDairyWebAPI.Models.SpeedSearch">
    <d2p1:P_Id>1</d2p1:P_Id>
    <d2p1:P_Partner_Name>sample string 2</d2p1:P_Partner_Name>
  </PartnerDetails>
  <ProductListForOpenSGRN>
    <OpenSGRN_DetailsModels>
      <Open_SGRND_PA_Id_FK>4</Open_SGRND_PA_Id_FK>
      <Open_SGRND_P_Id_FK>3</Open_SGRND_P_Id_FK>
      <Open_SGRND_Price>6</Open_SGRND_Price>
      <Open_SGRND_Qty>5</Open_SGRND_Qty>
      <Open_SGRND_TaxRate>7</Open_SGRND_TaxRate>
      <PA_Barcode>sample string 9</PA_Barcode>
      <PackSize>sample string 11</PackSize>
      <PackType>sample string 13</PackType>
      <PackUOM>sample string 12</PackUOM>
      <PacksizeCode>sample string 8</PacksizeCode>
      <ProductName>sample string 10</ProductName>
      <SGRND_Id>1</SGRND_Id>
      <SGRND_SGRN_Id_FK>2</SGRND_SGRN_Id_FK>
    </OpenSGRN_DetailsModels>
    <OpenSGRN_DetailsModels>
      <Open_SGRND_PA_Id_FK>4</Open_SGRND_PA_Id_FK>
      <Open_SGRND_P_Id_FK>3</Open_SGRND_P_Id_FK>
      <Open_SGRND_Price>6</Open_SGRND_Price>
      <Open_SGRND_Qty>5</Open_SGRND_Qty>
      <Open_SGRND_TaxRate>7</Open_SGRND_TaxRate>
      <PA_Barcode>sample string 9</PA_Barcode>
      <PackSize>sample string 11</PackSize>
      <PackType>sample string 13</PackType>
      <PackUOM>sample string 12</PackUOM>
      <PacksizeCode>sample string 8</PacksizeCode>
      <ProductName>sample string 10</ProductName>
      <SGRND_Id>1</SGRND_Id>
      <SGRND_SGRN_Id_FK>2</SGRND_SGRN_Id_FK>
    </OpenSGRN_DetailsModels>
  </ProductListForOpenSGRN>
  <SGRN_Date>2019-10-23T03:06:09.8205935+05:30</SGRN_Date>
  <SGRN_Id>1</SGRN_Id>
  <SGRN_No>sample string 2</SGRN_No>
  <SGRN_Note>sample string 5</SGRN_Note>
  <SGRN_SK_Id_FK>4</SGRN_SK_Id_FK>
  <SGRN_TotalAmount>6</SGRN_TotalAmount>
</OpenSGRN_Models>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.