{
  "openapi": "3.0.1",
  "info": {
    "title": "POMMS - ATT Guarantee BSSE Fiber Availability API",
    "description": "Retrieves eligible ATT Guarantee restitution offers for BSSE fiber BANs. Validates the account via CG Orch V4, fetches restitution offers from PnO V2, and returns available guarantee options (speed upgrade, bill credit, coupon promo, no thanks).",
    "version": "2.0.0",
    "contact": {
      "name": "Commerce POMMS Team"
    }
  },
  "servers": [
    {
      "url": "https://apporigin-tst5-idpsales-e2.az.3pc.att.com:8443/msapi/sales/productoffermanagementms",
      "description": "TST5 Environment"
    },
    {
      "url": "https://apporigin-tst3-idpsales-e2.az.3pc.att.com:8443/msapi/sales/productoffermanagementms",
      "description": "TST3 Environment"
    }
  ],
  "tags": [
    {
      "name": "ProductAvailability V2",
      "description": "API for product availability operations"
    }
  ],
  "paths": {
    "/v2/product/availability": {
      "post": {
        "tags": [
          "ProductAvailability V2"
        ],
        "summary": "Retrieve available restitution offers for BSSE Fiber BAN",
        "description": "For the given BSSE fiber BAN, returns eligible ATT Guarantee restitution offers. Requires feature flag `svc-pomms-bsse-guarantee-availability-enabled` to be ON. Routing: productType must be a valid BSSE type, mode=RESTITUTION, intent=OFFERS, version=v2.",
        "operationId": "getProductAvailabilityV2BsseFiber",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer token for API authentication",
            "schema": {
              "type": "string",
              "example": "Bearer eyJhbGciOiJSUzI1NiIs..."
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "X-ATT-ClientId",
            "in": "header",
            "required": true,
            "description": "Client application identifier",
            "schema": {
              "type": "string",
              "example": "myATTNative"
            }
          },
          {
            "name": "idpctx-appname",
            "in": "header",
            "required": true,
            "description": "Calling application name",
            "schema": {
              "type": "string",
              "example": "myATTApp"
            }
          },
          {
            "name": "idpctx-uuid",
            "in": "header",
            "required": true,
            "description": "Correlation UUID for distributed tracing",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
            }
          },
          {
            "name": "idpctx-channel",
            "in": "header",
            "required": false,
            "description": "Channel identifier",
            "schema": {
              "type": "string",
              "example": "RETAIL"
            }
          },
          {
            "name": "idpctx-dealerid",
            "in": "header",
            "required": false,
            "description": "Dealer or agent code",
            "schema": {
              "type": "string",
              "example": "D12345"
            }
          },
          {
            "name": "idpctx-linkedbsseaccountnumbers",
            "in": "header",
            "required": false,
            "description": "Comma-separated linked BSSE account numbers",
            "schema": {
              "type": "string",
              "example": "551234567890,551234567891"
            }
          },
          {
            "name": "idpctx-feature-svc-pomms-bsse-guarantee-availability-enabled",
            "in": "header",
            "required": true,
            "description": "IXP feature flag — must be true to enable BSSE guarantee availability",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          },
          {
            "name": "idpctx-feature-svc-cams-pomms-v2-submit-change",
            "in": "header",
            "required": true,
            "description": "IXP feature flag — enables V2 PnO restitution flow",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductAvailabilityRequest"
              },
              "examples": {
                "bsse-tech-fast": {
                  "summary": "BSSE Tech Fast Guarantee - UVERSE",
                  "value": {
                    "ban": "551234567890",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "intent": "OFFERS",
                    "guaranteeType": "tech fast"
                  }
                },
                "bsse-call-back": {
                  "summary": "BSSE Call Back Guarantee - UVERSE",
                  "value": {
                    "ban": "551234567891",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "intent": "OFFERS",
                    "guaranteeType": "call back"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with available restitution offers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilitySuccessResponse"
                },
                "examples": {
                  "eligible-with-offers": {
                    "summary": "Eligible BAN with multiple restitution offers",
                    "value": {
                      "content": {
                        "ban": "551234567890",
                        "serviceType": "UVERSE",
                        "addressInfo": [
                          {
                            "billingAddressInfo": {
                              "mediumType": "postalAddress",
                              "preferred": true,
                              "characteristic": {
                                "street1": "123 Main St",
                                "city": "Dallas",
                                "stateOrProvince": "TX",
                                "postCode": "75201",
                                "country": "US"
                              }
                            }
                          }
                        ],
                        "availableRestitutions": [
                          {
                            "id": "REST-2026-001",
                            "ban": "551234567890",
                            "banDesignation": "PRIMARY",
                            "serviceType": "UVERSE",
                            "offerExpiryDateTime": "2027-01-15T23:59:59Z",
                            "eligibility": "ELIGIBLE",
                            "eligibilityReason": "Customer qualifies for ATT Fiber guarantee restitution",
                            "eligibilityReasonCode": "ELIGIBLE_GUARANTEE",
                            "guaranteeType": "tech fast",
                            "breachReportMonth": "2026-10",
                            "breachReportDate": "2026-10-15",
                            "restitutionSequence": "1",
                            "outageStartTime": "2026-10-15T08:00:00Z",
                            "outageEndTime": "2026-10-15T14:30:00Z",
                            "outageStartTimeinLocalTZ": "2026-10-15T03:00:00-05:00",
                            "outageEndTimeinLocalTZ": "2026-10-15T09:30:00-05:00",
                            "incidentIds": [
                              "INC00123456"
                            ],
                            "gtocIncidentId": "GTOC-2026-78901",
                            "breachedLines": [
                              {
                                "subscriber": "2145551234",
                                "subscriberDesignation": "PRIMARY"
                              }
                            ],
                            "restitutions": [
                              {
                                "offerId": "OFFER-SPD-001",
                                "id": "SPD-UPGRADE-001",
                                "type": "SPEED_UPGRADE",
                                "name": "Fiber Speed Upgrade - 500Mbps to 1Gbps",
                                "rank": "1",
                                "restitutionBenefits": [
                                  {
                                    "upgradeLineLimit": "1",
                                    "subscribers": [
                                      {
                                        "ctn": "2145551234",
                                        "designation": "PRIMARY"
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "offerId": "OFFER-BC-001",
                                "id": "BILL-CREDIT-001",
                                "type": "BILL_CREDIT",
                                "name": "$25 Bill Credit",
                                "rank": "2",
                                "restitutionBenefits": [
                                  {
                                    "productOffering": [
                                      {
                                        "name": "$25 Bill Credit for Fiber Outage",
                                        "description": "One-time bill credit for service disruption"
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "offerId": "OFFER-RC-001",
                                "id": "COUPON-CARD-001",
                                "type": "COUPON_PROMO",
                                "name": "ATTG - Broadband - Coupon for wireless accessory-CallBack",
                                "rank": "3"
                              },
                              {
                                "offerId": "restitution-offer-11020",
                                "type": "NO_THANKS",
                                "name": "No Thank you.-CallBack",
                                "rank": "4"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "ineligible": {
                    "summary": "BSSE BAN with no eligible restitutions",
                    "value": {
                      "content": {
                        "ban": "551234567890",
                        "serviceType": "UVERSE",
                        "availableRestitutions": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — missing or invalid fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing-guarantee-type": {
                    "summary": "Missing guarantee type for BSSE broadband",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_PRODUCTAVAILABILITY_BSSEBROADBAND_TECHFAST_MISSING_GUARANTEE_TYPE",
                        "message": "Missing or invalid guaranteeType for BSSE broadband availability request"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error — downstream system failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "cg-v4-failure": {
                    "summary": "Customer Graph V4 backend failure",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_CG_CUSTOMER_API_BACKEND_ERROR",
                        "message": "Customer Graph V4 customer API backend error"
                      }
                    }
                  },
                  "pno-failure": {
                    "summary": "PnO V2 restitutions backend failure",
                    "value": {
                      "error": {
                        "code": "MS_PRODUCTOFFERS_RESTITUTIONS_API_BACKEND_ERROR",
                        "message": "Product offers restitutions API backend error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProductAvailabilityRequest": {
        "type": "object",
        "required": [
          "ban",
          "productType",
          "mode",
          "intent"
        ],
        "properties": {
          "ban": {
            "type": "string",
            "description": "BSSE fiber BAN — 12-digit, starts with 55",
            "pattern": "^55\\d{10}$",
            "example": "551234567890"
          },
          "accountNumber": {
            "type": "string",
            "description": "Alias for ban — either may be used",
            "example": "551234567890"
          },
          "productType": {
            "type": "string",
            "description": "Product type for the availability check",
            "enum": [
              "UVERSE",
              "WIRELESS",
              "WIRELESSBROADBAND"
            ],
            "example": "UVERSE"
          },
          "mode": {
            "type": "string",
            "description": "Operation mode",
            "enum": [
              "RESTITUTION"
            ],
            "example": "RESTITUTION"
          },
          "intent": {
            "type": "string",
            "description": "Intent of the availability check",
            "enum": [
              "OFFERS"
            ],
            "example": "OFFERS"
          },
          "guaranteeType": {
            "type": "string",
            "description": "Type of ATT Guarantee",
            "enum": [
              "tech fast",
              "call back"
            ],
            "example": "tech fast"
          },
          "subscriberDetails": {
            "type": "array",
            "description": "Subscriber data — required when productType is WIRELESS",
            "items": {
              "$ref": "#/components/schemas/SubscriberDetails"
            }
          },
          "deviceId": {
            "type": "string",
            "description": "Current device ID",
            "example": "65838021382177962"
          },
          "requestedDate": {
            "type": "string",
            "description": "Requested date in ISO-8601 format",
            "example": "2026-11-01T00:00:00Z"
          },
          "reasonCode": {
            "type": "string",
            "description": "Reason code for the availability request"
          }
        }
      },
      "SubscriberDetails": {
        "type": "object",
        "properties": {
          "subscriberNumber": {
            "type": "string",
            "description": "CTN (subscriber phone number)",
            "example": "2145551234"
          },
          "market": {
            "type": "string",
            "description": "Subscriber market",
            "example": "DFW"
          },
          "subMarket": {
            "type": "string",
            "description": "Subscriber sub-market",
            "example": "DALLAS"
          }
        }
      },
      "AvailabilitySuccessResponse": {
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/components/schemas/ProductAvailabilityV2Response"
          }
        }
      },
      "ProductAvailabilityV2Response": {
        "type": "object",
        "properties": {
          "ban": {
            "type": "string",
            "description": "Account number",
            "example": "551234567890"
          },
          "serviceType": {
            "type": "string",
            "description": "Resolved service/product type",
            "example": "UVERSE"
          },
          "addressInfo": {
            "type": "array",
            "description": "Billing address information",
            "items": {
              "$ref": "#/components/schemas/RestitutionAddressInfo"
            }
          },
          "availableRestitutions": {
            "type": "array",
            "description": "List of available guarantee restitution offers",
            "items": {
              "$ref": "#/components/schemas/ProductAvailabilityRestitutionResponse"
            }
          }
        }
      },
      "RestitutionAddressInfo": {
        "type": "object",
        "properties": {
          "billingAddressInfo": {
            "$ref": "#/components/schemas/BillingAddressInfo"
          }
        }
      },
      "BillingAddressInfo": {
        "type": "object",
        "properties": {
          "mediumType": {
            "type": "string",
            "description": "Address type",
            "example": "postalAddress"
          },
          "preferred": {
            "type": "boolean",
            "description": "Whether this is the preferred address",
            "example": true
          },
          "characteristic": {
            "$ref": "#/components/schemas/BillingContactCharacteristic"
          }
        }
      },
      "BillingContactCharacteristic": {
        "type": "object",
        "properties": {
          "street1": {
            "type": "string",
            "example": "123 Main St"
          },
          "street2": {
            "type": "string",
            "example": "Apt 4B"
          },
          "city": {
            "type": "string",
            "example": "Dallas"
          },
          "stateOrProvince": {
            "type": "string",
            "example": "TX"
          },
          "postCode": {
            "type": "string",
            "example": "75201"
          },
          "country": {
            "type": "string",
            "example": "US"
          }
        }
      },
      "ProductAvailabilityRestitutionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Restitution ID",
            "example": "REST-2026-001"
          },
          "ban": {
            "type": "string",
            "description": "Account number",
            "example": "551234567890"
          },
          "banDesignation": {
            "type": "string",
            "description": "BAN designation",
            "example": "PRIMARY"
          },
          "serviceType": {
            "type": "string",
            "description": "Service type",
            "example": "UVERSE"
          },
          "offerExpiryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Offer expiration (ISO-8601 UTC)",
            "example": "2027-01-15T23:59:59Z"
          },
          "eligibility": {
            "type": "string",
            "description": "Eligibility status",
            "enum": [
              "ELIGIBLE",
              "INELIGIBLE"
            ],
            "example": "ELIGIBLE"
          },
          "eligibilityReason": {
            "type": "string",
            "description": "Human-readable eligibility reason",
            "example": "Customer qualifies for ATT Fiber guarantee restitution"
          },
          "eligibilityReasonCode": {
            "type": "string",
            "description": "Machine-readable eligibility reason code",
            "example": "ELIGIBLE_GUARANTEE"
          },
          "guaranteeType": {
            "type": "string",
            "description": "ATT Guarantee type",
            "enum": [
              "tech fast",
              "call back"
            ],
            "example": "tech fast"
          },
          "breachReportMonth": {
            "type": "string",
            "description": "Month of the breach report (YYYY-MM)",
            "example": "2026-10"
          },
          "breachReportDate": {
            "type": "string",
            "description": "Date of the breach report (YYYY-MM-DD)",
            "example": "2026-10-15"
          },
          "restitutionSequence": {
            "type": "string",
            "description": "Restitution sequence number",
            "example": "1"
          },
          "outageStartTime": {
            "type": "string",
            "format": "date-time",
            "description": "Outage start time (UTC ISO-8601)",
            "example": "2026-10-15T08:00:00Z"
          },
          "outageEndTime": {
            "type": "string",
            "format": "date-time",
            "description": "Outage end time (UTC ISO-8601)",
            "example": "2026-10-15T14:30:00Z"
          },
          "outageStartTimeinLocalTZ": {
            "type": "string",
            "description": "Outage start time in customer's local timezone",
            "example": "2026-10-15T03:00:00-05:00"
          },
          "outageEndTimeinLocalTZ": {
            "type": "string",
            "description": "Outage end time in customer's local timezone",
            "example": "2026-10-15T09:30:00-05:00"
          },
          "incidentIds": {
            "type": "array",
            "description": "Network incident IDs",
            "items": {
              "type": "string"
            },
            "example": [
              "INC00123456"
            ]
          },
          "gtocIncidentId": {
            "type": "string",
            "description": "GTOC incident ID",
            "example": "GTOC-2026-78901"
          },
          "breachedLines": {
            "type": "array",
            "description": "Subscriber lines affected by the outage",
            "items": {
              "$ref": "#/components/schemas/BreachedLine"
            }
          },
          "restitutions": {
            "type": "array",
            "description": "Available restitution offer options",
            "items": {
              "$ref": "#/components/schemas/RestitutionOffersDetailsResponse"
            }
          }
        }
      },
      "BreachedLine": {
        "type": "object",
        "properties": {
          "subscriber": {
            "type": "string",
            "description": "CTN of the breached line",
            "example": "2145551234"
          },
          "subscriberDesignation": {
            "type": "string",
            "description": "Subscriber designation (PRIMARY, ADDITIONAL)",
            "example": "PRIMARY"
          }
        }
      },
      "RestitutionOffersDetailsResponse": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "description": "Parent offer ID",
            "example": "OFFER-SPD-001"
          },
          "id": {
            "type": "string",
            "description": "Restitution option ID",
            "example": "SPD-UPGRADE-001"
          },
          "type": {
            "type": "string",
            "description": "Restitution offer type",
            "enum": [
              "SPEED_UPGRADE",
              "BILL_CREDIT",
              "COUPON_PROMO",
              "NO_THANKS"
            ],
            "example": "SPEED_UPGRADE"
          },
          "name": {
            "type": "string",
            "description": "Display name of the offer",
            "example": "Fiber Speed Upgrade - 500Mbps to 1Gbps"
          },
          "rank": {
            "type": "string",
            "description": "Display priority (1 = highest)",
            "example": "1"
          },
          "restitutionBenefits": {
            "type": "array",
            "description": "Benefit details (structure varies by offer type)",
            "items": {
              "$ref": "#/components/schemas/RestitutionBenefitsResponse"
            }
          }
        }
      },
      "RestitutionBenefitsResponse": {
        "type": "object",
        "description": "Benefits for the restitution offer. For SPEED_UPGRADE: subscribers + upgradeLineLimit. For COUPON_PROMO/BILL_CREDIT: productOffering.",
        "properties": {
          "upgradeLineLimit": {
            "type": "string",
            "description": "Max lines eligible for upgrade (SPEED_UPGRADE only)",
            "example": "1"
          },
          "subscribers": {
            "type": "array",
            "description": "Eligible subscribers (SPEED_UPGRADE only)",
            "items": {
              "$ref": "#/components/schemas/SubscribersResponse"
            }
          },
          "productOffering": {
            "type": "array",
            "description": "Product offering details (COUPON_PROMO, BILL_CREDIT)",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingResponse"
            }
          }
        }
      },
      "SubscribersResponse": {
        "type": "object",
        "properties": {
          "ctn": {
            "type": "string",
            "description": "Subscriber phone number",
            "example": "2145551234"
          },
          "designation": {
            "type": "string",
            "description": "Subscriber designation",
            "example": "PRIMARY"
          }
        }
      },
      "ProductOfferingResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Offering name",
            "example": "$25 Bill Credit for Fiber Outage"
          },
          "description": {
            "type": "string",
            "description": "Offering description",
            "example": "One-time bill credit for service disruption"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable error code",
                "example": "MS_POMMS_CG_CUSTOMER_API_BACKEND_ERROR"
              },
              "message": {
                "type": "string",
                "description": "Human-readable error message",
                "example": "Customer Graph V4 customer API backend error"
              }
            }
          }
        }
      }
    }
  }
}