POST api/JobPart

Creates a Part on a Job

Request Information

URI Parameters

None.

Body Parameters

JobPart
NameDescriptionTypeAdditional information
JobPartId

Sedona internal autonumber for the OE_Job_Parts record (assigned automatically on POST)

integer

None.

JobSystemId

Foreign key from AR_Customer_System table

integer

Required

PartCode

Abbreviated Part_Code, from IN_Part table

string

Required

String length: inclusive between 0 and 25

Quantity

Quantity of the Part

decimal number

Required

Rate

Rate

decimal number

Required

Amount

calculated automatically as Quantity * Rate (should not include tax)

decimal number

None.

Location

Location of the Part

string

None.

InvoiceItem

Defaults to False if not supplied

boolean

None.

MasterItemCode

Item_Code from AR_Item table; the Recurring Revenue item that this item will be “rolled up” into. Items of like Master Item and cycle are grouped together in the application. Defaults to N/A if not set explicitly.

string

String length: inclusive between 0 and 25

LaborUnits

Units of Labor; defaults to zero if not supplied

decimal number

None.

MasterJobPartCode

Abbreviated Part_Code, from IN_Part table

string

String length: inclusive between 0 and 25

IssuedQuantity

defaults to zero if not supplied

integer

None.

PurchaseCost

Purchase Cost; defaults to zero if not supplied

decimal number

None.

PurchaseDescription

Purchase Description

string

String length: inclusive between 0 and 25

VendorCode

Vendor_Code from AP_Vendor; defaults to N/A if not supplied

string

String length: inclusive between 0 and 50

JobPartDescription

Part Description

string

String length: inclusive between 0 and 128

PhaseCode

Phase_Code from OE_Phase table

string

Required

String length: inclusive between 0 and 50

IssueFromStock

Defaults to False if not supplied

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "JobPartId": 1,
  "JobSystemId": 2,
  "PartCode": "sample string 3",
  "Quantity": 4.1,
  "Rate": 5.0,
  "Amount": 6.0,
  "Location": "sample string 7",
  "InvoiceItem": true,
  "MasterItemCode": "sample string 8",
  "LaborUnits": 9.1,
  "MasterJobPartCode": "sample string 10",
  "IssuedQuantity": 1,
  "PurchaseCost": 1.0,
  "PurchaseDescription": "sample string 11",
  "VendorCode": "sample string 12",
  "JobPartDescription": "sample string 13",
  "PhaseCode": "sample string 14",
  "IssueFromStock": true
}

application/xml, text/xml

Sample:
<JobPart xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <Amount>6</Amount>
  <InvoiceItem>true</InvoiceItem>
  <IssueFromStock>true</IssueFromStock>
  <IssuedQuantity>1</IssuedQuantity>
  <JobPartDescription>sample string 13</JobPartDescription>
  <JobPartId>1</JobPartId>
  <JobSystemId>2</JobSystemId>
  <LaborUnits>9.1</LaborUnits>
  <Location>sample string 7</Location>
  <MasterItemCode>sample string 8</MasterItemCode>
  <MasterJobPartCode>sample string 10</MasterJobPartCode>
  <PartCode>sample string 3</PartCode>
  <PhaseCode>sample string 14</PhaseCode>
  <PurchaseCost>1</PurchaseCost>
  <PurchaseDescription>sample string 11</PurchaseDescription>
  <Quantity>4.1</Quantity>
  <Rate>5</Rate>
  <VendorCode>sample string 12</VendorCode>
</JobPart>

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

Response Information

Resource Description

JobPart
NameDescriptionTypeAdditional information
JobPartId

Sedona internal autonumber for the OE_Job_Parts record (assigned automatically on POST)

integer

None.

JobSystemId

Foreign key from AR_Customer_System table

integer

Required

PartCode

Abbreviated Part_Code, from IN_Part table

string

Required

String length: inclusive between 0 and 25

Quantity

Quantity of the Part

decimal number

Required

Rate

Rate

decimal number

Required

Amount

calculated automatically as Quantity * Rate (should not include tax)

decimal number

None.

Location

Location of the Part

string

None.

InvoiceItem

Defaults to False if not supplied

boolean

None.

MasterItemCode

Item_Code from AR_Item table; the Recurring Revenue item that this item will be “rolled up” into. Items of like Master Item and cycle are grouped together in the application. Defaults to N/A if not set explicitly.

string

String length: inclusive between 0 and 25

LaborUnits

Units of Labor; defaults to zero if not supplied

decimal number

None.

MasterJobPartCode

Abbreviated Part_Code, from IN_Part table

string

String length: inclusive between 0 and 25

IssuedQuantity

defaults to zero if not supplied

integer

None.

PurchaseCost

Purchase Cost; defaults to zero if not supplied

decimal number

None.

PurchaseDescription

Purchase Description

string

String length: inclusive between 0 and 25

VendorCode

Vendor_Code from AP_Vendor; defaults to N/A if not supplied

string

String length: inclusive between 0 and 50

JobPartDescription

Part Description

string

String length: inclusive between 0 and 128

PhaseCode

Phase_Code from OE_Phase table

string

Required

String length: inclusive between 0 and 50

IssueFromStock

Defaults to False if not supplied

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "JobPartId": 1,
  "JobSystemId": 2,
  "PartCode": "sample string 3",
  "Quantity": 4.1,
  "Rate": 5.0,
  "Amount": 6.0,
  "Location": "sample string 7",
  "InvoiceItem": true,
  "MasterItemCode": "sample string 8",
  "LaborUnits": 9.1,
  "MasterJobPartCode": "sample string 10",
  "IssuedQuantity": 1,
  "PurchaseCost": 1.0,
  "PurchaseDescription": "sample string 11",
  "VendorCode": "sample string 12",
  "JobPartDescription": "sample string 13",
  "PhaseCode": "sample string 14",
  "IssueFromStock": true
}

application/xml, text/xml

Sample:
<JobPart xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <Amount>6</Amount>
  <InvoiceItem>true</InvoiceItem>
  <IssueFromStock>true</IssueFromStock>
  <IssuedQuantity>1</IssuedQuantity>
  <JobPartDescription>sample string 13</JobPartDescription>
  <JobPartId>1</JobPartId>
  <JobSystemId>2</JobSystemId>
  <LaborUnits>9.1</LaborUnits>
  <Location>sample string 7</Location>
  <MasterItemCode>sample string 8</MasterItemCode>
  <MasterJobPartCode>sample string 10</MasterJobPartCode>
  <PartCode>sample string 3</PartCode>
  <PhaseCode>sample string 14</PhaseCode>
  <PurchaseCost>1</PurchaseCost>
  <PurchaseDescription>sample string 11</PurchaseDescription>
  <Quantity>4.1</Quantity>
  <Rate>5</Rate>
  <VendorCode>sample string 12</VendorCode>
</JobPart>