{
  "info": {
    "_postman_id": "postman_02d8a7bdf151aa80ca6717a4",
    "name": "Travel Insured Partner GraphQL Collections",
    "description": "## Travel Insured Partner GraphQL Collection\n\nPartner-ready GraphQL collections generated from a reviewed allowlist.\nThese artifacts cover reviewed single-trip and annual quote-to-purchase flows, quote/plan search, single-trip plan modification, and annual plan modification requests.\nThe raw Insomnia export is used for provenance only and is never redistributed directly.\n\n### Authentication\n\n- Send Authorization: ApiKey {{apiToken}} on every request.\n- Send x-api-key: {{apiKey}} on every request.\n\n### Included Workflows\n\n- 00 - Getting Started: purchaseOptions\n- 01 - Single Trip Quote to Purchase: quote, stagePolicyPurchase, processPayment, policyBindRequest\n- 02 - Annual Quote to Purchase: annualPlanQuote, stageAnnualPolicyPurchase, processPayment, policyBindRequest\n- 03 - Quote Search and Requote: searchSavedQuotes, savedQuote, quote, annualPlanQuote\n- 04 - Plan Search and Modification: searchPlan, planModificationQuote, annualPlanModificationQuote, planModifyRequest, annualPlanModifyRequest, planModify",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "github-copilot-gpt-5.4"
  },
  "item": [
    {
      "name": "00 - Getting Started",
      "description": "Validate endpoint reachability and partner authentication before running transactional requests.",
      "item": [
        {
          "name": "Test GraphQL Connectivity",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Response contains data property\", function () {",
                  "    pm.expect(json).to.have.property('data');",
                  "});",
                  "pm.test(\"Marketing channels are returned\", function () {",
                  "    pm.expect(json.data.purchaseOptions.marketingChannels).to.be.an('array');",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query PurchaseOptions {\n  purchaseOptions {\n    marketingChannels {\n      marketingChannelId\n      marketingChannelName\n    }\n  }\n}",
                "variables": "{}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Use this request first to verify that graphqlBaseUrl, apiToken, and apiKey work together.\n- This request intentionally uses a low-risk published lookup instead of exposing internal diagnostic calls."
          },
          "response": []
        }
      ]
    },
    {
      "name": "01 - Single Trip Quote to Purchase",
      "description": "Published deferred single-trip purchase flow.",
      "item": [
        {
          "name": "1. Generate Quote",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Quote number is returned\", function () {",
                  "    pm.expect(json.data.quote.quoteNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "pm.test(\"At least one product is returned\", function () {",
                  "    pm.expect(json.data.quote.products).to.be.an('array').that.is.not.empty;",
                  "});",
                  "",
                  "const quoteNumberValue = json.data.quote.quoteNumber;",
                  "if (quoteNumberValue !== undefined && quoteNumberValue !== null) {",
                  "    pm.environment.set('quoteNumber', quoteNumberValue);",
                  "}",
                  "const selectedProductCodeValue = json.data.quote.products[0].productCode;",
                  "if (selectedProductCodeValue !== undefined && selectedProductCodeValue !== null) {",
                  "    pm.environment.set('selectedProductCode', selectedProductCodeValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation GenerateQuote($quoteRequest: QuoteRequestInput!) {\n  quote(quoteRequest: $quoteRequest) {\n    quoteNumber\n    products {\n      productId\n      productName\n      productCode\n      productDescription\n      availablePaymentMethod {\n        paymentMethod\n      }\n      coverages {\n        productCoverageId\n        productCoverageType\n          travelerId\n        productCoverageTypeCode\n        isBase\n        coverageLimits {\n          productCoverageLimitId\n        planProduct {\n          availableCoverages {\n            productCoverageId\n            productCoverageTypeCode\n            coverageClassification\n            isBase\n            pricingCoverageLimits {\n              productCoverageLimitId\n              totalPrice\n            }\n          }\n        }\n        segmentTripDetails {\n          policySegmentGuid\n          isModifyEnabled\n          departureDate\n          returnDate\n          depositDate\n          destinations {\n            countryIsoCode\n            destinationName\n          }\n        }\n          totalPrice\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"quoteRequest\": {\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"residencyCountryIsoCode\": \"US\",\n    \"residencyStateIsoCode\": \"CT\",\n    \"trip\": {\n      \"departureDate\": \"2026-10-01\",\n      \"returnDate\": \"2026-10-08\",\n      \"depositDate\": \"2026-09-15\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"GB\",\n          \"destinationName\": \"United Kingdom\"\n        }\n      ],\n      \"travelers\": [\n        {\n          \"id\": 1,\n          \"primaryTraveler\": true,\n          \"firstName\": \"Alex\",\n          \"lastName\": \"Example\",\n          \"dateOfBirth\": \"1988-04-12\",\n          \"email\": \"alex@example.com\",\n          \"tripCost\": 4200\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Generate a single-trip quote and capture quoteNumber for the staged purchase flow.\n- Use the returned productCode and optional coverage IDs when you stage purchase."
          },
          "response": []
        },
        {
          "name": "2. Stage Policy Purchase",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"A planGuid is returned\", function () {",
                  "    pm.expect(json.data.stagePolicyPurchase.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const planGuidValue = json.data.stagePolicyPurchase.planGuid;",
                  "if (planGuidValue !== undefined && planGuidValue !== null) {",
                  "    pm.environment.set('planGuid', planGuidValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation StagePolicyPurchase($policyPurchaseStage: PolicyPurchaseStageInput!) {\n  stagePolicyPurchase(policyPurchaseStage: $policyPurchaseStage) {\n    planGuid\n  }\n}",
                "variables": "{\n  \"policyPurchaseStage\": {\n    \"quoteNumber\": \"{{quoteNumber}}\",\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"product\": {\n      \"productCode\": \"{{selectedProductCode}}\",\n      \"effectiveDate\": \"2026-10-01\",\n      \"optionalCoverages\": [\n        {\n          \"productCoverageLimitId\": 301,\n          \"productCoverageTypeCode\": \"TC\"\n        }\n      ]\n    },\n    \"trip\": {\n      \"departureDate\": \"2026-10-01\",\n      \"returnDate\": \"2026-10-08\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"GB\",\n          \"destinationName\": \"United Kingdom\"\n        }\n      ],\n      \"primaryTraveler\": {\n        \"firstName\": \"Alex\",\n        \"lastName\": \"Example\",\n        \"dateOfBirth\": \"1988-04-12\",\n        \"email\": \"alex@example.com\",\n        \"phoneNumbers\": [\n          \"860-555-0100\"\n        ],\n        \"tripCost\": 4200,\n        \"address\": {\n          \"addressLine1\": \"123 Example Street\",\n          \"addressLine2\": \"Suite 200\",\n          \"city\": \"Hartford\",\n          \"stateIsoCode\": \"CT\",\n          \"zipCode\": \"06103\",\n          \"countryIsoCode\": \"US\"\n        },\n        \"beneficiaries\": [\n          {\n            \"firstName\": \"Taylor\",\n            \"lastName\": \"Example\",\n            \"middleInitial\": \"E\",\n            \"percentage\": 100\n          }\n        ]\n      }\n    },\n    \"deliveryTypes\": [\n      {\n        \"deliveryType\": \"Email\"\n      }\n    ]\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Convert the selected single-trip quote into a staged plan ready for payment.\n- All traveler and address values below are placeholders and must be replaced with real partner input."
          },
          "response": []
        },
        {
          "name": "3. Process Payment",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"A paymentRequestId is returned\", function () {",
                  "    pm.expect(json.data.processPayment.paymentRequestId).to.exist;",
                  "});",
                  "pm.test(\"The response includes the staged planGuid\", function () {",
                  "    pm.expect(json.data.processPayment.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const paymentRequestIdValue = json.data.processPayment.paymentRequestId;",
                  "if (paymentRequestIdValue !== undefined && paymentRequestIdValue !== null) {",
                  "    pm.environment.set('paymentRequestId', paymentRequestIdValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation ProcessPayment($paymentProcessingRequest: PaymentProcessingRequestInput!) {\n  processPayment(paymentProcessingRequest: $paymentProcessingRequest) {\n    paymentRequestId\n    planGuid\n  }\n}",
                "variables": "{\n  \"paymentProcessingRequest\": {\n    \"planGuid\": \"{{planGuid}}\",\n    \"paymentMethod\": \"CreditCard\",\n    \"hostedPaymentUrl\": \"{{hostedPaymentUrl}}\",\n    \"iFrameCommunicatorUrl\": \"{{iFrameCommunicatorUrl}}\",\n    \"billingPartyInformation\": {\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Example\",\n      \"email\": \"alex@example.com\",\n      \"totalAmount\": 580,\n      \"billingAddress\": {\n        \"addressLine1\": \"123 Example Street\",\n        \"addressLine2\": \"Suite 200\",\n        \"city\": \"Hartford\",\n        \"stateIsoCode\": \"CT\",\n        \"zipCode\": \"06103\",\n        \"countryIsoCode\": \"US\"\n      }\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Initiate PCI-compliant payment handling for a staged single-trip plan.\n- Keep payment card data out of this API and pass only partner-side URLs and non-card billing details."
          },
          "response": []
        },
        {
          "name": "4. Policy Bind Request",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"A planNumber is returned\", function () {",
                  "    pm.expect(json.data.policyBindRequest.planNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "pm.test(\"Document links are returned\", function () {",
                  "    pm.expect(json.data.policyBindRequest).to.have.property('cobDownloadLink');",
                  "    pm.expect(json.data.policyBindRequest).to.have.property('eobDownloadLink');",
                  "});",
                  "",
                  "const planNumberValue = json.data.policyBindRequest.planNumber;",
                  "if (planNumberValue !== undefined && planNumberValue !== null) {",
                  "    pm.environment.set('planNumber', planNumberValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation PolicyBindRequest($planGuid: UUID!, $transactionId: String) {\n  policyBindRequest(planGuid: $planGuid, transactionId: $transactionId) {\n    planNumber\n    cobDownloadLink\n    eobDownloadLink\n  }\n}",
                "variables": "{\n  \"planGuid\": \"{{planGuid}}\",\n  \"transactionId\": \"{{transactionId}}\"\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Finalize a paid staged single-trip plan and return the issued policy number plus document links.\n- Call this only after the payment flow confirms a successful transactionId."
          },
          "response": []
        }
      ]
    },
    {
      "name": "02 - Annual Quote to Purchase",
      "description": "Published deferred annual-plan purchase flow.",
      "item": [
        {
          "name": "1. Annual Plan Quote",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual quote number is returned\", function () {",
                  "    pm.expect(json.data.annualPlanQuote.quoteNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "pm.test(\"At least one annual product is returned\", function () {",
                  "    pm.expect(json.data.annualPlanQuote.products).to.be.an('array').that.is.not.empty;",
                  "});",
                  "",
                  "const quoteNumberValue = json.data.annualPlanQuote.quoteNumber;",
                  "if (quoteNumberValue !== undefined && quoteNumberValue !== null) {",
                  "    pm.environment.set('quoteNumber', quoteNumberValue);",
                  "}",
                  "const selectedProductCodeValue = json.data.annualPlanQuote.products[0].productCode;",
                  "if (selectedProductCodeValue !== undefined && selectedProductCodeValue !== null) {",
                  "    pm.environment.set('selectedProductCode', selectedProductCodeValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation AnnualPlanQuote($annualPlanQuoteRequest: AnnualPlanQuoteRequestInput!) {\n  annualPlanQuote(annualPlanQuoteRequest: $annualPlanQuoteRequest) {\n    quoteNumber\n    products {\n      productId\n      productName\n      productCode\n      availablePaymentMethod {\n        paymentMethod\n      }\n      coverages {\n        productCoverageTypeCode\n        coverageLimits {\n          productCoverageLimitId\n          totalPrice\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"annualPlanQuoteRequest\": {\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"includeOptionalOnBase\": false,\n    \"effectiveDate\": \"{{annualEffectiveDate}}\",\n    \"residencyCountryIsoCode\": \"US\",\n    \"residencyStateIsoCode\": \"CT\",\n    \"travelers\": [\n      {\n        \"id\": 1,\n        \"primaryTraveler\": true,\n        \"firstName\": \"Jamie\",\n        \"lastName\": \"Example\",\n        \"dateOfBirth\": \"1985-03-20\",\n        \"email\": \"jamie@example.com\"\n      }\n    ],\n    \"tripSegment\": {\n      \"departureDate\": \"{{annualDepartureDate}}\",\n      \"returnDate\": \"{{annualReturnDate}}\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"GB\",\n          \"destinationName\": \"United Kingdom\"\n        }\n      ],\n      \"travelers\": [\n        {\n          \"id\": 1,\n          \"firstName\": \"Jamie\",\n          \"lastName\": \"Example\",\n          \"dateOfBirth\": \"1985-03-20\",\n          \"tripCost\": 3000\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Generate an annual-plan quote and retain quoteNumber plus the selected productCode.\n- Use this flow for recurring or multi-trip annual coverage rather than a single-trip plan."
          },
          "response": []
        },
        {
          "name": "2. Stage Annual Policy Purchase",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual stage returns a planGuid\", function () {",
                  "    pm.expect(json.data.stageAnnualPolicyPurchase.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const planGuidValue = json.data.stageAnnualPolicyPurchase.planGuid;",
                  "if (planGuidValue !== undefined && planGuidValue !== null) {",
                  "    pm.environment.set('planGuid', planGuidValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation StageAnnualPolicyPurchase($annualPolicyPurchaseStage: AnnualPolicyPurchaseStageInput!) {\n  stageAnnualPolicyPurchase(annualPolicyPurchaseStage: $annualPolicyPurchaseStage) {\n    planGuid\n  }\n}",
                "variables": "{\n  \"annualPolicyPurchaseStage\": {\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"quoteNumber\": \"{{quoteNumber}}\",\n    \"deliveryTypes\": [\n      {\n        \"deliveryType\": \"Email\"\n      }\n    ],\n    \"product\": {\n      \"productCode\": \"{{selectedProductCode}}\",\n      \"effectiveDate\": \"{{annualEffectiveDate}}\"\n    },\n    \"planTravelers\": [\n      {\n        \"id\": 1,\n        \"primaryTraveler\": true,\n        \"firstName\": \"Jamie\",\n        \"lastName\": \"Example\",\n        \"dateOfBirth\": \"1985-03-20\",\n        \"contactInfo\": {\n          \"email\": \"jamie@example.com\",\n          \"phoneNumbers\": [\n            \"860-555-0100\"\n          ],\n          \"address\": {\n            \"addressLine1\": \"123 Main Street\",\n            \"city\": \"Hartford\",\n            \"stateIsoCode\": \"CT\",\n            \"zipCode\": \"06101\",\n            \"countryIsoCode\": \"US\"\n          }\n        }\n      }\n    ],\n    \"tripSegment\": {\n      \"departureDate\": \"{{annualDepartureDate}}\",\n      \"returnDate\": \"{{annualReturnDate}}\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"GB\",\n          \"destinationName\": \"United Kingdom\"\n        }\n      ],\n      \"travelers\": [\n        {\n          \"id\": 1,\n          \"firstName\": \"Jamie\",\n          \"lastName\": \"Example\",\n          \"dateOfBirth\": \"1985-03-20\",\n          \"tripCost\": 3000\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Create the staged annual plan from the quoted annual product and traveler model.\n- Keep traveler IDs stable between annual quote and annual staging."
          },
          "response": []
        },
        {
          "name": "3. Process Payment",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual payment response includes planGuid\", function () {",
                  "    pm.expect(json.data.processPayment.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const paymentRequestIdValue = json.data.processPayment.paymentRequestId;",
                  "if (paymentRequestIdValue !== undefined && paymentRequestIdValue !== null) {",
                  "    pm.environment.set('paymentRequestId', paymentRequestIdValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation ProcessPayment($paymentProcessingRequest: PaymentProcessingRequestInput!) {\n  processPayment(paymentProcessingRequest: $paymentProcessingRequest) {\n    paymentRequestId\n    planGuid\n  }\n}",
                "variables": "{\n  \"paymentProcessingRequest\": {\n    \"planGuid\": \"{{planGuid}}\",\n    \"paymentMethod\": \"CreditCard\",\n    \"hostedPaymentUrl\": \"{{hostedPaymentUrl}}\"\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Annual staged purchase uses the same deferred payment mutation as the single-trip flow.\n- The staged planGuid comes from stageAnnualPolicyPurchase instead of stagePolicyPurchase."
          },
          "response": []
        },
        {
          "name": "4. Policy Bind Request",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual bind returns a planNumber\", function () {",
                  "    pm.expect(json.data.policyBindRequest.planNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const planNumberValue = json.data.policyBindRequest.planNumber;",
                  "if (planNumberValue !== undefined && planNumberValue !== null) {",
                  "    pm.environment.set('planNumber', planNumberValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation PolicyBindRequest($planGuid: UUID!, $transactionId: String) {\n  policyBindRequest(planGuid: $planGuid, transactionId: $transactionId) {\n    planNumber\n    cobDownloadLink\n    eobDownloadLink\n  }\n}",
                "variables": "{\n  \"planGuid\": \"{{planGuid}}\",\n  \"transactionId\": \"{{transactionId}}\"\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Annual staged purchase uses the same bind mutation as the single-trip flow.\n- Call this after the annual payment flow confirms a transactionId."
          },
          "response": []
        }
      ]
    },
    {
      "name": "03 - Quote Search and Requote",
      "description": "Find saved quotes, resume them, and regenerate updated quotes.",
      "item": [
        {
          "name": "Search Saved Quotes",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Search Saved Quotes returns a connection\", function () {",
                  "    pm.expect(json.data).to.have.property('searchSavedQuotes');",
                  "});",
                  "pm.test(\"Search Saved Quotes returns pageInfo\", function () {",
                  "    pm.expect(json.data.searchSavedQuotes.pageInfo).to.have.property('hasNextPage');",
                  "});",
                  "",
                  "const modificationTravelerIdValue = json.data.searchPlan.edges[0].node.planPrimaryTraveler.travelerId;",
                  "if (modificationTravelerIdValue !== undefined && modificationTravelerIdValue !== null) {",
                  "    pm.environment.set('modificationTravelerId', modificationTravelerIdValue);",
                  "}",
                  "const modificationTripIdValue = json.data.searchPlan.edges[0].node.segmentTripDetails[0].policySegmentGuid;",
                  "if (modificationTripIdValue !== undefined && modificationTripIdValue !== null) {",
                  "    pm.environment.set('modificationTripId', modificationTripIdValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query SearchSavedQuotes($quoteSearchRequest: QuoteSearchRequestInput!, $first: Int, $after: String) {\n  searchSavedQuotes(quoteSearchRequest: $quoteSearchRequest, first: $first, after: $after) {\n    totalCount\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n    edges {\n      cursor\n      node {\n        quoteNumber\n        createDate\n        departureDate\n        returnDate\n        agencyName\n        advisorName\n        planNumber\n      }\n    }\n  }\n}",
                "variables": "{\n  \"quoteSearchRequest\": {\n    \"email\": \"jamie@example.com\",\n    \"agencyNumber\": \"{{agencyNumber}}\"\n  },\n  \"first\": 10\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Search resumable saved quotes by email, quote number, agency context, or date criteria.\n- Use this before resuming or re-quoting a saved quote."
          },
          "response": []
        },
        {
          "name": "Saved Quote Details",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Saved quote is returned\", function () {",
                  "    pm.expect(json.data.savedQuote).to.be.an('object');",
                  "});",
                  "",
                  "const quoteNumberValue = json.data.savedQuote.quoteNumber;",
                  "if (quoteNumberValue !== undefined && quoteNumberValue !== null) {",
                  "    pm.environment.set('quoteNumber', quoteNumberValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query SavedQuote($quoteNumber: String!) {\n  savedQuote(quoteNumber: $quoteNumber) {\n    quoteNumber\n    quoteInput {\n      quoteNumber\n      agencyNumber\n      agentId\n      residencyCountryIsoCode\n      residencyStateIsoCode\n      trip {\n        departureDate\n        returnDate\n        destinations {\n          countryIsoCode\n          destinationName\n        }\n      }\n    }\n    quoteReminders {\n      optOut\n      first\n      second\n      third\n    }\n  }\n}",
                "variables": "{\n  \"quoteNumber\": \"Q-2026-EXAMPLE-0001\"\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Resume an existing quote before checkout or customer follow-up.\n- Treat returned pricing as resumable context rather than a locked-price artifact."
          },
          "response": []
        },
        {
          "name": "Modify Quote (Single Trip Requote)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Requote returns a new quote number\", function () {",
                  "    pm.expect(json.data.quote.quoteNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const quoteNumberValue = json.data.quote.quoteNumber;",
                  "if (quoteNumberValue !== undefined && quoteNumberValue !== null) {",
                  "    pm.environment.set('quoteNumber', quoteNumberValue);",
                  "}",
                  "const selectedProductCodeValue = json.data.quote.products[0].productCode;",
                  "if (selectedProductCodeValue !== undefined && selectedProductCodeValue !== null) {",
                  "    pm.environment.set('selectedProductCode', selectedProductCodeValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation GenerateQuote($quoteRequest: QuoteRequestInput!) {\n  quote(quoteRequest: $quoteRequest) {\n    quoteNumber\n    products {\n      productId\n      productName\n      productCode\n      coverages {\n        productCoverageTypeCode\n        coverageLimits {\n          productCoverageLimitId\n          totalPrice\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"quoteRequest\": {\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"residencyCountryIsoCode\": \"US\",\n    \"residencyStateIsoCode\": \"CT\",\n    \"trip\": {\n      \"departureDate\": \"2026-10-03\",\n      \"returnDate\": \"2026-10-10\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"IT\",\n          \"destinationName\": \"Italy\"\n        }\n      ],\n      \"travelers\": [\n        {\n          \"id\": 1,\n          \"primaryTraveler\": true,\n          \"firstName\": \"Alex\",\n          \"lastName\": \"Example\",\n          \"dateOfBirth\": \"1988-04-12\",\n          \"email\": \"alex@example.com\",\n          \"tripCost\": 4500\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- There is no separate published single-trip modifyQuote mutation; modify a saved quote by changing inputs and re-running quote.\n- Use Search Saved Quotes and Saved Quote Details first if you need to start from an existing quote."
          },
          "response": []
        },
        {
          "name": "Modify Quote (Annual Requote)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual requote returns a new quote number\", function () {",
                  "    pm.expect(json.data.annualPlanQuote.quoteNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const quoteNumberValue = json.data.annualPlanQuote.quoteNumber;",
                  "if (quoteNumberValue !== undefined && quoteNumberValue !== null) {",
                  "    pm.environment.set('quoteNumber', quoteNumberValue);",
                  "}",
                  "const selectedProductCodeValue = json.data.annualPlanQuote.products[0].productCode;",
                  "if (selectedProductCodeValue !== undefined && selectedProductCodeValue !== null) {",
                  "    pm.environment.set('selectedProductCode', selectedProductCodeValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation AnnualPlanQuote($annualPlanQuoteRequest: AnnualPlanQuoteRequestInput!) {\n  annualPlanQuote(annualPlanQuoteRequest: $annualPlanQuoteRequest) {\n    quoteNumber\n    products {\n      productId\n      productName\n      productCode\n      coverages {\n        productCoverageTypeCode\n        coverageLimits {\n          productCoverageLimitId\n          totalPrice\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"annualPlanQuoteRequest\": {\n    \"agencyNumber\": \"{{agencyNumber}}\",\n    \"agentId\": \"{{agentId}}\",\n    \"includeOptionalOnBase\": false,\n    \"effectiveDate\": \"{{annualEffectiveDate}}\",\n    \"residencyCountryIsoCode\": \"US\",\n    \"residencyStateIsoCode\": \"CT\",\n    \"travelers\": [\n      {\n        \"id\": 1,\n        \"primaryTraveler\": true,\n        \"firstName\": \"Jamie\",\n        \"lastName\": \"Example\",\n        \"dateOfBirth\": \"1985-03-20\",\n        \"email\": \"jamie@example.com\"\n      }\n    ]\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- There is no separate published annual modifyQuote mutation; update the annual quote inputs and re-run annualPlanQuote.\n- Use this when the partner needs to change annual travelers, effective date, or the optional trip segment before purchase."
          },
          "response": []
        }
      ]
    },
    {
      "name": "04 - Plan Search and Modification",
      "description": "Search issued plans and run staged modification flows, including annual servicing requests.",
      "item": [
        {
          "name": "Search Plans",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Search Plans returns a connection\", function () {",
                  "    pm.expect(json.data).to.have.property('searchPlan');",
                  "});",
                  "pm.test(\"Search Plans includes pagination metadata\", function () {",
                  "    pm.expect(json.data.searchPlan).to.have.property('pageInfo');",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query SearchPlans($planSearchRequest: PlanSearchRequestInput!, $first: Int, $after: String) {\n  searchPlan(planSearchRequest: $planSearchRequest, first: $first, after: $after) {\n    totalCount\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n    edges {\n      cursor\n      node {\n        planNumber\n        planStatus\n        planType\n        isActive\n        isAnnual\n        effectiveDate\n        expirationDate\n        planPrimaryTraveler {\n          travelerId\n          firstName\n          lastName\n          email\n        }\n        pricingDetail {\n          totalPrice\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"planSearchRequest\": {\n    \"planNumber\": \"{{planNumber}}\",\n    \"searchAllTravelers\": false,\n    \"strictSearch\": true\n  },\n  \"first\": 10\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Search issued plans by plan number, traveler details, agency context, or date criteria.\n- Use the returned planNumber for plan-modification requests."
          },
          "response": []
        },
        {
          "name": "Get Plan Modification Quote",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Modification quote echoes planNumber\", function () {",
                  "    pm.expect(json.data.planModificationQuote).to.have.property('planNumber');",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query GetPlanModificationQuote($modifyPlanQuoteRequest: ModifyPlanQuoteRequestInput!) {\n  planModificationQuote(modifyPlanQuoteRequest: $modifyPlanQuoteRequest) {\n    planNumber\n    availableCoverages {\n      productCoverageTypeCode\n      pricingCoverageLimits {\n        productCoverageLimitId\n        totalPrice\n      }\n    }\n    pricingDetail {\n      totalAmountDue\n    }\n  }\n}",
                "variables": "{\n  \"modifyPlanQuoteRequest\": {\n    \"planNumber\": \"{{planNumber}}\",\n    \"coveragesToAdd\": [\n      {\n        \"productCoverageLimitId\": 301,\n        \"productCoverageTypeCode\": \"CFAR\"\n      }\n    ]\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Generate a price impact quote before changing an issued plan.\n- Use this for coverage additions, traveler changes, destination changes, or trip-date changes."
          },
          "response": []
        },
        {
          "name": "Get Annual Plan Modification Quote",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual modification quote echoes planNumber\", function () {",
                  "    pm.expect(json.data.annualPlanModificationQuote).to.have.property('planNumber');",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "query AnnualPlanModificationQuote($modifyAnnualPlanQuoteRequest: ModifyAnnualPlanQuoteRequestInput!) {\n  annualPlanModificationQuote(modifyAnnualPlanQuoteRequest: $modifyAnnualPlanQuoteRequest) {\n    planNumber\n    availableCoverages {\n      coverageClassification\n      isBase\n      productCoverageId\n      productCoverageType\n      productCoverageTypeCode\n      customDates\n      pricingCoverageLimits {\n        totalPrice\n        productCoverageLimitId\n        maxPerPlanLimitAmount\n        maxPerPersonLimitAmount\n        travelerBreakdown {\n          id\n          price\n        }\n      }\n    }\n    pricingDetail {\n      totalAmountDue\n      travelerBreakdown {\n        travelerId\n        firstName\n        lastName\n        type\n        pricingDetail {\n          amountDue\n          productCoverageTypeCode\n          productCoverageLimitId\n        }\n      }\n    }\n  }\n}",
                "variables": "{\n  \"modifyAnnualPlanQuoteRequest\": {\n    \"planNumber\": \"{{planNumber}}\",\n    \"tripSegment\": {\n      \"action\": \"update\",\n      \"tripId\": \"{{modificationTripId}}\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"FR\"\n        }\n      ],\n      \"depositDate\": \"{{annualModificationDepositDate}}\",\n      \"departureDate\": \"{{annualModificationDepartureDate}}\",\n      \"returnDate\": \"{{annualModificationReturnDate}}\",\n      \"tripSegmentTravelers\": [\n        {\n          \"id\": \"{{modificationTravelerId}}\",\n          \"tripCost\": 2000\n        }\n      ],\n      \"coveragesToAdd\": [\n        {\n          \"productCoverageLimitId\": \"{{annualModificationCoverageLimitId}}\",\n          \"productCoverageTypeCode\": \"{{annualModificationCoverageTypeCode}}\"\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Generate a pricing quote before changing an annual plan's trip segment or annual trip coverages.\n- This annual-specific modification surface was traced from reviewed servicing requests in the raw export."
          },
          "response": []
        },
        {
          "name": "Initiate Plan Modification",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Modification planGuid is returned\", function () {",
                  "    pm.expect(json.data.planModifyRequest.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const modificationPlanGuidValue = json.data.planModifyRequest.planGuid;",
                  "if (modificationPlanGuidValue !== undefined && modificationPlanGuidValue !== null) {",
                  "    pm.environment.set('modificationPlanGuid', modificationPlanGuidValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation InitiatePlanModification($modifyPlanRequest: ModifyPlanRequestInput!) {\n  planModifyRequest(modifyPlanRequest: $modifyPlanRequest) {\n    planGuid\n  }\n}",
                "variables": "{\n  \"modifyPlanRequest\": {\n    \"planNumber\": \"{{planNumber}}\",\n    \"coveragesToAdd\": [\n      {\n        \"productCoverageLimitId\": 301,\n        \"productCoverageTypeCode\": \"CFAR\"\n      }\n    ],\n    \"deliveryTypeCodes\": [\n      {\n        \"deliveryType\": \"Email\"\n      }\n    ]\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Stage the approved plan changes and obtain a modificationPlanGuid for payment or direct finalization.\n- Run this after the customer approves the modification quote."
          },
          "response": []
        },
        {
          "name": "Initiate Annual Plan Modification",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Annual modification planGuid is returned\", function () {",
                  "    pm.expect(json.data.annualPlanModifyRequest.planGuid).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const modificationPlanGuidValue = json.data.annualPlanModifyRequest.planGuid;",
                  "if (modificationPlanGuidValue !== undefined && modificationPlanGuidValue !== null) {",
                  "    pm.environment.set('modificationPlanGuid', modificationPlanGuidValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation AnnualPlanModifyRequest($modifyAnnualPlanRequest: ModifyAnnualPlanRequestInput!) {\n  annualPlanModifyRequest(modifyAnnualPlanRequest: $modifyAnnualPlanRequest) {\n    planGuid\n  }\n}",
                "variables": "{\n  \"modifyAnnualPlanRequest\": {\n    \"planNumber\": \"{{planNumber}}\",\n    \"deliveryTypeCodes\": [\n      {\n        \"deliveryType\": \"Email\"\n      }\n    ],\n    \"tripSegment\": {\n      \"action\": \"update\",\n      \"tripId\": \"{{modificationTripId}}\",\n      \"destinations\": [\n        {\n          \"countryIsoCode\": \"FR\"\n        }\n      ],\n      \"departureDate\": \"{{annualModificationDepartureDate}}\",\n      \"returnDate\": \"{{annualModificationReturnDate}}\",\n      \"depositDate\": \"{{annualModificationDepositDate}}\",\n      \"tripSegmentTravelers\": [\n        {\n          \"id\": \"{{modificationTravelerId}}\",\n          \"tripCost\": 2000\n        }\n      ],\n      \"coveragesToAdd\": [\n        {\n          \"productCoverageLimitId\": \"{{annualModificationCoverageLimitId}}\",\n          \"productCoverageTypeCode\": \"{{annualModificationCoverageTypeCode}}\"\n        }\n      ]\n    }\n  }\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Stage the approved annual plan changes and capture modificationPlanGuid for shared payment and finalization.\n- This annual-specific modification stage was traced from reviewed servicing requests in the raw export."
          },
          "response": []
        },
        {
          "name": "Finalize Plan Modification",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "const json = pm.response.json();",
                  "",
                  "pm.test(\"No GraphQL errors\", function () {",
                  "    pm.expect(json).to.not.have.property('errors');",
                  "});",
                  "",
                  "pm.test(\"Finalized modification returns planNumber\", function () {",
                  "    pm.expect(json.data.planModify.planNumber).to.be.a('string').that.is.not.empty;",
                  "});",
                  "",
                  "const planNumberValue = json.data.planModify.planNumber;",
                  "if (planNumberValue !== undefined && planNumberValue !== null) {",
                  "    pm.environment.set('planNumber', planNumberValue);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "ApiKey {{apiToken}}",
                "type": "text"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "graphql",
              "graphql": {
                "query": "mutation FinalizePlanModification($planGuid: UUID!, $transactionId: String) {\n  planModify(planGuid: $planGuid, transactionId: $transactionId) {\n    planNumber\n    cobDownloadLink\n    eobDownloadLink\n  }\n}",
                "variables": "{\n  \"planGuid\": \"{{modificationPlanGuid}}\",\n  \"transactionId\": \"{{transactionId}}\"\n}"
              }
            },
            "url": {
              "raw": "{{graphqlBaseUrl}}",
              "host": [
                "{{graphqlBaseUrl}}"
              ]
            },
            "description": "- Finalize the staged plan modification after payment, if payment was required.\n- Use modificationPlanGuid from planModifyRequest or annualPlanModifyRequest and transactionId only when the change increased cost."
          },
          "response": []
        }
      ]
    }
  ]
}
