PUT api/PurchaseOrderExpense/{id}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Body Parameters

PurchaseOrderExpense
NameDescriptionTypeAdditional information
PurchaseOrderExpenseId

Sedona internal autonumber for the PO Expense record

integer

None.

PurchaseOrderId

Foreign key from AP_Purchase_Order table; required only for POST, ignored on PUT

integer

None.

AccountCode

Expense Account from GL_Account table

string

String length: inclusive between 0 and 30

Quantity

integer

None.

Rate

decimal number

None.

Amount

Calculated on the server, no need to set when adding or updating PO expenses

decimal number

None.

Description

string

String length: inclusive between 0 and 50

CustomerNumber

Customer Number from AR_Customer table; seen by Sedona users

string

String length: inclusive between 0 and 15

JobCode

Value from OE_Job table; defaults to 000 if not set explicitly

string

String length: inclusive between 0 and 25

TicketNumber

Service Ticket Number from SV_Service_Ticket table

integer

None.

CategoryCode

Category_Code from AR_Category table

string

String length: inclusive between 0 and 25

ExpenseTypeCode

Expense Code from GL_Expense_Type table

string

Required

String length: inclusive between 0 and 25

Request Formats

application/json, text/json

Sample:
{
  "PurchaseOrderExpenseId": 1,
  "PurchaseOrderId": 2,
  "AccountCode": "sample string 3",
  "Quantity": 1,
  "Rate": 1.0,
  "Amount": 1.0,
  "Description": "sample string 4",
  "CustomerNumber": "sample string 5",
  "JobCode": "sample string 6",
  "TicketNumber": 1,
  "CategoryCode": "sample string 7",
  "ExpenseTypeCode": "sample string 8"
}

application/xml, text/xml

Sample:
<PurchaseOrderExpense xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models">
  <AccountCode>sample string 3</AccountCode>
  <Amount>1</Amount>
  <CategoryCode>sample string 7</CategoryCode>
  <CustomerNumber>sample string 5</CustomerNumber>
  <Description>sample string 4</Description>
  <ExpenseTypeCode>sample string 8</ExpenseTypeCode>
  <JobCode>sample string 6</JobCode>
  <PurchaseOrderExpenseId>1</PurchaseOrderExpenseId>
  <PurchaseOrderId>2</PurchaseOrderId>
  <Quantity>1</Quantity>
  <Rate>1</Rate>
  <TicketNumber>1</TicketNumber>
</PurchaseOrderExpense>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.