Events

Create and store event information for use with event tickets. When creating event tickets, you can reference an event, automatically populating event information on the pass. By storing and referencing event information independently of your passes, you can update a single event, automatically pushing an update to all passes referencing it.

Add event to pass group

Add an event to a pass group. You can target the group to make changes to multiple events.

Jump to examples ↓

POST /events/project/{projectId}/{eventId}/passGroups

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. Use the Airship-generated project ID or project’s external ID. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want modify groups for. For External IDs, format the {eventId} as id/{eventExternalId}.

Request body:

  • Content-Type: application/json

    OBJECT PROPERTIES
    • passGroups array[string]

      An array of pass groups that you want to create and add an event to. If an event already belongs to a pass group (string) in the array, it is ignored.

Responses

  • 200

    The event was successfully added to one or more passGroups.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • eventId integer

        The event added to the pass group.

      • passGroups array[string]

        An array of pass groups that the event was added to.

  • 400

    Missing or malformed input.

  • 404

    The event or project cannot be found.

Examples

Example request

POST /v1/events/project/12345/1234/passGroups HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
    "passGroups": [
        "EVENT_100_LUNCH",
        "EVENT_100_DINNER"
    ]
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "eventId": 1234,
    "passGroups": [
        "EVENT_100_LUNCH",
        "EVENT_100_DINNER"
    ]
}

Example request with external ID

POST /v1/events/project/id/67890/id/4567/passGroups HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
    "passGroups": [
        "EVENT_100_LUNCH",
        "EVENT_100_DINNER"
    ]
}

Response with external ID

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "eventExternalId" : "4567",
  "passGroups" :["EVENT_100_LUNCH","EVENT_100_DINNER"]
}

Create event

Create an event.

If your request uses an eventExternalId already associated with an existing event, the call is treated as a PUT, and updates the existing event. As with the PUT method, any fields not contained in the request are unchanged.

Jump to examples ↓

POST /events/project/{projectId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project you want to create the event in.

Request body:

  • Content-Type: application/json

    Represents an event scheduled at a specific time and venue.

Responses

  • 201

    The event was successfully created. A successful request returns the eventId and eventExternalId (if applicable) values, so you can reference the event in later operations.

    • Content-Type: application/json

      An event response returns identifiers that you can use to reference the event in other endpoints, along with the complete event request body.

Examples

Example request

POST /v1/events/project/12345 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": { "value": "LA Dodgers at SF Giants" },
    "venueTitle": { "value": "AT&T Park" },
    "venueAddress": { "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" },
     "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T08:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T09:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T11:00:00"
    }
  }
}

Response

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "passGroups": ["giants_2019-09-25"],
  "eventId": 1234,
  "projectId": 12345,
  "createdAt": "2018-09-24T09:12:32Z",
  "updatedAt": "2018-09-24T09:12:32Z",
  "fields": {
    "eventName": {
      "label": "Event",
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "label": "Venue",
      "value": "AT&T Park"
    },
    "venueAddress": {
      "label": "Address",
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T08:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T09:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T11:00:00"
    }
  }
}

Create event with external ID

Create an event with external IDs.

If your request uses an eventExternalId already associated with an existing event, the call is treated as a PUT, and updates the existing event. As with the PUT method, any fields not contained in the request are unchanged.

Jump to examples ↓

POST /events/project/id/{projectExternalId}/id/{eventExternalId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectExternalId stringREQUIRED
    The external ID of the project you want to create the event in or of the project the existing event belongs to.
  • eventExternalId stringREQUIRED
    A custom identifier for an event. This is the event you want to create, get, modify, or delete.

Request body:

  • Content-Type: application/json

    Represents an event scheduled at a specific time and venue.

Responses

  • 201

    The event was successfully created. A successful request returns the eventId and eventExternalId (if applicable) values, so you can reference the event in later operations.

    • Content-Type: application/json

      An event response returns identifiers that you can use to reference the event in other endpoints, along with the complete event request body.

Examples

Example request

POST /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": {
      "label": "Event",
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "label": "Venue",
      "value": "AT&T Park"
    },
    "venueAddress": {
      "label": "Address",
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T08:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T09:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T11:00:00"
    }
  }
}

