POST api/Part/GetPart

Gets information about a part

Exceptions

ExceptionCondition
ArgumentNullException

Thrown if some of the required arguments like TicketId, CombinedActivtyId or PartNumber is missing or not set.

ArgumentOutOfRangeHttpResponseException

Thrown if part or activity cannot be found.

Request Information

URI Parameters

None.

Body Parameters

Specify which part you want to lookup. Please note that you also have to specify which activity you are working on so do not forget to fill out combined activity either.

PartArgumentModel
NameDescriptionTypeAdditional information
PartNumber

Gets or sets the part number

string

None.

CombinedActivityId

Get or set combined activity id

string

None.

FormName

Gets or sets the optional FormName. The FormName is used to limit the number of fields returned from GetActivity.

string

None.

TicketId

Gets or sets the ticket id

string

None.

Culture

Gets or sets culture, if not specified we will use culture set on user.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "PartNumber": "sample string 1",
  "CombinedActivityId": "sample string 2",
  "FormName": "sample string 3",
  "TicketId": "sample string 4",
  "Culture": "sample string 5"
}

application/xml, text/xml

Sample:
<PartController.PartArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Controllers">
  <Culture xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 5</Culture>
  <TicketId xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 4</TicketId>
  <CombinedActivityId xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 2</CombinedActivityId>
  <FormName xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 3</FormName>
  <PartNumber>sample string 1</PartNumber>
</PartController.PartArgumentModel>

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

Response Information

Resource Description

PartReturnModel
NameDescriptionTypeAdditional information
Part

Gets or sets the part

PartModel

None.

CombinedPerformanceId

Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null

string

Json null value handling: Ignore

Response Formats

application/json, text/json

Sample:
{
  "Part": {
    "DatabaseId": 0,
    "PartNumber": "sample string 1",
    "SubstitutePartNumber": "sample string 2",
    "EquivalentPartNumber": "sample string 3",
    "CombinedPartId": "master:sample string 1",
    "PartName": "sample string 4",
    "Brand": "sample string 5",
    "IsUsingSerialNumberHandling": true,
    "SerialNumberFormattingRules": [
      "sample string 1",
      "sample string 2"
    ],
    "IsReworkable": true,
    "QuantityOnLocalStock": 8,
    "QuantityOnCentralStock": 9,
    "IsBundled": true,
    "QuantityInBundle": 11,
    "BundleParts": [
      {
        "PartNumber": "sample string 1",
        "PartName": "sample string 2",
        "Quantity": 3.0
      },
      {
        "PartNumber": "sample string 1",
        "PartName": "sample string 2",
        "Quantity": 3.0
      }
    ]
  },
  "CombinedPerformanceId": "sample string 1"
}

application/xml, text/xml

Sample:
<PartController.PartReturnModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Controllers">
  <CombinedPerformanceId xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 1</CombinedPerformanceId>
  <Part xmlns:d2p1="http://schemas.datacontract.org/2004/07/Rostov.Models">
    <d2p1:Brand>sample string 5</d2p1:Brand>
    <d2p1:BundleParts>
      <d2p1:BundlePartModel>
        <d2p1:PartName>sample string 2</d2p1:PartName>
        <d2p1:PartNumber>sample string 1</d2p1:PartNumber>
        <d2p1:Quantity>3</d2p1:Quantity>
      </d2p1:BundlePartModel>
      <d2p1:BundlePartModel>
        <d2p1:PartName>sample string 2</d2p1:PartName>
        <d2p1:PartNumber>sample string 1</d2p1:PartNumber>
        <d2p1:Quantity>3</d2p1:Quantity>
      </d2p1:BundlePartModel>
    </d2p1:BundleParts>
    <d2p1:IsBundled>true</d2p1:IsBundled>
    <d2p1:IsUsingSerialNumberHandling>true</d2p1:IsUsingSerialNumberHandling>
    <d2p1:PartName>sample string 4</d2p1:PartName>
    <d2p1:PartNumber>sample string 1</d2p1:PartNumber>
    <d2p1:QuantityInBundle>11</d2p1:QuantityInBundle>
    <d2p1:QuantityOnCentralStock>9</d2p1:QuantityOnCentralStock>
    <d2p1:QuantityOnLocalStock>8</d2p1:QuantityOnLocalStock>
    <d2p1:SerialNumberFormattingRules xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </d2p1:SerialNumberFormattingRules>
  </Part>
</PartController.PartReturnModel>