Structuring Real-Time Updates for Tickets

When to use a Real-time Update for Ticket Type Information:

Real-time updates for ticket updates should be issued in the following scenarios:

  • The price of the ticket type has changed
  • The name of the ticket type has changed
  • A new ticket type is being introduced

How to Update Ticket Type Information

Ticket type information is stored at the service level, and then referenced at the availability level. Changes to the ticket type, for example, price and name, through the inventory.partners.merchants.services.patch method. To update the existing service programmatically through create/delete, there are other methods available.

To update the price of a specific ticket type, issue a PATCH request:

patch https://mapsbooking.googleapis.com/v1alpha/inventory/partners/{PARTNER ID}/merchants/{MERCHANT ID}/services/{SERVICE ID}/?updateMask=ticketType

Because the entire ticketType object is being updated, it is important to include all ticketTypes for that service, not just the ticketType being updated.

Request Payload

Service

{
  "name": "partners/{partner_id}/merchants/{merchantId}/services/{serviceId}",
  "serviceName": "Zoo Safari",
  "description": "See all of your favorite animals in this Zoo Safari",
  "ticketType": [
{
  "ticketTypeId": “1001-adult”,
  "shortDescription": “Adult Ticket”,
  "price": {
  "priceMicros": “49000000”,
  "currencyCode": “USD”,
  }
},
{
  "ticketTypeId": “1001-child”,
  "shortDescription": “Child Ticket”,
  "price": {
  "priceMicros": “39000000”,
  "currencyCode": “USD”,
  }
}
  ]
},
 

How to Update Ticket Type Availability

To update the ticket availability for a service, replace methods should be called. Because this is a replace method it is important to include all remaining availability slots & ticket types, not just the ones being updated.

Choosing a Replace Method to Call

Use the following guide to determine which replace method is more suitable:

  • Are you able to pull availability data for multiple services at the same time?
  • Are you only able to update one service at a time?
    • Single Replace
    • Note: You can use multiple single replace calls to emulate a batch replace call, but it would be more efficient to use a single batch replace call