{
  "openapi": "3.0.1",
  "info": {
    "version": "0.0.1",
    "title": "Customer Device Life Cycle",
    "description": " \n\n The Customer Device Life Cycle micro service provides APIs that aid in managing the whole life cycle of a customer's device. Some of the APIs provided by this micro service help in retrieving/validating details about a device/sim. Some of the functions include: \n\n - Validating the IMEI (International Mobile Equipment Identity) of a device. \n - Validating the SIM (Subscriber Identity Module).",
    "contact": {}
  },
  "paths": {
    "/msapi/sales/customerdevicelifecycle/v1/activation/validateimei/{deviceImei}": {
      "get": {
        "tags": [
          "Device Life Cycle"
        ],
        "summary": "Find Device By Imei",
        "description": "This API endpoint is invoked to get the details about a device. It takes in the __IMEI__ number of the device and returns a json response.This response consists of 3 objects, namely,  __deviceDetails__, __deviceUnlockDetails__ and __variantDetails__ depending upon the type of the request. The deviceDetails object contains information like att compatibility, make, model, etc. ",
        "operationId": "validateImei",
        "parameters": [
          {
            "name": "deviceImei",
            "description": "15 or 16 digit International Mobile Equipment Identity number. Dial __*#06#__ on your device to get it's IMEI.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "358758580000000"
          },
          {
            "name": "customerType",
            "description": "The type of customer.",
            "example": "firstNet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeDeviceInfo",
            "in": "query",
            "required": false,
            "example": "false",
            "schema": {
              "type": "string"
            },
            "description": "If this query parameter is set to __true__, the response returned by the service includes the __variantDetails__ object."
          },
          {
            "name": "mode",
            "description": "If this query parameter mode is set to additionalDeviceInfo,it will invoke DLC Api call.",
            "example": "additionalDeviceInfo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "getdevicestatus",
            "description": "If this query parameter getdevicestatus is set to true,it will return only Imei Device status details.",
            "example": true,
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/idpctxuuid"
          },
          {
            "$ref": "#/components/parameters/idpctxSessionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;charset=utf-8": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateImeiResponse"
                },
                "examples": {
                  "phone": {
                    "$ref": "#/components/examples/validateimei200PhoneExample"
                  },
                  "watch": {
                    "$ref": "#/components/examples/validateimei200WatchExample"
                  },
                  "phone-red": {
                    "$ref": "#/components/examples/validateimei200PhoneRedExample"
                  },
                  "laptop": {
                    "$ref": "#/components/examples/validateimei200LaptopExample"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;charset=utf-8": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "blacklisted": {
                    "$ref": "#/components/examples/validateimei400BlacklistedExample"
                  },
                  "invalid-imei": {
                    "$ref": "#/components/examples/validateimei400InvalidImeiExample"
                  },
                  "DeviceStatusNotVailable": {
                    "$ref": "#/components/examples/validateimei400DeviceStatusNAExample"
                  },
                  "DeviceCarrierLocked": {
                    "$ref": "#/components/examples/validateimei400DeviceCarrierLockedExample"
                  },
                  "ImeiNotEligibleforFirstNet": {
                    "$ref": "#/components/examples/validateimei400ImeiNotEligibleforFirstNetExample"
                  },
                  "CpopMissingData": {
                    "$ref": "#/components/examples/validateimei400CpopMissingDataExample"
                  },
                  "InvalidDeviceActivation": {
                    "$ref": "#/components/examples/validateimei400InvalidDeviceActivation"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json;charset=utf-8": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Device Life Cycle"
    }
  ],
  "components": {
    "schemas": {
      "Attributes": {
        "type": "object",
        "properties": {
          "atgSkuID": {
            "type": "string",
            "description": "The ATG SKU ID of the product.",
            "example": "sku87654321"
          },
          "atgProductID": {
            "type": "string",
            "description": "The ATG Product ID of the product.",
            "example": "prod12345678"
          },
          "imeiType": {
            "type": "string",
            "description": "The type of the International Mobile Equipment Identity number.",
            "example": "S7"
          },
          "deviceSubType": {
            "type": "string",
            "description": "The subtype of the device.",
            "example": "pda"
          },
          "deviceCategory": {
            "type": "string",
            "description": "The category of the device.",
            "example": "smartphone"
          },
          "model": {
            "type": "string",
            "example": "2021 Test",
            "description": "The model of the device."
          },
          "edModelNames": {
            "type": "array",
            "description": "The list of ED model names.",
            "items": {
              "type": "string"
            },
            "example": [
              "2021 Test"
            ]
          },
          "productFamily": {
            "type": "string",
            "description": "The product family of the device.",
            "example": "wireless"
          },
          "isUsimCompatible": {
            "type": "boolean",
            "description": "Indicates if the device is compatible with USIM.",
            "example": false
          },
          "isSelfActivation": {
            "type": "boolean",
            "description": "Indicates if the device supports self-activation.",
            "example": false
          },
          "compatibleSimTypes": {
            "type": "array",
            "description": "The list of compatible SIM types.",
            "items": {
              "type": "string"
            }
          },
          "migratedProduct": {
            "type": "boolean",
            "description": "Indicates if the product is migrated.",
            "example": false
          },
          "startDate": {
            "type": "string",
            "description": "The start date of the product.",
            "example": "2018-10-28T00:00:00.000Z"
          },
          "endDate": {
            "type": "string",
            "description": "The end date of the product.",
            "example": "2018-10-28T00:00:00.000Z"
          },
          "displayName": {
            "type": "object",
            "description": "The display name of the product in a key-value format.",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "en": "Test 2020"
            }
          },
          "billingCode": {
            "type": "string",
            "description": "The billing code of the product.",
            "example": "213465"
          },
          "businessSegment": {
            "type": "array",
            "description": "The list of business segments the product belongs to.",
            "items": {
              "type": "string"
            },
            "example": [
              "CRU",
              "CONS",
              "IRU"
            ]
          },
          "skuStatus": {
            "type": "string",
            "description": "The status of the SKU.",
            "example": "Expired"
          },
          "includedFlags": {
            "type": "array",
            "description": "The list of included flags.",
            "items": {
              "$ref": "#/components/schemas/IncludedFlag"
            }
          },
          "firstNetIndicator": {
            "type": "string",
            "description": "The FirstNet indicator of the product. Indicates if the product is firstNet.",
            "example": ""
          },
          "associatedSDFs": {
            "type": "array",
            "description": "The list of associated SDFs.",
            "items": {
              "type": "string"
            }
          },
          "compatibleFeatureGroups": {
            "type": "string",
            "description": "The compatible feature groups of the product.",
            "example": "ALIST, DBP, ENW, FF, INTALIST"
          },
          "taxonomy": {
            "type": "array",
            "description": "The taxonomy of the product.",
            "items": {
              "type": "string"
            },
            "example": [
              "LTE-Advanced",
              "WIFI",
              "5G-EVOLUTION"
            ]
          }
        }
      },
      "DeviceDetails": {
        "type": "object",
        "properties": {
          "imei": {
            "type": "string",
            "description": "15 or 16 digit International Mobile Equipment Identity number. Dial *#06# on your device to get it's IMEI."
          },
          "imeiType": {
            "type": "string",
            "description": "The type of the International Mobile Equipment Identity number."
          },
          "manufacturer": {
            "type": "string",
            "description": "The manufacturer of the device."
          },
          "make": {
            "type": "string",
            "description": "The make of the device."
          },
          "model": {
            "type": "string",
            "description": "The model of the device."
          },
          "color": {
            "type": "string",
            "description": "The color of the device."
          },
          "skuId": {
            "type": "string",
            "description": "The Stock Keeping Unit ID of the device."
          },
          "deviceProductId": {
            "type": "string",
            "description": "The product ID of the device."
          },
          "isHotLined": {
            "type": "string",
            "description": "Indicates if the device is hotlined."
          },
          "eid": {
            "type": "string",
            "description": "The Embedded Identifier of the device."
          },
          "serialNumber": {
            "type": "string",
            "description": "The serial number of the device."
          },
          "esimCompatible": {
            "type": "boolean",
            "description": "Indicates if the device is compatible with eSIM."
          },
          "stolenDeviceDetails": {
            "$ref": "#/components/schemas/StolenDeviceDetails"
          },
          "deviceEIRInfo": {
            "$ref": "#/components/schemas/DeviceEIRInfo"
          },
          "attCompatibility": {
            "type": "string",
            "enum": [
              "GREEN",
              "RED"
            ],
            "description": "Indicates the compatibility of the device with AT&T."
          },
          "physicalSimCompatible": {
            "type": "boolean",
            "description": "Indicates if the device is compatible with a physical SIM card."
          },
          "deviceType": {
            "type": "string",
            "description": "The type of device."
          },
          "iccid": {
            "type": "string",
            "description": "The Integrated Circuit Card Identifier of the device."
          },
          "isPhone": {
            "type": "boolean",
            "description": "Indicates if the device is a phone."
          },
          "isTablet": {
            "type": "boolean",
            "description": "Indicates if the device is a tablet."
          },
          "isWearables": {
            "type": "boolean",
            "description": "Indicates if the device is a wearable."
          },
          "isLaptop": {
            "type": "boolean",
            "description": "Indicates if the device is a Laptop."
          },
          "isOtherDevice": {
            "type": "boolean",
            "description": "Indicates if the device is of a different type."
          },
          "deviceFriendlyName": {
            "type": "string",
            "description": "A commonly known name of the device."
          },
          "activationCardCompatible": {
            "type": "boolean",
            "description": "Indicates if the device is compatible with an activation card."
          },
          "encryptedEid": {
            "type": "boolean",
            "description": "Indicates if the EID of the device is encrypted."
          },
          "isHotspot": {
            "type": "boolean",
            "description": "Indicates if the device is a hotspot."
          },
          "deviceStatus": {
            "type": "string",
            "description": "Indicates if the device is locked/unlocked"
          },
          "variantGroup": {
            "type": "string",
            "description": "Device display name"
          },
          "imageKey": {
            "type": "string",
            "description": "image Lookup key used to get display images in UI by getting its URL from CMS"
          }
        }
      },
      "DeviceUnlockDetails": {
        "type": "object",
        "properties": {
          "deviceUnlockProfile": {
            "$ref": "#/components/schemas/DeviceUnlockProfile"
          },
          "statusDescription": {
            "type": "string",
            "description": "Description of the device unlock status."
          }
        }
      },
      "DeviceUnlockProfile": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Short descriptive message about the device unlock."
          },
          "status": {
            "type": "string",
            "description": "Status related to the short description."
          }
        }
      },
      "IncludedFlag": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "description": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "StolenDeviceDetails": {
        "type": "object",
        "properties": {
          "blacklistIndicator": {
            "type": "string"
          },
          "blockedIndicator": {
            "type": "string"
          }
        }
      },
      "DeviceEIRInfo": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string"
          },
          "blockedInd": {
            "type": "string"
          },
          "eirStatus": {
            "type": "string"
          },
          "reasonCodeList": {
            "type": "string"
          },
          "blocklistType": {
            "type": "string"
          }
        }
      },
      "ValidateImeiResponse": {
        "type": "object",
        "properties": {
          "deviceDetails": {
            "$ref": "#/components/schemas/DeviceDetails"
          },
          "deviceUnlockDetails": {
            "$ref": "#/components/schemas/DeviceUnlockDetails"
          },
          "variantDetails": {
            "$ref": "#/components/schemas/VariantDetails"
          }
        }
      },
      "VariantDetails": {
        "type": "object",
        "properties": {
          "productName": {
            "type": "string",
            "description": "Name of the product."
          },
          "invalidData": {
            "type": "boolean",
            "description": "Boolean expressing if the data invalid or not."
          },
          "attributes": {
            "$ref": "#/components/schemas/Attributes"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "string",
            "description": "Unique Id of the error."
          },
          "message": {
            "type": "string",
            "description": "A brief message explaining why the error occured. "
          }
        }
      }
    },
    "examples": {
      "validateimei200PhoneExample": {
        "value": {
          "content": {
            "deviceDetails": {
              "deviceCategory": "STANDARD",
              "imeiItemId": "PG05100",
              "frequency": "1900",
              "nfcCapability": "N",
              "umtsCapableIndicator": true,
              "imei": "353267079639967",
              "imeiType": "K3",
              "make": "APPLE",
              "model": "iPhone 6s",
              "skuId": "sku7730375",
              "deviceProductId": "prod8420721",
              "stolenDeviceDetails": {
                "blacklistIndicator": "N"
              },
              "deviceEIRInfo": {
                "phoneNumber": "4077758706",
                "blockedInd": "N",
                "eirStatus": "B",
                "reasonCodeList": "Red",
                "blocklistType": "P"
              },
              "attCompatibility": "GREEN",
              "physicalSimCompatible": true,
              "deviceType": "pda",
              "isPhone": true,
              "deviceFriendlyName": "Apple iPhone 6s",
              "encryptedEid": false,
              "deviceStatus": "unlocked",
              "variantGroup": "Apple iPhone 6s",
              "imageKey": "apple-iphone-6s"
            }
          }
        }
      },
      "validateimei200WatchExample": {
        "value": {
          "content": {
            "deviceDetails": {
              "imei": "350631910000000",
              "imeiType": "N9",
              "make": "SAMSNG",
              "model": "SM-R875U",
              "skuId": "sku1690039",
              "deviceProductId": "prod10330293",
              "esimCompatible": true,
              "stolenDeviceDetails": {
                "blacklistIndicator": "N"
              },
              "attCompatibility": "GREEN",
              "deviceType": "network",
              "isWearables": true,
              "deviceFriendlyName": "Samsung Galaxy Watch4 44mm",
              "encryptedEid": false
            }
          }
        }
      },
      "validateimei200PhoneRedExample": {
        "value": {
          "content": {
            "deviceDetails": {
              "imei": "354664101665136",
              "imeiType": "P6",
              "make": "SAMSNG",
              "model": "SM-G960F-DS",
              "stolenDeviceDetails": {
                "blacklistIndicator": "N"
              },
              "attCompatibility": "RED",
              "encryptedEid": false
            }
          }
        }
      },
      "validateimei200LaptopExample": {
        "value": {
          "content": {
            "deviceDetails": {
              "deviceCategory": "STANDARD",
              "imeiItemId": "PG05578",
              "frequency": "1900",
              "nfcCapability": "N",
              "umtsCapableIndicator": true,
              "imei": "355612659999999",
              "imeiType": "L6",
              "make": "DELL",
              "model": "Latitude 5350",
              "skuId": "sku41666v1",
              "deviceProductId": "prod41666",
              "eid": "7Nl6pXNlALE6mgiJ96PMdLArTzeX57yh",
              "esimCompatible": true,
              "stolenDeviceDetails": {
                "blacklistIndicator": "N",
                "blockedIndicator": false
              },
              "attCompatibility": "GREEN",
              "deviceType": "netbook",
              "isLaptop": true,
              "encryptedEid": true,
              "memorySizeUOM": "gb",
              "deviceCategoryType": "Laptop"
            }
          }
        }
      },
      "validateimei400BlacklistedExample": {
        "value": {
          "error": {
            "errorId": "VI-CSIIMEIDB-1001",
            "message": "IMEI is blacklisted."
          }
        }
      },
      "validateimei400InvalidImeiExample": {
        "value": {
          "error": {
            "errorId": "VI-DRI-1001",
            "message": "Validate IMEI request is invalid.",
            "details": [
              {
                "code": "VI-DRI-1001",
                "message": "Validate IMEI request is invalid."
              }
            ]
          }
        }
      },
      "validateimei400DeviceStatusNAExample": {
        "value": {
          "error": {
            "errorId": "VI-CSIDSNA-1001",
            "message": "Device status not available."
          }
        }
      },
      "validateimei400DeviceCarrierLockedExample": {
        "value": {
          "error": {
            "errorId": "ERROR_DEVICECARRIER_lOCKED",
            "message": "Device is carrier locked to another carrier."
          }
        }
      },
      "validateimei400ImeiNotEligibleforFirstNetExample": {
        "value": {
          "error": {
            "errorId": "VALIDATE-IMEI-ERROR-001",
            "message": "IMEI is not eligible for firstNet."
          }
        }
      },
      "validateimei400CpopMissingDataExample": {
        "value": {
          "error": {
            "errorId": "VI-CPOP-ERROR-1001",
            "message": "Missing Data From CPOP."
          }
        }
      },
      "validateimei400InvalidDeviceActivation": {
        "value": {
          "error": {
            "errorId": "VI-CPOP-ERROR-1002",
            "message": "Invalid Device For Activation"
          }
        }
      }
    },
    "parameters": {
      "idpctxuuid": {
        "in": "header",
        "name": "idpctx-uuid",
        "description": "Unique user id header parameter.",
        "schema": {
          "type": "string"
        },
        "example": "userNew123"
      },
      "idpctxSessionId": {
        "in": "header",
        "name": "idpctx-session-id",
        "description": "The unique session id of the current user session ('idpctx-session-id').",
        "schema": {
          "type": "string"
        },
        "example": "074e354a-8897-44c9-a8a0-c78dfe443a26"
      }
    }
  }
}