POST api/RestroPurchaseInvoice

Request Information

URI Parameters

None.

Body Parameters

RestroPurchaseInvoiceInsertUpdateModel
NameDescriptionTypeAdditional information
PurchaseInvoiceID

integer

None.

PurchaseInvoiceCode

string

Required

SupplierInvoiceNo

string

None.

PurchaseInvoicedate

date

Required

SupplierID

integer

Required

LocationID

integer

Required

InvoiceAmount

decimal number

None.

UserID

integer

None.

APIKey

string

None.

InvoiceItems

Collection of RestroPurchaseInvoiceItem

None.

Request Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "purchaseInvoiceID": 1,
  "purchaseInvoiceCode": "sample string 1",
  "supplierInvoiceNo": "sample string 2",
  "purchaseInvoicedate": "2025-07-17T04:42:15.4963239+00:00",
  "supplierID": 4,
  "locationID": 5,
  "invoiceAmount": 6.0,
  "userID": 7,
  "apiKey": "sample string 8",
  "invoiceItems": [
    {
      "purchaseInvoiceItemID": 1,
      "purchaseInvoiceID": 2,
      "ingredientID": 3,
      "ingredientCode": "sample string 4",
      "ingredientName": "sample string 5",
      "uomid": 6,
      "uom": "sample string 7",
      "quantity": 8.0,
      "unitPrice": 9.0,
      "totalCost": 10.0
    },
    {
      "purchaseInvoiceItemID": 1,
      "purchaseInvoiceID": 2,
      "ingredientID": 3,
      "ingredientCode": "sample string 4",
      "ingredientName": "sample string 5",
      "uomid": 6,
      "uom": "sample string 7",
      "quantity": 8.0,
      "unitPrice": 9.0,
      "totalCost": 10.0
    }
  ]
}

application/xml, text/xml

Sample:
<RestroPurchaseInvoiceInsertUpdateModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.RequestModel">
  <APIKey>sample string 8</APIKey>
  <InvoiceAmount>6</InvoiceAmount>
  <InvoiceItems>
    <RestroPurchaseInvoiceItem>
      <IngredientCode>sample string 4</IngredientCode>
      <IngredientID>3</IngredientID>
      <IngredientName>sample string 5</IngredientName>
      <PurchaseInvoiceID>2</PurchaseInvoiceID>
      <PurchaseInvoiceItemID>1</PurchaseInvoiceItemID>
      <Quantity>8</Quantity>
      <TotalCost>10</TotalCost>
      <UOM>sample string 7</UOM>
      <UOMID>6</UOMID>
      <UnitPrice>9</UnitPrice>
    </RestroPurchaseInvoiceItem>
    <RestroPurchaseInvoiceItem>
      <IngredientCode>sample string 4</IngredientCode>
      <IngredientID>3</IngredientID>
      <IngredientName>sample string 5</IngredientName>
      <PurchaseInvoiceID>2</PurchaseInvoiceID>
      <PurchaseInvoiceItemID>1</PurchaseInvoiceItemID>
      <Quantity>8</Quantity>
      <TotalCost>10</TotalCost>
      <UOM>sample string 7</UOM>
      <UOMID>6</UOMID>
      <UnitPrice>9</UnitPrice>
    </RestroPurchaseInvoiceItem>
  </InvoiceItems>
  <LocationID>5</LocationID>
  <PurchaseInvoiceCode>sample string 1</PurchaseInvoiceCode>
  <PurchaseInvoiceID>1</PurchaseInvoiceID>
  <PurchaseInvoicedate>2025-07-17T04:42:15.4963239+00:00</PurchaseInvoicedate>
  <SupplierID>4</SupplierID>
  <SupplierInvoiceNo>sample string 2</SupplierInvoiceNo>
  <UserID>7</UserID>
</RestroPurchaseInvoiceInsertUpdateModel>

multipart/form-data

Sample:
<RestroPurchaseInvoiceInsertUpdateModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.RequestModel"><APIKey>sample string 8</APIKey><InvoiceAmount>6</InvoiceAmount><InvoiceItems><RestroPurchaseInvoiceItem><IngredientCode>sample string 4</IngredientCode><IngredientID>3</IngredientID><IngredientName>sample string 5</IngredientName><PurchaseInvoiceID>2</PurchaseInvoiceID><PurchaseInvoiceItemID>1</PurchaseInvoiceItemID><Quantity>8</Quantity><TotalCost>10</TotalCost><UOM>sample string 7</UOM><UOMID>6</UOMID><UnitPrice>9</UnitPrice></RestroPurchaseInvoiceItem><RestroPurchaseInvoiceItem><IngredientCode>sample string 4</IngredientCode><IngredientID>3</IngredientID><IngredientName>sample string 5</IngredientName><PurchaseInvoiceID>2</PurchaseInvoiceID><PurchaseInvoiceItemID>1</PurchaseInvoiceItemID><Quantity>8</Quantity><TotalCost>10</TotalCost><UOM>sample string 7</UOM><UOMID>6</UOMID><UnitPrice>9</UnitPrice></RestroPurchaseInvoiceItem></InvoiceItems><LocationID>5</LocationID><PurchaseInvoiceCode>sample string 1</PurchaseInvoiceCode><PurchaseInvoiceID>1</PurchaseInvoiceID><PurchaseInvoicedate>2025-07-17T04:42:15.4963239+00:00</PurchaseInvoicedate><SupplierID>4</SupplierID><SupplierInvoiceNo>sample string 2</SupplierInvoiceNo><UserID>7</UserID></RestroPurchaseInvoiceInsertUpdateModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CommonResponseDataModel
NameDescriptionTypeAdditional information
ReturnID

integer

Required

Message

string

Required

Successful

boolean

Required

Code

integer

None.

TotalRecord

integer

None.

Response Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "returnID": 1,
  "message": "sample string 2",
  "successful": true,
  "code": 4,
  "totalRecord": 5
}

application/xml, text/xml

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.DataModel">
  <Code>4</Code>
  <Message>sample string 2</Message>
  <ReturnID>1</ReturnID>
  <Successful>true</Successful>
  <TotalRecord>5</TotalRecord>
</CommonResponseDataModel>

multipart/form-data

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.DataModel"><Code>4</Code><Message>sample string 2</Message><ReturnID>1</ReturnID><Successful>true</Successful><TotalRecord>5</TotalRecord></CommonResponseDataModel>