AnsweredAssumed Answered

How to affect "position" field in Products, ProductBundles, and ProductBundleNotes via REST API

Question asked by Dean Yeaton on Oct 25, 2017
Latest reply on Nov 1, 2017 by Matt Marum

Hello, I am trying to create and update Quotes via the v10 REST API using our Data Integration Tool.  For Products, ProductBundles, and ProductBundleNotes, I am trying to send a value for the "position" field and it does not appear to be recognized by the API.  No matter what value I send for the position field, the given record gets created with position 0.  This all seems to work correctly when you enter the quote directly through the SugarCRM API.  Here is an example of the data to create a Product on a quote that we are sending to the API in a POST Request:

 

data={"quote_id":"ef311a06-b8c7-11e7-8eb2-00155dfe2210","product_template_id":"bc779dfe-a9ce-11e7-88f3-00155dfe2210","list_price":654.890000,"list_usdollar":654.890000,"base_rate":1.000000,"category_name":null,"category_id":null,"cost_price":322.440000,"cost_usdollar":322.440000,"currency_id":"-99","currency_name":null,"currency_symbol":null,"description":null,"discount_price":567.990000,"discount_usdollar":567.990000,"manufacturer_id":null,"manufacturer_name":null,"mft_part_num":null,"name":"Dean Product2","pricing_factor":null,"pricing_formula":"Array","product_template_name":"Dean Product2","tax_class":"Taxable","type_id":null,"type_name":null,"vendor_part_num":null,"website":null,"weight":null,"quantity":2.3300,"position":1}

 

As you can see at the end of the request data, we are sending "position":1 but the Product is created with position 0.

Any help with this would be appreciated.

 

Thank you .

Dean........

Outcomes