Versions and If-Match

Every listing carries a version. Send it back with a change, and the change only happens if the listing is still what you read.

Download all as MarkdownOpenAPI

Why

A listing can change between the moment you read it and the moment you change it. Tickets sell. A marketplace holds seats for an order. Someone edits the listing in the dashboard. A repricer that works on what it read a minute ago may price tickets that are gone.

What the version covers

Every listing has a version: a short string that changes whenever what the listing offers changes. It covers:

  • the section, the row, the seats and how many there are
  • the ticket type
  • the price, and a price of its own on a marketplace
  • which seats are sold and how many tickets are reserved
  • whether the listing is on sale

It changes with every sale, every reservation, every seat that is removed and every edit, and when the listing goes on or off sale. It does not change while the marketplaces take a listing in, for example from queued to live: nothing you decide on has changed then.

It does not cover the face value, the cost, your reference or your note, nor the answer to a choice a marketplace waits for. A change to those leaves the version as it was.

An answer that is one listing also carries the version in its ETag header.

Sending it back

Send the version you read in the If-Match header of the change, in quotes as it comes in ETag:

HTTP
If-Match: "Hc4tN9wEo2sKjU6b"

If the listing is still at that version, the change happens and the answer carries the new version. If not, nothing is changed and the answer is 409 listing_changed with the version the listing has now:

JSON
{
	"error": {
		"code": "listing_changed",
		"message": "The listing is no longer at the version sent in If-Match. Nothing was changed. Read it again and decide anew.",
		"details": { "current_version": "Zr8yB1nQe5uMfA0x" }
	},
	"request_id": "req_8f3a1c5e7b9d2f4a6c8e0b1d"
}

When it is required

EndpointIf-Match
PATCH /v1/listings/{id}Required when the request changes seats, quantity, section, row or ticket_type. Optional otherwise
DELETE /v1/listings/{id}Required
POST /v1/listings/{id}/publishOptional
POST /v1/listings/{id}/unpublishOptional
POST /v1/listings/{id}/marketplaces/{marketplace_id}/choiceOptional

A request that needs the header and comes without it gets 428 precondition_required.

For a price and the other fields it is optional. Send it anyway when the price you set depends on what you read, such as how many tickets are left.

Request
curl -X PATCH "https://www.syncseats.com/api/v1/listings/671f3a9c2b7d4e0f1ae48236" \
	-H "Authorization: Bearer ssapi_test_..." \
	-H "Content-Type: application/json" \
	-H "Idempotency-Key: pos-48236-reprice-1" \
	-H 'If-Match: "Hc4tN9wEo2sKjU6b"' \
	-d '{
		"price_per_ticket": { "amount": "185.00", "currency": "USD" }
	}'
Response, 200
{
	"object": "listing",
	"id": "671f3a9c2b7d4e0f1ae48236",
	"status": "live",
	"on_sale": true,
	"version": "Zr8yB1nQe5uMfA0x",
	"event": {
		"id": "6718d2f4a9c3b17e5d204a93",
		"name": "Derby Day",
		"venue": "Emirates Stadium",
		"starts_at": "2026-11-29T15:30:00.000Z",
		"starts_at_local": "2026-11-29T15:30:00",
		"timezone": "Europe/London"
	},
	"section": "214",
	"row": "K",
	"general_admission": false,
	"seats": ["7", "8", "9"],
	"quantity": 3,
	"available_quantity": 3,
	"sold_quantity": 0,
	"reserved_quantity": 0,
	"sold_seats": [],
	"ticket_type": "mobile_transfer",
	"split": "no_singles",
	"price_per_ticket": { "amount": "185.00", "currency": "USD" },
	"face_value": null,
	"cost_per_ticket": { "amount": "150.00", "currency": "USD" },
	"restriction": null,
	"view": { "id": "aisle_seat", "label": "Aisle seat" },
	"extras": [],
	"reference": "48236",
	"internal_note": null,
	"proof_of_purchase_files": 0,
	"marketplaces": [
		{
			"id": "66a0c41e7b2d9f3a10c5e801",
			"name": "Viagogo",
			"status": "live",
			"price_per_ticket": { "amount": "185.00", "currency": "USD" },
			"own_price": false,
			"commission_percent": 5,
			"url": null,
			"action": null
		},
		{
			"id": "66a0c41e7b2d9f3a10c5e802",
			"name": "StubHub",
			"status": "live",
			"price_per_ticket": { "amount": "185.00", "currency": "USD" },
			"own_price": false,
			"commission_percent": 5,
			"url": null,
			"action": null
		}
	],
	"needs_action": false,
	"source": "api",
	"created_at": "2026-11-03T14:12:09.000Z",
	"updated_at": "2026-11-10T08:00:14.000Z"
}

Read, decide, write

  1. Read the listing and keep its version.
  2. Decide on the change from what you read.
  3. Send the change with If-Match.
  4. On 409 listing_changed, read the listing again and go back to the second step.

Do not just put details.current_version into the old request and send it again. The listing changed for a reason, and that reason may change what you want to do: after a sale there are fewer tickets to price.

What holds without it

The version guards your decision. Two rules hold even when you send none: sold and reserved seats can never be removed, and a listing that is being synced with a marketplace answers listing_busy until that is done. Working with listings has the rest.