Access Lists

Access list represents a list having records (access list entries which represent codes). There are different uses for these list, one of them is that the code can be exchanged to a ticket in access control scenarios (Tap & Go).

The Access List object

Required attributes

  • Name
    _id
    Type
    string
    Description

    The ID of the access list.

  • Name
    type
    Type
    enum(static, remote)
    Description

    The type of the access list.

  • Name
    sellerId
    Type
    string
    Description

    The ID of the seller of the access list.

  • Name
    name
    Type
    string
    Description

    The name of the access list.

Optional attributes

  • Name
    http
    Type
    object
    Description

    The remote URL of the access list.

    Required nested attributes (1)
    • Name
      url
      Type
      string
      Description

      The remote URL of the access list.

    Optional nested attributes (1)
    • Name
      hmacKey
      Type
      string
      Description

      The HMAC key used to sign requests to the remote URL.

Example

{
  "_id": "507f191e810c19729de860ea",
  "type": "static",
  "sellerId": "507f191e810c19729de860ea",
  "name": "Example Name",
  "http": {
    "url": "https://example.com",
    "hmacKey": "string"
  }
}

POST/api/access-lists

Create an Access List

Create an Access List

Payload

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the access list.

Optional attributes

  • Name
    http
    Type
    object
    Description

    The remote URL of the access list.

    Required nested attributes (1)
    • Name
      url
      Type
      string
      Description

      The remote URL of the access list.

    Optional nested attributes (1)
    • Name
      hmacKey
      Type
      string
      Description

      The HMAC key used to sign requests to the remote URL.

  • Name
    type
    Type
    enum(static, remote)
    Description

    The type of the access list.

Request

POST
/api/access-lists
const response = await fetch('https://vivenu.com/api/access-lists', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "name": "Example Name",
    "http": {
      "url": "https://example.com",
      "hmacKey": "string"
    },
    "type": "static"
  }),
})

const data = await response.json()

Response (201)

{
  "_id": "507f191e810c19729de860ea",
  "type": "static",
  "sellerId": "507f191e810c19729de860ea",
  "name": "Example Name",
  "http": {
    "url": "https://example.com",
    "hmacKey": "string"
  }
}

GET/api/access-lists/:id

Get an Access List

Get an Access List

Request

GET
/api/access-lists/:id
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "type": "static",
  "sellerId": "507f191e810c19729de860ea",
  "name": "Example Name",
  "http": {
    "url": "https://example.com",
    "hmacKey": "string"
  }
}

PUT/api/access-lists/:id

Update an Access List

Update an Access List

Payload

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the access list.

Optional attributes

  • Name
    http
    Type
    object
    Description

    The remote URL of the access list.

    Required nested attributes (1)
    • Name
      url
      Type
      string
      Description

      The remote URL of the access list.

    Optional nested attributes (1)
    • Name
      hmacKey
      Type
      string
      Description

      The HMAC key used to sign requests to the remote URL.

Request

PUT
/api/access-lists/:id
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "name": "Example Name",
    "http": {
      "url": "https://example.com",
      "hmacKey": "string"
    }
  }),
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "type": "static",
  "sellerId": "507f191e810c19729de860ea",
  "name": "Example Name",
  "http": {
    "url": "https://example.com",
    "hmacKey": "string"
  }
}

GET/api/access-lists

Get Access Lists

Get Access Lists

Query parameters

Optional query parameters

  • Name
    name
    Type
    string
    Description
  • Name
    skip
    Type
    number
    Description
  • Name
    top
    Type
    number
    Description

Request

GET
/api/access-lists
const response = await fetch('https://vivenu.com/api/access-lists?name=Example+Name&skip=10.5&top=10.5', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "docs": [],
  "total": 1
}

The Access List Entry object

Required attributes

  • Name
    _id
    Type
    string
    Description

    The ID of the access list entry.

  • Name
    listId
    Type
    string
    Description

    The ID of the access list of the access list entry.

  • Name
    externalCode
    Type
    string
    Description

    The external code of the access list entry.

  • Name
    sellerId
    Type
    string
    Description

    The ID of the seller of the access list entry.

Optional attributes

  • Name
    customerId
    Type
    string
    Description

    The ID of the customer of the access list entry.

  • Name
    firstname
    Type
    string
    Description

    The first name of the access list entry.

  • Name
    lastname
    Type
    string
    Description

    The last name of the access list entry.

  • Name
    email
    Type
    string
    Description

    The email of the access list entry.

  • Name
    phone
    Type
    string
    Description

    The phone number of the access list entry.

  • Name
    meta
    Type
    object
    Description

    The key-value pairs of the extra data of the access list entry.

Example

{
  "_id": "507f191e810c19729de860ea",
  "listId": "507f191e810c19729de860ea",
  "externalCode": "string",
  "sellerId": "507f191e810c19729de860ea",
  "customerId": "507f191e810c19729de860ea",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "phone": "string",
  "meta": {}
}

POST/api/access-lists/:listId/entries

Create an Access List Entry

Create an Access List Entry

Payload

Required attributes

  • Name
    externalCode
    Type
    string
    Description

    The external code of the access list entry.

Optional attributes

  • Name
    customerId
    Type
    string
    Description

    The ID of the customer of the access list entry.

  • Name
    firstname
    Type
    string
    Description

    The first name of the access list entry.

  • Name
    lastname
    Type
    string
    Description

    The last name of the access list entry.

  • Name
    email
    Type
    string
    Description

    The email of the access list entry.

  • Name
    phone
    Type
    string
    Description

    The phone number of the access list entry.

  • Name
    meta
    Type
    object
    Description

    The key-value pairs of the extra data of the access list entry.

Request

