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
  • Endpoint
  • Response
  1. Basics

Units

From the API, you are able to obtain a list of current active Units (venues / locations).

The API user is linked to an Airship account, and all the units associated to that account will be returned, paginated in the response.

Endpoint

https://api.airship.co.uk/v1/account/units

Response

Fields

Field
Notes

Airships unique unit ID for the unit. It is required when sending Airship data

The unit name

Each Airship account has a 'root' account (typically named Head Office) - this is used for data that can't be associated with a specific location. Only 1 root account can be setup for each account, and is identified by this flag

Example response

{
    "current_page": 1,
    "data": [
        {
            "id": 13822,
            "name": "Head Office",
            "is_root": true
        },
        {
            "id": 13835,
            "name": "The shack",
            "is_root": false
        }
    ],
    "first_page_url": "https://api.airship.co.uk/v1/account/units?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://api.airship.co.uk/v1/account/units?page=1",
    "next_page_url": null,
    "path": "https://api.airship.co.uk/v1/account/units",
    "per_page": 100,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
PreviousAdd anonymous purchase dataNextPostman collection

Last updated 11 months ago

id
name
is_root