Understanding NDCTerm Command Grammar
The prefix system, passenger and segment targeting, qualifier chains, ranges and commit verbs — enough to parse any NDCTerm command on sight.
The first character is the namespace
NDCTerm's entire language is one pattern: prefix, target, body, qualifiers. The prefix — the first character — tells you the command family. Learn the fourteen prefixes and you can classify any command before you've read the rest of it.
| Prefix | Family | Example |
|---|---|---|
(none) | Shopping & search | 15NOVJFKLAX |
1–9 | Selection (row numbers) | 1, 1/2/3, 1-5 |
A–Z | Action words | WP, ER, ISSUE, CANCEL |
* | Lookup & display | *ABC123, *L, *H |
- | Add passenger | -SMITH/JOHN MR |
@ | Passenger attributes | @DOB01JAN1980 |
$ | Seats | $MAP, $P1/12A |
! | Special service requests | !P1/VGML |
+ | Ancillary services | +BAG1/25KG |
% | Loyalty programs | %P1/UA/123456789 |
? | Queries & help | ?FR, ?BAG |
# | Workspaces | #1, #NEW |
X | Delete | X1, XA, XP1 |
D | Split order | D1 |
Two of these deserve a note before anything else:
- No prefix means search. A line that starts with a date is a search:
15NOVJFKLAX. Always lead with theDDMMMdate — Getting Started explains why a bare city pair is a trap. Xis a prefix, never a command.X1deletes segment 1,XAdeletes all segments,XP1deletes passenger 1 — but a bareXis rejected by the parser, so a stray keystroke can't wipe your work. To reset the transaction, useIorCLEAR.
Targeting: P for passenger, S for segment
Inside a command, P<n> names a passenger and S<n> names a segment, both 1-indexed by their position in the transaction sidebar or order display. Targets slot in right after the prefix, most specific last:
@DOB01JAN1980 # No target — applies to the LAST passenger added
@P2/DOB15MAR1985 # Explicit target — passenger 2
$P1/12A # Seat 12A for passenger 1
!P1/VGML # Vegetarian meal for P1, every segment
!P1/S2/WCHR # Wheelchair for P1, segment 2 only — P and S compose
%P1/UA/123456789 # Loyalty number for P1's whole itinerary
The default rule is consistent: omit the passenger target and the command applies to the last passenger added — with one deliberate exception. SSRs (!) always require an explicit P<n>; a special-service request never guesses its passenger.
Qualifiers chain with /
Everything after the body of a command chains with /, and within a family the order is mostly free — search modifiers in particular can appear in any order:
15NOVJFKLAX/SHOP/J/2ADT/1CHD # Live-priced, business cabin, 2 adults + 1 child
15NOVJFKLAX/SHOP7/AA # Same meaning as 15NOVJFKLAX/AA/SHOP7
Read a chained command left to right: body first, then each / token narrows or annotates it. Every qualifier belongs to one axis (carrier, cabin, passenger mix, connection rule, …); you'll never see two axes share a token.
Ranges and sets
Wherever a command takes numbers, two separators work, and they work identically across every family — selection, deletion, issuance:
-is a range:1-5means 1 through 5./is a set:1/3means 1 and 3, nothing between.
1-5 # Select rows 1 through 5
1/2/3 # Select rows 1, 2, and 3
X1-3 # Delete segments 1 through 3
ISSUE/1/3 # Issue cart items 1 and 3 only
The commit verbs: ER, E, ET, ETR
Four verbs end a transaction, and they compose from two letters: E ends (commits), T tickets, R retrieves (displays the result):
ER— commit and display the order. The default reflex.E— commit silently, no display.ET— commit and issue documents, no display.ETR— commit, issue, and display: booking to ticket in one call.
They appear two ways. Suffixed to a priced-offer row, they commit that offer: 1ER books a new offer on hold or accepts an exchange on hold where supported; 2ETR books or exchanges offer 2 and tickets it immediately. Some exchanges cannot be held, so ER directs you to the payment-backed ETR flow without committing. Standalone, the verbs commit whatever is queued in the transaction — queued seat assignments and other order changes — so a post-booking seat pick is $P1/12A then ER. Ticketing verbs need payment in place first; that whole topic is Issue and Verify Tickets.
Parsing an unfamiliar command
Put the pieces together and unfamiliar commands read themselves. Cover the answer and decompose these:
+P1/BAG1/25KG # + ancillary · P1 · one bag · 25kg
X1/2/3 # X delete · segments 1, 2, and 3 (set, not range)
*-SMITH/JOHN # * lookup · - by passenger name · SMITH/JOHN
$P1/X # $ seats · P1 · /X removes — the delete prefix reused as a suffix
D1 # D split · passenger 1 into a new order
That last pattern is worth internalizing: /X as a trailing qualifier means remove — $P1/X drops P1's seat — while X as a leading prefix deletes by number. Same letter, position decides.
Where to look things up
- The command reference is the complete lookup table, organized by the same families as the prefix table above. Keep it open in a second tab.
- Inside the terminal,
?answers questions about the current transaction:?FRfare rules,?BAGbaggage allowance for the offer in front of you. - Per-airline support for specific operations varies — check the carrier's page under Airlines.
Next: put the grammar to work — Search for Flights.