Method ExtractTreasury
ExtractTreasury extracts the overall Treasury Referral Status Code for a loan in servicing/postservicing. The logic for the returned value is as follows:
- If one or more of the Tax IDs on the loan are in DMS, returns "D"
- If no Tax IDs are in DMS, but one or more are in TOP, returns "T"
- Otherwise, returns an empty value
| SOAP Component: | https://caweb.sba.gov/elend/ws/elend.wsdl. |
| SOAP Method: | SharedEntryPoint, only input is structure Inputs |
| Or: | SharedEntryString, only input is JSON string InputString that decodes to a structure |
| REST Component: | /rest/elend/flexible |
| REST Method: | /rest/elend/flexible/SharedEntryPoint, only input is structure Inputs |
| Or: | /rest/elend/flexible/SharedEntryString, only input is JSON string InputString |
| Keys of the Input Structure: | |
| Mandatory. Must be ExtractTreasury. | |
| Mandatory. CLS login’s username with at least read permission in Servicing. | |
| Mandatory. CLS login’s password with at least read permission in Servicing. | |
| Mandatory. PIN generated by Generate_PIN using the same login. | |
| Mandatory. SBA Application Number of app to be extracted. | |
| Mandatory. A private code that authorizes use of SoftwareVendorName. | |
| Mandatory. Value from Code Tables, Vendor Table. | |
| Optional. Email address of person making the call. | |
| Optional. Allows extracting multiple apps in one XML file. (See below.) | |
| Optional. Allows extracting multiple loans in one XML file. (See below.) | |
| Optional. Comma-delimited list of option codes. (See below.) | |
| Optional. Add a reason attribute to the root tag with this information. Convenience note. | |
| Optional. SBA_ETran version number. If absent, the current default version will be used. | |
| Optional. Format of ResponseData. XML or JSON. See Format IN/OUT Defaults | |
| Keys of the Output Structure: | |
| Should be nullstring. If not, a generally-worded error message. | |
| Should be nullstring. If not, a more helpful error message, but scarier to some users. | |
| “Yes”, “No”, number of days till expiration or “TBD” (prior to validating login). | |
| The extracted XML (for the version requested). | |
For examples of calling flexible, structured methods, see Flexible Structure of Inputs For an explanation of REST calls, see Calling Rest Methods
If ApplicationNumber is given, it overrides ExtractAppList and ExtractLoanList. If ApplicationNumber is not given, and ExtractAppList is given, it must contain a comma-delimited list of SBA application numbers, and it overrides ExtractLoanList. If neither ApplicationNumber nor ExtractAppList is given, ExtractLoanList becomes mandatory and must contain a comma-delimited list of SBA loan numbers (10-digit format preferred). In all cases, the CLS login account must have read access to the requested loan(s). When a list is specified, all loans will be contained in a single file, as allowed by SBA_ETran format.
Currently available ExtractOptions are:- “cmp” – compresses out whitespace between tags. The default is indented, which is more human-readable.
- "env” – adds an attribute to the root tag to indicate environment (such as “test” or “prod”).
Other extract options will not cause issues but will not have any functionality
Example combination: If ExtractOptions is “env”, ExtractReason is “for electronic portfolio” and ExtractVersion is “5.0”, calling ExtractServicing on caweb.sba.gov (production environment) is liable to extract XML with the following root element:<SBA_ETran version="5.0" environment="prod" reason="for electronic portfolio">