Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
kennethprose
New Member

Data from API

Hi everyone. 

I'm having big problems retreving some data from an restfull api. 

APi documentation example looks like this. 


Product

Usage

This endpoints allows retrieveal, creation, modification and deletion of products in Warehouze, it also allows retrieval of stock quantities pr. warehouse.

Get

Call requires at least one property name, blank query is allowed.

 

Product Properties
Name Type Description Updatable
AdjustedInStockQtyDecimal False
BarcodeString True
BarredBoolean True
BaseNumberString False
ColliQtyDecimal False
CompanyIdInt32 False
CreationDateDateTime False
CustomProductPropertyFiveString False
CustomProductPropertyFourString False
CustomProductPropertyOneString False
CustomProductPropertyThreeString False
CustomProductPropertyTwoString False
DataSourceDataSource0 Economic, 1 SmartWeb, 2 Local, 3 Magento, 4 GoldenPlanet, 5 Shopify, 6 WooCommerce, 7 FakturaFil, 8 IEXFalse
DeliveryDaysInt32 True
ExtraCostsDecimal False
GroupIdInt32 False
HeightDecimal False
IdInt32 False
IncludeInShoppinglistBoolean False
IsCollectionMasterBoolean False
IsMasterBoolean False
LastUpdatedDateTime False
LengthDecimal False
LocationIdInt32 False
NameString True
NotesString True
NotificationsString False
NumberString False
OrderedByCustomersQtyDecimal False
OrderedFromSuppliersQtyDecimal False
PoQtyMinDecimal False
SelectedVariantType1String False
SelectedVariantType2String False
ShippingMethodString False
ShippingPriceDecimal False
ShoppingQtyDecimal False
StockQtyDecimal False
SupplierIdInt32 True
SupplierProductNumberString True
TurnoverQtyDecimal False
UnitCostPriceDecimal False
UnitIdInt32 False
UnitPriceDecimal False
UnitSalesPriceDecimal False
VariantMasterIdInt32 False
VolumeDecimal False
WarehouseIdInt32 False
WeightDecimal False
WidthDecimal False
 
Sample Get call
        var request = {
            Token: "Insert your token here",
            Query: [
                              "Number=130",
                              "WarehouseNumber=1",
            ],
            Properties: [
                            "Id",
                            "Name",
                            "StockQty",
            ],
        };
        $.ajax({
            url: "https://api.warehouze.io/Product",
            data: request,
            dataType: 'text',
            type: "GET",
            traditional: true,
            success: function (data) {
                console.log(data);
            },
            error: function (data, xHr) {
                console.log(data);
                console.log(xHr);
            }
        });
            

Can anyone help me how to extract data?

1 REPLY 1
lbendlin
Super User
Super User

You can't have a GET request with a payload in Power BI (or anywhere, I think).  It has to be a POST request.

 

Power BI does all that automatically via Web.Contents and Json.FromValue 

 

for example:

 

let
URL = "http://xxx/tstat",

headers = [#"Content-Type"="application/json"],
data = Json.FromValue([tmode = 2,t_cool = Setpoint,hold = 0]),
web = Web.Contents(URL, [ Content = data, Headers = headers, ManualStatusHandling = {404, 400}]),
result = Json.Document(web)

in result

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors