trep.docs
trep.docs

AI agents

Tools reference

The 27 tools the Trep connector gives your AI agent. View tools work on every connection; change tools need a connection you allowed to make changes. Tools marked “Asks first” are flagged as destructive, so apps like Claude confirm with you before running them.

Money is in paise (₹1 = 100 paise, so ₹6,500 is 650000). Dates are YYYY-MM-DD in India time. Ids come from the list and get tools.

Agency and dashboard

Get agency profile

get_agency

View

The connected agency's profile: name, site address (slug), status (onboarding, pending, verified, rejected, suspended), city, about, Instagram, WhatsApp number and whether it's verified, seat-hold hours, site design and custom domain.

No fields.

Get dashboard numbers

get_dashboard

View

Today's numbers, counted in IST: new orders, enquiries this week (Mon-Sun), seats filled vs offered this month, upcoming trips, published packages, WhatsApp taps and site views this week, and views per day for the last 7 days.

No fields.

Packages and batches

List packages

list_packages

View

The agency's trip packages with status (draft, published, archived), from-price in paise, next batch date and counts. Archived packages are left out unless include_archived is true.

FieldTypeNotes
include_archivedbooleanAlso list archived packages.

Get a package

get_package

View

One package in full: itinerary, inclusions, exclusions, pickup point, policies, base price, its sharing options with prices, and its batches with seats left and state (open, filling_fast, full, closed, completed).

FieldTypeNotes
package_idrequiredstring (id)The package's id (from list_packages).

List upcoming batches

list_batches

View

Upcoming dated batches across all packages, soonest first, with total seats, seats taken, seats left and state.

No fields.

Get a batch

get_batch

View

One batch: dates, total seats, seats taken and left, state, price override and women-only flag.

FieldTypeNotes
batch_idrequiredstring (id)The batch's id.

Get a batch's traveller list

get_batch_manifest

View

Every traveller booked on a batch (all orders except cancelled ones): names, ages, genders, phones and their order codes. Contains travellers' personal data: use it only for the agency's own trip operations.

FieldTypeNotes
batch_idrequiredstring (id)The batch's id.

Create a package

create_package

Change

Create a trip package as a draft (not visible to travellers until published with set_package_status). The site address of the package is made from the title.

FieldTypeNotes
titlerequiredstring up to 120 chars
destinationstring up to 120 chars
duration_daysinteger 1–60
duration_nightsinteger 0–60
summarystring
itinerarylist of object
inclusionslist of string
exclusionslist of string
pickup_pointstring
policiesstring
base_price_paiseinteger ≥ 0Price per person in paise (₹6,500 = 650000), used when the package has no sharing options.

Update a package

update_package

Change

Change a package's details. Only the fields given change. Existing orders keep the terms they were booked with.

FieldTypeNotes
package_idrequiredstring (id)
titlestring up to 120 chars
destinationstring up to 120 chars
duration_daysinteger 1–60
duration_nightsinteger 0–60
summarystring
itinerarylist of object
inclusionslist of string
exclusionslist of string
pickup_pointstring
policiesstring
base_price_paiseinteger ≥ 0

Set sharing options

set_package_options

ChangeAsks first

Replace a package's sharing options (e.g. Dorm, Triple, Double) and their per-person prices. Options not in the list are removed. An empty list means the package uses its base price.

FieldTypeNotes
package_idrequiredstring (id)
optionsrequiredlist of object

Publish, unpublish or archive a package

set_package_status

ChangeAsks first

