Getting orders

Community Forum

Ask a Question
Back to All

Getting orders

var options = new RestClientOptions("https://prod01-apigw.companyx.fabric.zone/api-order/orders/orderNumber/"+OrderID);
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
request.AddHeader("x-api-key", "aasdfsadf");
try
{
var response = await client.GetAsync(request);
string tmp = response.Content;
OrdersListAPI.OrdersContainer Orders = GetOrderList(tmp);
ShowOrders(Orders);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

When I run the code I get InternalServerError. Any idea what I am doing wrong?