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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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