Skip to main content
Solved

Is it possible to insert into supplier prices without going through the worksheet?

  • October 13, 2022
  • 4 replies
  • 216 views

Forum|alt.badge.img

I want to use rest API to upload item prices against a vendor, can I directly upload to the “Supplier Price” without going through the worksheet hold and release route?

Best answer by jamesl

I can confirm it’s indeed possible to enter directly using REST API

4 replies

Laura03
Captain II
Forum|alt.badge.img+19
  • Captain II
  • October 13, 2022

Hello James,

I’m not sure about rest API… but we CAN directly type into Vendor Prices screen without a worksheet, and we can Import with Import Scenarios, directly into Vendor Prices without a worksheet…  I expect rest API would have similar capabilities. 

Worst case, I’ve added a post to yours and my action will push your post back to the top of the Active threads list so a developer will be more likely to notice it and confirm for you.

Best regards,

Laura


Forum|alt.badge.img
  • Author
  • Jr Varsity I
  • October 13, 2022

Thanks Laura, yeah I just realised the worksheet is for “last purchased price”, I can directly type into VendorPricesInquiry screen. I am trying to do it over REST API so I can process pricebook imports automatically every night, but i am shooting in the dark at the moment.


Forum|alt.badge.img
  • Author
  • Jr Varsity I
  • Answer
  • October 15, 2022

I can confirm it’s indeed possible to enter directly using REST API


darylbowman
Captain II
Forum|alt.badge.img+15

This is a strange screen, and I'll admit, I had to dig a little, but it is possible to add records to it.

It is an inquiry screen, which means that it behaves differently than other screens. To GET the records, you actually do a PUT. And to CREATE records, you also do a PUT 🙂

 

Here's a 'get': 

PUT: ~/entity/Default/24.200.001/VendorPricesInquiry?$expand=VendorPriceDetails

{
    "InventoryID": {
        "value": "AAPOWERAID"
    }
}

This gets all records for 'AAPOWERAID'

 

Here's a 'create':

PUT: ~/entity/Default/24.200.001/VendorPricesInquiry?$expand=VendorPriceDetails

{
    "InventoryID": {
        "value": "AAPOWERAID"
    },
    "VendorPriceDetails": [
        {
            "Vendor": { "value": "ACADOIT" },
            "InventoryID": { "value": "AAPOWERAID" },
            "UOM": { "value": "EA" },
            "Price": { "value": 123.0 }
        }
    ]
}

This creates a new record for the 'ACADOIT' Vendor. This will also return all 'AAPOWERAID' records. I believe the parameters could be used to reduce the returned records.