Business Orders

Return all orders for specific business.

Parameters
  • idpath integerRequired

    Return all orders by the specific business id. You can retrieve this id from ...

  • includequery string

    Include associations (delimited with comma). Available associations: addresses, elements, business.

    Example: addresses,elements,business

  • sortquery string

    Sort ascending or descending order.

  • channelquery string filter

    Filter by channel.

  • dayquery date filter

    Filter by Date, the format should be ISO date.

  • statesquery string filter

    Filter by states.

  • order_typequery string filter

    Filter by order type.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/businesses/{id}/orders

{
  const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/orders`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}

RESPONSE

{
  "data": [
    {
      "id": "7122ef0d-1138-4112-8f7a-c8b4ae2c38a3",
      "type": "orders",
      "links": {
        "self": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3"
      },
      "attributes": {
        "accepted-at": "2021-10-06T09:37:38.122Z",
        "collection-at": null,
        "collection-code": null,
        "currency": "GBP",
        "customer-name": null,
        "dishes-cost-cents": 2000,
        "driver-location-lat": null,
        "driver-location-long": null,
        "estimated-delivery-in": 15,
        "estimated-time-of-dropoff": null,
        "estimated-time-of-pickup": null,
        "notes": {},
        "other-rejection-reason": null,
        "origin": null,
        "hubrise-source": null,
        "hubrise-service-type": null,
        "pickup-at-business": false,
        "placed-at": "2021-10-06T09:34:27.088Z",
        "reject-reason": null,
        "shipping-cost-cents": 535,
        "shipping-cost-for-business-cents": 0,
        "shipping-cost-for-customer-cents": 535,
        "short-id": 1,
        "state": "completed",
        "time-wish": "as soon as possible",
        "total-cost-cents": 2535,
        "unavailable-elements": null,
        "updated-at": "2021-10-06T09:38:59.847Z",
        "user-email": "aleksandra.bochenska+client@netguru.com",
        "user-phone": "7912123456",
        "user-phone-country-code": "GB",
        "user-phone-country-prefix": "44",
        "with-orkestro-delivery": true
      },
      "relationships": {
        "addresses": {
          "links": {
            "self": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/relationships/addresses",
            "related": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/addresses"
          }
        },
        "elements": {
          "links": {
            "self": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/relationships/elements",
            "related": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/elements"
          }
        },
        "business": {
          "links": {
            "self": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/relationships/business",
            "related": "/orders/7122ef0d-1138-4112-8f7a-c8b4ae2c38a3/business"
          }
        }
      }
    },
  ],
  "meta": {
    "total-count": 430,
    "total-pages": 43
  }
}

Business Orders Partners

Return all business partners used to make orders.

Parameters
  • idpath integerRequired

    Return all business partners used to make orders by the specific business id. You can retrieve this id from ...

  • includequery string

    Include associations (delimited with comma). Available associations: addresses, elements, business.

    Example: addresses,elements,business

GET/api/v1/businesses/{id}/orders/orders_partners

  {
    const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/orders/orders_partners`, {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json'
      }});
    const data = await res.json();
  }

RESPONSE