{
  "openapi": "3.1.2",
  "info": {
    "title": "Products and Offers API",
    "description": "Products and Offers API can be used to search bundle offer consisting of plans, addons and promotions. This will also provide lookup APIs for addons, devices, sims, offers.",
    "version": "1.0.0",
    "contact": {
      "name": "Omni API Support",
      "email": "DL-OmniAdapter@att.com"
    }
  },
  "servers": [
    {
      "url": "https://partner.att.com/omni-svcs"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Product And Offers",
      "description": "Product And Offers API for searching product offerings"
    },
    {
      "name": "Promotions APIs",
      "description": "Apis for searching Promotions"
    },
    {
      "name": "Tradein devices APIs",
      "x-tags": [
        "Wireless-Tradein"
      ],
      "description": "Apis for getting hyla tradein device details"
    }
  ],
  "paths": {
    "/v1/promotions/potential-promotions": {
      "post": {
        "tags": [
          "Promotions APIs"
        ],
        "x-tags": [
          "Wireless-Tradein"
        ],
        "summary": "Check potential promotion eligibility",
        "description": "Evaluate promotion eligibility for a device context.",
        "operationId": "evaluatePromotionEligibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromotionEligibilityRequest"
              },
              "examples": {
                "PromotionEligibilityByImei": {
                  "summary": "Promo eligibility details by for imei",
                  "value": {
                    "imei": "12345789",
                    "qualificationType": "Trade-In",
                    "deviceBillCode": "689C",
                    "flowType": "UP",
                    "deviceConditionAnswers": [
                      {
                        "name": "ATT_GENERIC",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "LCD_FUNCTIONALITY",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "POWER_ON",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "DEACTIVATED",
                        "value": [
                          "Yes"
                        ]
                      }
                    ]
                  }
                },
                "PromotionEligibilityByDeviceIdentifier": {
                  "summary": "Promo eligibility by hyla device id",
                  "value": {
                    "make": "Apple",
                    "model": "Iphone 12 Pro",
                    "capacity": "128GB",
                    "qualificationType": "Trade-In",
                    "deviceBillCode": "689C",
                    "flowType": "UP",
                    "tradeInModelCode": "2234245",
                    "deviceConditionAnswers": [
                      {
                        "name": "ATT_GENERIC",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "LCD_FUNCTIONALITY",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "POWER_ON",
                        "value": [
                          "Yes"
                        ]
                      },
                      {
                        "name": "DEACTIVATED",
                        "value": [
                          "Yes"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualification response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualificationResponse"
                },
                "example": {
                  "qualificationType": "Trade-In",
                  "potentialQualificationItem": [
                    {
                      "characteristic": [
                        {
                          "name": "tradeInValue",
                          "value": "81.0"
                        },
                        {
                          "name": "tradeInModel",
                          "value": "iPhone 14 Pro"
                        }
                      ],
                      "potentialPromotion": [
                        {
                          "id": "wrlspr-29966",
                          "promotion": {
                            "id": "wrlspr-29966",
                            "name": "OFFER APPLIED: You're getting up to $350 off with elig. trade-in on installment &amp;amp; elig. unlimited plan (speed restr's apply). Credits start within 3 bills. Without unlimited, device is full price.",
                            "promotionCharacteristics": [
                              {
                                "name": "discount",
                                "value": "350.0"
                              },
                              {
                                "name": "promotype",
                                "value": "tradeIn"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.. Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/tradein/devices": {
      "get": {
        "tags": [
          "Tradein devices APIs"
        ],
        "x-tags": [
          "Wireless-Tradein"
        ],
        "summary": "List trade-in eligible device categories",
        "description": "Returns trade-in device categories, makes, hyla codes and associated questions used for trade-in flows.",
        "operationId": "getTradeInDevices",
        "responses": {
          "200": {
            "description": "Successful retrieval of trade-in device details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeInDetails"
                },
                "example": {
                  "devices": [
                    {
                      "category": "phone",
                      "questions": [
                        {
                          "questionCode": "ATT_GENERIC",
                          "text": "Is the device in good condition (no cracks, breaks, or missing parts)?",
                          "helpText": "A device is considered in good condition if it has no cracks, breaks, or missing parts.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "ATT_GENERIC"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "ATT_GENERIC"
                            }
                          ]
                        },
                        {
                          "questionCode": "POWER_ON",
                          "text": "Does the device power on?",
                          "helpText": "A device powers on if it can be turned on and reaches the home screen.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "POWER_ON"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "POWER_ON"
                            }
                          ]
                        },
                        {
                          "questionCode": "LCD_FUNCTIONALITY",
                          "text": "Is the device's LCD screen functional?",
                          "helpText": "An LCD screen is considered functional if it displays images correctly without any distortion or dead pixels.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "LCD_FUNCTIONALITY"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "LCD_FUNCTIONALITY"
                            }
                          ]
                        },
                        {
                          "questionCode": "DEACTIVATED",
                          "text": "Is the device deactivated from any previous carrier?",
                          "helpText": "A device is considered deactivated if it is no longer associated with any previous carrier and can be activated on a new network.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "DEACTIVATED"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "DEACTIVATED"
                            }
                          ]
                        }
                      ],
                      "makes": [
                        {
                          "name": "Apple",
                          "models": [
                            {
                              "name": "iPhone 15 Pro Max",
                              "productFamily": [
                                {
                                  "name": "iPhone 15 Pro Max",
                                  "tradeInModelCode": "2440093",
                                  "capacity": "1TB"
                                },
                                {
                                  "name": "iPhone 15 Pro Max",
                                  "tradeInModelCode": "2440094",
                                  "capacity": "256GB"
                                },
                                {
                                  "name": "iPhone 15 Pro Max",
                                  "tradeInModelCode": "2440095",
                                  "capacity": "512GB"
                                }
                              ]
                            },
                            {
                              "name": "iPhone 12 Pro",
                              "productFamily": [
                                {
                                  "name": "iPhone 12 Pro",
                                  "tradeInModelCode": "2234245",
                                  "capacity": "128GB"
                                },
                                {
                                  "name": "iPhone 12 Pro",
                                  "tradeInModelCode": "2234251",
                                  "capacity": "256GB"
                                },
                                {
                                  "name": "iPhone 12 Pro",
                                  "tradeInModelCode": "2234257",
                                  "capacity": "512GB"
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "otherMakes": [
                        {
                          "name": "Google",
                          "models": [
                            {
                              "name": "Pixel 3",
                              "productFamily": [
                                {
                                  "name": "Pixel 3",
                                  "tradeInModelCode": "1556785",
                                  "capacity": "64GB"
                                },
                                {
                                  "name": "Pixel 3",
                                  "tradeInModelCode": "1556784",
                                  "capacity": "128GB"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "category": "tablet",
                      "questions": [
                        {
                          "questionCode": "ATT_GENERIC",
                          "text": "Is the device in good condition (no cracks, breaks, or missing parts)?",
                          "helpText": "A device is considered in good condition if it has no cracks, breaks, or missing parts.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "ATT_GENERIC"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "ATT_GENERIC"
                            }
                          ]
                        },
                        {
                          "questionCode": "POWER_ON",
                          "text": "Does the device power on?",
                          "helpText": "A device powers on if it can be turned on and reaches the home screen.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "POWER_ON"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "POWER_ON"
                            }
                          ]
                        },
                        {
                          "questionCode": "LCD_FUNCTIONALITY",
                          "text": "Is the device's LCD screen functional?",
                          "helpText": "An LCD screen is considered functional if it displays images correctly without any distortion or dead pixels.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "LCD_FUNCTIONALITY"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "LCD_FUNCTIONALITY"
                            }
                          ]
                        },
                        {
                          "questionCode": "DEACTIVATED",
                          "text": "Is the device deactivated from any previous carrier?",
                          "helpText": "A device is considered deactivated if it is no longer associated with any previous carrier and can be activated on a new network.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "DEACTIVATED"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "DEACTIVATED"
                            }
                          ]
                        }
                      ],
                      "makes": [
                        {
                          "name": "Apple",
                          "models": [
                            {
                              "name": "iPad Mini",
                              "productFamily": [
                                {
                                  "name": "iPad Mini",
                                  "tradeInModelCode": "APPLA1455IPADMINI64GBSPRINT",
                                  "capacity": "64GB"
                                },
                                {
                                  "name": "iPad Mini",
                                  "tradeInModelCode": "APPLA1455IPADMINI16GBOTHER",
                                  "capacity": "16GB"
                                },
                                {
                                  "name": "iPad Mini",
                                  "tradeInModelCode": "APPLA1454IPADMINI32GBOTHER",
                                  "capacity": "32GB"
                                }
                              ]
                            },
                            {
                              "name": "iPad mini A17 Pro (7th Gen)",
                              "productFamily": [
                                {
                                  "name": "iPad mini A17 Pro (7th Gen)",
                                  "tradeInModelCode": "2511046",
                                  "capacity": "512GB"
                                },
                                {
                                  "name": "iPad mini A17 Pro (7th Gen)",
                                  "tradeInModelCode": "2511041",
                                  "capacity": "256GB"
                                },
                                {
                                  "name": "iPad mini A17 Pro (7th Gen)",
                                  "tradeInModelCode": "2511037",
                                  "capacity": "128GB"
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "otherMakes": []
                    },
                    {
                      "category": "wearable",
                      "questions": [
                        {
                          "questionCode": "ATT_GENERIC",
                          "text": "Is the device in good condition (no cracks, breaks, or missing parts)?",
                          "helpText": "A device is considered in good condition if it has no cracks, breaks, or missing parts.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "ATT_GENERIC"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "ATT_GENERIC"
                            }
                          ]
                        },
                        {
                          "questionCode": "POWER_ON",
                          "text": "Does the device power on?",
                          "helpText": "A device powers on if it can be turned on and reaches the home screen.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "POWER_ON"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "POWER_ON"
                            }
                          ]
                        },
                        {
                          "questionCode": "LCD_FUNCTIONALITY",
                          "text": "Is the device's LCD screen functional?",
                          "helpText": "An LCD screen is considered functional if it displays images correctly without any distortion or dead pixels.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "LCD_FUNCTIONALITY"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "LCD_FUNCTIONALITY"
                            }
                          ]
                        },
                        {
                          "questionCode": "DEACTIVATED",
                          "text": "Is the device deactivated from any previous carrier?",
                          "helpText": "A device is considered deactivated if it is no longer associated with any previous carrier and can be activated on a new network.",
                          "validAnswers": [
                            {
                              "answerText": "Yes",
                              "questionCode": "DEACTIVATED"
                            },
                            {
                              "answerText": "No",
                              "questionCode": "DEACTIVATED"
                            }
                          ]
                        }
                      ],
                      "makes": [
                        {
                          "name": "Apple",
                          "models": [
                            {
                              "name": "Watch Series 5 Nike",
                              "productFamily": [
                                {
                                  "name": "Watch Series 5 Nike",
                                  "tradeInModelCode": "1649959",
                                  "capacity": "32GB"
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "otherMakes": [
                        {
                          "name": "Google",
                          "models": []
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.. Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "ProductOfferingRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "description": "Lookup by Ids. IDs is a list of productOfferingIDs to retrieve details. e.g. 06c387fb-bfd5-4287-a1e8-b9da4c0be06e",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "description": "Max number of productOffering details to be returned in response. Not used when ids query param is populated.",
            "type": "integer",
            "format": "int32",
            "default": 50
          },
          "offset": {
            "description": "Page number of productOffering details response. Not used when ids query param is populated.",
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "channel": {
            "$ref": "#/components/schemas/SalesChannel"
          },
          "relatedProductOfferingId": {
            "description": "Product Offering Id needs to be passed to return compatible products. Pass device offering id to get compatible mobile_offers. Pass mobile_offers to get compatible addons.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "example": "06c387fb-bfd5-4287-a1e8-b9da4c0be06e"
          },
          "productOfferingTypeGroup": {
            "type": "string",
            "enum": [
              "mobilePlan",
              "mobileAddon",
              "mobileDevice",
              "mobileOffer",
              "sim",
              "BBAddons",
              "BBOffers"
            ],
            "example": "BBOffers"
          },
          "customerType": {
            "description": "Customer Type to be used for filtering. e.g. CONSUMER, IRU, CRU.",
            "type": "string",
            "enum": [
              "CONSUMER",
              "IRU",
              "CRU"
            ]
          },
          "cartId": {
            "description": "Cart Id",
            "type": "string",
            "example": "1111-12333333"
          },
          "ctn": {
            "description": "Customer telephone number if available for AL, UP",
            "type": "string",
            "example": "4694561111"
          },
          "flowTypes": {
            "description": "List of Flow types to be used for filtering.  e.g. NEW, AL, UP.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NEW",
                "AL",
                "UP"
              ]
            }
          },
          "BYOD": {
            "type": "object",
            "description": "List of characteristics to be used for filtering  BYOD for certain edModels of device",
            "properties": {
              "edModels": {
                "type": "string",
                "example": "iPh11PMA2161"
              }
            }
          },
          "deviceType": {
            "type": "array",
            "description": "deviceType: Phone, Tablet, Wearable, etc.",
            "items": {
              "type": "string",
              "example": "Phone",
              "enum": [
                "Phone",
                "Tablet",
                "Wearable"
              ]
            }
          },
          "lineCount": {
            "type": "number",
            "description": "Number of lines that customer wants to add in the cart so that adjusted plan prices can be returned"
          },
          "serviceAddressId": {
            "type": "string",
            "description": "Service Address Id to be used for filtering product offerings that can be offered at that address",
            "example": "12345"
          },
          "intent": {
            "type": "string",
            "description": "Intent of the flow example: MOVE, for Provide flow this will be empty",
            "example": "MOVE"
          }
        }
      },
      "ProductOffering": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "06c387fb-bfd5-4287-a1e8-b9da4c0be06e"
          },
          "name": {
            "type": "string",
            "example": "Value Plus VL"
          },
          "localizedName": {
            "type": "string",
            "example": "Value Plus VL"
          },
          "description": {
            "type": "string",
            "example": "Value Plus VL"
          },
          "productOfferingType": {
            "type": "string",
            "example": "Mobile_Offer"
          },
          "productOfferingTypeGroup": {
            "type": "string",
            "example": "mobileOffer"
          },
          "bundledProductOffering": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundledProductOffering"
            }
          },
          "productOfferingTotalPrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingPrice"
            }
          },
          "bundledProductOfferingGroupOption": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundledProductOfferingGroupOption"
            }
          },
          "immediatePromotion": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImmediatePromotionRef"
            }
          },
          "productOfferingCharacteristic": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingCharacteristic"
            }
          }
        }
      },
      "ImmediatePromotionRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "62900028"
          },
          "status": {
            "type": "string",
            "example": "add",
            "enum": [
              "add",
              "keep",
              "revoke",
              "update"
            ]
          },
          "promotion": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "wrlnpr-62900028"
              },
              "name": {
                "type": "string",
                "example": "Price includes $10/mo. discount when you sign up for paperless billing and AutoPay with a bank account. Or $5/mo. with a debit card."
              },
              "description": {
                "type": "string",
                "example": "Price includes $10/mo. discount when you sign up for paperless billing and AutoPay with a bank account. Or $5/mo. with a debit card."
              },
              "type": {
                "type": "string",
                "example": "discount"
              },
              "applyPolicy": {
                "type": "string",
                "example": "automatic"
              },
              "promotionCharacteristics": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "duration"
                    },
                    "value": {
                      "type": "string",
                      "example": "999"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ProductOfferingCharacteristic": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Payment_Type"
          },
          "localizedName": {
            "type": "string",
            "example": ""
          },
          "valueType": {
            "type": "string",
            "example": ""
          },
          "value": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "example": "Pay_on_Bill"
                },
                "localizedValue": {
                  "type": "string",
                  "example": "Pay on Bill"
                },
                "default": {
                  "type": "boolean",
                  "example": false
                }
              }
            }
          }
        }
      },
      "ProductOfferingPrice": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Value Plus VL"
          },
          "priceCategory": {
            "type": "string",
            "example": "serviceRC"
          },
          "priceType": {
            "type": "string",
            "example": "RC"
          },
          "recurringChargePeriod": {
            "type": "string",
            "example": "month",
            "enum": [
              "month",
              "week"
            ]
          },
          "recurringChargePeriodLength": {
            "type": "number",
            "example": 1
          },
          "role": {
            "type": "string",
            "example": "Price",
            "enum": [
              "Price",
              "Bundle Price Alteration"
            ]
          },
          "price": {
            "$ref": "#/components/schemas/PriceRef"
          },
          "finalPrice": {
            "$ref": "#/components/schemas/PriceRef"
          },
          "standalonePrice": {
            "$ref": "#/components/schemas/PriceRef"
          },
          "priceAlteration": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceAlterationRef"
            }
          },
          "taxIncluded": {
            "type": "string",
            "example": "Excluded"
          }
        }
      },
      "PriceRef": {
        "type": "object",
        "properties": {
          "dutyFreeAmount": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            }
          },
          "marketingAmount": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "example": "USD"
              },
              "value": {
                "type": "number",
                "example": 60.99
              }
            }
          }
        }
      },
      "BundledProductOfferingGroupOption": {
        "type": "object",
        "properties": {
          "groupOptionId": {
            "type": "string",
            "example": "3405d3aa-b60a-11ef-ae7c-27965683c6f2"
          },
          "description": {
            "type": "string",
            "example": "Select Device"
          },
          "bundledProductOffering": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundledProductOffering"
            }
          }
        }
      },
      "BundledProductOffering": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "c9715944-afed-42eb-a35f-51c2ced6bea4"
          },
          "name": {
            "type": "string",
            "example": "Bring Your Own Phone"
          },
          "description": {
            "type": "string",
            "example": "Bring Your Own Phone"
          },
          "productOfferingType": {
            "type": "string",
            "example": "Mobile_Device"
          },
          "productOfferingTypeGroup": {
            "type": "string",
            "example": "mobileDevice"
          },
          "bundledProductOfferingOption": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundledProductOfferingOption"
            }
          },
          "productOfferingTotalPrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingPrice"
            }
          }
        }
      },
      "BundledProductOfferingOption": {
        "type": "object",
        "properties": {
          "productOfferingPrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingPrice"
            }
          },
          "productOfferingTotalPrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingPrice"
            }
          },
          "productOfferingCharacteristic": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOfferingCharacteristic"
            }
          }
        }
      },
      "PriceAlterationRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Discount"
          },
          "priceType": {
            "type": "string",
            "example": "RC"
          },
          "immediatePromotionId": {
            "type": "string",
            "example": "RC"
          },
          "chargeType": {
            "type": "string",
            "example": "credit",
            "enum": [
              "credit",
              "debit",
              "discount"
            ]
          },
          "price": {
            "type": "object",
            "properties": {
              "dutyFreeAmount": {
                "type": "object",
                "properties": {
                  "unit": {
                    "type": "string",
                    "example": "USD"
                  },
                  "value": {
                    "type": "number",
                    "example": 10
                  }
                }
              }
            }
          }
        }
      },
      "PromotionEligibilityRequest": {
        "type": "object",
        "properties": {
          "imei": {
            "type": "string",
            "description": "Device IMEI number. Used to uniquely identify a device for trade-in eligibility."
          },
          "make": {
            "type": "string",
            "description": "Device manufacturer (e.g., Apple, Samsung). Required if IMEI is not provided."
          },
          "model": {
            "type": "string",
            "description": "Device model name (e.g., iPhone 12 Pro). Required if IMEI is not provided."
          },
          "capacity": {
            "type": "string",
            "description": "Device storage capacity (e.g., 128GB). Required if IMEI is not provided."
          },
          "qualificationType": {
            "type": "string",
            "enum": [
              "Trade-In"
            ],
            "description": "Type of qualification to check. Only 'Trade-In' is currently supported."
          },
          "deviceBillCode": {
            "type": "string",
            "description": "Device bill code. Used to identify the device for billing and trade-in purposes."
          },
          "flowType": {
            "type": "string",
            "description": "Flow type for the trade-in process. Allowed values: AL (Add Line), UP (Upgrade), NEW (New Line).",
            "enum": [
              "AL",
              "UP",
              "NEW"
            ]
          },
          "tradeInModelCode": {
            "type": "string",
            "description": "Internal code representing the trade-in device model. Used if IMEI is not provided."
          },
          "deviceConditionAnswers": {
            "type": "array",
            "description": "List of answers to device condition questions (e.g., is device functional, powered on, etc.). Each item contains a question name and an array of answer values.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the device condition question (e.g., ATT_GENERIC, LCD_FUNCTIONALITY)."
                },
                "value": {
                  "type": "array",
                  "description": "Array of answers for the question (e.g., ['Yes'], ['No']).",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "ProductFamilyItem": {
        "type": "object",
        "properties": {
          "tradeInModelCode": {
            "type": "string",
            "description": "Internal code representing the specific trade-in device model. Used to identify the model for trade-in eligibility and processing."
          },
          "capacity": {
            "type": "string",
            "description": "Device storage capacity (e.g., 64GB, 128GB, 256GB). Indicates the storage size of the device model."
          },
          "name": {
            "type": "string",
            "description": "Device name. Indicates the name of the device model."
          }
        }
      },
      "Model": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Device model name (e.g., iPhone 12 Pro, Galaxy S21). Identifies the specific model within a make."
          },
          "productFamily": {
            "type": "array",
            "description": "List of product family items for this model, each representing a variant (e.g., different storage capacities) of the model.",
            "items": {
              "$ref": "#/components/schemas/ProductFamilyItem"
            }
          }
        }
      },
      "Make": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Device manufacturer name (e.g., Apple, Samsung, Google). Identifies the brand or make of the device."
          },
          "models": {
            "type": "array",
            "description": "List of device models available for this make. Each model contains its own variants and product family information.",
            "items": {
              "$ref": "#/components/schemas/Model"
            }
          }
        }
      },
      "TradeinDeviceQuestions": {
        "type": "object",
        "properties": {
          "questionCode": {
            "type": "string",
            "description": "Unique code identifying the trade-in device question (e.g., ATT_GENERIC, POWER_ON, LCD_FUNCTIONALITY, DEACTIVATED).",
            "example": "Yes"
          },
          "text": {
            "type": "string",
            "description": "The text of the question presented to the user (e.g., 'Is your device in good condition?').",
            "example": "Is your device in good condition?"
          },
          "helpText": {
            "type": "string",
            "description": "Additional help or guidance text for the question, explaining what is meant or what to consider when answering.",
            "example": "Select if the following are true: >It turns on and off, and functions normally >The buttons and cameras work It’s free of dents and scratches >The touchscreen and back glass aren’t damaged"
          },
          "validAnswers": {
            "type": "array",
            "description": "List of valid answers for the question. Each answer includes the answer text and associated code.",
            "items": {
              "$ref": "#/components/schemas/ValidAnswers"
            }
          }
        }
      },
      "ValidAnswers": {
        "type": "object",
        "properties": {
          "answerText": {
            "type": "string",
            "description": "Text of the valid answer option for the question (e.g., 'Yes', 'No').",
            "example": "Yes"
          },
          "questionCode": {
            "type": "string",
            "description": "Code of the question this answer is associated with (e.g., ATT_GENERIC, POWER_ON).",
            "example": "ATT_GENERIC"
          }
        }
      },
      "DeviceCategory": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "Device category type (e.g., phone, tablet, wearable, other). Identifies the general class of device.",
            "enum": [
              "phone",
              "tablet",
              "wearable",
              "other"
            ]
          },
          "questions": {
            "type": "array",
            "description": "List of trade-in device questions relevant for this device category. Each question includes code, text, help, and valid answers.",
            "items": {
              "$ref": "#/components/schemas/TradeinDeviceQuestions"
            }
          },
          "makes": {
            "type": "array",
            "description": "List of primary device makes (manufacturers) for this category (e.g., Apple, Samsung). Each make contains its models.",
            "items": {
              "$ref": "#/components/schemas/Make"
            }
          },
          "otherMakes": {
            "type": "array",
            "description": "List of additional or less common device makes for this category.",
            "items": {
              "$ref": "#/components/schemas/Make"
            }
          }
        }
      },
      "TradeInDetails": {
        "type": "object",
        "properties": {
          "devices": {
            "type": "array",
            "description": "List of device categories eligible for trade-in. Each item represents a device category (e.g., phone, tablet, wearable) and includes associated questions, makes, and other makes.",
            "items": {
              "$ref": "#/components/schemas/DeviceCategory"
            }
          }
        }
      },
      "QualificationResponse": {
        "type": "object",
        "description": "Root payload describing qualification results.",
        "properties": {
          "qualificationType": {
            "type": "string",
            "description": "Type of qualification (e.g., Trade-in).",
            "enum": [
              "Trade-In"
            ]
          },
          "potentialQualificationItem": {
            "type": "array",
            "description": "Collection of qualification items that may qualify for promotions.",
            "items": {
              "$ref": "#/components/schemas/PotentialQualificationItem"
            }
          }
        }
      },
      "PotentialQualificationItem": {
        "type": "object",
        "description": "A single potential qualification item including characteristics and promotions.",
        "properties": {
          "characteristic": {
            "type": "array",
            "description": "Key/value characteristics of the item (e.g., model, value).",
            "items": {
              "$ref": "#/components/schemas/KeyValueObject"
            }
          },
          "potentialPromotion": {
            "type": "array",
            "description": "List of promotions potentially applicable to this item.",
            "items": {
              "$ref": "#/components/schemas/PotentialPromotion"
            }
          }
        }
      },
      "PotentialPromotion": {
        "type": "object",
        "description": "Wrapper describing a potential promotion reference and its details.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the potential promotion entry.",
            "example": "wrlspr-29966"
          },
          "promotion": {
            "$ref": "#/components/schemas/Promotion"
          }
        }
      },
      "Promotion": {
        "type": "object",
        "description": "Detailed promotion payload with characteristics.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the promotion. Used to reference and distinguish each promotion entry.",
            "example": "wrlspr-29966"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name or summary of the promotion. Provides a brief description for display purposes.",
            "example": "OFFER APPLIED: You're getting up to $350 off with elig. trade-in on installment &amp;amp; elig. unlimited plan (speed restr's apply). Credits start within 3 bills. Without unlimited, device is full price."
          },
          "promotionCharacteristics": {
            "type": "array",
            "description": "List of characteristics (attributes) associated with the promotion. Each item describes a specific property of the promotion, such as maximum value, duration, or eligibility criteria.",
            "items": {
              "$ref": "#/components/schemas/PromotionCharacteristic"
            }
          }
        }
      },
      "PromotionCharacteristic": {
        "type": "object",
        "description": "Name/value pair describing a promotion attribute.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Promotion characteristic name.",
            "example": "maxValue"
          },
          "value": {
            "type": "string",
            "description": "Promotion characteristic value (string representation to match payload).",
            "example": "129.99"
          }
        }
      },
      "KeyValueObject": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the characteristic"
          },
          "value": {
            "type": "string",
            "description": "Value of the characteristic"
          }
        },
        "description": "ATT++::Describes a given characteristic of an object or entity through a name/value pair."
      },
      "PartnerServiceError": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "string",
            "example": "Top level error code"
          },
          "message": {
            "type": "string",
            "example": "Top level error message"
          },
          "errorSystemId": {
            "type": "string",
            "example": "System name"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "example": "Detail code 1"
                },
                "message": {
                  "type": "string",
                  "example": "Detail message 1"
                }
              }
            }
          }
        }
      },
      "WrappedPartnerServiceError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/PartnerServiceError"
          }
        }
      },
      "SalesChannel": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of a related entity.",
            "enum": [
              "IND",
              "ATTR",
              "ECOMM",
              "SelfService"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the channel.",
            "enum": [
              "IND",
              "ATTR",
              "ECOMM",
              "SelfService"
            ]
          },
          "extensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the characteristic",
                  "enum": [
                    "subChannelGroup",
                    "subChannel"
                  ]
                },
                "value": {
                  "type": "string",
                  "description": "Value of the characteristic"
                }
              }
            }
          }
        },
        "description": "Related channel to another entity. May be online web, mobile app, social ,etc."
      }
    }
  }
}