Airship Developers
HomeAcademy
  • Welcome
  • Rest API
    • Overview
    • Authentication
    • API Reference
    • Accreditation
  • Basics
    • Contacts
      • Write a contact
      • Append feedback
      • Append purchase history
      • Append booking data
      • Append WiFi data
      • Append Stay data
      • Append Loyalty data
      • Append ticket data
      • Append other PoPs
    • Bookings
      • Booking Search by reference
      • Booking Search by data_element
      • Booking Update
    • Search Contact
      • Search PoPs by contact
      • Search contact by Email, Mobile, Name
      • Search contact by voucher
    • Vouchers
      • Redeem voucher code
      • Check voucher code
      • Create Unique Code Group
    • Anonymous purchase data
      • Add anonymous purchase data
    • Units
    • Postman collection
  • SOAP API (legacy)
    • Overview
Powered by GitBook
On this page
  • Configuration
  • Example request
  1. Basics
  2. Search Contact

Search PoPs by contact

Search for specified PoPs for a contact record, within a defined date range.

The get PoP by date will allow you to see all PoPs for a specific contact, and the associated Purchase, Booking, WIFI interaction details.

Configuration

https://api.airship.co.uk/v1/pop/by_date

Headers

Field
Notes

Authentication (bearer token)

The authentication token is linked to the account that you are searching bookings in. If you are unsure of what your Authentication token is, ask our support team to confirm.

Body

Field
Notes

account_id

The account ID represents the account that you are searching bookings in. If you are unsure of what your account ID is, ask our support team to confirm.

contact_id

Contact ID which you want to perform a PoP Search on

start_date

Start date to search for a PoP Required

end_date

End date to search for a PoP Required

types

Array of PoP types, you can add; - purchases - wifi - booking Required

Example request

{
    "account_id": 2,
    "contact_id": 90357243,
    "start_date": "2023-01-03",
    "end_date": "2023-09-03",
    "types" : ["purchases", "booking", "wifi"]
}
{
    "purchases":
    [
        {
            "transaction_lines":
            [
                {
                    "id": 21811807,
                    "description": "TYRRELLS SEA SALT &",
                    "sku": "8507",
                    "quantity": "-1",
                    "value": "1.29"
                },
                {
                    "id": 21811808,
                    "description": "LATTE REGULAR 12oz",
                    "sku": "3001",
                    "quantity": "1",
                    "value": "3.00"
                }
            ],
            "unit_name": "The shack",
            "id": 4753469,
            "contact_id": "90357243",
            "transaction_reference": "wqeqweqeqw-1c96-44fd-bc98-4dab1248ebd2",
            "unit_id": "13835",
            "provider_id": "1",
            "order_type_id": "1",
            "transaction_date": "2023-07-04 12:11:58"
        }
    ],
    "booking":
    {
        "current_page": 1,
        "data":
        [],
        "first_page_url": "https://api.airship.co.uk/v1/pop/by_date?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://api.airship.co.uk/v1/pop/by_date?page=1",
        "next_page_url": null,
        "path": "https://api.airship.co.uk/v1/pop/by_date",
        "per_page": 100,
        "prev_page_url": null,
        "to": null,
        "total": 0
    },
    "wifi":
    {
        "current_page": 1,
        "data":
        [],
        "first_page_url": "https://api.airship.co.uk/v1/pop/by_date?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://api.airship.co.uk/v1/pop/by_date?page=1",
        "next_page_url": null,
        "path": "https://api.airship.co.uk/v1/pop/by_date",
        "per_page": 100,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "contact_id": [
            "This contact does not belong to this account"
        ]
    }
}

The results will return the PoPs by type, in an array if there are more than 1 interaction within that range

PreviousSearch ContactNextSearch contact by Email, Mobile, Name

Last updated 1 year ago