I did this recently. Creating the quote header was fairly straightforward with a POST:
server/api/v1/Erp.BO.QuoteSvc/Quotes
{
"Company": CompanyID,
"QuoteNum":0,
"CustomerCustID":CustID,
"CustNum":CustNum,
"ShipToCustNum":CustNum,
"PrcConNum":ConNum,
"ConName":ConName,
"ECCComment":"Generated from website by " + UserEmail
"MktgCampaignID": "DEFAULT",
"MktgEvntSeq": 1,
"TerritoryID":TerritoryID,
}
The response data will have the quote number you just created.
The quote lines were similar but a little more involved because for some reason the price and discount is not calculated or applied properly when the record is created:
server/api/v1/Erp.BO.QuoteSvc/QuoteDtls
{
"Company": CompanyID,
"QuoteNum":QuoteNum,
"QuoteLine":0,
"PartNum":"Web",
"LineDesc":PartDescription,
"CustNum":CustNum,
"CustomerCustID":CustID,
"OrderQty":"1",
"SellingExpectedQty":"1",
"DocExpUnitPrice": Price,
"ProdCode":ProdGroup
}
Then do a PATCH with the Price again - for some reason it doesn’t take on the new record.
{
"DocExpUnitPrice": Price
}
Then get the discount and externally calculate the discount amount and do a PATCH to apply this amount:
{
"DocDspDiscount":Discount
}