# Get Orders (Bulk Orders)

Retrieves details for a bulk of orders that have been submitted within a given time range and optionally by order status or customer.

Endpoint: GET /api/orders
Version: 1.3
Security: sec0

## Query parameters:

  - `start_date` (string, required)
    Start date used for filtering orders. Must be a date in the format YYYY-MM-DD.

  - `end_date` (string, required)
    End date used for filtering orders. Must be a date in the format YYYY-MM-DD.

  - `status` (string)
    Current status of an order. Can be one or many order statuses which are comma separated.  Available order statuses can be found here: Order Status

  - `per_page` (integer)
    Number of orders returned in a single response. The maximum is 200.

  - `page` (integer)
    Page to retrieve. The number of pages available is given in the meta object in the response.

  - `account_reference` (string)
    Customer reference that was passed as a parameter when creating an order. Used to retrieve all orders for a customer.

## Header parameters:

  - `Accept` (string)

  - `X-Request-Id` (string)
    This is the correlation ID related to the request.

## Response 200 fields (application/json):

  - `data` (object)

  - `data.orders` (array)

  - `data.orders.id` (string)
    Example: "7f954c2eaea52db2d7e57d839620a764"

  - `data.orders.account_id` (string)
    Example: "564d914ba50d51d67095817f1559e0a7"

  - `data.orders.account_reference` (string)
    Example: "098f6bcd4621d373cade4e832627b4f6"

  - `data.orders.order_type` (string)
    Example: "CRYPTO-BUY"

  - `data.orders.payment_type` (string)
    Example: "POLI"

  - `data.orders.ref` (integer)
    Example: 1

  - `data.orders.fiat_code` (string)
    Example: "AUD"

  - `data.orders.fiat_amount` (integer)
    Example: 200

  - `data.orders.coin_code` (string)
    Example: "BTC"

  - `data.orders.coin_amount` (number)
    Example: 0.015

  - `data.orders.wallet_address` (string)
    Example: "1LbQ1WNTsm1Nzj1hbh3WDCbEim1oUg5rfi"

  - `data.orders.blockchain` (object)

  - `data.orders.blockchain.code` (string)
    Example: "BTC"

  - `data.orders.blockchain.description` (string)
    Example: "Bitcoin"

  - `data.orders.blockchain.contract_id` (any)

  - `data.orders.blockchain.network_id` (any)

  - `data.orders.fee` (number)
    Example: 4.3

  - `data.orders.payment_fee` (integer)

  - `data.orders.commission` (number)
    Example: 0.03

  - `data.orders.tx_hash` (string)
    Example: "323bf75d66fd5a4fe8c903f950d81c5f0170bacd0f872cde8f4f3d6e7c94db35"

  - `data.orders.created_at` (string)
    Example: "2020-06-01 00:20:51"

  - `data.orders.status` (string)
    Example: "complete"

  - `data.orders.meta_data` (string)
    Example: "{'tracking_id': 'HSKJDGHKSJG0393LJKJF'}"

  - `meta` (object)

  - `meta.current_page` (integer)
    Example: 1

  - `meta.from` (integer)
    Example: 1

  - `meta.last_page` (integer)
    Example: 1

  - `meta.per_page` (integer)
    Example: 50

  - `meta.to` (integer)
    Example: 1

  - `meta.total` (integer)
    Example: 1

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.status` (string)
    Example: "422"

  - `errors.title` (string)
    Example: "Invalid Parameters"

  - `errors.detail` (string)
    Example: "Invalid order status: pending. Valid options are: pendingPayment, waitingPayment, paymentReceived, inProgress, coinTransferred, cancelled, declined, expired, complete, refunded"