Set a package to published (visible on the agency's site), draft (hidden) or archived (hidden and out of lists). The package's site address is fixed once published.

FieldTypeNotes
package_idrequiredstring (id)
statusrequiredone of: draft, published, archived

Duplicate a package

duplicate_package

Change

Copy a package (with its sharing options, without batches) as a new draft.

FieldTypeNotes
package_idrequiredstring (id)

Delete a package

delete_package

ChangeAsks first

Delete a package. A package with orders is archived instead (orders are never lost).

FieldTypeNotes
package_idrequiredstring (id)

Add a batch

create_batch

Change

Add a dated batch to a package. Travellers can book it once the package is published and the WhatsApp number is verified.

FieldTypeNotes
package_idrequiredstring (id)
starts_onrequiredstring (YYYY-MM-DD)First day, YYYY-MM-DD (IST).
ends_onrequiredstring (YYYY-MM-DD)Last day, YYYY-MM-DD (IST), on or after starts_on.
total_seatsrequiredinteger 1–1000
price_override_paiseinteger ≥ 0Replaces the package price and every option price for this batch.
women_onlyboolean

Update or close a batch

update_batch

ChangeAsks first

Change a batch's dates, seats, price override or women-only flag, or close it (status closed stops new bookings; open reopens it). Seats can't go below those already taken.

FieldTypeNotes
batch_idrequiredstring (id)
starts_onstring (YYYY-MM-DD)
ends_onstring (YYYY-MM-DD)
total_seatsinteger 1–1000
price_override_paiseinteger ≥ 0
clear_price_overridebooleanRemove the price override.
statusone of: open, closed
women_onlyboolean

Delete a batch

delete_batch

ChangeAsks first

Delete a batch. A batch with orders is archived instead (orders are never lost).

FieldTypeNotes
batch_idrequiredstring (id)

Orders and customers

List orders

list_orders

View

Orders, newest first. Filter by status, package, batch or customer, or search by order code (TRP-CODE-0001), traveller name or phone. Returns up to 'limit' orders (default 50, at most 200).

FieldTypeNotes
statusone of: new, contacted, payment_pending, confirmed, completed, cancelled
searchstringOrder code, traveller name or phone.
package_idstring (id)
batch_idstring (id)
customer_idstring (id)
limitinteger 1–200
offsetinteger ≥ 0

Get an order

get_order

View

One order: code, status, the terms booked (package, dates, sharing option, unit price, total), lead traveller and other travellers, seat hold expiry, payments recorded, and the timeline of status changes and notes.

FieldTypeNotes
order_idrequiredstring (id)The order's id (not its TRP code; use list_orders with search to find it).

List customers

list_customers

View

Customers (de-duplicated by phone) with trip counts and total spent. Search by name or phone, or filter by tag.

FieldTypeNotes
searchstringName or phone.
tagstring

Get a customer

get_customer

View

One customer with notes, tags and their order history.

FieldTypeNotes
customer_idrequiredstring (id)

Move an order

update_order_status

ChangeAsks first

Move an order through the pipeline: new → contacted → payment_pending → confirmed → completed, or cancelled. Confirming re-checks seats if the hold lapsed; cancelling releases the seats; completed is allowed only after the trip ends. The move and the note go on the order's timeline.

FieldTypeNotes
order_idrequiredstring (id)
statusrequiredone of: contacted, payment_pending, confirmed, completed, cancelled
notestring up to 2000 chars

Add a note to an order

add_order_note

Change

Add a note to an order's timeline (visible to the agency only).

FieldTypeNotes
order_idrequiredstring (id)
noterequiredstring up to 2000 chars

Record a payment

record_payment

Change

Record a payment received outside Trep (UPI, cash, bank transfer, card) against an order. It's added to the order's paid total and timeline.

FieldTypeNotes
order_idrequiredstring (id)
amount_paiserequiredinteger ≥ 1Amount in paise (₹2,000 = 200000).
moderequiredone of: upi, cash, bank, card, other
kindrequiredone of: advance, full, balance
paid_onrequiredstring (YYYY-MM-DD)YYYY-MM-DD (IST).
notestring up to 500 chars

Update a customer's notes or tags

update_customer

Change

Replace a customer's private notes and/or tags (e.g. repeat, corporate, vegetarian).

FieldTypeNotes
customer_idrequiredstring (id)
notesstring up to 4000 chars
tagslist of string up to 40 chars

Website

Get website sections

get_website_sections

View

The agency website's custom sections in order (gallery, services, testimonials, faq, text, contact), including hidden ones. Use get_agency for the hero layout and accent colour.

No fields.

Change the website design

update_website_design

Change

Set the website's hero layout (cover, split, minimal) and/or accent colour (trep, teal, ocean, indigo, forest, plum, rust).

FieldTypeNotes
hero_styleone of: cover, split, minimal
accentone of: trep, teal, ocean, indigo, forest, plum, rust

Replace website sections

set_website_sections

ChangeAsks first

Replace all of the website's custom sections with this ordered list (sections not in the list are removed; read them first with get_website_sections). Kinds and their data: gallery {media_ids: [uuid]}, services {items: [{icon, title, text}]}, testimonials {items: [{name, trip, quote}]}, faq {items: [{q, a}]}, text {body}, contact {address, hours, phone, email, map_url (https only)}. Plain text only.

FieldTypeNotes
sectionsrequiredlist of object up to 20