{
  "openapi": "3.0.1",
  "info": {
    "title": "POMMS - ATT Guarantee BSSE Fiber Submit Change API",
    "description": "Submits a restitution offer redemption for BSSE fiber BANs. Validates account via CG Orch V4, verifies eligibility via PnO V2, discovers offers via PnO Discovery, submits a shopping cart, updates CG restitution status, and publishes CLM/CDO events.",
    "version": "1.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": "SubmitChangeRestitution",
      "description": "Submit change restitution operations for ATT Guarantee"
    }
  ],
  "paths": {
    "/v1/product/submitchange": {
      "post": {
        "tags": [
          "SubmitChangeRestitution"
        ],
        "summary": "Submit restitution offer redemption for BSSE Fiber BAN",
        "description": "Submits a selected ATT Guarantee restitution offer for redemption. Requires feature flag `svc-pomms-bsse-guarantee-availability-enabled` to be ON. Routing: BAN must be a 12-digit BSSE account (starts with 55), mode=RESTITUTION, type=SPEED_UPGRADE (or other restitution types).",
        "operationId": "submitChangeBsseFiberGuarantee",
        "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"
            }
          },
          {
            "name": "idpctx-feature-svc-pomms-bsse-guarantee-availability-enabled",
            "in": "header",
            "required": true,
            "description": "IXP feature flag — must be true to enable BSSE guarantee flow",
            "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"
            }
          },
          {
            "name": "idpctx-feature-svc-pomms-bsse-bill-credit-enabled",
            "in": "header",
            "required": false,
            "description": "IXP feature flag — enables bill credit restitution type",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          },
          {
            "name": "idpctx-feature-svc-pomms-bups-bill-credit-call-enable",
            "in": "header",
            "required": false,
            "description": "IXP feature flag — enables BUPS bill credit call",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "example": "true"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitChangeRequest"
              },
              "examples": {
                "speed-upgrade-tech-fast": {
                  "summary": "Speed Upgrade — BSSE Tech Fast",
                  "value": {
                    "ban": "551234567890",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "type": "SPEED_UPGRADE",
                    "intent": "OFFERS",
                    "guaranteeType": "tech fast",
                    "id": "REST-2026-001",
                    "offerId": "OFFER-SPD-001",
                    "subscribers": [
                      "2145551234"
                    ],
                    "browserId": "browser-session-abc123",
                    "channel": {
                      "name": "RETAIL"
                    }
                  }
                },
                "bill-credit-call-back": {
                  "summary": "Bill Credit — BSSE Call Back",
                  "value": {
                    "ban": "551234567891",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "type": "BILL_CREDIT",
                    "intent": "OFFERS",
                    "guaranteeType": "call back",
                    "id": "REST-2026-002",
                    "offerId": "OFFER-BC-001",
                    "subscribers": [
                      "2145551234"
                    ],
                    "browserId": "browser-session-abc123",
                    "channel": {
                      "name": "RETAIL"
                    }
                  }
                },
                "coupon-promo-call-back": {
                  "summary": "Coupon Promo — BSSE Call Back",
                  "value": {
                    "ban": "551234567891",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "type": "COUPON_PROMO",
                    "intent": "OFFERS",
                    "guaranteeType": "call back",
                    "id": "REST-2026-002",
                    "offerId": "OFFER-CP-001",
                    "subscribers": [
                      "2145551234"
                    ],
                    "browserId": "browser-session-abc123",
                    "channel": {
                      "name": "RETAIL"
                    }
                  }
                },
                "no-thanks-tech-fast": {
                  "summary": "No Thanks (Decline) — BSSE Tech Fast",
                  "value": {
                    "ban": "551234567890",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "type": "NO_THANKS",
                    "intent": "OFFERS",
                    "guaranteeType": "tech fast",
                    "id": "REST-2026-001",
                    "offerId": "OFFER-NT-001",
                    "browserId": "browser-session-abc123",
                    "channel": {
                      "name": "RETAIL"
                    }
                  }
                },
                "speed-upgrade-with-terms": {
                  "summary": "Speed Upgrade with Terms & Conditions — Tech Fast",
                  "value": {
                    "ban": "551234567890",
                    "productType": "UVERSE",
                    "mode": "RESTITUTION",
                    "type": "SPEED_UPGRADE",
                    "intent": "OFFERS",
                    "guaranteeType": "tech fast",
                    "id": "REST-2026-001",
                    "offerId": "OFFER-SPD-001",
                    "subscribers": [
                      "2145551234"
                    ],
                    "browserId": "browser-session-abc123",
                    "termsAndConditions": [
                      {
                        "type": "ATT_GUARANTEE_TNC",
                        "version": "1.0",
                        "contentUrl": "https://www.att.com/legal/terms/guarantee"
                      }
                    ],
                    "channel": {
                      "name": "RETAIL"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with restitution redemption result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitChangeSuccessResponse"
                },
                "examples": {
                  "redeemed": {
                    "summary": "Speed Upgrade successfully redeemed",
                    "value": {
                      "content": {
                        "status": "REDEEMED",
                        "id": "REST-2026-001",
                        "offerId": "OFFER-SPD-001",
                        "type": "SPEED_UPGRADE",
                        "name": "Fiber Speed Upgrade - 500Mbps to 1Gbps",
                        "rank": "1",
                        "guaranteeType": "tech fast"
                      }
                    }
                  },
                  "ineligible": {
                    "summary": "Customer ineligible for the offer",
                    "value": {
                      "content": {
                        "status": "INELIGIBLE",
                        "id": "REST-2026-001",
                        "offerId": "OFFER-SPD-001",
                        "type": "SPEED_UPGRADE",
                        "name": "Fiber Speed Upgrade - 500Mbps to 1Gbps",
                        "rank": "1",
                        "guaranteeType": "tech fast"
                      }
                    }
                  },
                  "informed-no-thanks": {
                    "summary": "No Thanks — customer informed",
                    "value": {
                      "content": {
                        "status": "INFORMED",
                        "id": "REST-2026-001",
                        "offerId": "OFFER-NT-001",
                        "type": "NO_THANKS",
                        "name": "No Thanks",
                        "rank": "4",
                        "guaranteeType": "tech fast"
                      }
                    }
                  },
                  "bill-credit-redeemed": {
                    "summary": "Bill Credit successfully redeemed — Call Back",
                    "value": {
                      "content": {
                        "status": "REDEEMED",
                        "id": "REST-2026-002",
                        "offerId": "OFFER-BC-001",
                        "type": "BILL_CREDIT",
                        "name": "$25 Bill Credit",
                        "rank": "2",
                        "guaranteeType": "call back"
                      }
                    }
                  },
                  "unredeemed": {
                    "summary": "Offer available but not yet redeemed",
                    "value": {
                      "content": {
                        "status": "UNREDEEMED",
                        "id": "REST-2026-001",
                        "offerId": "OFFER-SPD-001",
                        "type": "SPEED_UPGRADE",
                        "name": "Fiber Speed Upgrade - 500Mbps to 1Gbps",
                        "rank": "1",
                        "guaranteeType": "tech fast"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — missing or invalid fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing-browser-id": {
                    "summary": "Missing browserId",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_SUBMITCHANGE_MISSING_BROWSERID",
                        "message": "Missing browserId in submit change request"
                      }
                    }
                  },
                  "invalid-product-type": {
                    "summary": "Invalid product type",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_SUBMITCHANGE_INVALID_PRODUCT_TYPE",
                        "message": "Invalid product type for submit change request"
                      }
                    }
                  },
                  "missing-ban": {
                    "summary": "Missing or invalid BAN",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_SUBMITCHANGE_MISSING_BAN",
                        "message": "Missing or invalid BAN in submit change request"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error — downstream system failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "cart-failure": {
                    "summary": "Shopping cart submission failure",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_SHOPPING_SUBMIT_CART_BACKEND_API_FAILURE",
                        "message": "Shopping cart submit API backend failure"
                      }
                    }
                  },
                  "pno-failure": {
                    "summary": "PnO V2 restitutions backend failure",
                    "value": {
                      "error": {
                        "code": "MS_PRODUCTOFFERS_RESTITUTIONS_API_BACKEND_ERROR",
                        "message": "Product offers restitutions API backend error"
                      }
                    }
                  },
                  "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"
                      }
                    }
                  },
                  "cg-restitution-update-failure": {
                    "summary": "CG Restitution update failure",
                    "value": {
                      "error": {
                        "code": "MS_POMMS_CG_RESTITUTION_API_BACKEND_FAILURE",
                        "message": "Customer Graph restitution update API backend failure"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SubmitChangeRequest": {
        "type": "object",
        "required": [
          "ban",
          "productType",
          "mode",
          "type",
          "id",
          "offerId",
          "browserId"
        ],
        "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",
            "example": "551234567890"
          },
          "productType": {
            "type": "string",
            "description": "Product type",
            "enum": [
              "UVERSE",
              "WIRELESS",
              "WIRELESSBROADBAND"
            ],
            "example": "UVERSE"
          },
          "mode": {
            "type": "string",
            "description": "Operation mode",
            "enum": [
              "RESTITUTION"
            ],
            "example": "RESTITUTION"
          },
          "type": {
            "type": "string",
            "description": "Restitution type to redeem",
            "enum": [
              "SPEED_UPGRADE",
              "BILL_CREDIT",
              "COUPON_PROMO",
              "NO_THANKS"
            ],
            "example": "SPEED_UPGRADE"
          },
          "intent": {
            "type": "string",
            "description": "Intent of the submit change",
            "example": "OFFERS"
          },
          "guaranteeType": {
            "type": "string",
            "description": "ATT Guarantee type",
            "enum": [
              "tech fast",
              "call back"
            ],
            "example": "tech fast"
          },
          "id": {
            "type": "string",
            "description": "Restitution ID (from /v2/availability response)",
            "example": "REST-2026-001"
          },
          "offerId": {
            "type": "string",
            "description": "Offer ID to redeem (from /v2/availability response)",
            "example": "OFFER-SPD-001"
          },
          "subscribers": {
            "type": "array",
            "description": "CTN list for the restitution (required for speed upgrade)",
            "items": {
              "type": "string"
            },
            "example": [
              "2145551234"
            ]
          },
          "browserId": {
            "type": "string",
            "description": "Browser session ID — required for cart submission",
            "example": "browser-session-abc123"
          },
          "cartId": {
            "type": "string",
            "description": "Pre-existing cart ID (if resuming a cart session)",
            "example": "CART-12345"
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date (YYYYMMDD format)",
            "pattern": "^\\d{8}$",
            "example": "20261115"
          },
          "termsAndConditions": {
            "type": "array",
            "description": "Terms and conditions acceptance",
            "items": {
              "$ref": "#/components/schemas/TermsAndConditions"
            }
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "orderRelationship": {
            "type": "array",
            "description": "Order relationship details",
            "items": {
              "$ref": "#/components/schemas/OrderRelationship"
            }
          },
          "productOrderItem": {
            "type": "array",
            "description": "Product order items with offering details",
            "items": {
              "$ref": "#/components/schemas/RequestProductOrderItem"
            }
          },
          "orderExtensions": {
            "type": "array",
            "description": "Custom extension data for the order",
            "items": {
              "$ref": "#/components/schemas/Extension"
            }
          },
          "ratingType": {
            "type": "string",
            "description": "Rating type"
          },
          "offerCode": {
            "type": "string",
            "description": "Offer code"
          },
          "reasonCode": {
            "type": "string",
            "description": "Reason code for the change"
          },
          "requestedDate": {
            "type": "string",
            "description": "Requested date"
          }
        }
      },
      "TermsAndConditions": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Agreement type",
            "example": "ATT_GUARANTEE_TNC"
          },
          "version": {
            "type": "string",
            "description": "Content version",
            "example": "1.0"
          },
          "contentUrl": {
            "type": "string",
            "description": "URL to the terms content",
            "example": "https://www.att.com/legal/terms/guarantee"
          }
        }
      },
      "Channel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Channel name",
            "example": "RETAIL"
          }
        }
      },
      "OrderRelationship": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Related order ID"
          },
          "type": {
            "type": "string",
            "description": "Relationship type"
          }
        }
      },
      "RequestProductOrderItem": {
        "type": "object",
        "properties": {
          "productOffering": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Product offering ID"
              },
              "productOfferingType": {
                "type": "string",
                "description": "Offering type (e.g., SIM)"
              }
            }
          },
          "actionReason": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Action reason name"
                }
              }
            }
          }
        }
      },
      "Extension": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Extension key"
          },
          "value": {
            "type": "string",
            "description": "Extension value"
          }
        }
      },
      "SubmitChangeSuccessResponse": {
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/components/schemas/SubmitChangeRestitutionCommonResponse"
          }
        }
      },
      "SubmitChangeRestitutionCommonResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Redemption outcome status",
            "enum": [
              "REDEEMED",
              "INELIGIBLE",
              "UNREDEEMED",
              "PARTIAL_REDEEMED",
              "INFORMED",
              "REMINDED"
            ],
            "example": "REDEEMED"
          },
          "id": {
            "type": "string",
            "description": "Restitution ID",
            "example": "REST-2026-001"
          },
          "offerId": {
            "type": "string",
            "description": "Offer ID that was redeemed",
            "example": "OFFER-SPD-001"
          },
          "type": {
            "type": "string",
            "description": "Restitution type",
            "enum": [
              "SPEED_UPGRADE",
              "BILL_CREDIT",
              "COUPON_PROMO",
              "NO_THANKS"
            ],
            "example": "SPEED_UPGRADE"
          },
          "name": {
            "type": "string",
            "description": "Offer display name",
            "example": "Fiber Speed Upgrade - 500Mbps to 1Gbps"
          },
          "rank": {
            "type": "string",
            "description": "Offer priority rank (1 = highest)",
            "example": "1"
          },
          "guaranteeType": {
            "type": "string",
            "description": "ATT Guarantee type",
            "enum": [
              "tech fast",
              "call back"
            ],
            "example": "tech fast"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable error code",
                "example": "MS_POMMS_SHOPPING_SUBMIT_CART_BACKEND_API_FAILURE"
              },
              "message": {
                "type": "string",
                "description": "Human-readable error message",
                "example": "Shopping cart submit API backend failure"
              }
            }
          }
        }
      }
    }
  }
}