POST api/purchase/add

Request Information

URI Parameters

None.

Body Parameters

PurchaseEntity
NameDescriptionTypeAdditional information
PurchaseOrderId

integer

None.

OrderRefNumber

string

None.

SupplierId

integer

None.

SupplierName

string

None.

BillTo

string

None.

ShipTo

string

None.

OrderDate

date

None.

Active

boolean

None.

CreatedTime

date

None.

UpdatedTime

date

None.

Note

string

None.

TotalAmount

decimal number

None.

VendorId

integer

None.

Status

string

None.

GRNId

integer

None.

PurchaseOrderDetail

Collection of PurchaseOrderDetailEntity

None.

Request Formats

application/json, text/json

Sample:
{
  "PurchaseOrderId": 1,
  "OrderRefNumber": "sample string 2",
  "SupplierId": 1,
  "SupplierName": "sample string 3",
  "BillTo": "sample string 4",
  "ShipTo": "sample string 5",
  "OrderDate": "2025-12-31T16:36:31.9411572+05:30",
  "Active": true,
  "CreatedTime": "2025-12-31T16:36:31.9411572+05:30",
  "UpdatedTime": "2025-12-31T16:36:31.9411572+05:30",
  "Note": "sample string 7",
  "TotalAmount": 1.0,
  "VendorId": 8,
  "Status": "sample string 9",
  "GRNId": 1,
  "PurchaseOrderDetail": [
    {
      "PurchaseOrderDetailsId": 1,
      "OrderCost": 1.0,
      "OrderQuantity": 1,
      "ProductId": 1,
      "ProductSKU": "sample string 2",
      "ProductName": "sample string 3",
      "SupplierId": 4,
      "PurchaseOrderId": 5,
      "ReceivedCost": 1.0,
      "ReceivedQuantity": 1,
      "RecommendedMRP": 6.0,
      "VendorId": 7,
      "LocationSpecificInventoryList": [
        {
          "LocationSpecificInventoryId": 1,
          "VendorId": 2,
          "LocationId": 3,
          "ProductId": 4,
          "ReorderLevel": 5,
          "CurrentQuantity": 6,
          "CreatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "Price": 1.0,
          "UpdatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "IsDeleted": true,
          "LocationName": "sample string 9",
          "TaxType": "sample string 10"
        },
        {
          "LocationSpecificInventoryId": 1,
          "VendorId": 2,
          "LocationId": 3,
          "ProductId": 4,
          "ReorderLevel": 5,
          "CurrentQuantity": 6,
          "CreatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "Price": 1.0,
          "UpdatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "IsDeleted": true,
          "LocationName": "sample string 9",
          "TaxType": "sample string 10"
        }
      ]
    },
    {
      "PurchaseOrderDetailsId": 1,
      "OrderCost": 1.0,
      "OrderQuantity": 1,
      "ProductId": 1,
      "ProductSKU": "sample string 2",
      "ProductName": "sample string 3",
      "SupplierId": 4,
      "PurchaseOrderId": 5,
      "ReceivedCost": 1.0,
      "ReceivedQuantity": 1,
      "RecommendedMRP": 6.0,
      "VendorId": 7,
      "LocationSpecificInventoryList": [
        {
          "LocationSpecificInventoryId": 1,
          "VendorId": 2,
          "LocationId": 3,
          "ProductId": 4,
          "ReorderLevel": 5,
          "CurrentQuantity": 6,
          "CreatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "Price": 1.0,
          "UpdatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "IsDeleted": true,
          "LocationName": "sample string 9",
          "TaxType": "sample string 10"
        },
        {
          "LocationSpecificInventoryId": 1,
          "VendorId": 2,
          "LocationId": 3,
          "ProductId": 4,
          "ReorderLevel": 5,
          "CurrentQuantity": 6,
          "CreatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "Price": 1.0,
          "UpdatedTime": "2025-12-31T16:36:31.9411572+05:30",
          "IsDeleted": true,
          "LocationName": "sample string 9",
          "TaxType": "sample string 10"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<PurchaseEntity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/pos_crm_api_DAL.Entities">
  <Active>true</Active>
  <BillTo>sample string 4</BillTo>
  <CreatedTime>2025-12-31T16:36:31.9411572+05:30</CreatedTime>
  <GRNId>1</GRNId>
  <Note>sample string 7</Note>
  <OrderDate>2025-12-31T16:36:31.9411572+05:30</OrderDate>
  <OrderRefNumber>sample string 2</OrderRefNumber>
  <PurchaseOrderDetail>
    <PurchaseOrderDetailEntity>
      <LocationSpecificInventoryList>
        <LocationSpecificInventoryEntity>
          <CreatedTime>2025-12-31T16:36:31.9411572+05:30</CreatedTime>
          <CurrentQuantity>6</CurrentQuantity>
          <IsDeleted>true</IsDeleted>
          <LocationId>3</LocationId>
          <LocationName>sample string 9</LocationName>
          <LocationSpecificInventoryId>1</LocationSpecificInventoryId>
          <Price>1</Price>
          <ProductId>4</ProductId>
          <ReorderLevel>5</ReorderLevel>
          <TaxType>sample string 10</TaxType>
          <UpdatedTime>2025-12-31T16:36:31.9411572+05:30</UpdatedTime>
          <VendorId>2</VendorId>
        </LocationSpecificInventoryEntity>
        <LocationSpecificInventoryEntity>
          <CreatedTime>2025-12-31T16:36:31.9411572+05:30</CreatedTime>
          <CurrentQuantity>6</CurrentQuantity>
          <IsDeleted>true</IsDeleted>
          <LocationId>3</LocationId>
          <LocationName>sample string 9</LocationName>
          <LocationSpecificInventoryId>1</LocationSpecificInventoryId>
          <Price>1</Price>
          <ProductId>4</ProductId>
          <ReorderLevel>5</ReorderLevel>
          <TaxType>sample string 10</TaxType>
          <UpdatedTime>2025-12-31T16:36:31.9411572+05:30</UpdatedTime>
          <VendorId>2</VendorId>
        </LocationSpecificInventoryEntity>
      </LocationSpecificInventoryList>
      <OrderCost>1</OrderCost>
      <OrderQuantity>1</OrderQuantity>
      <ProductId>1</ProductId>
      <ProductName>sample string 3</ProductName>
      <ProductSKU>sample string 2</ProductSKU>
      <PurchaseOrderDetailsId>1</PurchaseOrderDetailsId>
      <PurchaseOrderId>5</PurchaseOrderId>
      <ReceivedCost>1</ReceivedCost>
      <ReceivedQuantity>1</ReceivedQuantity>
      <RecommendedMRP>6</RecommendedMRP>
      <SupplierId>4</SupplierId>
      <VendorId>7</VendorId>
    </PurchaseOrderDetailEntity>
    <PurchaseOrderDetailEntity>
      <LocationSpecificInventoryList>
        <LocationSpecificInventoryEntity>
          <CreatedTime>2025-12-31T16:36:31.9411572+05:30</CreatedTime>
          <CurrentQuantity>6</CurrentQuantity>
          <IsDeleted>true</IsDeleted>
          <LocationId>3</LocationId>
          <LocationName>sample string 9</LocationName>
          <LocationSpecificInventoryId>1</LocationSpecificInventoryId>
          <Price>1</Price>
          <ProductId>4</ProductId>
          <ReorderLevel>5</ReorderLevel>
          <TaxType>sample string 10</TaxType>
          <UpdatedTime>2025-12-31T16:36:31.9411572+05:30</UpdatedTime>
          <VendorId>2</VendorId>
        </LocationSpecificInventoryEntity>
        <LocationSpecificInventoryEntity>
          <CreatedTime>2025-12-31T16:36:31.9411572+05:30</CreatedTime>
          <CurrentQuantity>6</CurrentQuantity>
          <IsDeleted>true</IsDeleted>
          <LocationId>3</LocationId>
          <LocationName>sample string 9</LocationName>
          <LocationSpecificInventoryId>1</LocationSpecificInventoryId>
          <Price>1</Price>
          <ProductId>4</ProductId>
          <ReorderLevel>5</ReorderLevel>
          <TaxType>sample string 10</TaxType>
          <UpdatedTime>2025-12-31T16:36:31.9411572+05:30</UpdatedTime>
          <VendorId>2</VendorId>
        </LocationSpecificInventoryEntity>
      </LocationSpecificInventoryList>
      <OrderCost>1</OrderCost>
      <OrderQuantity>1</OrderQuantity>
      <ProductId>1</ProductId>
      <ProductName>sample string 3</ProductName>
      <ProductSKU>sample string 2</ProductSKU>
      <PurchaseOrderDetailsId>1</PurchaseOrderDetailsId>
      <PurchaseOrderId>5</PurchaseOrderId>
      <ReceivedCost>1</ReceivedCost>
      <ReceivedQuantity>1</ReceivedQuantity>
      <RecommendedMRP>6</RecommendedMRP>
      <SupplierId>4</SupplierId>
      <VendorId>7</VendorId>
    </PurchaseOrderDetailEntity>
  </PurchaseOrderDetail>
  <PurchaseOrderId>1</PurchaseOrderId>
  <ShipTo>sample string 5</ShipTo>
  <Status>sample string 9</Status>
  <SupplierId>1</SupplierId>
  <SupplierName>sample string 3</SupplierName>
  <TotalAmount>1</TotalAmount>
  <UpdatedTime>2025-12-31T16:36:31.9411572+05:30</UpdatedTime>
  <VendorId>8</VendorId>
</PurchaseEntity>

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.