POST
/api/access-lists/:listId/entries
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea/entries', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "externalCode": "string",
    "customerId": "507f191e810c19729de860ea",
    "firstname": "string",
    "lastname": "string",
    "email": "example@vivenu.com",
    "phone": "string",
    "meta": {}
  }),
})

const data = await response.json()

Response (201)

{
  "_id": "507f191e810c19729de860ea",
  "listId": "507f191e810c19729de860ea",
  "externalCode": "string",
  "sellerId": "507f191e810c19729de860ea",
  "customerId": "507f191e810c19729de860ea",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "phone": "string",
  "meta": {}
}

GET/api/access-lists/:listId/entries/:id

Get an Access List Entry

Get an Access List Entry

Request

GET
/api/access-lists/:listId/entries/:id
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea/entries/507f191e810c19729de860ea', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "listId": "507f191e810c19729de860ea",
  "externalCode": "string",
  "sellerId": "507f191e810c19729de860ea",
  "customerId": "507f191e810c19729de860ea",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "phone": "string",
  "meta": {}
}

PUT/api/access-lists/:listId/entries/:id

Update an Access List Entry

Update an Access List Entry

Payload

Required attributes

  • Name
    externalCode
    Type
    string
    Description

    The external code of the access list entry.

Optional attributes

  • Name
    customerId
    Type
    string
    Description

    The ID of the customer of the access list entry.

  • Name
    firstname
    Type
    string
    Description

    The first name of the access list entry.

  • Name
    lastname
    Type
    string
    Description

    The last name of the access list entry.

  • Name
    email
    Type
    string
    Description

    The email of the access list entry.

  • Name
    phone
    Type
    string
    Description

    The phone number of the access list entry.

  • Name
    meta
    Type
    object
    Description

    The key-value pairs of the extra data of the access list entry.

Request

PUT
/api/access-lists/:listId/entries/:id
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea/entries/507f191e810c19729de860ea', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "externalCode": "string",
    "customerId": "507f191e810c19729de860ea",
    "firstname": "string",
    "lastname": "string",
    "email": "example@vivenu.com",
    "phone": "string",
    "meta": {}
  }),
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "listId": "507f191e810c19729de860ea",
  "externalCode": "string",
  "sellerId": "507f191e810c19729de860ea",
  "customerId": "507f191e810c19729de860ea",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "phone": "string",
  "meta": {}
}

DELETE/api/access-lists/:listId/entries/:id

Delete an Access List Entry

Delete an Access List Entry

Request

DELETE
/api/access-lists/:listId/entries/:id
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea/entries/507f191e810c19729de860ea', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "listId": "507f191e810c19729de860ea",
  "externalCode": "string",
  "sellerId": "507f191e810c19729de860ea",
  "customerId": "507f191e810c19729de860ea",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "phone": "string",
  "meta": {}
}

GET/api/access-lists/:listId/entries

Get all Access List Entries

Get all Access List Entries

Query parameters

Optional query parameters

  • Name
    customerId
    Type
    string
    Description
  • Name
    externalCode
    Type
    string
    Description
  • Name
    email
    Type
    string
    Description
  • Name
    skip
    Type
    number
    Description
  • Name
    top
    Type
    number
    Description

Request

GET
/api/access-lists/:listId/entries
const response = await fetch('https://vivenu.com/api/access-lists/507f191e810c19729de860ea/entries?customerId=507f191e810c19729de860ea&externalCode=value&email=example%40vivenu.com&skip=10.5&top=10.5', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "docs": [],
  "total": 1
}

GETPUBLIC/api/access-lists/entries/:externalCode/ticket

Get an Access List Entry's Ticket

Get an Access List Entry's Ticket

A token received by your access device must be specified with each request via the HTTP header. token: ${token}

Query parameters

Required query parameters

  • Name
    eventId
    Type
    string
    Description

Request

GET
/api/access-lists/entries/:externalCode/ticket
const response = await fetch('https://vivenu.com/api/access-lists/entries/externalCode/ticket?eventId=507f191e810c19729de860ea', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "sellerId": "507f191e810c19729de860ea",
  "eventId": "507f191e810c19729de860ea",
  "ticketTypeId": "507f191e810c19729de860ea",
  "ticketName": "string",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z",
  "status": "VALID",
  "secret": "string",
  "barcode": "string",
  "name": "Example Name",
  "firstname": "string",
  "lastname": "string",
  "email": "example@vivenu.com",
  "street": "string",
  "line2": "string",
  "city": "string",
  "postal": "string",
  "state": "string",
  "country": "string",
  "categoryRef": "string",
  "categoryName": "string",
  "regularPrice": 10.5,
  "realPrice": 10.5,
  "completed": true,
  "seat": "string",
  "seatingInfo": {
    "_type": 6,
    "statusId": "507f191e810c19729de860ea",
    "_id": "507f191e810c19729de860ea",
    "categoryId": "507f191e810c19729de860ea",
    "name": "Example Name",
    "seatType": "handicapped",
    "sectionName": "string",
    "groupName": "string",
    "rowName": "string",
    "seatName": "string",
    "gate": "string"
  },
  "type": "SINGLE",
  "origin": "yourticket",
  "extraFields": {},
  "deliveryType": "HARD",
  "transactionId": "507f191e810c19729de860ea",
  "batchCounter": 10.5,
  "slotId": "507f191e810c19729de860ea",
  "slotStartTime": "2030-01-23T23:00:00.123Z",
  "personalized": true,
  "_locks": [
    {
      "by": "string",
      "at": "2030-01-23T23:00:00.123Z",
      "eventId": "507f191e810c19729de860ea",
      "type": "resell"
    }
  ],
  "barcodeRevealed": true,
  "barcodeRevealDate": "2030-01-23T23:00:00.123Z"
}

Was this page helpful?