POST api/apxapi/PostSavePurchasesData

Request Information

URI Parameters

None.

Body Parameters

PurchasesData
NameDescriptionTypeAdditional information
purchasesHeaderData

PurchasesHeaderData

None.

purchasesPrimaryData

PurchasesPrimaryData

None.

purchasesSecondaryData

Collection of PurchasesSecondaryData

None.

purchasesTradeAdditionDeductionData

Collection of PurchasesTradeAdditionDeductionData

None.

purchaseRegularisation

PurchaseRegularisation

None.

Request Formats

application/json, text/json

Sample:
{
  "purchasesHeaderData": {
    "CompanyCode": "sample string 1",
    "TransType": "sample string 2",
    "BranchCode": "sample string 3",
    "UserId": "sample string 4"
  },
  "purchasesPrimaryData": {
    "DocumentNoPrefix": "sample string 1",
    "DocumentNo": 2,
    "Date": 3,
    "Time": "sample string 4",
    "ReferenceDocNo": "sample string 5",
    "ReferenceDocDate": 6,
    "DocumentType": "sample string 7",
    "PurchaseType": "sample string 8",
    "PartyType": "sample string 9",
    "PartyIdType": "sample string 10",
    "PartyIdCode": "sample string 11",
    "TaxClassCode": "sample string 12",
    "ItemTotalAddition": 13.1,
    "ItemTotalDeduction": 14.1,
    "TotalTradeAddition": 15.1,
    "TotalTradeDeduction": 16.1,
    "NetAmount": 17.1,
    "TranNotes": "sample string 18"
  },
  "purchasesSecondaryData": [
    {
      "ItemCodeType": "sample string 1",
      "ItemCode": "sample string 2",
      "ItemName": "sample string 3",
      "ItemAdditionalInfo": "sample string 4",
      "ItemQty": 5.1,
      "ItemFreeQty": 6.1,
      "ItemGrossRate": 7.1,
      "ItemDiscount1Perc": 8.1,
      "ItemDiscount1Amount": 9.1,
      "ItemDiscount2Perc": 10.1,
      "ItemDiscount2Amount": 11.1,
      "ItemTax1Type": "sample string 12",
      "ItemTax1Perc": 13.1,
      "ItemTax1Amount": 14.1,
      "ItemTax2Type": "sample string 15",
      "ItemTax2Perc": 16.1,
      "ItemTax2Amount": 17.1,
      "ItemCessPerc": 18.1,
      "ItemCessAmount": 19.1,
      "ItemAddiCessPerc": 20.1,
      "ItemAddiCessAmount": 21.1,
      "ItemTaxableAmount": 22.1,
      "purachasesSecondaryIdentitiesdata": [
        {
          "SerialNo": "sample string 1"
        },
        {
          "SerialNo": "sample string 1"
        }
      ]
    },
    {
      "ItemCodeType": "sample string 1",
      "ItemCode": "sample string 2",
      "ItemName": "sample string 3",
      "ItemAdditionalInfo": "sample string 4",
      "ItemQty": 5.1,
      "ItemFreeQty": 6.1,
      "ItemGrossRate": 7.1,
      "ItemDiscount1Perc": 8.1,
      "ItemDiscount1Amount": 9.1,
      "ItemDiscount2Perc": 10.1,
      "ItemDiscount2Amount": 11.1,
      "ItemTax1Type": "sample string 12",
      "ItemTax1Perc": 13.1,
      "ItemTax1Amount": 14.1,
      "ItemTax2Type": "sample string 15",
      "ItemTax2Perc": 16.1,
      "ItemTax2Amount": 17.1,
      "ItemCessPerc": 18.1,
      "ItemCessAmount": 19.1,
      "ItemAddiCessPerc": 20.1,
      "ItemAddiCessAmount": 21.1,
      "ItemTaxableAmount": 22.1,
      "purachasesSecondaryIdentitiesdata": [
        {
          "SerialNo": "sample string 1"
        },
        {
          "SerialNo": "sample string 1"
        }
      ]
    }
  ],
  "purchasesTradeAdditionDeductionData": [
    {
      "Code": "sample string 1",
      "Type": "sample string 2",
      "Name": "sample string 3",
      "Percentage": 4.1,
      "Amount": 5.1
    },
    {
      "Code": "sample string 1",
      "Type": "sample string 2",
      "Name": "sample string 3",
      "Percentage": 4.1,
      "Amount": 5.1
    }
  ],
  "purchaseRegularisation": {
    "TransType": "sample string 1",
    "DocumentNo": "sample string 2",
    "DocumentDate": 3
  }
}

application/xml, text/xml

