Business Deliveries

Return all deliveries for specific business.

Parameters
  • idpath integerRequired

    Returns all deliveries by the specific business id. You can retrieve this id from ...

  • includequery string

    Include associations (delimited with comma). Available associations: business.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

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

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

RESPONSE

{
  "url": "/api/v1/businesses/{id}/deliveries",
  "method": "GET",
  "data": [
    {
      "id": "2b96692f-4e1e-49d7-80b5-658611b908d2",
      "type": "deliveries",
      "links": {
        "self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2"
      },
      "attributes": {
        "code": "CH-1005",
        "currency": "EUR",
        "free-from-cents": 3500,
        "price-cents": 600
      },
      "relationships": {
        "business": {
          "links": {
            "self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/relationships/business",
            "related": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/business"
          }
        }
      }
    },
  ],
  "meta": {
    "total-count": 4,
    "total-pages": 1
  }
}

Business Deliveries By Code

Return a delivery for specific business.

Parameters
  • idpath integerRequired

    Return a delivery by the specific business id. You can retrieve this id from ...

  • codepath integer

    Provided a delivery code.

  • includequery string

    Include associations (delimited with comma). Available associations: business.

GET/api/v1/businesses/{id}/deliveries/{code}

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

RESPONSE

{
  "data": {
    "id": "2b96692f-4e1e-49d7-80b5-658611b908d2",
    "type": "deliveries",
    "links": {
      "self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2"
    },
    "attributes": {
      "code": "CH-1005",
      "currency": "EUR",
      "free-from-cents": 3500,
      "price-cents": 600
    },
    "relationships": {
      "business": {
        "links": {
          "self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/relationships/business",
          "related": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/business"
        }
      }
    }
  }
}