ListOrders method

Stay organized with collections Save and categorize content based on your preferences.

This method returns orders by user id, or order ids. The expected retention period for past orders is one year.

Request

ListOrdersRequest

Return value

ListOrdersResponse

// Request to list orders.
message ListOrdersRequest {
  message OrderIds {
    repeated string order_id = 1;
  }

  // Request of orders either by user ID, or by order ID.
  oneof ids {
    // If set, return all orders belong to the user.
    string user_id = 1;

    // If set, return the specified orders.
    OrderIds order_ids = 2;
  }
}

// Response for the ListOrders RPC.
message ListOrdersResponse {
  // All requested orders (required)
  repeated Order order = 1;
}