Delete event

Deletes the specified event.

Jump to examples ↓

DELETE /events/project/{projectId}/{eventId}

Security:

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want to get, update, or delete. For External IDs, format the {eventId} as id/{eventExternalId}.

Responses

  • 200

    The event was deleted.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • ok boolean

        If true, the operation completed successfully.

Examples

Example request

DELETE /v1/events/project/12345/1 HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

DELETE /v1/events/project/id/67890/id/4567 HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{}

Get event

Returns information about a single event.

Jump to examples ↓

GET /events/project/{projectId}/{eventId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want to get, update, or delete. For External IDs, format the {eventId} as id/{eventExternalId}.

Responses

  • 200

    A successful request returns the eventId and eventExternalId (if applicable) values, so you can reference the event in later operations.

    • Content-Type: application/json

      An event response returns identifiers that you can use to reference the event in other endpoints, along with the complete event request body.

Examples

Example request

GET /v1/events/project/12345/1234 HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "eventId": 1234,
  "projectId": 12345,
  "createdAt": "2018-09-24T09:12:32Z",
  "updatedAt": "2018-09-24T09:12:32Z",
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": {
      "label": "Event",
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "label": "Venue",
      "value": "AT&T Park"
    },
    "venueAddress": {
      "label": "Address",
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T09:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T10:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T12:00:00"
    }
  }
}

Example request with external ID

GET /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response with external ID

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "eventId": 1234,
  "eventExternalId": "event123ExtId",
  "projectId": 12345,
  "projectExternalId": "project123ExtId",
  "createdAt": "2018-09-24T09:12:32Z",
  "updatedAt": "2018-09-24T09:12:32Z",
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": {
      "label": "Event",
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "label": "Venue",
      "value": "AT&T Park"
    },
    "venueAddress": {
      "label": "Address",
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T09:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T10:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T12:00:00"
    }
  }
}

List pass groups for event

Returns a list of pass groups associated with an event.

Jump to examples ↓

GET /events/project/{projectId}/{eventId}/passGroups

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. Use the Airship-generated project ID or project’s external ID. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want modify groups for. For External IDs, format the {eventId} as id/{eventExternalId}.

Responses

  • 200

    Returns a list of pass groups that an event is associated with.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • eventId integer

        The Airship-generated ID of the event in the request.

      • passGroups array[string]

        An array of the pass groups that the event belongs to.

  • 400

    Missing fields or malformed input.

  • 404

    The event or project cannot be found.

Examples

Example request

GET /v1/events/project/12345/1234/passGroups HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

GET /v1/events/project/id/project123ExtId/id/event123ExtId/passGroups HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8 

{
    "eventTicketId": 1234,
    "passGroups": [
        "EVENT_100_LUNCH",
        "FLIGHT_100_DINNER"
    ]
}

Remove event from pass group

Removes an event from a pass group. The group specified in the path will no longer appear in the event’s passGroups array, nor will you be able to make changes to the event by targeting the pass group.

Jump to examples ↓

DELETE /events/project/{projectId}/{eventId}/passGroups/{passGroup}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. Use either the Airship-generated project ID or the external ID. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want modify groups for. Use either the Airship-generated event ID or the external ID for the event. For External IDs, format the {eventId} as id/{eventExternalId}.
  • passGroup stringREQUIRED
    The pass group you want to remove the event from.

Responses

  • 200

    The event was removed from the pass group.

  • 400

    The project, event, or pass group was not found.

Examples

Example request

DELETE /v1/events/project/12345/1234/passGroups/EVENT_100_LUNCH HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

DELETE /v1/events/project/id/project123ExtId/id/event123ExtId/passGroups/EVENT_100_LUNCH HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8

{}

