{
  "openapi": "3.1.2",
  "info": {
    "version": "1.0.2",
    "title": "Credit",
    "description": "This is OpenAPI Spec APIs for external partners to invoke the checkout process running the credit for the order.",
    "contact": {
      "name": "Omni API Support",
      "email": "DL-OmniAdapter@att.com"
    }
  },
  "servers": [
    {
      "url": "https://partner.att.com/omni-svcs"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Credit Check",
      "description": "Credit and Policy Check, Debt Resolution APIs"
    }
  ],
  "paths": {
    "/v1/credit-application": {
      "post": {
        "tags": [
          "Credit Check"
        ],
        "description": "Enables external partners to perform a real‐time credit check on a customer account, returning a risk classification (e.g., LOW or HIGH) and any recommended next steps before order submission. Note: There is no way to proceed once credit status results in Fraud Risk, Abusive Risk. Analyst Review can be mitigated by calling Call center and resolve, after which status API needs to be called to ensure credit status before proceeding",
        "summary": "Credit updates on the order",
        "operationId": "invokeCreditCheck",
        "parameters": [
          {
            "$ref": "#/components/parameters/ParameterAppname"
          }
        ],
        "requestBody": {
          "description": "Credit transaction request payload",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditCheck"
              },
              "examples": {
                "CreditCheck": {
                  "summary": "credit check request for the order",
                  "value": {
                    "cartId": "8256a5e0-b5da-11f0-9a9b-a592d05bf939",
                    "userInfo": {
                      "birthdate": "1959-01-01",
                      "legalId": [
                        {
                          "identificationId": "666050459",
                          "identificationType": "SocialSecurityNumber"
                        }
                      ]
                    }
                  }
                },
                "CreditCheckAnswers": {
                  "summary": "credit check with answers for the order",
                  "value": {
                    "cartId": "8256a5e0-b5da-11f0-9a9b-a592d05bf939",
                    "unifiedCreditTransactionId": "U202602170001",
                    "interConnectTransactionId": "INT1234567890",
                    "casApplicationId": "602177078164",
                    "selectedAnswers": [
                      {
                        "questionId": "1",
                        "answerId": "1"
                      }
                    ]
                  }
                },
                "CreditCheckAdditionalInfoReq": {
                  "summary": "credit check with submit additional info for the order",
                  "value": {
                    "cartId": "8256a5e0-b5da-11f0-9a9b-a592d05bf939",
                    "unifiedCreditTransactionId": "U202602170001",
                    "userInfo": {
                      "birthdate": "1961-03-28",
                      "legalId": [
                        {
                          "identificationId": "00678600",
                          "identificationType": "SocialSecurityNumber"
                        }
                      ],
                      "previousAddress": {
                        "postcode": "91913",
                        "stateOrProvince": "CA",
                        "city": "Chula Vista",
                        "addressCharacteristic": [
                          {
                            "name": "addressLine1",
                            "value": "15759"
                          },
                          {
                            "name": "addressLine2",
                            "value": "WINDWARD CONCOURSE"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credit response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                },
                "examples": {
                  "CreditCheckLowRisk": {
                    "$ref": "#/components/examples/CreditCheckLowRisk"
                  },
                  "CreditCheckPolicyAdvPay": {
                    "$ref": "#/components/examples/CreditCheckPolicyAdvPay"
                  },
                  "CreditCheckDebt": {
                    "$ref": "#/components/examples/CreditCheckDebt"
                  },
                  "CreditCheckIdentityVerification": {
                    "$ref": "#/components/examples/CreditCheckIdentityVerification"
                  },
                  "CreditCheckAnswerVerificationFailedResponse": {
                    "$ref": "#/components/examples/CreditCheckAnswerVerificationFailedResponse"
                  },
                  "CreditCheckAnswerVerificationSuccessResponse": {
                    "$ref": "#/components/examples/CreditCheckAnswerVerificationSuccessResponse"
                  },
                  "CreditCheckFraudRisk": {
                    "$ref": "#/components/examples/CreditCheckFraudRisk"
                  },
                  "CreditCheckAbusiveRisk": {
                    "$ref": "#/components/examples/CreditCheckAbusiveRisk"
                  },
                  "CreditCheckAnalystReview": {
                    "$ref": "#/components/examples/CreditCheckAnalystReview"
                  },
                  "CreditCheckHighRisk": {
                    "$ref": "#/components/examples/CreditCheckHighRisk"
                  },
                  "CreditCheckAdditionalInfoResponse": {
                    "$ref": "#/components/examples/CreditCheckAdditionalInfoResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Missing fields, Invalid input data, validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckInvalidRequest": {
                    "summary": "credit check invalid request",
                    "value": {
                      "error": {
                        "errorId": "EXTSALESOPS-CREDIT-UAS-0001",
                        "message": "Required fields are missing",
                        "errorSystemId": "universalaccount",
                        "details": [
                          {
                            "code": "CA-V40003",
                            "message": "birth date is required or invalid format"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckSystemError": {
                    "summary": "credit check system error",
                    "value": {
                      "error": {
                        "errorId": "EXT_CREDIT-CAS-0001",
                        "message": "System Error",
                        "errorSystemId": "Credit",
                        "details": [
                          {
                            "code": "CA-B40000",
                            "message": "system error"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/credit-application/status": {
      "post": {
        "tags": [
          "Credit Check"
        ],
        "description": "Enables external partners to check the status of an existing credit application using the unifiedCreditTransactionId. This endpoint returns the current credit risk status and any related transaction details.",
        "summary": "Check credit application status",
        "operationId": "checkCreditStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/ParameterAppname"
          }
        ],
        "requestBody": {
          "description": "Credit status request payload",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "unifiedCreditTransactionId"
                ],
                "properties": {
                  "unifiedCreditTransactionId": {
                    "type": "string",
                    "description": "Unique identifier for the unified credit transaction.",
                    "example": "U202602170001"
                  },
                  "cartId": {
                    "type": "string",
                    "description": "Unique identifier for the cart.",
                    "example": "8256a5e0-b5da-11f0-9a9b-a592d05bf939"
                  },
                  "casApplicationId": {
                    "type": "string",
                    "description": "CAS application transaction Id.",
                    "example": "602177078164"
                  }
                }
              },
              "examples": {
                "CreditStatusRequest": {
                  "summary": "credit status request with transaction ID",
                  "value": {
                    "unifiedCreditTransactionId": "U202602170001",
                    "cartId": "8256a5e0-b5da-11f0-9a9b-a592d05bf939",
                    "casApplicationId": "602177078164"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credit status response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                },
                "examples": {
                  "CreditCheckLowRisk": {
                    "$ref": "#/components/examples/CreditCheckLowRisk"
                  },
                  "CreditCheckPolicyAdvPay": {
                    "$ref": "#/components/examples/CreditCheckPolicyAdvPay"
                  },
                  "CreditCheckDebt": {
                    "$ref": "#/components/examples/CreditCheckDebt"
                  },
                  "CreditCheckIdentityVerification": {
                    "$ref": "#/components/examples/CreditCheckIdentityVerification"
                  },
                  "CreditCheckAnswerVerificationFailedResponse": {
                    "$ref": "#/components/examples/CreditCheckAnswerVerificationFailedResponse"
                  },
                  "CreditCheckAnswerVerificationSuccessResponse": {
                    "$ref": "#/components/examples/CreditCheckAnswerVerificationSuccessResponse"
                  },
                  "CreditCheckFraudRisk": {
                    "$ref": "#/components/examples/CreditCheckFraudRisk"
                  },
                  "CreditCheckAbusiveRisk": {
                    "$ref": "#/components/examples/CreditCheckAbusiveRisk"
                  },
                  "CreditCheckAnalystReview": {
                    "$ref": "#/components/examples/CreditCheckAnalystReview"
                  },
                  "CreditCheckHighRisk": {
                    "$ref": "#/components/examples/CreditCheckHighRisk"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Missing fields, Invalid input data, validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditStatusInvalidRequest": {
                    "summary": "credit status invalid request",
                    "value": {
                      "error": {
                        "errorId": "EXTSALESOPS-CREDIT-STATUS-0001",
                        "message": "Required fields are missing",
                        "errorSystemId": "credit",
                        "details": [
                          {
                            "code": "CA-V40001",
                            "message": "unifiedCreditTransactionId is required"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Credit transaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditStatusNotFound": {
                    "summary": "credit transaction not found",
                    "value": {
                      "error": {
                        "errorId": "EXTSALESOPS-CREDIT-STATUS-0002",
                        "message": "Credit transaction not found",
                        "errorSystemId": "credit",
                        "details": [
                          {
                            "code": "CA-N40001",
                            "message": "No credit transaction found for the provided unifiedCreditTransactionId"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditStatusSystemError": {
                    "summary": "credit status system error",
                    "value": {
                      "error": {
                        "errorId": "EXT_CREDIT-STATUS-0001",
                        "message": "System Error",
                        "errorSystemId": "Credit",
                        "details": [
                          {
                            "code": "CA-B50000",
                            "message": "system error"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/cart/{cartId}/credit/resolution": {
      "post": {
        "tags": [
          "Deprecated"
        ],
        "description": "Allows external partners to execute one or more AT&T-driven internal mitigation steps when a credit check returns HIGH risk, so you can resolve or reduce risk before proceeding with order submission.",
        "summary": "Credit Resolution updates on the order",
        "operationId": "creditResolution",
        "parameters": [
          {
            "name": "cartId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Cart ID"
          },
          {
            "name": "appname",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Application name of the client making the request"
          }
        ],
        "requestBody": {
          "description": "Credit Resolution request payload",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditResolution"
              },
              "examples": {
                "CreditResolutionDebt": {
                  "summary": "credit resolution for debt payment for the order",
                  "value": {
                    "payment": {
                      "paymentItemRequest": [
                        {
                          "accountNumber": "",
                          "amount": "1.00",
                          "system": "RTB",
                          "systemDivision": "RTB"
                        }
                      ],
                      "customerAgreement": "CC_OF_20230612_T",
                      "tncId": 610,
                      "storeTermsConditionConsent": true,
                      "encPaymentMethod": ""
                    },
                    "action": "DEBT",
                    "unifiedCreditTransactionId": "U202602170001",
                    "casApplicationId": "602177078164"
                  }
                },
                "CreditResolutionAdvPay": {
                  "summary": "credit resolution for adv pay with payment details",
                  "value": {
                    "payment": {
                      "profileOwnerId": "",
                      "profileName": "",
                      "customerAgreement": "CC_OF_20230612_T",
                      "tncId": 610,
                      "storeTermsConditionConsent": true,
                      "encPaymentMethod": ""
                    },
                    "action": "ADVPAY",
                    "unifiedCreditTransactionId": "U202602170001",
                    "casApplicationId": "602177078164",
                    "unifiedPolicyTransactionId": ""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credit response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                },
                "examples": {
                  "CreditCheckPolicyResponse": {
                    "summary": "credit policy response for the order",
                    "value": {
                      "unifiedCreditTransactionId": "U202602170001",
                      "casApplicationId": "602177078164",
                      "unifiedPolicyTransactionId": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Credit response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckInvalidRequest": {
                    "summary": "credit check invalid request",
                    "value": {
                      "error": {
                        "errorId": "EXT_CREDIT-CAS-0001",
                        "message": "System Error",
                        "errorSystemId": "Credit",
                        "details": [
                          {
                            "code": "CA-B40000",
                            "message": "system error"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Credit response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckSystemError": {
                    "summary": "credit check system error",
                    "value": {
                      "error": {
                        "errorId": "EXT_CREDIT-CAS-0001",
                        "message": "System Error",
                        "errorSystemId": "Credit",
                        "details": [
                          {
                            "code": "CA-B40000",
                            "message": "system error"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/credit-application/debt-payment": {
      "post": {
        "tags": [
          "Credit Check"
        ],
        "description": "Allows external partners to execute one or more AT&T-driven internal mitigation steps when a credit check returns HIGH risk, so you can resolve or reduce risk before proceeding with order submission.",
        "summary": "Credit Debt Payment updates on the order",
        "operationId": "creditDebtPayment",
        "parameters": [
          {
            "name": "appname",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Application name of the client making the request"
          }
        ],
        "requestBody": {
          "description": "Credit Debt Payment request payload",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditDebtPayment"
              },
              "examples": {
                "CreditDebt": {
                  "summary": "credit Debt Payment for debt payment for the order",
                  "value": {
                    "cartId": "8256a5e0-b5da-11f0-9a9b-a592d05bf939",
                    "payment": {
                      "paymentItemRequest": [
                        {
                          "accountNumber": "",
                          "amount": "1.00",
                          "system": "RTB",
                          "systemDivision": "RTB"
                        }
                      ],
                      "customerAgreement": "CC_OF_20230612_T",
                      "tncId": 610,
                      "storeTermsConditionConsent": true,
                      "encPaymentMethod": ""
                    },
                    "unifiedCreditTransactionId": "U202602170001",
                    "casApplicationId": "602177078164"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Credit response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                },
                "examples": {
                  "CreditCheckPolicyResponse": {
                    "summary": "credit policy response for the order",
                    "value": {
                      "unifiedCreditTransactionId": "U202602170001",
                      "casApplicationId": "602177078164",
                      "unifiedPolicyTransactionId": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Missing fields, Invalid input data, validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckInvalidRequest": {
                    "summary": "credit check invalid request",
                    "value": {
                      "error": {
                        "errorId": "EXTSALESOPS-CREDIT-UAS-0010,",
                        "message": "Required fields are missing",
                        "errorSystemId": "universalaccount",
                        "details": [
                          {
                            "code": "CA-V40001",
                            "message": "UnifiedCreditTransactionId  is required"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrappedPartnerServiceError"
                },
                "examples": {
                  "CreditCheckSystemError": {
                    "summary": "credit check system error",
                    "value": {
                      "error": {
                        "errorId": "EXT_CREDIT-CAS-0001",
                        "message": "System Error",
                        "errorSystemId": "Credit",
                        "details": [
                          {
                            "code": "CA-B40000",
                            "message": "system error"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreditCheck": {
        "type": "object",
        "properties": {
          "cartId": {
            "type": "string",
            "description": "Unique identifier for the cart.",
            "example": "8256a5e0-b5da-11f0-9a9b-a592d05bf939"
          },
          "unifiedCreditTransactionId": {
            "type": "string",
            "example": "U20230224407318536",
            "description": "Unique identifier for the unified credit transaction."
          },
          "casApplicationId": {
            "type": "string",
            "example": "602177078164",
            "description": "CAS application transaction Id."
          },
          "selectedAnswers": {
            "type": "array",
            "description": "List of selected answers for credit check questions.",
            "items": {
              "type": "object",
              "properties": {
                "questionId": {
                  "type": "string",
                  "example": "1",
                  "description": "Identifier for the question."
                },
                "answerId": {
                  "type": "string",
                  "example": "1",
                  "description": "Identifier for the answer."
                }
              },
              "required": [
                "questionId",
                "answerId"
              ]
            }
          },
          "userInfo": {
            "$ref": "#/components/schemas/UserInfo",
            "description": "User information for the credit check."
          },
          "interConnectTransactionId": {
            "type": "string",
            "example": "abc",
            "description": "Interconnect transaction Id for the which is co-relates with previous credit response"
          }
        }
      },
      "CreditResolution": {
        "type": "object",
        "description": "Request payload for credit resolution actions such as debt payment or advance payment.",
        "properties": {
          "action": {
            "type": "string",
            "example": "DEBT",
            "description": "Action type for credit resolution (DEBT or ADVPAY).",
            "enum": [
              "DEBT",
              "ADVPAY"
            ]
          },
          "unifiedCreditTransactionId": {
            "type": "string",
            "example": "U20230224407318536",
            "description": "Unique identifier for the unified credit transaction."
          },
          "unifiedPolicyTransactionId": {
            "type": "string",
            "description": "Unique identifier for the unified policy transaction after running credit policy check on cart items."
          },
          "casApplicationId": {
            "type": "string",
            "example": "602177078164",
            "description": "CAS application transaction identifier."
          },
          "payment": {
            "type": "object",
            "properties": {
              "paymentItemRequest": {
                "type": "array",
                "description": "List of payment items for the credit resolution.",
                "items": {
                  "type": "object",
                  "properties": {
                    "accountNumber": {
                      "type": "string",
                      "description": "Account number associated with the payment."
                    },
                    "amount": {
                      "type": "string",
                      "description": "Amount to be paid."
                    },
                    "system": {
                      "type": "string",
                      "example": "CNG",
                      "description": "System identifier for the payment."
                    },
                    "systemDivision": {
                      "type": "string",
                      "example": "TTB",
                      "description": "Division identifier for the payment system."
                    }
                  }
                }
              },
              "profileOwnerId": {
                "type": "string",
                "description": "Identifier for the profile owner."
              },
              "paySource": {
                "type": "object",
                "description": "Payment source information.",
                "properties": {
                  "sourceSystem": {
                    "type": "string",
                    "description": "Source system identifier."
                  },
                  "sourceLocation": {
                    "type": "string",
                    "description": "Source location identifier."
                  },
                  "sourceUser": {
                    "type": "string",
                    "description": "Source user identifier."
                  }
                }
              },
              "profileName": {
                "type": "string",
                "description": "Name of the payment profile."
              },
              "customerAgreement": {
                "type": "string",
                "description": "Customer agreement reference."
              },
              "tncId": {
                "type": "integer",
                "description": "Terms and conditions identifier."
              },
              "storeTermsConditionConsent": {
                "type": "boolean",
                "description": "Indicates if store terms and conditions consent is given."
              },
              "encPaymentMethod": {
                "type": "string",
                "description": "Encrypted payment method information."
              },
              "action": {
                "type": "string",
                "example": "DEBT",
                "description": "Action type for payment (DEBT or ADVPAY).",
                "enum": [
                  "DEBT",
                  "ADVPAY"
                ]
              }
            }
          },
          "riskAssessmentResult": {
            "$ref": "#/components/schemas/RiskAssessmentResult",
            "description": "Risk assessment results after credit policy check."
          }
        }
      },
      "CreditDebtPayment": {
        "type": "object",
        "description": "Request payload for credit debt payment actions.",
        "properties": {
          "cartId": {
            "type": "string",
            "description": "Unique identifier for the cart.",
            "example": "8256a5e0-b5da-11f0-9a9b-a592d05bf939"
          },
          "unifiedCreditTransactionId": {
            "type": "string",
            "example": "U20230224407318536",
            "description": "Unique identifier for the unified credit transaction."
          },
          "unifiedPolicyTransactionId": {
            "type": "string",
            "description": "Unique identifier for the unified policy transaction."
          },
          "casApplicationId": {
            "type": "string",
            "example": "602177078164",
            "description": "CAS application transaction identifier."
          },
          "payment": {
            "type": "object",
            "description": "Payment details for debt payment.",
            "properties": {
              "paymentItemRequest": {
                "type": "array",
                "description": "List of payment items for debt payment.",
                "items": {
                  "type": "object",
                  "properties": {
                    "accountNumber": {
                      "type": "string",
                      "description": "Account number associated with the payment."
                    },
                    "amount": {
                      "type": "string",
                      "description": "Amount to be paid."
                    },
                    "system": {
                      "type": "string",
                      "example": "CNG",
                      "description": "System identifier for the payment."
                    },
                    "systemDivision": {
                      "type": "string",
                      "example": "TTB",
                      "description": "Division identifier for the payment system."
                    }
                  }
                }
              },
              "profileOwnerId": {
                "type": "string",
                "description": "Identifier for the profile owner."
              },
              "paySource": {
                "type": "object",
                "description": "Payment source information.",
                "properties": {
                  "sourceSystem": {
                    "type": "string",
                    "description": "Source system identifier."
                  },
                  "sourceLocation": {
                    "type": "string",
                    "description": "Source location identifier."
                  },
                  "sourceUser": {
                    "type": "string",
                    "description": "Source user identifier."
                  }
                }
              },
              "profileName": {
                "type": "string",
                "description": "Name of the payment profile."
              },
              "customerAgreement": {
                "type": "string",
                "description": "Customer agreement reference."
              },
              "tncId": {
                "type": "integer",
                "description": "Terms and conditions identifier."
              },
              "storeTermsConditionConsent": {
                "type": "boolean",
                "description": "Indicates if store terms and conditions consent is given."
              },
              "encPaymentMethod": {
                "type": "string",
                "description": "Encrypted payment instrument details."
              }
            }
          },
          "riskAssessmentResult": {
            "$ref": "#/components/schemas/RiskAssessmentResult",
            "description": "Risk assessment results after credit policy check."
          }
        }
      },
      "UserInfo": {
        "type": "object",
        "description": "User information required for credit check.",
        "properties": {
          "birthdate": {
            "type": "string",
            "format": "date",
            "example": "1959-01-01",
            "description": "User's date of birth. Supports JWE encrypted value."
          },
          "legalId": {
            "type": "array",
            "description": "List of legal identification numbers.",
            "items": {
              "type": "object",
              "properties": {
                "identificationId": {
                  "type": "string",
                  "example": "666050459",
                  "description": "Legal identification number. Supports JWE encrypted value."
                },
                "identificationType": {
                  "type": "string",
                  "example": "SocialSecurityNumber",
                  "description": "Type of legal identification (e.g., SocialSecurityNumber)."
                }
              }
            }
          },
          "previousAddress": {
            "$ref": "#/components/schemas/BillingAddress",
            "description": "Address information for the providing previous address during Additional Info request."
          }
        },
        "required": [
          "birthdate",
          "legalId"
        ]
      },
      "CreditResponse": {
        "type": "object",
        "description": "Credit check response payload",
        "properties": {
          "unifiedCreditTransactionId": {
            "type": "string",
            "example": "U20230224407318536",
            "description": "Unique identifier for the unified credit transaction."
          },
          "interConnectTransactionId": {
            "type": "string",
            "example": "u123",
            "description": "Identifier used to link the identity verification risk for a specific credit transaction, enabling correlation between the identity verification questions and the corresponding answers."
          },
          "casApplicationId": {
            "type": "string",
            "example": "602177078164",
            "description": "CAS application transaction identifier."
          },
          "unifiedPolicyTransactionId": {
            "type": "string",
            "example": "",
            "description": "Unique identifier for the unified policy transaction which is an assessment of risk based on items in cart."
          },
          "creditDisclosureRequired": {
            "type": "boolean",
            "description": "Indicates if credit disclosure is required."
          },
          "eidVerifierCode": {
            "type": "boolean",
            "description": "Indicates if EID verifier code is present."
          },
          "questionsAndAnswers": {
            "$ref": "#/components/schemas/Questions",
            "description": "List of identity verification questions and answers."
          },
          "debt": {
            "$ref": "#/components/schemas/DebtAccountDetails",
            "description": "List of debt account details if debt exists."
          },
          "riskAssessmentResult": {
            "$ref": "#/components/schemas/RiskAssessmentResult",
            "description": "Risk assessment results after credit policy check."
          },
          "creditRisk": {
            "type": "string",
            "example": "AbusiveRisk",
            "description": "Credit risk classification for the transaction."
          },
          "validation": {
            "$ref": "#/components/schemas/Validation",
            "description": "Validation results for the credit check."
          }
        }
      },
      "RiskAssessmentResult": {
        "type": "array",
        "description": "List of risk assessment results after credit policy run.",
        "items": {
          "type": "object",
          "properties": {
            "productType": {
              "type": "string",
              "example": "WIRELINE_PRODUCTS",
              "description": "Type of product associated with the risk assessment."
            },
            "securityType": {
              "type": "string",
              "example": "ADVPAY",
              "description": "Type of security requirement (e.g., ADVPAY)."
            },
            "securityDescription": {
              "type": "string",
              "example": "Advance Pay",
              "description": "Description of the security requirement."
            },
            "securityAmount": {
              "type": "number",
              "example": 100,
              "description": "Amount required for the security."
            },
            "productOrderItemId": {
              "type": "string",
              "example": "",
              "description": "Identifier for the product order item."
            },
            "resource": {
              "type": "array",
              "description": "Resources associated with the risk assessment message.",
              "items": {
                "$ref": "#/components/schemas/RelatedResource"
              }
            }
          }
        }
      },
      "Questions": {
        "type": "array",
        "description": "List of questions and answer options for identity verification.",
        "items": {
          "type": "object",
          "properties": {
            "questionId": {
              "type": "string",
              "description": "Unique identifier for the question."
            },
            "questionText": {
              "type": "string",
              "description": "Text of the identity verification question."
            },
            "answerOptions": {
              "type": "array",
              "description": "List of possible answer options for the question.",
              "items": {
                "type": "object",
                "properties": {
                  "answerId": {
                    "type": "string",
                    "description": "Unique identifier for the answer option."
                  },
                  "answerText": {
                    "type": "string",
                    "description": "Text of the answer option."
                  }
                }
              }
            }
          }
        }
      },
      "DebtAccountDetails": {
        "type": "array",
        "description": "List of debt account details associated with the credit check.",
        "items": {
          "type": "object",
          "properties": {
            "accountNumber": {
              "type": "string",
              "example": "117293950",
              "description": "Account number associated with the debt."
            },
            "billingAddress": {
              "$ref": "#/components/schemas/BillingAddress",
              "description": "Billing address for the debt account."
            },
            "billingFullName": {
              "type": "string",
              "example": "SANDRA HOOD",
              "description": "Full name on the billing account."
            },
            "debtDetails": {
              "$ref": "#/components/schemas/DebtDetails",
              "description": "Details of the debt associated with the account."
            }
          }
        }
      },
      "BillingAddress": {
        "type": "object",
        "description": "Billing address details for the debt account.",
        "properties": {
          "addressCharacteristic": {
            "type": "array",
            "description": "List of address characteristics for the billing address.",
            "items": {
              "$ref": "#/components/schemas/AddressCharacteristicCredit"
            }
          },
          "city": {
            "type": "string",
            "example": "GARLAND",
            "description": "City name for the billing address."
          },
          "geographicSubAddress": {
            "type": "array",
            "description": "Geographic sub-address details.",
            "items": {
              "type": "object"
            }
          },
          "postcode": {
            "type": "string",
            "example": "75044",
            "description": "Postal code for the billing address."
          },
          "stateOrProvince": {
            "type": "string",
            "example": "TX",
            "description": "State or province for the billing address."
          }
        }
      },
      "AddressCharacteristicCredit": {
        "type": "object",
        "description": "Address characteristic details for the billing address.",
        "properties": {
          "characteristicRelationship": {
            "type": "array",
            "description": "List of characteristic relationships.",
            "items": {
              "type": "object"
            }
          },
          "metadata": {
            "type": "array",
            "description": "Metadata associated with the address characteristic.",
            "items": {
              "type": "object"
            }
          },
          "name": {
            "type": "string",
            "example": "addressLine1",
            "description": "Name of the address characteristic."
          },
          "value": {
            "type": "string",
            "example": "517 BALTUSROL CIR",
            "description": "Value of the address characteristic."
          },
          "valueMetadata": {
            "type": "array",
            "description": "Metadata associated with the value.",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DebtDetails": {
        "type": "object",
        "description": "Debt details for the account.",
        "properties": {
          "accountBalance": {
            "type": "number",
            "format": "float",
            "example": 101.54,
            "description": "Total balance on the account."
          },
          "accountStatus": {
            "type": "string",
            "example": "O",
            "description": "Status of the account."
          },
          "system": {
            "type": "string",
            "example": "CNG",
            "description": "System identifier for the debt account."
          },
          "systemDivision": {
            "type": "string",
            "example": "TTB",
            "description": "Division identifier for the debt system."
          },
          "billRenderDate": {
            "type": "string",
            "format": "date",
            "description": "Date when the bill was rendered."
          },
          "minimumAmountDue": {
            "type": "number",
            "format": "float",
            "example": 101.54,
            "description": "Minimum amount due on the account."
          },
          "pastDueAmount": {
            "type": "number",
            "format": "float",
            "example": 101.54,
            "description": "Past due amount on the account."
          }
        }
      },
      "Variable": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the variable\n"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier of the variable\n"
          },
          "value": {
            "type": "array",
            "description": "Value(s) of the variable\n",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "Variable that is associated with a resource\n"
      },
      "ContainedResource": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the resource\n"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier of the resource\n"
          },
          "variable": {
            "type": "array",
            "description": "Variables that are related to the resource\n",
            "items": {
              "$ref": "#/components/schemas/Variable"
            }
          }
        },
        "description": "Resources that are contained in the validation message\n"
      },
      "RelatedResource": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the resource\n"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier of the resource\n"
          },
          "variable": {
            "type": "array",
            "description": "Variables related to the resource\n",
            "items": {
              "$ref": "#/components/schemas/Variable"
            }
          },
          "containedResource": {
            "type": "array",
            "description": "Other resources, specs, or offers that are linked to the message but did not trigger the validation message\n",
            "items": {
              "$ref": "#/components/schemas/ContainedResource"
            }
          }
        },
        "description": "Resource that is associated with the validation message (that is, triggered the validation failure)\n"
      },
      "Error": {
        "required": [
          "code",
          "reason"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Application relevant detail, defined in the API or a common list."
          },
          "reason": {
            "type": "string",
            "description": "Explanation of the reason for the error which can be shown to a client user."
          },
          "message": {
            "type": "string",
            "description": "More details and corrective actions related to the error which can be shown to a client user."
          },
          "status": {
            "type": "string",
            "description": "HTTP Error code extension"
          },
          "referenceError": {
            "type": "string",
            "description": "URI of documentation describing the error.",
            "format": "uri"
          },
          "@baseType": {
            "type": "string",
            "description": "When sub-classing, this defines the super-class."
          },
          "@schemaLocation": {
            "type": "string",
            "description": "A URI to a JSON-Schema file that defines additional attributes and relationships",
            "format": "uri"
          },
          "@type": {
            "type": "string",
            "description": "When sub-classing, this defines the sub-class entity name."
          }
        },
        "description": "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)"
      },
      "ValidationMessageParameter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the parameter\n"
          },
          "value": {
            "type": "array",
            "description": "Value of the parameter\n",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "Name/value pair of the validation message parameter\n"
      },
      "ValidationMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Non-localized name identifier of the validation message\n"
          },
          "text": {
            "type": "string",
            "description": "Localized descriptive validation message\n"
          },
          "type": {
            "type": "string",
            "description": "Type of the validation message\n"
          },
          "subtype": {
            "type": "string",
            "description": "Distinct code which represents the issue\n"
          },
          "parameter": {
            "type": "array",
            "description": "Name/value pair of the validation message\n",
            "items": {
              "$ref": "#/components/schemas/ValidationMessageParameter"
            }
          },
          "severity": {
            "type": "string",
            "description": "Severity of the validation message\n"
          },
          "path": {
            "type": "string",
            "description": "Path to the resource part to which the validation message is related\n"
          },
          "resource": {
            "type": "array",
            "description": "Resource that is associated with the message\n",
            "items": {
              "$ref": "#/components/schemas/RelatedResource"
            }
          }
        },
        "description": "Message associated with the validation failure\n"
      },
      "ConfigurationChangeParameter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the parameter\n"
          },
          "value": {
            "type": "array",
            "description": "Value(s) of the parameter\n",
            "items": {
              "type": "string"
            }
          },
          "valueType": {
            "type": "string",
            "description": "Types of each Value in the parameter array\nAs a default - when empty - the type is string.\nAlso will be supported-\n** HashMap - a jason format representation of key value <string,string> map.\n"
          }
        },
        "description": "Name/value pair of the configuration change parameters\n"
      },
      "PatchElement": {
        "type": "object",
        "description": "Patched resource part\n",
        "properties": {
          "op": {
            "type": "string",
            "description": "Operation that is associated with the patched resource part. Valid values are *add*, *remove*, or *replace*.\n"
          },
          "path": {
            "type": "string",
            "description": "Path of this resource part within the patched resource, for example, */note*, */name*, or */orderItem/quantity*\n"
          },
          "value": {
            "type": "object",
            "description": "Value of the patched resource part\n"
          }
        }
      },
      "ConfigurationChange": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the configuration change\n"
          },
          "text": {
            "type": "string",
            "description": "Localized descriptive configuration change message\n"
          },
          "type": {
            "type": "string",
            "description": "Implementation discriminator of the configuration change\n"
          },
          "parameter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConfigurationChangeParameter"
            }
          },
          "severity": {
            "type": "string",
            "description": "Severity of the configuration change\n"
          },
          "path": {
            "type": "string",
            "description": "Path to the configuration change in the resource model\n"
          },
          "skipRevalidation": {
            "type": "boolean",
            "description": "Indicates whether revalidation of the configuration change is required\n"
          },
          "patchElement": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchElement"
            }
          },
          "configurationChangeSource": {
            "type": "array",
            "description": "Holds a list of the impacting components that are involved in action rule\n- enablmentRelation - The action rule has impacting enablment relation functionality or was created by this functionality.\n- commertialRelation - The action rule has impacting commertial relation functionality or was created by this functionality.\n- subscriptionRelation - The action rule has impacting subscription relation or was created by this functionality. functionality\n- catalog - The action rule was created by catalog.\n",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "Configuration change recommended for a validated resource\n"
      },
      "KeyValueObject": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the characteristic"
          },
          "value": {
            "type": "string",
            "description": "Value of the characteristic"
          }
        },
        "description": "Describes a characteristic of an object or entity using a name/value pair."
      },
      "Configuration": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Type of the component\n"
          },
          "type": {
            "type": "string",
            "description": "Type of the component\n"
          },
          "subtype": {
            "type": "string",
            "description": "Sub Type of the Component\n"
          },
          "properties": {
            "type": "array",
            "description": "Name/value pair\n",
            "items": {
              "$ref": "#/components/schemas/KeyValueObject"
            }
          },
          "required": {
            "type": "boolean",
            "description": "Component required for Product Order Configuration\n"
          },
          "postOrderConfigurable": {
            "type": "boolean",
            "description": "Component Post Order Product Order Configuration\n"
          },
          "readOnly": {
            "type": "boolean",
            "description": "Component allowed for configuration or not.\n"
          },
          "resource": {
            "type": "array",
            "description": "Resource that is associated with the message\n",
            "items": {
              "$ref": "#/components/schemas/RelatedResource"
            }
          }
        },
        "description": "Message associated with the validation failure\n"
      },
      "Validation": {
        "type": "object",
        "description": "Validation result that is associated with the product order\n",
        "properties": {
          "status": {
            "type": "string",
            "description": "Validation status\n"
          },
          "readyToCheckout": {
            "type": "boolean",
            "description": "Ready To Checkout\n"
          },
          "readyToSubmit": {
            "type": "boolean",
            "description": "Ready to Submit\n"
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "validationMessage": {
            "type": "array",
            "description": "Validation message\n",
            "items": {
              "$ref": "#/components/schemas/ValidationMessage"
            }
          },
          "configurationChange": {
            "type": "array",
            "description": "Configuration change\n",
            "items": {
              "$ref": "#/components/schemas/ConfigurationChange"
            }
          },
          "configuration": {
            "type": "array",
            "description": "Configuration Components\n",
            "items": {
              "$ref": "#/components/schemas/Configuration"
            }
          },
          "extensions": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {}
            }
          }
        },
        "x-examples": {}
      },
      "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"
          }
        }
      }
    },
    "examples": {
      "CreditCheckLowRisk": {
        "summary": "credit check response for the order",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "casApplicationId": "602177078164",
          "unifiedPolicyTransactionId": "P20210818000068739",
          "creditRisk": "LOW"
        }
      },
      "CreditCheckPolicyAdvPay": {
        "summary": "credit check resulting advance pay",
        "value": {
          "unifiedCreditTransactionId": "U202602170001",
          "casApplicationId": "602177078164",
          "unifiedPolicyTransactionId": "P20210818000068739",
          "riskAssessmentResult": [
            {
              "productType": "WIRELINE_PRODUCTS",
              "securityType": "ADVPAY",
              "securityDescription": "Advance Pay",
              "securityAmount": 100,
              "productOrderItemId": "12345-123555-1235566-11111"
            }
          ]
        }
      },
      "CreditCheckDebt": {
        "summary": "credit check with debt",
        "value": {
          "unifiedCreditTransactionId": "U202602170001",
          "casApplicationId": "602177078164",
          "creditRisk": "BadPaymentRisk",
          "debt": [
            {
              "accountNumber": "123456789",
              "billingAddress": {
                "addressCharacteristic": [
                  {
                    "characteristicRelationship": [],
                    "metadata": [],
                    "name": "addressLine1",
                    "value": "517 BALTUSROL CIR",
                    "valueMetadata": []
                  }
                ],
                "city": "GARLAND",
                "geographicSubAddress": []
              },
              "debtDetails": {
                "accountBalance": 0,
                "minimumAmountDue": 0,
                "pastDueAmount": 0,
                "system": "CNG",
                "systemDivision": "TTB"
              }
            }
          ]
        }
      },
      "CreditCheckIdentityVerification": {
        "summary": "credit check response id verification",
        "value": {
          "unifiedCreditTransactionId": "U202602170001",
          "creditRisk": "IDConfidenceRisk",
          "interConnectTransactionId": "INT1234567890",
          "casApplicationId": "602177078164",
          "questionsAndAnswers": [
            {
              "questionId": "1",
              "questionText": "On which of the following streets have you lived?",
              "answerOptions": [
                {
                  "answerId": "1",
                  "answerText": "BIRCHCREST DR"
                },
                {
                  "answerId": "2",
                  "answerText": "BLUE STEM CT"
                }
              ]
            }
          ]
        }
      },
      "CreditCheckAnswerVerificationFailedResponse": {
        "summary": "credit check response with after answers were provided. EidVerifierCode is false denoting answer verification failed.",
        "value": {
          "unifiedCreditTransactionId": "U20220309405953264",
          "eidVerifierCode": false,
          "interConnectTransactionId": "fail123"
        }
      },
      "CreditCheckAnswerVerificationSuccessResponse": {
        "summary": "credit check response with after answers were provided. EidVerifierCode is true denoting answer verification succeeded.",
        "value": {
          "unifiedCreditTransactionId": "U20220309405953264",
          "eidVerifierCode": true,
          "casApplicationId": "602177078164",
          "unifiedPolicyTransactionId": "P20210818000068739"
        }
      },
      "CreditCheckFraudRisk": {
        "summary": "credit check response Fraud Risk",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "creditRisk": "FraudRisk"
        }
      },
      "CreditCheckAbusiveRisk": {
        "summary": "credit check response Abusive Risk",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "creditRisk": "AbusiveRisk"
        }
      },
      "CreditCheckAnalystReview": {
        "summary": "credit check response Analyst Review",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "creditRisk": "AnalystReview"
        }
      },
      "CreditCheckHighRisk": {
        "summary": "credit check response High Risk",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "creditRisk": "HIGH"
        }
      },
      "CreditCheckAdditionalInfoResponseFirst": {
        "summary": "credit check response after additional info required was determined",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "creditRisk": "AdditionalInfoRequired"
        }
      },
      "CreditCheckAdditionalInfoResponse": {
        "summary": "credit check response after additional info provided. Other response like BadPaymentRisk, FraudRisk, etc can be returned based on the additional info provided.",
        "value": {
          "unifiedCreditTransactionId": "U35456657879",
          "casApplicationId": "602177078164",
          "unifiedPolicyTransactionId": "P20210818000068739",
          "creditRisk": "LOW"
        }
      }
    },
    "parameters": {
      "ParameterAppname": {
        "name": "appname",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Application name making the request"
      }
    }
  }
}