Search Examples
Purpose-built searchPlan queries for policy lookup, reconciliation, reporting, servicing, and authorized support workflows.
These examples use narrow selections for ten common searchPlan workflows. Replace placeholders only with identifiers and synthetic customer data authorized for the current agency and environment. A matching identifier is not authorization evidence; enforce object-level and tenant authorization before returning any plan data.
All examples request at most five records. For a unique plan or transaction lookup, require the expected issued plan in the result rather than assuming that the first node is correct. See Quote and Policy Search for the complete filter table, cursor pagination, and no-result behavior.
Exact Policy Lookup
Retrieve the minimum policy, status, date, and product fields needed to confirm an issued plan.
query SearchPlanExactPolicy($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planStatus
planType
isActive
isAnnual
issueDate
effectiveDate
expirationDate
planProduct { productCode productName }
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"searchAllTravelers": false
},
"first": 5
}
Transaction Reconciliation
Find the issued policy related to a known payment transaction. Reconcile the returned plan number against trusted purchase state and keep transaction details server-side.
query SearchPlanTransactionReconciliation($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planStatus
isActive
planPaymentDetails {
transactionId
amount
paymentType
methodType
createDate
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"transactionId": "<verified-transaction-id>",
"searchAllTravelers": false
},
"first": 5
}
Traveler-Assisted Lookup
Combine traveler criteria with the issued plan number to reduce ambiguity. Send only the customer attributes needed for the approved lookup and mask them in logs.
query SearchPlanTravelerLookup($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
issueDate
effectiveDate
expirationDate
planPrimaryTraveler { travelerId firstName lastName email }
planAdditionalTravelers { travelerId firstName lastName }
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"searchAllTravelers": true,
"traveler": {
"firstName": "<synthetic-first-name>",
"lastName": "<synthetic-last-name>"
}
},
"first": 5
}
Trip-Date Lookup
Use the policy trip dates with the issued plan number and confirm that a returned trip contains both expected dates.
query SearchPlanTripDateLookup($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planStatus
planTripDetails {
departureDate
returnDate
destinations { countryIsoCode stateIsoCode destinationName }
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"departureDate": "<yyyy-mm-dd>",
"returnDate": "<yyyy-mm-dd>",
"searchAllTravelers": false
},
"first": 5
}
Issue-Date Report
Use the same start and end date for a one-day issuance window. Keep the issued plan number when validating a known fixture; omit it only for an approved, bounded report.
query SearchPlanIssueDateReport($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
issueDate
source
marketingChannel
planProduct { productCode productName }
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"issueStartDate": "<yyyy-mm-dd>",
"issueEndDate": "<yyyy-mm-dd>",
"searchAllTravelers": false
},
"first": 5
}
Group or Tour Lookup
Search by an approved group number and return only the group and tour context needed by the workflow. To search by tour instead, replace groupNumber with the contract-approved tourNumber value.
query SearchPlanGroupTourLookup($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
tourPnrNumber
policyGroup { groupNumber groupName tourName departureDate returnDate }
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"groupNumber": 12345,
"searchAllTravelers": false
},
"first": 5
}
Annual Servicing
Retrieve issued annual traveler and segment identifiers before quoting or staging an annual modification. A non-annual policy can validly return no segment records.
query SearchPlanAnnualServicing($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planStatus
isActive
isAnnual
planPrimaryTraveler { travelerId firstName lastName }
planAdditionalTravelers { travelerId firstName lastName }
segmentTripDetails {
policySegmentGuid
departureDate
returnDate
isModifyEnabled
tripSegmentTravelers { travelerId }
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-annual-plan-number>",
"searchAllTravelers": true
},
"first": 5
}
Payment Support
Request payment fields only for an authorized support role and an active business purpose. Keep authorization codes, transaction IDs, and card last-four values out of client-visible diagnostics and routine logs.
query SearchPlanPaymentSupport($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planPaymentDetails {
transactionId
amount
authorizationCode
createDate
methodType
paymentType
creditCardLast4
gatewayName
}
creditCardTransactionHistories {
amount
creditCardLast4
creditCardType
isSettled
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"searchAllTravelers": false
},
"first": 5
}
Document Delivery
Use document capability links only on an authorized backend or controlled delivery surface. Never write links or delivery email addresses to logs, analytics, test reports, or support screenshots.
query SearchPlanDocumentDelivery($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
planDocuments {
documentName
documentType
deliveryType
deliveryEmail
sentDate
downloadLink
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"searchAllTravelers": false
},
"first": 5
}
Claims Support
The schema exposes claim identity, status, type, creation date, and reasons. It does not expose claim amounts, payments, adjusters, notes, documents, incident dates, or decision explanations through searchPlan.
query SearchPlanClaimsSupport($planSearchRequest: PlanSearchRequestInput!, $first: Int) {
searchPlan(planSearchRequest: $planSearchRequest, first: $first) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
planNumber
claimDetails {
claimId
claimStatus
claimType
createDate
claimReasonsForClaim { claimReasonId claimReason }
}
}
}
}
Request example variables:
{
"planSearchRequest": {
"agencyNumber": "<authorized-agency-number>",
"planNumber": "<issued-plan-number>",
"searchAllTravelers": false
},
"first": 5
}
Validate Results Safely
- Require the known plan number in every result when testing against an issued fixture.
- Treat empty group, segment, payment, document, or claim collections as not applicable to that fixture, not as proof of an API failure.
- Use dedicated approved fixtures before claiming end-to-end coverage for group, annual, payment-support, document, or claim workflows.
- Fail closed when the caller is not authorized for the returned policy or selected support fields.
- Mask traveler data, transaction details, card fragments, document links, and claim information in diagnostics.