{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d8ba4411-74be-4ad4-b736-2c46eae079b4","name":"NRG Sales APIs","description":"> This collection hosts all sales APIs. The documentation below will explain the expected inputs and outputs for each call to be made during an enrollment. You can also find the values that are accepted as for repetitive inputs throughout each API below. \n  \n\n# API Overview\n\n## Identification\n\nAll users must have a valid Social Security Number or Texas Driver’s License to enroll online using the real time process. Users who do not pass this validation step will be required to call in for service. Via the call center agent path, users may present alternative identification such as out of state license information, which will be manually approved.\n\n## Deposit Payment Information\n\nAfter successful submission of an enrollment request, the API will return a contract account number. At this point, if the customer owes a deposit, the affiliate can either direct the customer to call the NRG brand-specific phone number to pay their deposit, or take advantage of an NRG hosted “payment gateway” to offer the user the option of making their payment online right then. (The pages for this deposit payment flow are hosted on an NRG server that is specifically configured to meet the high security requirements around collection of PCI data, like credit cards.)\n\n## Language Preferences\n\nThe “Language Code” in the calls allows the front end to optionally indicate whether the customer-facing “message code” text returned in the calls should be in English or Spanish (if the affiliate wants to use the messages directly).  \nA separate variable called “Preferred Language” is for setting the language of the NRG account-related customer communications, such as account invoices. This value is submitted to SAP.\n\n## Addresses\n\nServices must be physical address with a street number and street name. Billing address may be a PO Box or street number/street name format.\n\n## Tracking ID and GUID\n\nA tracking ID and GUID will be created for data submitted to the Identity API. If a particular step is repeated with updated data, the call should be submitted with the same tracking ID and GUID so that the data can be updated in our NRG systems. (Note: The token, prospect, address cleanup, standalone ESID Details call and Offers call do not require or create a tracking ID, allowing for flexibility in where these functions may be used by the affiliate.)\n\nSubmitted enrollment requests that are written into NRG backend system will also receive a contract account number in the “Enrollment” API. For the enrollment API, besides the data included in the call input, there is information that will be pulled from NRG database based on earlier calls. For that reason, the tracking ID and GUID is required for some of the earlier calls to tie information to the appropriate record.\n\n# API Processing\n\nEach API submission will go through a number of validations before being processed. The API will return a failure in any of these scenarios:\n\n- Required input variables are not included in the submission\n    \n- The submitted input variables do not meet the format requirements\n    \n- Internal system issues caused us to be unable to process the request\n    \n\nThe “errorDescription” text is provided for internal troubleshooting in case of issue with processing of the API.\n\nIf the API call completes processing, it will return a status code that indicates the following:\n\n- The prospect can continue the process beyond this point\n    \n- The prospect must be stopped due to an exception; Affiliate may want to provide call center number for these instances if not already displayed on the page.\n    \n- The prospect can continue after verification of necessary information\n    \n\nThe “messageText” field is provided for customer-facing message content. This message may be appended with additional content determined by the Affiliate (i.e. Affiliate specific call center number). There can be message codes returned even in the case where the user does not need to be stopped, for example to advise them about special handling that will be needed on the account (such as where there is a “Switch Hold Notify” response from the \"Available Dates API. )\n\n# Building API Request\n\n## Authorization\n\nAll NRG Sales APIs are available only for B2B communication and are secured by Basic Authentication scheme. To access these APIs on NRGs QA or Production environments, please work with your Business Contact at NRG to get your network IPs whitelisted and get issued your unique API credentials. For any queries or trouble accessing APIs, please email [NRGWebRetail@reliant.com](https://mailto:NRGWebRetail@reliant.com).\n\n## Input options by brand and channel\n\n### Brand identifiers\n\n| Brand | Company Code | Brand ID |\n| --- | --- | --- |\n| Reliant | 0121 | RE |\n| Green Mountain | 0271 | GM |\n| Cirro | 0391 | CE |\n| Discount Power | 0391 | PW |\n| Direct Energy | 0315 | DE |\n\n### TDSP codes\n\n| TDSP | TDSP Code |\n| --- | --- |\n| CenterPoint Energy | D0001 |\n| ONCOR | D0002 |\n| Texas-New Mexico Power | D0003 |\n| AEP Texas Central | D0004 |\n| AEP Texas North | D0005 |\n| Sharyland Utilities | D0009 |\n| Lubbock Power & Light TDSP | D0011 |\n\n### Channel indicator\n\n| Channel ID | Channel |\n| --- | --- |\n| WEB | Online enrollments |\n| AA | Agent assisted enrollments |\n| AFF | Affiliate enrollments |\n| CC | Call center enrollments |\n| SMB | Small business enrollments |\n\n### Language code (will default to English if blank)\n\nThe “Language Code” in the API input allows the API client to optionally indicate whether the customer-facing “message code” text returned in the calls should be in English or Spanish.\n\n| Language Code | Language |\n| --- | --- |\n| E | English |\n| S | Spanish |\n\n# Understanding API Response\n\nEach NRG Sales API, upon successful execution, would produce a JSON response. Upon execution of the API, you would receive an HTTP Status and a statusCode in the response payload. Use below chart to understand how to interpret different HTTP Status Codes and Response statusCode when consuming the API\n\n## Interpreting HTTP Status Code\n\n| Status Code | Meaning | Definition |\n| --- | --- | --- |\n| 200 | OK | Standard response for successful HTTP requests |\n| 400 | Bad Request | The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, missing mandatory field in the request, invalid trackingId and guid) |\n| 401 | Unauthorized | Authentication is required and has failed or has not yet been provided |\n| 403 | Forbidden | The request contained valid data and was understood by the server, but the server is refusing action |\n| 404 | Not Found | The requested resource could not be found |\n| 405 | Method Not Allowed | A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST |\n| 500 | Internal Server Error | A generic error message, given when an unexpected condition was encountered and no more specific message is suitable |\n\n## Interpreting statusCode in response\n\n| Status Code | Meaning | Definition |\n| --- | --- | --- |\n| 00 | Continue | The user is approved to move forward with the enrollment. |\n| 01 | Hard stop | The user should stop the enrollment and not continue. |\n| 02 | Ask | There are further questions that the customer should address before continuing. |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3890864","team":745264,"collectionId":"d8ba4411-74be-4ad4-b736-2c46eae079b4","publishedId":"SzKYQcto","public":true,"publicUrl":"https://docs.nrg.com","privateUrl":"https://go.postman.co/documentation/3890864-d8ba4411-74be-4ad4-b736-2c46eae079b4","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2020-07-15T13:38:03.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Stage","id":"ae725690-84bf-4138-8d27-1078d22d5912","owner":"10503842","values":[{"key":"url","value":"https://stg-api.nrg.com","enabled":true},{"key":"language_code","value":"E","enabled":true},{"key":"promo_code","value":null,"enabled":true},{"key":"tracking_number","value":null,"enabled":true},{"key":"esid","value":"","enabled":true},{"key":"tdsp_code","value":"","enabled":true},{"key":"auth_token","value":"<Use the username & password provided separately>","enabled":true},{"key":"","value":"","enabled":false},{"key":"trackingId","value":"","enabled":true,"type":"any"},{"key":"guid","value":"","enabled":true,"type":"any"},{"key":"offerCode","value":"","enabled":true,"type":"any"},{"key":"promoCode","value":"","enabled":true,"type":"any"},{"key":"campaignCode","value":"","enabled":true,"type":"any"},{"key":"productPriceCode","value":"","enabled":true,"type":"any"},{"key":"marketSegment","value":"","enabled":true,"type":"any"},{"key":"incentiveCode","value":"","enabled":true,"type":"any"},{"key":"currentDate","value":"","enabled":true,"type":"any"},{"key":"caNumber","value":"","enabled":true,"type":"any"},{"key":"checkDigit","value":"","enabled":true,"type":"any"},{"key":"bpNumber","value":"","enabled":true,"type":"any"},{"key":"idoc_number","value":"","enabled":true,"type":"any"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/2c80481e55ba85fd13fbceb6b08bc9e03a52af73023f7eebf90eb3253c88c930","favicon":"https://nrg.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Stage","value":"10503842-ae725690-84bf-4138-8d27-1078d22d5912"}],"canonicalUrl":"https://docs.nrg.com/view/metadata/SzKYQcto"}