Update event

Update any of the keys provided in the fields object of an Event Request. Provide only the fields you want to update; any fields that you omit from the payload remain unchanged.

Jump to examples ↓

PUT /events/project/{projectId}/{eventId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. For External IDs, format the {projectId} as id/{projectExternalId}.
  • eventId integerREQUIRED
    The event you want to get, update, or delete. For External IDs, format the {eventId} as id/{eventExternalId}.

Request body:

  • Content-Type: application/json

    OBJECT PROPERTIES
    • fields object

Responses

  • 200

    A successful request returns the complete, updated event object and the eventId and eventExternalId (if applicable) values, so you can reference the updated event in later operations.

    • Content-Type: application/json

      An event response returns identifiers that you can use to reference the event in other endpoints, along with the complete event request body.

Examples

Example request

PUT /v1/events/project/12345/1234 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "fields": {
    "doorsOpen": { "value": "2019-09-25T09:35:00" },
    "startTime": { "value": "2019-09-25T10:00:00" },
    "endTime": { "value": "2019-09-25T12:00:00" }
  }
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "eventId": 1234,
  "projectId": 12345,
  "createdAt": "2018-09-24T09:12:32Z",
  "updatedAt": "2018-09-24T09:12:32Z",
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": {
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "value": "AT&T Park"
    },
    "venueAddress": {
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T09:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T10:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T12:00:00"
    }
  }
}

Example request with external ID

PUT /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "fields": {
    "doorsOpen": { "value": "2019-09-25T09:35:00" },
    "startTime": { "value": "2019-09-25T10:00:00" },
    "endTime": { "value": "2019-09-25T12:00:00" }
  }
}

Response with external ID

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "eventId": 1234,
  "eventExternalId": "event123ExtId",
  "projectId": 12345,
  "projectExternalId": "project123ExtId",
  "createdAt": "2018-09-24T09:12:32Z",
  "updatedAt": "2018-09-24T09:12:32Z",
  "passGroups": ["giants_2019-09-25"],
  "fields": {
    "eventName": {
      "value": "LA Dodgers at SF Giants"
    },
    "venueTitle": {
      "value": "AT&T Park"
    },
    "venueAddress": {
      "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107"
    },
    "doorsOpen": {
      "label": "Doors Open",
      "value": "2019-09-25T09:35:00"
    },
    "startTime": {
      "label": "Start Time",
      "value": "2019-09-25T10:00:00"
    },
    "endTime": {
      "label": "End Time",
      "value": "2019-09-25T12:00:00"
    }
  }
}

Update events in a pass group

Update all of the events in a pass group.

Jump to examples ↓

PUT /events/project/{projectId}/passGroups/{passGroup}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId integerREQUIRED
    The project that the event belongs to. For External IDs, format the {projectId} as id/{projectExternalId}.
  • passGroup integerREQUIRED
    The pass group that you want to modify.

Request body:

Update fields common to multiple events.

  • Content-Type: application/json

    OBJECT PROPERTIES
    • fields object

      Provide only the keys that you want to update from fields object of an Event Request; any fields that you omit from the payload remain unchanged.

Responses

  • 200

    The update was successful.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • events array[object]

        Lists the events updated as a part of this pass group.

      • groupName string

        The pass group that you updated in this request.

  • 400

    The request was malformed.

  • 404

    The project ID or pass group was not found.

Examples

Example request

PUT /v1/events/project/myFavProject/passGroups/giants_2019-09-25 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "fields": {
    "venueTitle": {
      "value": "Oracle Park"
    }
  }
}

Example request with external ID

PUT /v1/events/project/id/myFavProject/passGroups/giants_2019-09-25 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "fields": {
    "venueTitle": {
      "value": "Oracle Park"
    }
  }
}

Response

HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8 

{
  "groupName" : "giants_2019-09-25", 
  "events" : [
    {
      "eventTicketId" : 123
    },
    {
      "eventTicketId" : 456
    }
  ]
}