/sequences/{sequenceId}

Change a sequence. Send any subset of name, description, status, appliesTo, rank, way, sequenceBricks and properties; a field left out keeps its stored value, and null removes appliesTo, rank or way. The sequence that results is checked as a whole, with the rules of POST /sequences. It must have exactly one form: to make a sequence built from bricks simple, send the way with sequenceBricks: []; to build a simple one from bricks, send way: null with the three bricks. A stored value that breaks a rule, such as an empty name or a carrier or brick deleted since, refuses the change until the same request fixes it; to switch such a sequence off, use POST /sequences/{sequenceId}/deactivate. Every change advances version. A request that changes nothing, such as one that sends only values the sequence already has, writes nothing and keeps version. Send expectedVersion to refuse the write when the sequence changed since it was read (412 SEQUENCE_VERSION_MISMATCH). Running the sequence never changes it. The response is the stored sequence, with its summary.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

ID of the sequence to change

Body Params

the fields to change

name
object

Localized sequence name ({ en?, de? }); at least one language must be non-empty.

description
object

Localized explanation of what the sequence is for, shown to operators.

string
enum

'active' or 'inactive'. Automatic dispatch skips an inactive sequence; it keeps its rank.

Allowed:
appliesTo
object | null

Tour rule group that must match before automatic dispatch considers this sequence, with the same rules as on create. null, or a group without rules, removes it: the sequence then applies to every tour.

integer | null
1 to 9007199254740991

Positive integer that orders this sequence in automatic dispatch, stored as sent: two sequences may share a rank, and then the older one comes first. null removes the sequence from automatic dispatch; it then runs only when started by hand.

way

The simple form, assign or marketplace as on create: how the tour is handed out. It replaces the stored way. A sequence built from bricks takes a way only together with sequenceBricks: []. null removes way, and needs the three sequenceBricks in the same request.

sequenceBricks
array of strings

The advanced form: three distinct SequenceBrick ids, one select, one score and one distribute brick. They replace the stored list. Send them with way: null to build a simple sequence from bricks, or send [] with a way to make a sequence built from bricks simple.

sequenceBricks
properties
object

Custom sequence properties. They replace the stored properties as a whole: a property left out is removed.

integer
0 to 9007199254740991

The version of the sequence as the client last read it (0 for a sequence from before versioning). When the stored sequence has another version, nothing is written and the answer is 412 with internalCode SEQUENCE_VERSION_MISMATCH: read the sequence again and decide anew. Omit it to apply the change to whatever is stored.

Responses

401

unauthorized

403

The role of the API key does not allow this action. The key needs a role with the matching permission, for example full access.

404

sequence not found: no sequence with this ID in the tenant of the key

409

conflict - other requests kept changing the sequence (internalCode CONCURRENT_UPDATE). Nothing is written; send the request again.

412

precondition failed - expectedVersion is not the stored version (internalCode SEQUENCE_VERSION_MISMATCH). Nothing is written; read the sequence again and decide anew.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json