Sample:
<PurchasesData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APXWebAPI.Models.Purchases">
  <purchaseRegularisation>
    <DocumentDate>3</DocumentDate>
    <DocumentNo>sample string 2</DocumentNo>
    <TransType>sample string 1</TransType>
  </purchaseRegularisation>
  <purchasesHeaderData>
    <BranchCode>sample string 3</BranchCode>
    <CompanyCode>sample string 1</CompanyCode>
    <TransType>sample string 2</TransType>
    <UserId>sample string 4</UserId>
  </purchasesHeaderData>
  <purchasesPrimaryData>
    <Date>3</Date>
    <DocumentNo>2</DocumentNo>
    <DocumentNoPrefix>sample string 1</DocumentNoPrefix>
    <DocumentType>sample string 7</DocumentType>
    <ItemTotalAddition>13.1</ItemTotalAddition>
    <ItemTotalDeduction>14.1</ItemTotalDeduction>
    <NetAmount>17.1</NetAmount>
    <PartyIdCode>sample string 11</PartyIdCode>
    <PartyIdType>sample string 10</PartyIdType>
    <PartyType>sample string 9</PartyType>
    <PurchaseType>sample string 8</PurchaseType>
    <ReferenceDocDate>6</ReferenceDocDate>
    <ReferenceDocNo>sample string 5</ReferenceDocNo>
    <TaxClassCode>sample string 12</TaxClassCode>
    <Time>sample string 4</Time>
    <TotalTradeAddition>15.1</TotalTradeAddition>
    <TotalTradeDeduction>16.1</TotalTradeDeduction>
    <TranNotes>sample string 18</TranNotes>
  </purchasesPrimaryData>
  <purchasesSecondaryData>
    <PurchasesSecondaryData>
      <ItemAddiCessAmount>21.1</ItemAddiCessAmount>
      <ItemAddiCessPerc>20.1</ItemAddiCessPerc>
      <ItemAdditionalInfo>sample string 4</ItemAdditionalInfo>
      <ItemCessAmount>19.1</ItemCessAmount>
      <ItemCessPerc>18.1</ItemCessPerc>
      <ItemCode>sample string 2</ItemCode>
      <ItemCodeType>sample string 1</ItemCodeType>
      <ItemDiscount1Amount>9.1</ItemDiscount1Amount>
      <ItemDiscount1Perc>8.1</ItemDiscount1Perc>
      <ItemDiscount2Amount>11.1</ItemDiscount2Amount>
      <ItemDiscount2Perc>10.1</ItemDiscount2Perc>
      <ItemFreeQty>6.1</ItemFreeQty>
      <ItemGrossRate>7.1</ItemGrossRate>
      <ItemName>sample string 3</ItemName>
      <ItemQty>5.1</ItemQty>
      <ItemTax1Amount>14.1</ItemTax1Amount>
      <ItemTax1Perc>13.1</ItemTax1Perc>
      <ItemTax1Type>sample string 12</ItemTax1Type>
      <ItemTax2Amount>17.1</ItemTax2Amount>
      <ItemTax2Perc>16.1</ItemTax2Perc>
      <ItemTax2Type>sample string 15</ItemTax2Type>
      <ItemTaxableAmount>22.1</ItemTaxableAmount>
      <purachasesSecondaryIdentitiesdata>
        <PurchasesSecondaryidentityData>
          <SerialNo>sample string 1</SerialNo>
        </PurchasesSecondaryidentityData>
        <PurchasesSecondaryidentityData>
          <SerialNo>sample string 1</SerialNo>
        </PurchasesSecondaryidentityData>
      </purachasesSecondaryIdentitiesdata>
    </PurchasesSecondaryData>
    <PurchasesSecondaryData>
      <ItemAddiCessAmount>21.1</ItemAddiCessAmount>
      <ItemAddiCessPerc>20.1</ItemAddiCessPerc>
      <ItemAdditionalInfo>sample string 4</ItemAdditionalInfo>
      <ItemCessAmount>19.1</ItemCessAmount>
      <ItemCessPerc>18.1</ItemCessPerc>
      <ItemCode>sample string 2</ItemCode>
      <ItemCodeType>sample string 1</ItemCodeType>
      <ItemDiscount1Amount>9.1</ItemDiscount1Amount>
      <ItemDiscount1Perc>8.1</ItemDiscount1Perc>
      <ItemDiscount2Amount>11.1</ItemDiscount2Amount>
      <ItemDiscount2Perc>10.1</ItemDiscount2Perc>
      <ItemFreeQty>6.1</ItemFreeQty>
      <ItemGrossRate>7.1</ItemGrossRate>
      <ItemName>sample string 3</ItemName>
      <ItemQty>5.1</ItemQty>
      <ItemTax1Amount>14.1</ItemTax1Amount>
      <ItemTax1Perc>13.1</ItemTax1Perc>
      <ItemTax1Type>sample string 12</ItemTax1Type>
      <ItemTax2Amount>17.1</ItemTax2Amount>
      <ItemTax2Perc>16.1</ItemTax2Perc>
      <ItemTax2Type>sample string 15</ItemTax2Type>
      <ItemTaxableAmount>22.1</ItemTaxableAmount>
      <purachasesSecondaryIdentitiesdata>
        <PurchasesSecondaryidentityData>
          <SerialNo>sample string 1</SerialNo>
        </PurchasesSecondaryidentityData>
        <PurchasesSecondaryidentityData>
          <SerialNo>sample string 1</SerialNo>
        </PurchasesSecondaryidentityData>
      </purachasesSecondaryIdentitiesdata>
    </PurchasesSecondaryData>
  </purchasesSecondaryData>
  <purchasesTradeAdditionDeductionData>
    <PurchasesTradeAdditionDeductionData>
      <Amount>5.1</Amount>
      <Code>sample string 1</Code>
      <Name>sample string 3</Name>
      <Percentage>4.1</Percentage>
      <Type>sample string 2</Type>
    </PurchasesTradeAdditionDeductionData>
    <PurchasesTradeAdditionDeductionData>
      <Amount>5.1</Amount>
      <Code>sample string 1</Code>
      <Name>sample string 3</Name>
      <Percentage>4.1</Percentage>
      <Type>sample string 2</Type>
    </PurchasesTradeAdditionDeductionData>
  </purchasesTradeAdditionDeductionData>
</PurchasesData>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.