Get started
Webhooks

collection.itinerary

collection.itinerary

Subscribe an endpoint to every event on this page with collection.itinerary.*. Each is the envelope every webhook event shares, with the CollectionItineraryEventObject object as its data.object.

Event typeWhat happened
collection.itinerary.addedAn itinerary was added to a collection.
collection.itinerary.removedAn itinerary left a collection.
collection.itinerary.movedAn itinerary moved within a collection.

The CollectionItineraryEventObject object

An itinerary's place in a collection: which collection, which itinerary, and where it sits. getCollection reads the order of the whole.

object

string

required

One of: collection.itinerary

The kind of object this is, always collection.itinerary: the family of the event types that carry it, and what tells the members of WebhookEventObject apart.

collection_id

string (uuid)

required

Identifier of the collection.

itinerary_id

string (uuid)

required

Identifier of the itinerary.

position

integer (int32)

Where the itinerary sits in the collection once this change was made, counted from 0. Absent on collection.itinerary.removed. A move shifts the itineraries between its two positions, which record no event of their own.

collection_version

integer (int64)

required

The collection's version once this change was made, which every change to what it holds moves. Of two events about one collection, the one carrying the higher figure is the later state.

collection.itinerary.added

An itinerary the collection did not hold was added to it.

Triggered by

  • collection.itinerary.add: Once for each itinerary the collection did not hold. One it holds keeps its place and records nothing.
    • POST /v1/collections/{collection_id}/itineraries: postCollectionItineraries, mountaya.studio.collections.postCollectionItineraries() in TypeScript. Every request.

Payload

type

string

required

One of: collection.itinerary.added

Always collection.itinerary.added.

data.object

CollectionItineraryEventObject

required

The itinerary of a collection.

See the CollectionItineraryEventObject object.

Every other field is the envelope every webhook event shares.

collection.itinerary.removed

An itinerary left a collection: it was removed from it, or the itinerary was deleted.

Triggered by

  • itinerary.delete: Once for each collection that held the itinerary.
    • DELETE /v1/itineraries/{itinerary_id}: deleteItinerary, mountaya.studio.itineraries.deleteItinerary() in TypeScript. Every itinerary deleted.
  • collection.itinerary.remove: When the collection held the itinerary.
    • DELETE /v1/collections/{collection_id}/itineraries/{itinerary_id}: deleteCollectionItinerary, mountaya.studio.collections.deleteCollectionItinerary() in TypeScript. Every request.

Payload

type

string

required

One of: collection.itinerary.removed

Always collection.itinerary.removed.

data.object

CollectionItineraryEventObject

required

The itinerary of a collection.

See the CollectionItineraryEventObject object.

Every other field is the envelope every webhook event shares.

collection.itinerary.moved

An itinerary moved to another position in a collection.

Triggered by

  • collection.itinerary.move: When the itinerary's position changes. A request naming the position it holds records nothing.
    • PATCH /v1/collections/{collection_id}/itineraries/{itinerary_id}: patchCollectionItinerary, mountaya.studio.collections.patchCollectionItinerary() in TypeScript. Every request.

Payload

type

string

required

One of: collection.itinerary.moved

Always collection.itinerary.moved.

data.object

CollectionItineraryEventObject

required

The itinerary of a collection.

See the CollectionItineraryEventObject object.

data.previous_attributes

object

The former value of each field of data.object the change moved, and of no other.

Every other field is the envelope every webhook event shares.