12-05-2018 09:00 AM
I am running the GET
/api/opportunities/{opportunityid}/products/{id}
and the productID field is showing as "00000000-0000-0000-0000-000000000000" for all opportunity products.
This means the data cannot be linked to the product table unless you use the itemnumber field which is not a unique value. As we are a reseller some suppliers have the same itemnumbers.
Am I missing something or is this a bug in the API?
Any assistance appreciated.
Kind Regards
Stuart
04-03-2019 01:43 PM - edited 04-03-2019 01:47 PM
This is just a mapping issue in the API. The ProductID is the Guid for the List of Product's not the Opportunity Product. For some reason it is not mapping. I will open a defect on this.
{ "id": "d96bfd0d-9784-403f-8d96-54efdaac73e3", -- THE OPPORTUNITY PRODUCT ID "name": "IHS", "cost": 120, "createDate": "2019-04-03T13:23:33-07:00", "discount": 0, "discountPrice": 150, "editDate": "2019-04-03T13:23:33-07:00", "itemNumber": "399938", "opportunityID": "d30252b3-9124-41e7-a1c7-2544126d19fd", "price": 150, "productID": "00000000-0000-0000-0000-0000000000000", -- THE LIST OF PRODUCTS ID "quantity": 1, "total": 150, "customFields": { "item_type": null }, "created": "2019-04-03T13:23:33-07:00", "edited": "2019-04-03T13:23:33-07:00", "editedBy": null, "recordOwner": null, "recordManager": "Stephen Burton" }
04-03-2019 02:42 PM
Hi Stephen,
Thanks for responding, albeit it's taken a while for a response.
I understand the fields and their links. The product ID, as far as I am aware would not return a list of products as per your comment. It's a 1-2-1 relationship between the opportunity product and the product table.
It may be just a mapping issue but it's pretty poor that the API has been released without this being checked.
Stuart
04-08-2019 08:23 AM
This has been fixed and will be in the next release of the API v1.0.381.0 or greater.