Closed jmawebtech closed 4 years ago
If I change the API format to JSON, the code finds no orders. Here is a valid response.
ods.txt
config = new ClientConfig(clientId, clientSecret); config.ChannelType = channelType; config.ApiFormat = Sdk.Base.Primitive.ApiFormat.JSON;
The ordersList returns no orders in the elements object:
public OrdersListType SearchOrders(DateTime beginTime, DateTime endTime, OrderLineStatusValueType ty) { var apiClient = new ApiClient(config); var ordersEndpoint = new OrderEndpoint(apiClient); OrderFilter filter = new OrderFilter(); if (ty == OrderLineStatusValueType.Shipped) { filter.Status = OrderLineStatusValueType.Shipped; } filter.CreatedEndDate = endTime; filter.CreatedStartDate = beginTime; filter.Limit = 20; OrdersListType orderList = new OrdersListType(); try { orderList = ordersEndpoint.GetAllOrders(filter).Result; } catch (Exception ex) { } return orderList; }
Looks like this issue takes longer to fix, meanwhile i recommend to use xml format, it should be transparent for you
If I change the API format to JSON, the code finds no orders. Here is a valid response.
ods.txt
The ordersList returns no orders in the elements object: