GetOrderRequest is no more (use API v2)

Hi,

I am using “get_order” from API v1.1 to retrieve a particular order thanks to order id.
Since yesterday, it appears this is not available anymore (see https://github.com/wix/openrest4j/tree/master/openrest4j-api/src/main/java/com/wix/restaurants/orders/requests last commit : GetOrderRequest is no more (use API v2).

How can I know do that?
Thanks for your help

Current code (in wix backend):

let wixRestaurantAPIUrl = "https://api.wixrestaurants.com/v1.1";
let wixBody = {
 "type":"get_order", 
 "orderId":orderId,  
 "viewMode":"restaurant", 
 "accessToken":accessToken
    };
 
let res = null;
 try {
        res = await fetch (wixRestaurantAPIUrl, { "method": "POST","body":JSON.stringify(wixBody),  "headers": { "Content-Type": "application/json" }});
    }
....

The link you provide has nothing to do with Wix or Wix Code.
Refer to the wix-fetch.fetch() API documentation. Also see the article Accessing 3rd-Party Services .

Hi

You can see in the code that I am already using wix fetch API…

Also as the link points to wix.com github, ans as the last commit I’m referring to was made by Danny Leshem, Director of Wix.com, I am sure it has everything to do with Wix…

I’ll ask him directly.

cheers

This can be done in API v2:

curl -H “Authorization: Bearer [access_token]” “https://api.wixrestaurants.com/v2/organizations/:organizationId/orders/:orderId?viewMode=restaurant

Thanks a lot for your help Danny, much appreciated.

Is there any link where we can find the complete API v2 documentation ?

Cheers

We’re working on adding it to developers.wixrestaurants.com.