SCS Print Generate Contract PDF API
Overview
This document defines the capabilities of the PrintGenerateContractPDF method. This method allows the consumer of the service to print the latest stored version of a contract PDF from SCS. Consumers of the service will also be able to generate a contract PDF if one did not exist prior to the initiation of the request. The service will also print the contract PDF after it is generated. The service will not generate a new contract PDF, it will only print the existing PDF, if one already existed prior to the initiation of the request.
The PrintGenerateContractPDF service will generate and print contract PDFs for contracts in any status from sellers in any status. If the contract can not be generated or printed an error will be returned in the response. In SCS the following note will be added to the contract when a contract PDF is generated: "Contract generated from Web Service by user <user_name>".
In SCS the following note will be added to the contract when a contract PDF is printed: "Contract was reprinted by user <user_name>".
The following table represents the data formats used in the XML coding (Use to reference the “Format” column in the following XML schema tables)
| | |
|---|
| Data Type | Description | Example |
| X(10) | Characters of max length of 10 | ABCDEABCDE |
| Date | yyyy-mm-dd | 2000-12-21 |
| DateTime | yyyy-mm-ddThh:mm:ss | 2000-12-21T12:24:40 |
| N(5) | Number,max length of 5 | 12345 |
| N(8,2) | Number with two decimals, max length of 8 | 123456.78 |
| Boolean | Boolean true or false | true |
Request Schema items are noted as (R)equired, (O)ptional, or (C)onditional in the documentation provided.
Location
Request Schema
PrintGenerateContractPDF Request Object
| | | |
|---|
| Tag | Format | Validate | Description |
| TpaCode | X(4) | R | Third Party Administrator Code |
| UserId | X(30) | R | User ID issued to the requesting system |
| Password | X(255) | R | Password issued to the requesting system |
| RequestingUser | X(50) | R | User name of the user requesting the service. User must be configured in SCS. |
| ContractNumber | X(20) | R | Contract Number of the contract PDF to be generated/printed. |
| DealerNumber | X(18) | R | Dealer Number of the contract seller. |
Sample Soap Request
<soapenv:Envelope xmlns:soapenv[="http://schemas.xmlsoap.org/soap/envelope/"](http://schemas.xmlsoap.org/soap/envelope/) [xmlns:con="http://tempuri.org/ContractService/">](http://tempuri.org/ContractService/)
<soapenv:Header/>
<soapenv:Body>
<PrintGenerateContractPDF>
<printGeneratePDFRequest>
<UserId>userID</UserId>
<Password>XXXXXXXXX</Password>
<TpaCode>SEFI</TpaCode>
<ContractNumber>CONTRACT123</ContractNumber>
<DealerNumber>SELLER01</DealerNumber>
<RequestingUser>JSMITH</RequestingUser>
</printGeneratePDFRequest>
</PrintGenerateContractPDF>
</soapenv:Body>
</soapenv:Envelope>
Response Schema
PrintGenerateContractPDF Object
| | |
|---|
| Tag | Valid Values | Description |
| ContractDocument | Encrypted Document | |
| Messages | Message Object | Collection of Messages. See Message Object. |
Message Object
| | |
|---|
| Tag | Valid Values | Description |
| Type | 1, 2, 3, 4 | 1 – Error, 2 – Info, 3 – Warning, 4 – Success |
| ResponseCode | Various | Provides the associated code with each message text. |
| Messages | | Message associated to the response, if any. See Error Messages list below for more information. |
Error Messages
| | |
|---|
| Message Type | Error Code | Message |
| Error | PRNT_PDF_0009 | Requesting User is required. |
| Error | PRNT_PDF_0005 | Contract Number is required. |
| Error | PRNT_PDF_0007 | Dealer Number is required. |
| Error | VD0003 | TPA Code is required. |
| Error | PRNT_PDF_0003 | Contract not found. |
| Error | GNRT_PDF_0001 | Only selling dealer can print/generate contracts. |
| Error | GNRT_PDF_0002 | Technical difficulties are preventing contract PDF creation. Please contact your product provider for further assistance. |
| Error | GNRT_PDF_0003 | Error occurred - PrintGenerateContractPDF. Please contact System Administrator for further assistance. |
| Error | ERRINREQ | Error in Request. |
Sample SOAP Response for Successful Request
<soap:Envelope>
<soap:Body>
<PrintGenerateContractPDFResponse>
<PrintGenerateContractPDFResult>
<ResponseCode>1</ResponseCode>
<Messages/>
<ContractPDF>JVBERi0xLjcNJeLjz9MKNiA.......
</PrintGenerateContractPDFResult>
</PrintGenerateContractPDFResponse>
</soap:Body>
</soap:Envelope>