Business Cards

Return all cards successfully used by specific business.

If any erros occur you can access the errors guide.

Parameters
  • idpath integerRequired

    Returns all cards successfully used by specific business id. You can retrieve this id from ...

  • includequery string

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

  • sortquery string

    Sort ascending or descending order.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

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

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

RESPONSE

{
  "data": [
    {
      "id": "15cc2af5-a33a-4ccc-bc9b-1c74ecbc59a8",
      "type": "cards",
      "links": {
        "self": "/cards/15cc2af5-a33a-4ccc-bc9b-1c74ecbc59a8"
      },
      "attributes": {
        "stripe-source-id": "pm_1Jw7FIBtvCfXmRItGquxmkDn",
        "last4": "4242",
        "expiration-date": "2022-02-01",
        "brand": "visa"
      },
      "relationships": {
        "user": {
          "links": {
            "self": "/cards/15cc2af5-a33a-4ccc-bc9b-1c74ecbc59a8/relationships/user",
            "related": "/cards/15cc2af5-a33a-4ccc-bc9b-1c74ecbc59a8/user"
          }
        }
      }
    }
  ],
  "meta": {
    "total-count": 3,
    "total-pages": 1
  }
}