GET api/PurchaseRequests/{code}/Materials

Get the requested stock items of a purchase request

Request Information

URI Parameters

NameDescriptionTypeAdditional information
code

integer

Required

Body Parameters

None.

Response Information

Resource Description

The Stock Items List

Collection of PurchaseRequest.StockItem
NameDescriptionTypeAdditional information
Id

integer

None.

Code

string

None.

Description

string

None.

Supplier

BasicDetail

None.

Quantity

decimal number

None.

UnitCost

decimal number

None.

Urgency

PurchaseRequest.Urgency

None.

Store

BasicDetail

None.

State

PurchaseRequest.ItemState

None.

CostAllocation

AllocationEntityDetails

None.

Account

BasicDetail

None.

Notes

string

None.

Response Formats

Sample:
[
  {
    "Id": 1,
    "Code": "sample string 2",
    "Description": "sample string 3",
    "Supplier": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Quantity": 4.1,
    "UnitCost": 5.1,
    "Urgency": "Emergency",
    "Store": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "State": "Pending",
    "CostAllocation": {
      "Type": "WorkOrder",
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Account": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Notes": "sample string 6"
  },
  {
    "Id": 1,
    "Code": "sample string 2",
    "Description": "sample string 3",
    "Supplier": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Quantity": 4.1,
    "UnitCost": 5.1,
    "Urgency": "Emergency",
    "Store": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "State": "Pending",
    "CostAllocation": {
      "Type": "WorkOrder",
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Account": {
      "Code": "sample string 1",
      "Description": "sample string 2"
    },
    "Notes": "sample string 6"
  }
]
Sample:
<ArrayOfStockItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Purchase">
  <StockItem>
    <Account xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Account>
    <Code>sample string 2</Code>
    <CostAllocation xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
      <d3p1:Type>WorkOrder</d3p1:Type>
    </CostAllocation>
    <Description>sample string 3</Description>
    <Id>1</Id>
    <Notes>sample string 6</Notes>
    <Quantity>4.1</Quantity>
    <State>Pending</State>
    <Store xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Store>
    <Supplier xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Supplier>
    <UnitCost>5.1</UnitCost>
    <Urgency>Emergency</Urgency>
  </StockItem>
  <StockItem>
    <Account xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Account>
    <Code>sample string 2</Code>
    <CostAllocation xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
      <d3p1:Type>WorkOrder</d3p1:Type>
    </CostAllocation>
    <Description>sample string 3</Description>
    <Id>1</Id>
    <Notes>sample string 6</Notes>
    <Quantity>4.1</Quantity>
    <State>Pending</State>
    <Store xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Store>
    <Supplier xmlns:d3p1="http://schemas.datacontract.org/2004/07/WebAPI.Models.ManWinWin">
      <d3p1:Code>sample string 1</d3p1:Code>
      <d3p1:Description>sample string 2</d3p1:Description>
    </Supplier>
    <UnitCost>5.1</UnitCost>
    <Urgency>Emergency</Urgency>
  </StockItem>
</ArrayOfStockItem>
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Id"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Code"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Description"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Supplier.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Supplier.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Quantity"

4.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].UnitCost"

5.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Urgency"

Emergency
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Store.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Store.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].State"

Pending
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].CostAllocation.Type"

WorkOrder
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].CostAllocation.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].CostAllocation.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Account.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Account.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[0].Notes"

sample string 6
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Id"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Code"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Description"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Supplier.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Supplier.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Quantity"

4.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].UnitCost"

5.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Urgency"

Emergency
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Store.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Store.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].State"

Pending
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].CostAllocation.Type"

WorkOrder
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].CostAllocation.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].CostAllocation.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Account.Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Account.Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="[1].Notes"

sample string 6
--MultipartDataMediaFormatterBoundary1q2w3e--