Flow Service API
Flow Service (previously called Signature Service) enables easy integration of sending requests for signatures, payments, documents, and image uploads. Integrators are also able to retrieve previously sent Flow requests and create transaction reports on previous requests. All requests are made through common HTTP POST, GET, PUT, PATCH requests.
Authentication will be done with a Base64 encoded username:password, passed in through the BASIC HTTP Authorization Header.
If the request cannot be delivered by the requested method (email or text message), the integrator will receive an HTTP error 500 with a RequestErrorList containing an ERR type RequestError. The request will thus be treated as a failed request and will not be stored for future reporting or retrieval.
Signature
endpoint: https://flow.pdcflow.com/api/v2_0/signatures
POST to the signature endpoint to send a request though email, text, or both. 
GET to retrieve a previous signature. 
PUT to modify a previous signature.
| Attribute | Description | 
| signatureId 
                    Numeric20
                 | The id of the signature request. | 
| parentId 
                    Numeric20
                 Readonly | The id of the parent signature. Only generated when recipientshave been provided. For the Parent Signature, theparentIdwill be the same as thesignatureId. | 
| firstName 
                    Alphanumeric45
                 Required | The first name of your client. | 
| lastName 
                    Alphanumeric45
                 Required | The last name of your client. | 
| fullNameOverride 
                    Alphanumeric100
                 | Use this name to override the firstNameandlastNameof your client. This is useful if you want to use it as a company name.If provided this will be used in place of firstNameandlastName. | 
| accountNumber 
                    Alphanumeric45
                 | Account or reference number. This is often the customer account number from your system. | 
| invoiceId 
                    Alphanumeric45
                 | Invoice or reference number. This is often the customer invoice id from your system. Currently only shown on the BILLING_DATAcomponent page. | 
| emailAddress 
                    Alphanumeric65
                 | The email address to send the request to. Sending both emailAddressandmobileNumberwill send the request to both. | 
| mobileNumber 
                    Numeric15
                 | The phone number to send request to. Sending both emailAddressandmobileNumberwill send the request to both.Format: With country code See the important note about SMS Opt In. | 
| username 
                    Alphanumeric65
                 Conditional | Username or email of the employee sending this request. 
                    Constraint(s): Required for modification ( PUT) requests. | 
| description 
                    Alphanumeric160
                 Conditional | Description of what the signature is for. Will show with the signature. 
                    Constraint(s): Only required with standalone signature.
                 | 
| verificationPin 
                    Numeric8
                 Required | Shared secret for client verification. 
                    Constraint(s): Must be between 4 and 8 digits long or -1. -1 will prevent the pin verification page from being displayed. ** Warning, this will allow anyone with the request url to complete the request. ** | 
| pinDescription 
                    Alphanumeric50
                 Required | Description of the verificationPin. | 
| verificationPageHeader 
                    Alphanumeric160
                 | Text that will be displayed above the verificationPinon the verification page. | 
| pageFooter 
                    Alphanumeric320
                 | Text that will be displayed below the pinDescriptionon the verification page. | 
| maxPinAttempts 
                    Numeric2
                 | Maximum amount of attempts the client is allowed for verification before transaction is locked. Default: 3 | 
| requestGeolocation 
                    Boolean5
                 | Request the geolocation from the client. 
                    Constraint(s): Client can refuse to share location, preventing capture.
                 Valid value(s):  true,falseDefault: true | 
| latitude 
                    NumericString25
                 
                    Readonly
                 | The latitude geolocation of your client. Provided if the original request had requestGeolocationtrue and the client Browser/OS settings allow location sharing. | 
| longitude 
                    NumericString25
                 
                    Readonly
                 | The longitude geolocation of your client. Provided if the original request had requestGeolocationtrue and the client Browser/OS settings allow location sharing. | 
| timeoutMinutes 
                    Numeric6
                 | Number of minutes client has to complete the transaction before it expires. Default: 2880 Minutes (48 hours) | 
| redirectLink 
                    URL65
                 
                    Conditional
                 | A URL link to direct the user to, after the transaction is complete, and the user clicks "Done". Required if  automaticRedirectistrue | 
| automaticRedirect 
                    Boolean
                 | Option to bypass the Donepage and automatically follow theredirectLinkwhen the transaction is complete. | 
| customMessage 
                    AlphaNumeric320
                 | Free form text to display at the end of the transaction. | 
| payment 
                    PaymentN/A
                 | ** Deprecated: Use COMPONENTtypePORTAL_PAYMENT**Data for payment request. 
                    Constraint(s): See object definition below.
                 | 
| document 
                    DocumentN/A
                 | ** Deprecated: Use COMPONENTtypeDOCUMENT**Data for document presentation. 
 
                    Constraint(s):  
 | 
| imageUploadList Readonly 
                    ImageUploadListN/A
                 | A list of ImageUploadobjects uploaded by your client.
                    Constraint(s): See object definition below.
                 | 
| imageUpload 
                    ImageUploadN/A
                 | Information for image upload. 
                    Constraint(s): See object definition below.
                 | 
| companyOverride 
                    CompanyOverrideN/A
                 | Data for overriding company information. 
                    Constraint(s): See object definition below.
                 | 
| standaloneSignatureRequested 
                    Boolean5
                 | Whether standalone signature is desired or not. Valid value(s):  true,falseDefault: true | 
| transactionOrigin 
                    String3
                 | The origin of the transaction request. This should be set to EXT.NOTE: There are other possible values. Please contact our Customer Success team to learn more. | 
| flowTitle 
                    String50
                 | The title of the flow. If sending the request via sms, this will be visible in the message sent. | 
| templateName 
                    String50
                 | The name of the template used for this request. Can be used to associate similar requests together. | 
| completionDate 
                    Date25
                 | The date and time the full request was completed. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| signatureReceivedDate 
                    Date25
                 | The date and time the signature was stored on our system. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| signatureReceivedTimezone 
                    Numeric5
                 | The timezone in which the signature was signed. Format: GMT Offset | 
| signatureClosed 
                    Boolean5
                 | Whether the transaction was closed. Either all parts of the transaction were completed or an error occurred. Valid value(s):  true,false | 
| modificationCode 
                    Alpha5
                 Required | The modification to make on the transaction. Valid value(s):  CLOSE | 
| postbackUrl 
                    URL500
                 | A URL to POSTcompleted signature data to.
                    Constraint(s): Must be SSL (HTTPS)
                POSTed data may include: signatureId,completionDate,errorCode,errorMessage | 
| postbackAuthHeader 
                    AlphaNumeric512
                 | An optional Authorization Header that will be provided when we POSTto the providedpostbackUrl | 
| customEmailBody 
                    AlphaNumeric60,000
                     Conditional | Text to include in the email request, above the signature link. If this is part of the request, ONLY this text, the signature link, and the customEmailFooterwill be sent to theemailAddress.
                    Constraint(s): Required if the  customEmailFooteris also requested. | 
| customEmailFooter 
                    AlphaNumeric60,000
                 | Text to include in the email request, below the signature link. If this is part of the request, ONLY the customEmailBody, the signature link, and this text will be sent to theemailAddress. | 
| errorCode 
                    Alpha3
                 | Code if an error occurred with the signature. See errorMessagefor possible values. | 
| errorMessage 
                    Alphanumeric160
                 | An explanation message for the error that occurred. 
                    Constraint(s): Will only show if an  errorCodeis present.
                    Valid values for an  errorCode:
 | 
| roundTripNVPS 
                    ListN/A
                 | List of roundTripNVPobjects. These are Name/Value pass-through values.
                    Constraint(s): Max of 10  roundTripNVPobjects per request. See object definition below. | 
| pageOrder 
                    List-AlphaN/A
                 | A list of page enum values to define the order in which the receiver will view the pages of the request. Valid value(s):  
 
                    Constraint(s): Only pages for requested functionality can be included. PG_PAY&PG_PMTcan't be included in the same request. | 
| reportOrder 
                    List-AlphaN/A
                 | A list of report enum values to define the order in which the pages will show on the transaction report. Valid value(s) for a Parent:
                     
 Default for a Parent:  PG_COV,PG_RECValid value(s) for a Recipient:
                     
 Default for a Recipient:  PG_COV,pageOrder,PG_LOCConstraint(s): Must at least contain the same values as  pageOrder | 
| requestedDate 
                    Date25
                 | Date and time the transaction was requested. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| expirationDate 
                    Date25
                 | Date and time the transaction will expire. Based on the requestedDateandtimeoutMinutes.Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| signatureImage 
                    Base64N/A
                 | Base64 encoded signature image in .png format. | 
| textSuccessful 
                    Boolean5
                 | Whether the text was successfully sent to the client. Valid value(s):  true,false | 
| emailSuccessful 
                    Boolean5
                 | Whether the email was successfully sent to the client. Valid value(s):  true,false | 
| signatureUrl 
                    Alphanumeric160
                 | The URL sent to the recipient to complete the signature request. | 
| status 
                    Alpha9
                 | The current status of the request. For requests sent prior to June 2019, this field may be empty. Valid value(s):  WAITING- The request has been created, but not sent yet. This is used when a secondarySEQUENTIALRecipient has not been sent yet.PENDING- The request has been sent.OPEN- A valid PIN has been entered on the request, but the request has not been completed.COMPLETED- The request has been successfully completed.CLOSED- The request was manually closed.FAILED- The request has failed. This can be due to the document being denied, or other errors. AnerrorCodeanderrorMessagewill provide the reason for the failure.EXPIRED- The request has exceeded thetimeoutMinutesand cannot be completed. | 
| statusDate 
                    Date25
                 | The date that the current statushappened. For anEXPIREDstatus, this will be the date the request expired. For requests sent prior to June 2019, this field may be empty.Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| componentList 
                    ListN/A
                 | List of related Componentobjects. See object definition below. | 
| emailNotificationIdList 
                    ListN/A
                 | List of related email Notification Ids. READONLY | 
| emailAttemptList 
                    ListN/A
                 | List of related EmailAttemptobjects. See object definition below. READONLY | 
| smsNotificationIdList 
                    ListN/A
                 | List of related SMS Notification Ids. READONLY. See the important note about SMS Opt In. | 
| smsAttemptList 
                    ListN/A
                 | List of related SmsAttemptobjects. See object definition below. For requests sent prior to Nov 2020, this field may be missing/empty. READONLY.See the important note about SMS Opt In. | 
| locationId 
                    Numeric10
                 | The id for the Location that the Signature is requested for. | 
| statusList 
                    ListN/A
                 | List of signature statuses. See object definition below. READONLY | 
| eventRecipientList 
                    ListN/A
                 | List of EventRecipientobjects. See object definition below. These recipients will receive a notification for a final Flow status ofCOMPLETED,DISPUTED,EXPIRED,FAILED. | 
| businessOrigin 
                    Alphanumeric100
                 | If another business is related to the communication, this attribute can be used to include that businesses name in the SMS Messages. | 
| qrCode 
                    AlphanumericN/A
                 | Base64 encoded string that can be converted to a QR code image that contains the signatureUrl. READONLY | 
| recipients 
                    FlowRecipientsN/A
                 | Data for sending a Signature request to multiple recipients. When provided this Signature will become the Parent Signature. See the object definition below for more details. Only the following elements are returned for the Parent Signature: 
 | 
| reminderList 
                    List1
                 | List of Reminderobjects. See object definition below. | 
statusList
| Attribute | Description | 
| status 
                        Alpha9
                     | The status of the request. Valid value(s):  WAITING- The request has been created, but not sent yet. This is used when a secondarySEQUENTIALRecipient has not been sent yet.PENDING- The request has been sent.OPEN- A valid PIN has been entered on the request, but the request has not been completed.COMPLETED- The request has been successfully completed.CLOSED- The request was manually closed.FAILED- The request has failed. This can be due to the document being denied, or other errors. AnerrorCodeanderrorMessagewill provide the reason for the failure.EXPIRED- The request has exceeded thetimeoutMinutesand cannot be completed. | 
| statusDate 
                        Date25
                     | The date that this statushappened. For anEXPIREDstatus, this will be the date the request expired. For requests sent prior to June 2019, this field may be empty.Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
-Signature Document
endpoint: https://flow.pdcflow.com/api/v2_0/{signatureId}/documents
GET to retrieve a Document Object (if there is only one document or a documentList if there is more than one) that is attached to the signatureId, including any overlay box data that has been entered per document.
-QR Code
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/{signatureId}/qrcode
GET to retrieve a QR code in PNG format that contains the signatureUrl as an alternative to converting a Signature object's qrCode base64 string to an image.
-SMS Opt In Waiting
How to know when a FLOW’s SMS is in the queue, waiting for a YES response from the Recipient
When a Flow is requested with a mobileNumber, we will attempt to send the FLOW SMS. However, starting September 27, 2021, before your first SMS is delivered to a recipient, the recipient will be sent an SMS Opt-in Request from PDCflow asking them to confirm that they do want to receive SMS from your company via PDCflow. This is the SMS Opt-in Request that PDCflow will send:
{fullName}, {companyName} wants to send you PDCflow secure communications: Text back YES to receive them. Msg&data rates may apply. Reply STOP to opt-out anytime.
**Note {fullName} will be {firstName} {lastName} or {fullNameOverride} if it was provided in the request.
The FLOW will still be created and when the recipient responds "YES", the SMS FLOW Request, which includes the link to the FLOW, will be sent. Now that the recipient has opted in, any future requests to their mobileNumber will be sent. If they ever respond with STOP, they will be unsubscribed from receiving SMS from PDCflow, and new FLOW requests will be rejected before they are created.
To identify if a FLOW is waiting for the SMS recipient to OPT IN, on the initial response and subsequent GETs, you will see there is a mobileNumber, but the smsNotificationIdList will be missing/empty. As soon as the recipient opts in, the waiting flow(s) will now have a Notification ID in the "smsNotificationIdList".
The FLOW’s SMS is Queued and Waiting For SMS Opt-in if:
- FLOW statusisPENDINGorOPEN
- There is a mobileNumber
- There is not a value in the smsNotificationIdList
-BULK Signature Request
POST
a FlowBulk to create and process a list of
new Signature Requests
endpoint: https://flow.pdc4u.com/api/v2_0/signatures/bulk
Response
FlowBulk object 
When the endpoint begins processing the signature requests in the background (async), the HTTP Status will
be 202 ACCEPTED
Patch Signature
PATCH a PatchSignature object to update an existing Signature for a specific signatureId.
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/{signatureId}
Response
The updated Signature
PatchSignature
| Attribute | Description | 
| accountNumber 
                    Alphanumeric45
                 | Account or reference number. This is often the customer account number from your system. | 
| roundTripNVPS 
                    ListN/A
                 | List of RoundTripNVPobjects. These are Name/Value pass-through values.Any RoundTripNVPwith a newrtNamewill add to the existing list. AnyRoundTripNVPwith anrtNamethat matches an existingRoundTripNVPwill save the updatedrtValue.
                    Constraint(s): Max of 10  RoundTripNVPobjects per request. | 
Bulk Search
POST 
FlowBulkSearchParameters to get a list of 
FlowBulk objects matching the FlowBulkSearchParameters provided
endpoint: https://flow.pdc4u.com/v2_0/signatures/bulk/search
Response
List of FlowBulk objects that match
the FlowBulkSearchParametersObject 
FlowBulkSearchParametersObject
| Attribute | Description | 
| dateStart 
                Date19
             | The starting date and time for the report range. Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss) | 
| dateEnd 
                Date19
             | The ending date and time for the report range. Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss) | 
| flowBulkIdList 
                List - Numeric10
             | List of bulkId. | 
| usernameList 
                List - Alphanumeric75
             | List of usernames provided with the FlowBulk | 
| descriptionList 
                List - Alphanumeric100
             | List of descriptions provided with the FlowBulk | 
| statusList 
                List - Alpha10
             | A list of flow bulk statuses. Valid Values: See FlowBulkstatusDefault: All Statuses | 
| includeSuccessful 
                Boolean5
             | Whether or not the response should include the signatureListSuccess.Default: false | 
| recordStart 
                Numeric20
             | The record count to start on. Default: 0 | 
| recordCount 
                Numeric4
             | How many records to return. Default: 2000 Maximum: 5000 | 
SearchParameters
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/search
POST to retrieve a list of signature transactions.
endpoint: https://flow.pdcflow.com/api/v2_0/signatures
GET to retrieve a list of signature transactions. URL encode all values for request.
| Attribute | Description | 
| flowIdList 
                    List - Alphanumeric20
                 | List of Flow IDs. NOTE: This option will ignore other search options. | 
| parentIdList 
                    List - Alphanumeric20
                 | List of Parent IDs. NOTE: This option will ignore other search options. | 
| startDate 
                    Date25
                 | The starting date for the report range. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) Default: One month prior to today's date | 
| endDate 
                    Date25
                 | The ending date for the report range. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| firstName 
                    Alpha45
                 | The first name to filter the report results by. Adding a "%" to the end of the name will allow wildcard search. | 
| lastName 
                    Alpha45
                 | The last name to filter the report results by. Adding a "%" to the end of the name will allow wildcard search. | 
| flowBulkIdList 
                    List - Numeric10
                 | List of bulkIdto find flows that were processed using a BULK Endpoint. | 
| reportType 
                    AlphaN/A
                 Required | What type of report to retrieve. Valid value(s):  ALL- Retrieve all signature requests.SIGNATURE- Retrieve only requests with that include a signature.ALLDOCUMENTS- Retrieve only requests with attached documents.SINGLEDOCUMENT- Retrieve only requests with the specifieddocumentIdattached.ACHPAYMENT- Retrieve only requests with an attached ACH payment.CCPAYMENT- Retrieve only requests with an attached Credit Card payment.ALLPAYMENT- Retrieve only requests with an attached payment. | 
| documentId 
                    Numeric20
                 Conditional | The document Id to filter SINGLEDOCUMENTtype reports. | 
| usernameList 
                    ListN/A
                 | A list of usernames to filter reports by. Each username is limited to a string with a length of 75 characters. | 
| currentStatusList 
                    ListN/A
                 | A list of statuses to filter the results by. Valid value(s):  WAITING- The request has been created, but not sent yet. This is used when a secondarySEQUENTIALRecipient has not been sent yet.PENDING- The request has been sent.OPEN- A valid PIN has been entered on the request, but the request has not been completed.COMPLETED- The request has been successfully completed.CLOSED- The request was manually closed.FAILED- The request has failed. This can be due to the document being denied, or other errors. AnerrorCodeanderrorMessagewill provide the reason for the failure.EXPIRED- The request has exceeded thetimeoutMinutesand cannot be completed. | 
| accountNumberList 
                    ListN/A
                 | A list of account numbers to filter the results by. Each value will be treated as a wildcard search. | 
| groupIdList 
                    ListN/A
                 | A list of group ids to filter the results by. If "0" is contained within the list, the search results will include signatures with no groupId | 
| locationIdList 
                    ListN/A
                 | A list of location ids to filter the results by. If "0" is contained within the list, the search results will include signatures with no locationId | 
| searchRoundTripNVPList 
                    ListNA
                 | A list of SearchRoundTripNVPobjects to filter the results by. | 
| templateNameList 
                    ListN/A
                 | A list of flow template names to filter the results by. | 
| transactionOriginList 
                    List - Alphanumeric3
                 | List of Transaction Origins. This will typically be EXT.NOTE: There are other possible values. Please contact our Customer Success team to learn more. | 
| accountDirectiveList 
                    ListN/A
                 | Filters search to contain flows with Paymentsusing any of the specifiedaccountDirectives.In addition to specific accountDirectives, adding a value of0to the list will filter the search to contain flows that don't have anaccountDirectiveassociated with them. | 
| recordStart 
                    Numeric20
                 | The record count to start on. Default:   0 | 
| recordCount 
                    Numeric4
                 | How many records to return. Default:   2000 Maximum:  5000 | 
| retrieveOnlyCompletedRequests 
                    BooleanN/A
                 | Whether to retrieve only signaturerequests that have been closed. This field has been deprecated in favor of usingcurrentStatusListwith aCOMPLETEDvalue.Valid value(s):  true,falseDefault:   false Constraint(s): Will return a validation error if used in conjunction with  currentStatusListthat contains any values other thanCOMPLETED | 
| userId 
                    Alphanumeric75
                 | The user Id to filter reports by. This field has been deprecated in favor of using usernameList | 
-SignatureList
| Attribute | Description | 
| signatureList 
                    ListN/A
                 | A list of Signatureobjects returned from a report request. Result parameters (For a detailed explanation of each response parameter, see Signature):signatureId firstName lastName fullNameOverride emailAddress mobileNumber username companyOverride (if applicable) -- companyName -- emailFromName -- subject -- linkText payment (if applicable) -- accountNumber -- paymentTransactionId -- paymentType -- totalAmount document (if applicable) -- documentId imageUpload (if applicable) -- imageUploadId standaloneSignatureRequested completionDate signatureClosed errorCode errorMessage requestedDate status statusDate expirationDate locationId roundTripNVPS | 
Self Serve
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/selfserve
POST to create a new Self Serve with a flow template. 
GET to retrieve an existing Self Serve. Add /{{uuid}} to the endpoint url. 
GET to retrieve a QR code in PNG format for the url. Add /{{uuid}}/qrcode to the endpoint url.
PUT to modify an existing Self Serve. Add /{{uuid}} to the endpoint url. 
DELETE to delete an existing Self Serve. Add /{{uuid}} to the endpoint url. This endpoint will only return an http status of either 200 for success, or a 404 if the {{uuid}} is not found.
| Attribute | Description | 
| uuid 
                    Alphanumeric40
                 Readonly | Unique id for the Self Serve object. | 
| url 
                    URL160
                 Readonly | The URL for a recipient to start the Self Serve process which will generate a new Flow from the flowTemplate. | 
| locationId 
                    Numeric10
                 | The id for the Location that the Self Serve is linked to. | 
| name 
                    Alphanumeric50
                 Required | A name used to identify this Self Serve. | 
| htmlPageTitle 
                    Alphanumeric50
                 | A name used as the HTML page title for the Self Serve. If not provided it will default to PDCflow Secure Communication. | 
| defaultSMS 
                    Boolean
                 | Will change the default MFA method to Mobile Phone. | 
| description 
                    Alphanumeric100
                 | A description of the Self Serve. | 
| consent 
                    Alphanumeric750
                 | The contents of this will be displayed on the Self Serve page and require the user to click a checkbox to agree. Formatted html is supported. | 
| disclaimer 
                    Alphanumeric2000
                 | The contents of this will be displayed on the Self Serve page below the consent. Formatted html is supported. | 
| flowTemplate 
                    Object
                 Required | A Signatureobject used as the template to specify Flow features and components on this Self Serve.The following are not allowed to be included: 
 | 
-Self Serve Search
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/selfserve/search
POST to retrieve a selfServeList which contains a list of SelfServe objects matching the SelfServeSearch provided 
| Attribute | Description | 
| uuidList 
                    List - Alphanumeric40
                 | List of uuidto search forNOTE: This option will ignore other search options | 
| locationIdList 
                    List - Numeric10
                 | List of locationIdto search for | 
| nameList 
                    List - Alphanumeric40
                 | List of nameto search for | 
| descriptionList 
                    List - Alphanumeric100
                 | List of descriptionto search for | 
| consentList 
                    List - Alphanumeric500
                 | List of consentto search for | 
| disclaimerList 
                    List - Alphanumeric2000
                 | List of disclaimerto search for | 
| recordStart 
                    Numeric
                 | The record count to start on. Default:   0 | 
| recordCount 
                    Numeric
                 | How many records to return. Default:   2000 Maximum:  5000 | 
Summary Totals
POST FlowSummarySearchParameters for a FlowSummarySearch object which contains Flow Summary Totals.
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/summary
Response
FlowSummarySearch object
FlowSummarySearchParameters
| Attribute | Description | 
| startDate 
                    Date19
                 Required | The starting date and time for the report range. Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss) | 
| endDate 
                    Date19
                 | The ending date and time for the report range. Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss) | 
| dateSearched 
                    Alpha20
                 | The date which startDateandendDatewill apply.
                    Valid value(s): 
 Default:  RECEIVED | 
| columnGroupList 
                    List - Alpha
                 | The fields to show and group the Flows by. A field will show in the FlowSummaryobject.
                    Valid value(s):NOTE: The 
 flowDateis the FlowstatusDatewhendateSearchedisCURRENT_STATUS, otherwise it issignatureReceivedDate | 
| usernameList 
                    List - AlphaNumeric75
                 | List of Usernames. Searching for a Username of 0 (zero) will find Flowswithout a Username. | 
| groupIdList 
                    ListN/A
                 | A list of Group IDs. Searching for a Group ID of 0 (zero) will find Flowswithout a Group ID. | 
| locationIdList 
                    List - Numeric10
                 | List of Location IDs. Searching for a Location ID of 0 (zero) will find Flowswithout a Location ID. | 
| templateNameList 
                    List - AlphaNumeric50
                 | List of Template Names. Searching for a Template Name of 0 (zero) will find Flowswithout a Template Name. | 
| transactionOriginList 
                    List - Alphanumeric3
                 | List of Transaction Origins. This will typically be EXT.NOTE: There are other possible values. Please contact our Customer Success team to learn more. | 
| pageTypeList 
                    List - Alpha
                 | List of Page Types. 
                    Valid value(s): 
 Default: All  PageTypes | 
| currentStatusList 
                    List - Alpha
                 | A list of Flow Statues. 
                    Valid value(s): 
 Default: All  FlowStatuses | 
| searchRoundTripNVPList 
                    List
                 | List of SearchRoundTripNVPobjects. | 
FlowSummarySearch
| Attribute | Description | 
| totalFlowCount 
                Numeric
             Readonly | Total Count for all Flows matching the FlowSummarySearchParametersShown if columnGroupListdoes not containpageType. | 
| totalRecipientCount 
                Numeric
             Readonly | Total Recipient Count for all Flows matching the FlowSummarySearchParametersShown if columnGroupListdoes not containpageType. | 
| totalPageCount 
                Numeric
             Readonly | Total Count for all Flow Pages matching the FlowSummarySearchParametersOnly shown if columnGroupListcontainspageType. | 
| flowSummaryListSize 
                Numeric
             Readonly | Size of the flowSummaryList | 
| flowSummaryList 
                List - Object
             Readonly | List of FlowSummarygroup objects with fields shown based on the providedcolumnGroupList | 
FlowSummary
| Attribute | Description | 
| flowCount 
                Numeric
             Readonly | Total Count for Flows in the group | 
| recipientCount 
                Numeric
             Readonly | Total Count for Recipients in the group | 
| day 
                Alphanumeric
             Readonly | The flowDateformatted asYYYY-MM-ddfor Flows in the group. TheflowDateis the FlowstatusDatewhendateSearchedisCURRENT_STATUS, otherwise it issignatureReceivedDateOnly shown if columnGroupListcontainsday. | 
| month 
                Alphanumeric
             Readonly | The flowDateformatted asYYYY-MMfor Flows in the group. TheflowDateis the FlowstatusDatewhendateSearchedisCURRENT_STATUS, otherwise it issignatureReceivedDateOnly shown if columnGroupListcontainsmonth. | 
| year 
                Alphanumeric
             Readonly | The flowDateformatted asYYYYfor Flows in the group. TheflowDateis the FlowstatusDatewhendateSearchedisCURRENT_STATUS, otherwise it issignatureReceivedDateOnly shown if columnGroupListcontainsyear. | 
| pageType 
                Alphanumeric
             Readonly | The pageTypefor Flows in the group.
                Valid value(s):Only shown if 
 columnGroupListcontainspageType. | 
| username 
                Alphanumeric
             Readonly | The usernamefor Flows in the group.Only shown if columnGroupListcontainsusername. | 
| locationId 
                Numeric
             Readonly | The locationIdfor Flows in the group.Only shown if columnGroupListcontainslocationId. | 
| templateName 
                Alphanumeric
             Readonly | The templateNamefor Flows in the group.Only shown if columnGroupListcontainstemplateName. | 
| currentStatus 
                Alphanumeric
             Readonly | The statusfor Flows in the group.
                Valid value(s):Only shown if 
 columnGroupListcontainscurrentStatus. | 
| transactionOrigin 
                Alphanumeric
             Readonly | The transactionOriginfor Flows in the group.Only shown if columnGroupListcontainstransactionOrigin. | 
| roundTripNVPS.{rtName} 
                Alphanumeric
             Readonly | The roundTripNVPS.{rtName}for Flows in the group.Only shown if columnGroupListcontainsroundTripNVPS.{rtName}. | 
-FlowBulk Object
| Attribute | Description | 
| bulkId 
                    NumericString10
                 Readonly | The auto-generated ID for the bulk batch of Flow Requests. | 
| status 
                    Alpha20
                 Readonly | Status of the Bulk Process 
                    Valid value(s): 
 | 
| dateStart 
                    Date19
                 Readonly | Date the processing started. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| dateEnd 
                    Date19
                 Readonly | Date the processing ended. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| elapsedMs 
                    NumericN/A
                 Readonly | Number of milliseconds the processing took to finish. | 
| username 
                    Alphanumeric75
                 | The user that is requesting the bulk. This username will be used as the default username if one is not provide as part of the defaultSignature | 
| description 
                    Alphanumeric100
                 | Bulk description. | 
| flowCountRequest 
                    NumericN/A
                 Readonly | Number of flows requested to process. | 
| flowCountSuccess 
                    NumericN/A
                 Readonly | Number of flows successfully processed. | 
| flowCountError 
                    NumericN/A
                 Readonly | Number of flows which had errors attempting to create. | 
| postBackUrl 
                    URL500
                 | A URL to POSTwhen a bulk process isCOMPLETED.
                    Constraint(s): Must be a secure HTTPS URL
                 POSTed body will be json with at least these fields from the FlowBulkobject:bulkId,status,dateStart,dateEnddescription,flowCountRequest,flowCountSuccessTo retrieve the flows use the flowBulkIdListparameter on the Search Parameters. | 
| postBackAuthHeader 
                    AlphaNumeric512
                 | An Authorization Header that will be provided when we POSTto the providedpostBackUrl. | 
| defaultSignature 
                    Signature
                 | The default Signatureobject.This signature definition will be used as the default signature definition for each entry in signatureListThe following elements CAN'T be included as part of the defaultSignature 
 flowBulkIdListparameter on the Search Parameters. | 
| signatureList 
                    List5000
                 
                    Required
                 | A list of Signatureobjects to process.This list is not returned because the flows will be processed async by the service. To retrieve the flows use the flowBulkIdListparameter on the Search Parameters.Any element not provided in the detail signature will be loaded from the defaultSignature The following elements are required to be included as part of each individual signature 
 
 eventRecipientListorroundTripNVPSwill be combined with any values from thedefaultSignature. | 
| signatureListSuccess 
                    List
                 
                    Readonly
                 | A list of Signatureobjects which were successfully created.NOTE: Only returned when using the FlowBulkSearchendpoint and sendtruefor theincludeSuccessfulparameter | 
| signatureListError 
                    List
                 
                    Readonly
                 | A list of Signatureobjects which had errors attempting to be created.NOTE: Only returned when using the FlowBulkSearchendpoint | 
| requestErrorList 
                    ListN/A
                 
                    Readonly
                 | NOTE: Only returned if statusisERROR | 
-FlowRecipients
| Attribute | Description | 
| type Alpha Required | Specify when the recipients will be notified of their portion of the request 
                    Valid value(s): 
 | 
| documentEmailList List20 | A list of email addresses to send the final document(s) when the Parent Flow is COMPLETED. | 
| recipientCount Numeric Readonly | The number of recipients provided in the recipientList | 
| recipientList List20 Required | A list of Signatureobjects where each is a Recipient of the Parent.Any element not provided on the recipient Signature will be loaded from the Parent Signature The following elements are required to be included as part of each Recipient Signature: 
 If a documentis provided, thedocumentIdmust be the same for each Recipient that has adocumentIf an overlay is requested for the document, each Recipient should have a differentoverlayIdfor the same document.The following are not allowed to be included with the Recipient: 
 The following are not allowed to be included with the Parent: 
 roundTripNVPSwill be combined with any values from the Parent Signature. | 
-Payment
| Attribute | Description | 
| paymentTransactionId 
                    Numeric20
                 | The confirmation id of the payment. | 
| accountNumber 
                    Alphanumeric45
                 | Account number associated with payment in this transaction. DEPRECATED: Use the accountNumberon the mainSignatureobject instead | 
| dateCreated 
                    Date25
                 | The date and time the payment was entered for processing. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| dateProcessed 
                    Date25
                 | The date and time the payment was processed. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| paymentAmount 
                    NumericString11
                 | The payment amount for this transaction. This attribute also serves as the maximum payment amount. The payer will not be allowed to pay more than the submitted amount, even if editablePaymentAmountis set totrue.Format: XXXXXXXX.XX | 
| editablePaymentAmount 
                    Boolean5
                 | Whether or not the paymentAmountis editable by the payer.Valid value(s):  true,falseDefault:   false | 
| minimumAmount 
                    NumericString11
                 | If the payer is able to edit the paymentAmount, this is the minimum they can pay.Format: XXXXXXXX.XX | 
| feeAmount 
                    NumericString11
                 | The fee amount for this transaction. Format: XXXXXXXX.XX 
                    Constraint(s): Cannot be present if  feePercentageis present | 
| feePercentage 
                    Numeric9
                 | The percentage of the payment amount that will be charged as a fee. Presented as a percentage, not a decimal Format: XXX.XXXXXX 
                    Constraint(s):  -Cannot be present if feeAmountis present-Cannot be greater than 4 | 
| totalAmount 
                    NumericString11
                 | The total amount for this transaction. Format: XXXXXXXX.XX | 
| address 
                    Alphanumeric80
                 | The address associated with the payment. | 
| city 
                    Alphanumeric45
                 | The city associated with the payment. | 
| state 
                    Alphanumeric2
                 | The state abbreviation associated with the payment. | 
| zip 
                    NumericString9
                 | The zip code associated with the payment. | 
| paymentType 
                    Alpha3
                 | Type of payment to include in the request. 
                    Constraint(s): If present, the  paymentobject will be used to make a payment. Also if present, aPAYMENT_PORTALcomponent cannot be used. 
                    If not present, the payment details will only be used on the standalone signature image.Valid value(s):  ACH,CC,ALL | 
| achTransaction 
                    ObjectN/A
                 | Data to preload for ACH payment request. 
                    Constraint(s): See object definition below.
                 | 
| ccTransaction 
                    ObjectN/A
                 | Data to preload for credit card payment request. 
                    Constraint(s): See object definition below.
                 | 
| accountDirectiveDeprecated | This element is deprecated. Use the accountDirectivewithinAchTransactionandCreditCardTransaction. | 
-AchTransaction
| Attribute | Description | 
| achStatusData 
                    ListN/A
                 | List of achStatusDataobjects for this ach transaction.
                    Constraint(s): See object definition below.
                 | 
| accountDirective 
                    Alphanumeric10
                 | The account directive if an ach payment is processed. Format: XXX-X | 
| bankAccountNumber 
                    Alphanumeric20
                 | The payer's bank Token or a raw bank account number for ACH transaction. To create a token, see Secure Overlay API and/or TokenizationService. NOTE: Providing a raw bank account number is deprecated
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 | 
| bankRoutingNumber 
                    NumericString9
                 | The payer's bank routing number for ACH transaction. This value is retrieved from a token bankAccountNumberif not provided.
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 | 
| bankAccountNumberLastFour 
                    NumericString20
                 | The last four numbers of the payer's bank account number. | 
| checkNumber 
                    NumericString9
                 | The payer's check number for transaction. 
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 | 
| bankAccountType 
                    Alpha8
                 | The type of bank account. This value is retrieved from a token bankAccountNumberif not provided.
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 Valid value(s):  CHECKING,SAVINGS | 
-AchStatusData
| Attribute | Description | 
| status 
                    Alpha12
                 | The status of the ACH transaction 
                    Valid value(s): WAITING- transaction will be included in next batchSUBMITTED- transaction has been submitted for processingACKNOWLEDGED- transaction has been accepted for processingFUNDED- money has been deposited into your accountDEDUCTION- money has been taken from your accountVOID- transaction was cancelled prior to submission for processingRETURNED- an exception occurred while processing transactionCORRECTION- transaction was automatically corrected during processingERROR- an unknown error occurred while processing transaction | 
| returnCode 
                    Alpha8
                 | The return code for the ACH transaction, if applicable. | 
| returnMessage 
                    AlphanumericN/A
                 | Explanation of the returnCode. | 
| statusChangeDate 
                    Date25
                 | Date and time this ACH status was recorded. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
-CreditCardTransaction
| Attribute | Description | 
| accountDirective 
                    Alphanumeric10
                 | The account directive if a card payment is processed. Format: XXX-X | 
| creditCardExpirationMonth 
                    Numeric2
                 | Expiration month of the payer's credit card. This value will be retrieved from the creditCardTokenif not provided.
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 | 
| creditCardExpirationYear 
                    Numeric4
                 | Expiration year of the payer's credit card. This value will be retrieved from the creditCardTokenif not provided.
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
                 | 
| creditCardToken 
                    Alphanumeric16
                 | Credit card token as generated by PDC4U. An actual credit card number will fail validation. 
                    Constraint(s): Will be preloaded on form for client, though they will be able to edit it or enter a different card number.
                 See the Store a credit card in the vault example in the Credit Card API for help generating the token. | 
| creditCardType 
                    Alpha50
                 | The type of the payer's credit card. | 
| authorizationCode 
                    Alphanumeric75
                 | The authorization code for the processed transaction | 
-Signature Remind
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/{signatureId}/remind
PUT to send a reminder of the request to the emailAddress and/or mobileNumber stored with the Signature. Only 1 reminder is allowed per Signature request. Sending a manual reminder via this endpoint will replace the scheduled reminder.
-Document
endpoint: https://flow.pdcflow.com/api/v2_0/documents
POST to document endpoint to upload a document. 
GET to retrieve a previously uploaded document.
--Append the GET URL query string with signatureId={{signatureId}} to include any overlays for a specific Signature.
--Append the GET URL query string with emailAddressList={{emailAddress}} to send the document to one or more email address (comma seperated). When the document is emailed, the response will not include the documentBase64String or overlayBoxList.
| Attribute | Description | 
| type 
                    Alphanumeric
                 Readonly | The type of document in the documentBase64String. EitherPDForDOCX. | 
| documentName 
                    Alphanumeric36
                 | The name given for the document. | 
| documentBase64String 
                    Base64N/A
                 | The document as a Base64 encoded string. Max file size is 8 MB Max pages is 150 for a PDFand 50 for aDOCX | 
| documentId 
                    Numeric20
                 | Id for document that was uploaded. Can be sent in future requests to reuse document without uploading it again. | 
| documentUrl 
                    Alphanumeric160
                 | The URL to retrieve the information, through a GETrequest, for this document. | 
| originalUploadDate 
                    Date25
                 | The date and time the document was originally uploaded. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| readOnly 
                    Boolean
                 | 
                      Boolean flag to replace  Deny,AcceptButtons withContinueButton | 
| prePopulateVariables 
                    List
                 | 
                    Object containing key/value pairs to pre-populate data on overlay TEXT boxes which specify a  prePopulateVariablematching a key on this object | 
| overlayId 
                    Numeric20
                 | The id of an uploaded overlay to apply to this document in the request Constraint(s): This can only be included if overlayBoxListis not provided. | 
| overlayBoxList 
                    List
                 | A list of overlayBoxobjects to apply to this document request.Constraint(s): This can only be included if overlayIdis not provided.see object definition below | 
| templateVariables 
                    Object
                 | See TemplateVariables object definition. When POSTing a newDOCXDynamic Document as thedocumentBase64String, any variables will be placed in this object.A variable starts with {{and ends with}}, for example{{VariableName}}. We recommend any time you edit a variable on the document to replace the full variable including the{{}}.Any variables outside a table will be part of the fieldMap.The Dynamic Document can contain a table with one template row. To specify the template row, the first cell must start with <tr>. Variables on this row will be part of thetableList.rowMapList, any other variables will be part of thefieldMap.When POSTing a new Signature with a Component Type DOCUMENT use this to provide the variables to replace on the template. Any variable outside a table, or in a table but outside the template row, will need to be infieldMap. The table template row will be duplicated for all the provided rows intableList.rowMapList. | 
-Overlay
endpoint: [https://flow.pdcflow.com/api/v2_0/overlays/{overlayId}(https://flow.pdcflow.com/api/v2_0/overlays/{overlayId})
Send a POST request with the following parameters to the overlays endpoint to create a new Overlay
Send a GET request with an overlayId to the overlays endpoint to retrieve a Overlay
Send a GET request without an overlayId to the overlays endpoint to retrieve a list of Overlay objects
Send a PUT request with an overlayId to the overlays endpoint with a command parameter to modify or delete an existing Overlay. Valid command values are EDIT and DELETE
| Attribute | Description | 
| originalDocumentId 
                    NumericN/A
                 | The id of the reference document | 
| overlayName 
                    Alphanumeric36
                 | A user defined name to assign to the Overlay | 
| overlayBoxDefinitionList 
                    ListN/A
                 | A list of overlayBoxobjects.Constraint(s): see object definition below | 
| overlayId 
                    NumericN/A
                 
                    Readonly
                 | The id of the Overlay | 
| createdDate 
                    Date25
                 
                    Readonly
                 | The date the overlay was originally created. Returned on Overlaycreation and retrievalFormat: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| lastModifiedDate 
                    Date25
                 
                    Readonly
                 | The date the overlay was last updated. Returned on OverlayretrievalFormat: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
-OverlayBox
| Attribute | Description | 
| boxTypeId 
                    NumericN/A
                 | The id indicating the box type. Valid values: - 1: Signifies a smaller signature box*- 2: Signifies an uneditable date box that contains the current date- 3: Signifies a check box- 4: Signifies a larger signature box*- 5: Signifies a text box*- 6: Signifies an initial box*- 7: Signifies a clickable URL that will go to the link when clicked- 8: Signifies an area that will go to a link when clicked- 9: Signifies a dropdown box*If present, an end user must populate these boxes to complete the signature successfully | 
| startXPercent 
                    NumericN/A
                 | Starting draw position as a percentage from the left side of the document | 
| startYPercent 
                    NumericN/A
                 | Starting draw position as a percentage from the top of the document | 
| documentPage 
                    NumericN/A
                 | The page on the uploaded document to which to assign the OverlayBox | 
| data 
                    AlphanumericN/A
                 | For signature, initial, dropdown, date, and non-readOnly text boxes this is a readonly field that will be the data that was entered into the overlay box. - For SIGNATURE,INITIALthis will be the base64 values of the signature/initial image.- For TEXT,DATE,DROPDOWNthis will be the value entered into the field.For readOnly text boxes, this is an optional field that can be used to set the data for the box, otherwise a prePopulateVariable must be used instead. For link and link area boxes this will be a required field. - For LINKthe data should be in md format [linkText](url), link text is shown on the document and the url is the link that will be used when the link text has been clicked.- For LINK_AREAthe data should be a valid url that will be used when the area is clicked. | 
| checked 
                    BooleanN/A
                 | Only present for CHECKboxes. | 
| boxProperties 
                    ObjectN/A
                 | Properties for the OverlayBox. Only applicable text, signature, link, and link area boxes. All other box types have fixed properties.Constraint(s): see object definition below | 
| boxTypeLabel 
                    AlphanumericN/A
                 
                    Readonly
                 | Text label for an OverlayBox. Returned onOverlayretrieval. Possible values:- Signature- Date- Checkbox- Big Signature- UserText | 
| boxType 
                    AlphanumericN/A
                 
                    Readonly
                 | Predefined name for box type. Returned on Overlayretrieval. Possible values:- SIGNATURE- DATE- CHECK- TEXT- INITIAL- LINK- LINK_AREA- DROPDOWN | 
-BoxProperties
| Attribute | Description | 
| description 
                    AlphaNumeric250
                 | A description message to show when the Signature, Initial, or Text overlay is clicked. For a Dropdown, this will show before an item is selected and as the first unselectable option in the dropdown list. If a description is not provided the default will be "-- Select One --" Only applies to signature, initial, text, and dropdown boxes | 
| boxName 
                    AlphaNumeric25
                 | A name of the box. Only available if provided with the Overlay Definition | 
| boxHeight 
                    Numeric
                 | Height of the overlay box in pixels. Default Values: - SIGNATURE: 75px, 225px (big signature)- DATE: 40px- CHECK: 24px- TEXT: 50px- INITIAL: 45px- LINK_AREA: 55px- DROPDOWN: 75pxMinimum Values: - SIGNATURE: 24px- DATE: 40px- CHECK: 24px- TEXT: 24px- INITIAL: 24px- LINK_AREA: 24px- DROPDOWN: 25pxApplies to all boxes, except link boxes. Signature and initial must have an aspect ratio of 8:3. | 
| boxWidth 
                    Numeric
                 | Width of the overlay box in pixels. Default Values: - SIGNATURE: 200px, 600px (big signature)- DATE: 150px- CHECK: 24px- TEXT: 200px- INITIAL: 120px- LINK_AREA: 413px- DROPDOWN: 300pxMinimum Values: - SIGNATURE: 64px- DATE: 150px- CHECK: 24px- TEXT: 36px- INITIAL: 64px- LINK_AREA: 24px- DROPDOWN: 100pxApplies to all boxes, except link boxes. Signature and initial boxes must have an aspect ratio of 8:3. | 
| fontSize 
                    Numeric
                 | Font size of the text in the overlay box Default: 9px, only applies to text, link, and dropdown boxes | 
| characterLimit 
                    Numeric
                 | Character limit for the text box. If left blank, this value will be calculated using boxHeight,boxWidth, andfontSizeOnly applies to text boxes | 
| prePopulateVariable 
                    AlphaNumeric250
                 | A variable which can be used when requesting a flow with a document where prePopulateVariableskey/value object can be provided to map this variable to pre-populate data on overlayTEXT,LINK, andLINK_AREAbox.Only applies to text, link, and link area boxes | 
| misc 
                    AlphaNumeric25
                 | A miscellaneous field that does not affect the service usage of an overlay. For example, this can be used for grouping or tracking of boxes. | 
| optionList 
                    List - AlphaNumeric25
                 | Used to provide a list of options for a DROPDOWNbox.Only applies to dropdown boxes | 
| required 
                    Boolean
                 | Determines whether a box needs to be filled in or not before accepting a document with an overlay Default Values: - SIGNATURE: true- CHECK: false- TEXT: true- INITIAL: true- DROPDOWN: trueApplies to all boxes, except date, link, and link area boxes | 
| readOnly 
                    Boolean
                 | Determines whether a box can be interacted with or not and a readOnly box will have no surrounding border, it can't be clicked, and the data cannot be changed. It will also require a data field or prePopulateVariable field that will be used to fill in the readOnly box. Only applies to text boxes and the default value is false | 
-TemplateVariables
{
  "templateVariables": {
    "fieldMap": {
      "field1": {
        "value": "Value for field1"
      },
      "field2": {
        "value": "Value for field2"
      }
    },
    "tableList": [
      {
        "rowMapList": [
          {
            "column1": {
              "value": "Value for Row 1 column1"
            },
            "column2": {
              "value": "Value for Row 1 column2"
            }
          },
          {
            "column1": {
              "value": "Value for Row 2 column1",
              "backgroundColor": "#e6e6e6"
            },
            "column2": {
              "value": "Value for Row 2 column2",
              "backgroundColor": "#e6e6e6"
            }
          }
        ]
      }
    ]
  }
}
| Attribute | Description | ||
| fieldMap Object | Object with key value pairs. The key is the template variable field name string that matches a field on the Dynamic Document. The value is an object that contains the valueas a string. | ||
| tableList 
                    List5
                 | List of tables variables for each row 
 | 
-Attachment
| Attribute | Description | 
| filename 
                    Alphanumeric36
                 | The name given for the attachment. | 
| base64String 
                    Base64N/A
                 | The attachment as a Base64 encoded string. | 
-ImageUploadList
endpoint: https://flow.pdcflow.com/api/v2_0/imageUploads/allUploads/[signatureId]
GET to retrieve a list of images from a previous signature request.
| Attribute | Description | 
| imageUploadList 
                    ListN/A
                 | A list of ImageUploadobjects uploaded by your client.
                Constraint(s): see object definition below. | 
-ImageUpload
endpoint: https://flow.pdcflow.com/api/v2_0/imageUploads
GET to retrieve an image from a previous signature request.
| Attribute | Description | 
| imageUploadRequested 
                    Boolean5
                 | Whether to request an image upload from the client. Valid value(s):  true,falseDefault:   false | 
| imageUploadId 
                    Numeric20
                 | Id for the image that was uploaded by the client. | 
| signatureId 
                    Numeric20
                 | The id of the transaction request this image is tied to. | 
| imageUploadSuccessful 
                    Boolean5
                 | Whether the upload was successful or not. Valid value(s):  true,false | 
| imageUploadDescription 
                    Alphanumeric160
                 | A description of the image for the client to upload. Default:   Upload Image | 
| ImageUploadBase64 
                    Base64N/A
                 | Base64 encoded value of the .png format uploaded image. | 
| signatureUrl 
                    Alphanumeric160
                 | The URL to retrieve the information, through a GETrequest, for this transaction. | 
| imageUploadUrl 
                    Alphanumeric160
                 | The URL to retrieve the information, through a GETrequest, for this image upload. | 
-CompanyOverride
| Attribute | Description | 
| companyName 
                    Alphanumeric45
                 | The company name to display on the signature, if different than the company sending the request. If this value is included in the request, the configured company logo will not show for this request. | 
| emailFromName 
                    Alphanumeric50
                 | The name to display on from field of the signature email request. Default:   The sending Company's Name (or provided overrideCompanyName) will be used | 
| subject 
                    Alphanumeric200
                 | The subject to display on the signature email request. Default:   The sending Company's Name (or provided overrideCompanyName) will be used | 
| linkText 
                    Alphanumeric25
                 | The text to display on the clickable URL in the signature email request. Default:   Complete Transaction | 
-Reminder
| Attribute | Description | 
| minutesBeforeTimeout Numeric Required | The number of minutes (at least 15) before the Signature timeoutMinutesto send a reminder to theiremailAddressand/ormobileNumber.The Signature must have a statusof eitherPENDINGorOPENto send a reminder on thereminderDate. | 
| reminderDate Date Readonly | The date the reminder is scheduled to send. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| smsNotificationId Numeric Readonly | The Notification Service ID for an SMS reminder. This will only be present after the reminder is sent for a Signature that has a mobileNumber. | 
| emailNotificationId Numeric Readonly | The Notification Service ID for an Email reminder. This will only be present after the reminder is sent for a Signature that has an emailAddress. | 
-Component
| Attribute | Description | 
| componentType 
                    AlphaN/A
                 | The type of this component. 
                    Valid values:
                     
 
 | 
| relatedId Alphanumeric24 Conditional | The id of the object represented by this component. 
                Conditional notes:
                 
 | 
| data ObjectN/A Conditional | Object for a given componentType
                    Object definition links:
                     
 | 
--PAYMENT_PORTAL Component Data
| Attribute | Description | 
| portalUrl AlphaNumeric200 Required | The full URL of the portal. | 
| requestSignature 
                    Boolean
                 | Option to specify if the Portal Payment page should request a signature. | 
| signatureDescription 
                    Alphanumeric160
                 | Custom text to display with the signature. Only used if requestSignatureistrue. | 
| customReceiptText 
                    Alphanumeric5000
                 | Custom text to show on the Receipt. If not provided, the service will use the company default. | 
| customReceiptLabels 
                    ObjectN/A
                 | A Name/Value list of CustomReceiptLabelsto show on the Receipt. If a label is sent, it must be accompanied by a value. | 
| portalPrePopulateVariables ObjectN/A | See Portal > Prepopulate FeatureaccountNumberis DEPRECATED, use theaccountNumberon the mainSignatureobject instead | 
| portalResponse ObjectN/A READONLY | The response from the payment portal. See object definition below. | 
portalResponse
| Attribute | Description | 
| transactionStatus AlphaN/A | The result of the portal payment. Valid values: APPROVED,FAILED,DENIED | 
| arrivalId Numeric10 | The arrivalId of the payment. | 
| transactionId Numeric10 | The transactionId of the payment. | 
| paymentMethod AlphaN/A | The payment method entered in the portal. Valid values: CARD,CHECK | 
| uuid AlphaNumeric36 | A unique id used internally by the service. | 
--BILLING_DATA Component Data
| Attribute | Description | 
| paymentTypeAccountDirectiveList List - AlphanumericN/A Required | List of directives for Payment Types to select from. Valid Payment Types(s):  CARD,CHECK,PAYPALFormat: XXXX-X | 
| authorizationTextOverride Alphanumeric500 | Text to display at the bottom of the input form for the authorization check box. | 
| firstName Alphanumeric45 | First Name of the account holder. If provided initially, this will be pre-populated on the form. | 
| lastName Alphanumeric45 | Last Name of the account holder. If provided initially, this will be pre-populated on the form. | 
| address Alphanumeric80 | Address of the account holder. If provided initially, this will be pre-populated on the form. | 
| city Alphanumeric45 | City of the account holder. If provided initially, this will be pre-populated on the form. | 
| state Alpha2 | State of the account holder. If provided initially, this will be pre-populated on the form. | 
| zip Numeric5 | Zip of the account holder. If provided initially, this will be pre-populated on the form. | 
| paymentType Alpha5 READONLY | The payment type selected by the end user. Valid value(s):  CARD,CHECK,PAYPAL | 
| ccDetails Object conditional READONLY | Only returned if paymentTypeisCARDSee object definition below. | 
| achDetails Object conditional READONLY | Only returned if paymentTypeisCHECKSee object definition below. | 
| payPalDetails Object conditional READONLY | Only returned if paymentTypeisPAYPALSee object definition below. | 
| paymentTypeRequest ListN/A | List of payment types to select from. Valid value(s):  CARD,CHECKDEPRECATED: Use paymentTypeAccountDirectiveListinstead | 
ccDetails
| Attribute | Description | 
| token AlphaNumeric16 | The Tokenized credit card number. | 
| cardType Alpha50 | The type of card for the token. | 
| cardExpirationMonth Numeric2 | The card expiration month. | 
| cardExpirationYear Numeric2 | The card expiration year. | 
achDetails
| Attribute | Description | 
| bankRoutingNumber Numeric9 | The bank routing number. | 
| bankAccountNumber Numeric20 | The bank account token. | 
| bankAccountType Alpha8 | The bank account type. Valid value(s):  CHECKING,SAVINGS | 
payPalDetails
| Attribute | Description | 
| vaultId Alphanumeric20 | A reference to the PayPal payment information. This can be used to process a PayPalTransactionusing TransactionService | 
| emailAddress 
                    Alphanumeric100
                 | The email address associated with the PayPal account. | 
--SCHEDULE Component Data
| Attribute | Description | 
| requestPaymentData Boolean READONLY | Boolean stating if the Schedule is requesting Payment Data | 
| requestAuthorization Boolean READONLY | Boolean stating if the Schedule is requesting Authorization | 
| paymentTypes ListN/A READONLY | Allowed Payment Types for this Schedule Valid value(s):  CARD,CHECK,PAYPAL | 
--DOCUMENT Component Data
| Attribute | Description | 
| documentList List5 Required | List of Document objects. | 
--ATTACHMENT Component Data
| Attribute | Description | 
| attachmentList List Required | List of Attachment objects. Constraint(s): Total combined filesize for all attachments is 8 MB | 
--FILE_UPLOAD Component Data
| Attribute | Description | 
| fileUploadList List5 Required | List of FileUpload objects. | 
FileUpload
| Attribute | Description | 
| fileId AlphaNumeric Readonly | An auto generated ID for the file. | 
| description AlphaNumeric160 Required | A description of the file being requested for the client to upload. | 
| fileType AlphaN/A | The type of file being requested. This will limit the type of files a client can upload. 
                    Valid values:
                     
 Default:  FILE | 
| isRequired Boolean5 | Whether the file is required by the client or not. Default:  true | 
| fileName AlphaNumeric Readonly | The name of the file uploaded by the client. | 
| fileBase64 AlphaNumeric Readonly | The file uploaded by the client as a Base64 encoded value. | 
--FORM Component Data
| Attribute | Description | 
| formList List10 Required | List of Form objects. | 
Form
| Attribute | Description | 
| title AlphaNumeric100 Required | A name for the form which will show above the inputs | 
| inputList List25 Required | List of FormInput objects. | 
FormInput
{
  "formList": [
    {
      "title": "My Form",
      "inputList": [
        {
          "type": "TEXT",
          "attribute": "REQUIRED",
          "name": "firstName",
          "label": "First Name",
          "data": {
            "minLength": 2,
            "maxLength": 20,
            "text": "John"
          }
        },
        {
          "type": "TEXT",
          "attribute": "REQUIRED",
          "name": "lastName",
          "label": "Last Name",
          "data": {
            "minLength": 2,
            "maxLength": 20,
            "text": "Doe"
          }
        },
        {
          "type": "EMAIL",
          "attribute": "REQUIRED",
          "name": "emailAddress",
          "label": "Email Address",
          "data": {
            "email": "JohnDoe@example.com"
          }
        },
        {
          "type": "PHONE",
          "attribute": "REQUIRED",
          "name": "phoneNumber",
          "label": "Phone Number",
          "data": {
            "phone": "8015551234"
          }
        },
        {
          "type": "PARAGRAPH",
          "attribute": "REQUIRED",
          "name": "someParagraph",
          "label": "Provide a paragraph",
          "data": {
            "minLength": 2,
            "maxLength": 200,
            "text": "Here is the paragraph text"
          }
        },
        {
          "type": "NUMBER",
          "attribute": "REQUIRED",
          "name": "someNumber",
          "label": "Provide a whole number",
          "data": {
            "minValue": -2,
            "maxValue": 999,
            "number": "123"
          }
        },
        {
          "type": "NUMBER",
          "attribute": "REQUIRED",
          "name": "someDecimal",
          "label": "Provide a decimal number",
          "data": {
            "minValue": -2,
            "maxValue": 999,
            "decimalPlaces": 2,
            "number": "123.99"
          }
        },
        {
          "type": "DATE",
          "attribute": "REQUIRED",
          "name": "someDate",
          "label": "Pick a date",
          "data": {
            "date": "YYYY-MM-DD"
          }
        },
        {
          "type": "DROPDOWN",
          "attribute": "REQUIRED",
          "name": "someDropdown",
          "label": "Select one from the list",
          "data": {
            "optionList": [
              "Option 1",
              "Option 2",
              "Option 3"
            ],
            "selected": "Option 1"
          }
        },
        {
          "type": "RADIO",
          "attribute": "REQUIRED",
          "name": "someRadio",
          "label": "Select One",
          "data": {
            "optionList": [
              "Option 1",
              "Option 2",
              "Option 3"
            ],
            "selected": "Option 1"
          }
        },
        {
          "type": "CHECKBOXES",
          "attribute": "REQUIRED",
          "name": "someCheckboxes",
          "label": "Select One or More",
          "data": {
            "optionList": [
              "Option 1",
              "Option 2",
              "Option 3"
            ],
            "selectedList": [
              "Option 1",
              "Option 3"
            ]
          }
        }
      ]
    }
  ]
}
| Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type Alpha Required | The type of input being requested. 
                    Valid values:
                     
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| attribute Alpha Required | 
                    Valid values:
                     
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name AlphaNumeric100 Required | A unique internal name used to track the input. This value must not contain any whitespace. NOTE: It's possible for the values provided on an input to be used to pre-populate DOCUMENToverlayfields as long as thisnamematches theoverlayprePopulateVariable** In order to pre-populate DOCUMENToverlayfields, you must use the COMPONENT typeDOCUMENT, not the basedocumentelement.** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| label AlphaNumeric100 Required | A visible name or title for the input. This is placed directly above the input. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data Object Conditional | Object fields for a given type
 
 
 
 
 
 
 
 
 | 
-EmailAttempt
| Attribute | Description | 
| notificationId 
                    Numeric
                 Readonly | The Notification Service ID for the Email | 
| attemptDate 
                    Date25
                 Readonly | The date and time the Email was attempted to send. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| attemptResult 
                    Alphanumeric10
                 Readonly | The result status of the sending Attempt. Valid value(s):
                     SENT= email was successfully sent to the email providerFAILED= email was sent to the email provider, but rejected and will not be retriedRETRY= email was not able to send to the email provider, but will be retried | 
| emailDeliveryResultList 
                    ListN/A
                 Readonly | List of related EmailDeliveryResultobjects. See object definition below | 
-EmailDeliveryResult
| Attribute | Description | 
| result 
                    Alphanumeric30
                 Readonly | Delivery Result for a SENTEmail attemptValid value(s):
                     SEND= email provider acknowledged they received the emailDELIVERY= email provider successfully delivered the emailBOUNCED= email provider was not able to deliver the emailOPEN= email was opened by recipientCLICK= an email link was clicked by recipientCOMPLAINT= email was reported as spam/abuse by recipient | 
| resultDate 
                    Date25
                 Readonly | The date and time of the Email delivery result Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
-SmsAttempt
| Attribute | Description | 
| notificationId 
                    Numeric
                 Readonly | The Notification Service ID for the SMS | 
| attemptDate Date25 Readonly | The date and time the SMS was attempted to send Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| status AlphaN/A Readonly | The result status of the sending attempt Valid value(s):
                     ACCEPTED= the SMS has been accepted by the processing vendorSENT= the phone carrier has accepted the SMSDELIVERED= the SMS was successfully deliveredUNDELIVERED= the SMS was not deliveredFAILED= the SMS could not be sent | 
| statusDate Date25 Readonly | The date and time the statuswas updatedFormat: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
-RoundTripNVP
| Attribute | Description | 
| rtName 
                    Alphanumeric75
                 Required | The name of a round trip name value pair. | 
| rtValue 
                    Alphanumeric75
                 Required | The value of a round trip name value pair. | 
-EventRecipient
| Attribute | Description | 
| emailAddress 
                    Alphanumeric75
                 Required | An Email address to receive an event notification. | 
| eventList List - Alpha | Optionally provide a list of events to receive an event notification for. If the list is not provided an event will be sent for all events. Valid Values: 
 | 
-SearchRoundTripNVP
| Attribute | Description | 
| rtName 
                    Alphanumeric75
                 Required | The name of a round trip name value pair to filter a search by. Constraint(s): Each name must be unique | 
| rtValueList 
                    ListN/A
                 Required | A list of values of a round trip name value pair to filter a search by If the list contains a value of -1, the results will also be filtered to include signatures that do not contain aRoundTripNVPwith the specified nameIf the list contains a value of 0, the results will also be filtered to include signatures that contain aRoundTripNVPwhose value is null for the specified name. This functionality is designed for legacy signatures as PDCflow now requires allRoundTripNVPobjects to contain both a name and value.Constraint(s): Each value must not exceed 75 characters | 
TransactionReport
endpoint: https://flow.pdcflow.com/api/v2_0/transactionReports
GET to retrieve a transaction report for a signature transaction. If this flow is an authorization request for a schedule, the schedule will be included in this report, along with the signature if the authorization request was completed.
| Attribute | Description | 
| signatureId 
                    Numeric20
                 Required | The id of the transaction request to retrieve a report for. | 
| emailAddressList 
                    List - Alphanumeric65
                 | A List of email addresses to send the transaction report to. | 
| reportData 
                    Base64N/A
                 | The full transaction report pdf as a Base64 encoded value. | 
| closedOrExpired 
                    Boolean5
                 | Whether the request has been closed or expired or not. Valid value(s):  true,false | 
| emailAddressDeprecated | This element is deprecated. Use the emailAddressList. | 
Account Directive Migration
endpoint: https://flow.pdcflow.com/api/v2_0/migrations/accountdirectives
PATCH to the endpoint with an AccountDirectiveMigration body to migrate all PENDING and OPEN signatures from one accountDirective to another. Only signatures with a Payment and/or SCHEDULE component will be affected. Returns a MigrationResponse. This is an asynchronous process and realtime processing results will not be returned.
| Attribute | Description | 
| oldAccountDirective 
                Alphanumeric String
                10
             Required | The accountDirectivecurrently assigned to the targeted signatures. | 
| newAccountDirective 
                Alphanumeric String
                10
             Required | The desired accountDirectiveto assign to the targeted signatures.
                Constraint(s): Must be valid for the same payment method as the  oldAccountDirective.If the payment method is CARD, this field must allow at least the same card types as theoldAccountDirective.If the payment method is CHECK, this field must be valid for the same SEC code as theoldAccountDirective | 
MigrationResponse
| Attribute | Description | 
| response 
                String
                
             | A description of the processing status. | 
| requestErrorList 
                List
             | A list of RequestErrorobjects. Only returned on unsuccessful migrations. | 
PostBack Flow Events
Basic information about a Flow can be sent back to your system for some Flow events. The information returned can be used to securely GET further details from Flow Service. The PostBackBody will always come as JSON using an HTTPs POST.
If something goes wrong attempting to postback to your system, we will automatically retry on this schedule:
- Attempt #1 - Immediate
- Attempt #2 - 5 minutes after 1st attempt
- Attempt #3 - 15 minutes after 1st attempt
- Attempt #4 - 1 hour after 1st attempt
- Attempt #5 - 24 hours after 1st attempt (final attempt)
To be considered successful, we expect your server to return HTTP STATUS 200. Once that is received or after Attempt #5 we will no longer try to post the data.
To enable sending, please log into your app.pdcflow.com account and navigate to CONFIGURE > NOTIFICATIONS. This is where you can configure PostBacks for each Flow event:
| Event | Description | 
|---|---|
| FLOW_OPENED | A Flow has been opened. | 
| FLOW_COMPLETED | A Flow has been completed. | 
| FLOW_DISPUTED | A Flow has been disputed. | 
| FLOW_EXPIRED | A Flow has expired. | 
| FLOW_FAILED | A Flow has failed. | 
-PostBackBody
| Attribute | Description | 
|---|---|
| signatureId 
          Numeric20
         | The PDC Signature/Flow ID, always present. Use this to pull further details on a payment from Flow Service. | 
| companyId 
          Numeric8
         | The PDC Company ID for the Flow. | 
| completionDate 
                Date25
             | The date and time the request was completed. Format: ISO-8601 (YYYY-MM-DD HH:mm:ss) | 
| errorCode 
                Alpha3
             | Code if an error occurred with the signature. See errorMessagefor possible values. | 
| errorMessage 
                Alphanumeric160
             | An explanation message for the error that occurred. 
                Constraint(s): Will only show if an  errorCodeis present.
                Valid values for an  errorCode:
 | 
RequestErrorList
| Attribute | Description | 
| requestErrorList 
                    ListN/A
                 | A list of RequestErrorobjects containing validation errors.
            Constraint(s): Only returned when validation errors occur. See object definition below.
         | 
RequestError
| Attribute | Description | 
| code 
                    Alpha3
                 | The code for the validation error. | 
| description 
                    AlphanumericN/A
                 | The description of the validation error. | 
Sample Use Case
While the signature service offers many different types of functionality, knowing how to tie them all together can be a bit tricky. Below are some potential work-flows that you may encounter, and the API components that should be used. The components can be used separately, or as a group.
-Get signatures on a mortgage document and image of some form of identification
<?php
$data = [
  'document' => [
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  ],
  'imageUpload' => [
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  ],
  'standaloneSignatureRequested' => 'true'
];
my $data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'imageUpload' => {
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  },
  'standaloneSignatureRequested' => 'true'
};
data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'imageUpload' => {
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  },
  'standaloneSignatureRequested' => 'true'
};
Components required: Signature, Document, ImageUpload
- Step 1: Upload the mortgage document. The documentIdreturned will be used in the next step.
- Step 2: Send a Signature Request. You would set standaloneSignatureRequestedtotrueand add theimageUploadblock. Thedocumentblock would also be submitted, wheredocumentIdhas the value from step 1. See sample code block to the right.
- Step 3: Once the request has been completed by the end user, you would use the Transaction Report Retrieval to see the signed document and photo they uploaded for identification.
-Get a signature on a recurring payment schedule
<?php
$data = [
  'document' => [
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  ],
  'standaloneSignatureRequested' => 'true'
];
my $data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'standaloneSignatureRequested' => 'true'
};
data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'standaloneSignatureRequested' => 'true'
};
Components required: Signature, Document
- Step 1: Upload a PDF of the recurring schedule. The documentIdreturned will be used in the next step.
- Step 2: Send a Signature Request. You would set standaloneSignatureRequestedtotrue. Thedocumentblock would also be submitted, wheredocumentIdhas the value from step 1. See sample code block to the right.
- Step 3: Once the request has been completed by the end user, you would use the Transaction Report Retrieval to see the signed document.
Sample Code
This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Signature Service REST API and are not meant for production use.
-Result Status Codes
Expected HTTP Status codes
Status '200':
Description = 'Success.'
Status: '400':
Description = 'Malformed request. The request is either incorrectly formatted, or there are validation errors.'
Status '401':
Description = 'Invalid credentials.'
Status '403':
Description = 'Service not activated.'
Status '404':
Description = 'The requested signature/document/image was not found.'
Status '405':
Description = 'POST, GET, PUT request not supported for resource.'
Status '500':
Description = 'An internal error has occurred.'
All requests will return a status code. For example, in the case of status code 400, check for a requestErrorList in the response, containing information on validation failure.
General signature requests will use this method. It will send a text or email or both to the specified emailAddress, mobileNumber.
Send a HTTP POST request, with the required data, to:
endpoint: https://flow.pdcflow.com/api/v2_0/signatures
-Send Signature Request
<?php
$paymentType = 'CARD';
$payment = [
  'accountNumber' => 'YourAccountNumber',
  'paymentAmount' => '$125.00',
  'feeAmount' => '$5.00',
  'feePercentage' => 0,
  'accountDirective' => '0000',
  'editablePaymentAmount' => 'true',
  'minimumAmount' => '100.00'
];
if($paymentType == 'CARD') {
  $payment['paymentType'] = 'CC';
  $payment['ccTransaction'] = [
    'creditCardExpirationMonth' => '09',
    'creditCardExpirationYear' => '2022',
    'creditCardToken' => 'CardTokenFromPDC'
  ];
}
else if($paymentType == 'CHECK') {
  $payment['paymentType'] = 'ACH';
  $payment['achTransaction'] = [
    'bankAccountNumber' => 'aBankToken123456',
    'bankAccountNumberLastFour' => '3456',
    'bankAccountType' => 'CHECKING',
    'bankRoutingNumber' => '124001545',
    'checkNumber' => '1'
  ];
}
$roundTripList = [];
$roundTripList[] = [
  'rtName' => 'personalIdNumber',
  'rtValue' => '1234Number'
];
$data = [
  'customMessage' => 'Thank you for buying!',
  'description' => 'Agreement for mortgage.',
  'emailAddress' => 'frontenduser@pdc4u.com',
  'firstName' => 'Adam',
  'lastName' => 'Test',
  'maxPinAttempts' => '2',
  'mobileNumber' => '7777777777',
  'pinDescription' => 'Last four of your social security number',
  'verificationPageHeader' => 'Text that will be displayed at the top of the verification page',
  'redirectLink' => 'https://www.pdcflow.com',
  'requestGeolocation' => 'true',
  'roundTripNVPS' => $roundTripList,
  'payment' => $payment,
  'companyOverride' => [
    'companyName' => 'Our Child Company'
  ],
  'document' => [
    'documentId' => '1',
    'overlayId' => '1',
    'prePopulateVariables' => [
        'firstName' => 'Adam'
    ]
  ],
  'imageUpload' => [
    'imageUploadDescription' => 'Upload photo id',
    'imageUploadRequested' => 'true',
  ],
  'standaloneSignatureRequested' => 'true',
  'templateName' => 'SignatureOnly',
  'timeoutMinutes' => '4.5',
  'transactionOrigin' => 'EXT',
  'username' => 'someuser@pdc4u.com',
  'verificationPin' => '1235',
  'postbackUrl' => 'https://www.testpostbackaddress.com'
];
$url = 'https://flow.pdcflow.com/api/v2_0/signatures';
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
  ]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   my $paymentType = 'CARD';
   my %payment = (
      'accountNumber' => 'YourAccountNumber',
      'paymentAmount' => '$125.00',
      'feeAmount' => '$5.00',
      'feePercentage' => '0',
      'accountDirective' => '0000',
      'editablePaymentAmount' => 'true',
      'minimumAmount' => '100.00'
   );
   if($paymentType eq 'CARD') {
      $payment{'paymentType'} = 'CC';
      $payment{'ccTransaction'} = {
         'creditCardExpirationMonth' => '09',
         'creditCardExpirationYear' => '2022',
         'creditCardToken' => 'CardTokenFromPDC'
      };
   }
   elsif ($paymentType == 'CHECK'){
      $payment{'paymentType'} = 'ACH';
      $payment{'achTransaction'} = {
         'bankAccountNumber' => 'aBankToken123456',
         'bankAccountNumberLastFour' => '3456',
         'bankAccountType' => 'CHECKING',
         'bankRoutingNumber' => '124001545',
         'checkNumber' => '1'
      };
   }
   my $roundTripList = [ {'rtName'=>'personalIdNumber'}, {'rtValue'=>'1234abcd'} ];
   my $data = {
      'customMessage' => 'Thank you for buying!',
      'description' => 'Agreement for mortgage.',
      'emailAddress' => 'frontenduser@pdc4u.com',
      'firstName' => 'Adam',
      'lastName' => 'Test',
      'maxPinAttempts' => '2',
      'mobileNumber' => '7777777777',
      'pinDescription' => 'Last four of your social security number',
      'verificationPageHeader' => 'Text that will be displayed at the top of the verification page',
      'redirectLink' => 'https://www.pdcflow.com',
      'requestGeolocation' => 'true',
      'roundTripNVPS' => $roundTripList,
      'payment' => \%payment,
      'companyOverride' => {
        'companyName' => 'Our Child Company'
      },
      'document' => {
         'documentId' => '1',
         'overlayId' => '' #Specify to include an overlay
      },
      'imageUpload' => {
         'imageUploadDescription' => 'Upload photo id',
         'imageUploadRequested' => 'true',
      },
      'standaloneSignatureRequested' => 'true',
      'templateName' => 'SignatureOnly',
      'timeoutMinutes' => '4.5',
      'transactionOrigin' => 'EXT',
      'username' => 'someuser@pdc4u.com',
      'verificationPin' => '1235',
      'customEmailBody' => 'We would like to capture authorization that you approve this message. Please click the following link to authorize our transaction.',
      'postbackUrl' => 'https://www.testpostbackaddress.com'
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $url = 'https://flow.pdcflow.com/api/v2_0/signatures';
   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  paymentType = 'CARD'
  #paymentType = 'CHECK'
  payment = {
    'accountNumber' => 'YourAccountNumber',
    'paymentAmount' => '$125.00',
    'feeAmount' => '$5.00',
    'feePercentage' => '0',
    'accountDirective' => '0000',
    'editablePaymentAmount' => 'true',
    'minimumAmount' => '100.00'
  }
  if paymentType == 'CARD' then
    payment['paymentType'] = 'CC'
    payment['ccTransaction'] = {
      'creditCardExpirationMonth' => '09',
      'creditCardExpirationYear' => '2022',
      'creditCardToken' => 'CardTokenFromPDC'
    }
  elsif paymentType == 'CHECK' then
    payment['paymentType'] = 'ACH'
    payment['achTransaction'] = {
      'bankAccountNumber' => 'aBankToken123456',
      'bankAccountNumberLastFour' => '3456',
      'bankAccountType' => 'CHECKING',
      'bankRoutingNumber' => '124001545',
      'checkNumber' => '1'
    }
  end
  roundTripList = [
    'rtName'=>'personalIdNumber',
    'rtValue'=>'1234abcd'
  ]
  data = {
    'customMessage' => 'Thank you for buying!',
    'description' => 'Agreement for mortgage.',
    'emailAddress' => 'frontenduser@pdc4u.com',
    'firstName' => 'Adam',
    'lastName' => 'Test',
    'maxPinAttempts' => '2',
    'mobileNumber' => '7777777777',
    'pinDescription' => 'Last four of your social security number',
    'verificationPageHeader' => 'Text that will be displayed at the top of the verification page',
    'redirectLink' => 'https://www.pdcflow.com',
    'requestGeolocation' => 'true',
    'roundTripNVPS' => roundTripList,
    'payment' => payment,
    'companyOverride' => {
      'companyName' => 'Our Child Company'
    },
    'document' => {
      'documentId' => '1',
      'overlayId' => '' # Specify to include an overlay
    },
    'imageUpload' => {
      'imageUploadDescription' => 'Upload photo id',
      'imageUploadRequested' => 'true',
    },
    'standaloneSignatureRequested' => 'true',
    'templateName' => 'SignatureOnly',
    'timeoutMinutes' => '4.5',
    'transactionOrigin' => 'EXT',
    'username' => 'someuser@pdc4u.com',
    'verificationPin' => '1235',
    'customEmailBody' => 'We would like to capture authorization that you approve this message. Please click the following link to authorize our transaction.',
    'customEmailFooter' => 'This email has been brought to you by our Corporation.',
    'postbackUrl' => 'https://www.testpostbackaddress.com'
  }
  c = Curl::Easy.new
  c.url = 'https://flow.pdcflow.com/api/v2_0/signatures'
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = data.to_json.length
  payload = data.to_json
  c.headers = headers
  c.http_post(payload)
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
-Send Bulk Signature Request
Send a HTTP POST request, with the required data, to:
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/bulk
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://flow.pdc4u.com/api/v2_0/signatures/bulk',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "username": "someUserName",
    "description": "BULK FLOW Profound 3rd generation circuit",
    'postBackUrl' => 'https://www.example.com',
    'postBackAuthHeader' => 'BEARER abc123...',
    "defaultSignature": {
        "timeoutMinutes": 20,
        "verificationPin": "1234",
        "maxPinAttempts": "2",
        "pinDescription": "Pin Description",
        "description": "Demo Description",
        "flowTitle": "Flow Demo",
        "templateName": "DemoFlowTempate",
        "customMessage" => "Thank you for buying!",
        "verificationPageHeader" => "Text that will be displayed at the top of the verification page",
        "pageFooter": "Page footer",
        "standaloneSignatureRequested": false,
        "requestGeolocation": false,
        "companyOverride": {
            "companyName": "Jones - Hermann",
            "subject": "Bulk Requesting All Things",
            "emailFromName": "Omar Cartwright",
            "linkText": ">>>Click Here To Begin<<<"
        },
        "imageUpload": {
            "imageUploadRequested": true,
            "imageUploadDescription": "Please Upload Your Image!"
        },
        "componentList": [
            {
                "componentType": "BILLING_DATA",
                "data": {
                    "paymentTypeRequest": [
                        "CHECK",
                        "CARD"
                    ]
                }
            },
            {
                "componentType": "FILE_UPLOAD",
                "data": {
                    "fileUploadList": [
                        {
                            "fileType": "image",
                            "isRequired": "TRUE",
                            "description": "Polarised real-time framework"
                        },
                        {
                            "fileType": "PDF",
                            "isRequired": false,
                            "description": "Managed responsive budgetary management"
                        }
                    ]
                }
            }
        ],
        "roundTripNVPS": [
            {
                "rtName": "n1",
                "rtValue": "v1"
            },
            {
                "rtName": "employee",
                "rtValue": "employeeName"
            }
        ]
    },
    "signatureList": [
        {
            "firstName": "Clara",
            "lastName": "Maggio",
            "emailAddress": "emailaddress@my.com",
            "description": "This one has a payment",
            "mobileNumber": "",
            "roundTripNVPS": [
                {
                    "rtName": "Bulk Request #",
                    "rtValue": "1"
                }
            ]
        },
        {
            "firstName": "Natasha",
            "lastName": "Hessel",
            "emailAddress": "emailaddress2@my.com",
            "mobileNumber": "",
            "standaloneSignatureRequested": true,
            "requestGeolocation": true,
            "payment": {
                "paymentType": "ALL",
                "accountNumber": "97810345",
                "paymentAmount": "$401.78",
                "minimumAmount": "$0.02",
                "feeAmount": "$0.10",
                "editablePaymentAmount": true,
                "state": "UT",
                "zip": "84401",
                "ccTransaction": {
                    "accountDirective": "888-1",
                    "creditCardToken": "someCCToken",
                    "creditCardExpirationMonth": "01",
                    "creditCardExpirationYear": "2025"
                },
                "achTransaction": {
                    "accountDirective": "2071-1",
                    "bankAccountNumber": "89252076",
                    "bankRoutingNumber": "324377516",
                    "bankAccountType": "CHECKING",
                    "checkNumber": "919"
                }
            },
            "roundTripNVPS": [
                {
                    "rtName": "Bulk Request #",
                    "rtValue": "2"
                }
            ]
        }
    ]
}'
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
-Overlay Creation
<?php
$data = [
    'overlayName' => MyOverlayName',
    'overlayBoxDefinitionList' => [
        [
            'boxTypeId' => 5,
            'startXPercent' => 5.798,
            'startYPercent' => 25.755,
            'documentPage' => 1,
            'boxProperties' => [
                'fontSize' => 24,
                'boxWidth' => 520.55,
                'boxHeight' => 120.44,
                'characterLimit' => 40,
                'description' => 'First Name',
                'prePopulateVariable' => 'firstName'
            ]
        ],
        [
            'boxTypeId' => 2,
            'startXPercent' => 71.336,
            'startYPercent' => 10.151,
            'documentPage' => 1
        ]
    ]
];
$url = 'https://flow.pdcflow.com/api/v2_0/overlays';
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'someSecretUsername:someSecretPassword');
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {  
   my $data = {
       'overlayName' => MyOverlayName',
       'overlayBoxDefinitionList' => [
           {
               'boxTypeId' => 5,
               'startXPercent' => 5.798,
               'startYPercent' => 25.755,
               'documentPage' => 1,
               'boxProperties' => {
                   'fontSize' => 24,
                   'boxWidth' => 520.55,
                   'boxHeight' => 120.44,
                   'characterLimit' => 40,
                   'description' => 'First Name',
                   'prePopulateVariable' => 'firstName'
               }
           },
           {
               'boxTypeId' => 2,
               'startXPercent' => 71.336,
               'startYPercent' => 10.151,
               'documentPage' => 1
           }
       ]
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $url = 'https://flow.pdcflow.com/api/v2_0/overlays';
   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  data = {
    'overlayName' => MyOverlayName',
       'overlayBoxDefinitionList' => [
           {
               'boxTypeId' => 5,
               'startXPercent' => 5.798,
               'startYPercent' => 25.755,
               'documentPage' => 1,
               'boxProperties' => {
                   'fontSize' => 24,
                   'boxWidth' => 520.55,
                   'boxHeight' => 120.44,
                   'characterLimit' => 40,
                   'description' => 'First Name',
                   'prePopulateVariable' => 'firstName'
               }
           },
           {
               'boxTypeId' => 2,
               'startXPercent' => 71.336,
               'startYPercent' => 10.151,
               'documentPage' => 1
           }
       ]
   }
   c = Curl::Easy.new
   c.url = 'https://flow.pdcflow.com/api/v2_0/overlays'
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json
   c.headers = headers
   c.http_post(payload)
   puts JSON.parse c.body_str
   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end
-Overlay Modification
<?php
$data = [
    'overlayName' => MyOverlayName',
    'overlayBoxDefinitionList' => [
        [
            'boxTypeId' => 5,
            'startXPercent' => 5.798,
            'startYPercent' => 25.755,
            'documentPage' => 1,
            'boxProperties' => [
                'fontSize' => 24,
                'boxWidth' => 520.55,
                'boxHeight' => 120.44,
                'characterLimit' => 40,
                'description' => 'First Name',
                'prePopulateVariable' => 'firstName'
            ]
        ],
        [
            'boxTypeId' => 2,
            'startXPercent' => 71.336,
            'startYPercent' => 10.151,
            'documentPage' => 1
        ]
    ]
];
&existingOverlayId = 1;
$url = 'https://flow.pdcflow.com/api/v2_0/overlays/' . existingOverlayId . '?command=EDIT';
$curl = curl_init();
curl_setopt($curl, CURLOPT_PUT, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'someSecretUsername:someSecretPassword');
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {  
   my $data = {
       'overlayName' => MyOverlayName',
       'overlayBoxDefinitionList' => [
           {
               'boxTypeId' => 5,
               'startXPercent' => 5.798,
               'startYPercent' => 25.755,
               'documentPage' => 1,
               'boxProperties' => {
                   'fontSize' => 24,
                   'boxWidth' => 520.55,
                   'boxHeight' => 120.44,
                   'characterLimit' => 40,
                   'description' => 'First Name',
                   'prePopulateVariable' => 'firstName'
               }
           },
           {
               'boxTypeId' => 2,
               'startXPercent' => 71.336,
               'startYPercent' => 10.151,
               'documentPage' => 1
           }
       ]
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $existingOverlayId = 1;
   my $url = 'https://flow.pdcflow.com/api/v2_0/overlays/' . existingOverlayId . '?command=EDIT';
   my $req = HTTP::Request->new( 'PUT', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  data = {
    'overlayName' => MyOverlayName',
       'overlayBoxDefinitionList' => [
           {
               'boxTypeId' => 5,
               'startXPercent' => 5.798,
               'startYPercent' => 25.755,
               'documentPage' => 1,
               'boxProperties' => {
                   'fontSize' => 24,
                   'boxWidth' => 520.55,
                   'boxHeight' => 120.44,
                   'characterLimit' => 40,
                   'description' => 'First Name',
                   'prePopulateVariable' => 'firstName'
               }
           },
           {
               'boxTypeId' => 2,
               'startXPercent' => 71.336,
               'startYPercent' => 10.151,
               'documentPage' => 1
           }
       ]
   }
   c = Curl::Easy.new
   existingOverlayId = 1
   c.url = 'https://flow.pdcflow.com/api/v2_0/overlays/' + existingOverlayId + '?command=EDIT'
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json
   c.headers = headers
   c.http_post(payload)
   puts JSON.parse c.body_str
   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end
-Overlay Deletion
<?php
&existingOverlayId = 1;
$url = 'https://flow.pdcflow.com/api/v2_0/overlays/' . existingOverlayId . '?command=DELETE';
$curl = curl_init();
curl_setopt($curl, CURLOPT_PUT, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: 0'
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'someSecretUsername:someSecretPassword');
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   $data = JSON::XS->new->utf8->encode ($data);
   my $existingOverlayId = 1;
   my $url = 'https://flow.pdcflow.com/api/v2_0/overlays/' . existingOverlayId . '?command=DELETE';
   my $req = HTTP::Request->new( 'PUT', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length(0);
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  c = Curl::Easy.new
  existingOverlayId = 1
  c.url = 'https://flow.pdcflow.com/api/v2_0/overlays/' + existingOverlayId + '?command=DELETE'
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = 0
  payload = data.to_json
  c.headers = headers
  c.http_put()
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
-Send Signature Request with a PAYMENT_PORTAL component
<?php
   $roundTripList = [
      'rtName'=>'personalIdNumber',
      'rtValue'=>'1234abcd'
   ];
$portalPrePopulateVariables = [
    'firstName'  =>'firstName',
    'lastName'  =>'lastName',
    'emailAddress'  =>'my@my.com',
    'streetAddressOne'  =>'streetAddressOne',
    'streetAddressTwo'  =>'streetAddressTwo',
    'city'  =>'city',
    'country'  =>'US',
    'zip'  =>'84401',
    'state'  =>'UT',
    'zipPlusFour'  =>'1234',
    'phoneNumber'  =>'8017782224',
    'accountNumber'  =>'234134',
    'memo'  =>'memo',
    'paymentAmount'  =>'100.00',
    'roundTrip'  => $roundTripList
];
$componentData = [
    'portalUrl' => 'https://app.pdcflow.com/1234',
    'portalPrePopulateVariables' => $portalPrePopulateVariables
];
$componentList = [
    'componentType' => 'PAYMENT_PORTAL',
    'data' => $componentData
];
$data = [
    'customMessage' => 'Thank you for buying!',
    'description' => 'Agreement for mortgage.',
    'emailAddress' => 'frontenduser@pdc4u.com',
    'firstName' => 'Adam',
    'lastName' => 'Test',
    'maxPinAttempts' => '2',
    'mobileNumber' => '7777777777',
    'pinDescription' => 'Last four of your social security number',
    'verificationPageHeader' => 'Text that will be displayed at the top of the verification page',
    'redirectLink' => 'https://www.pdcflow.com',
    'requestGeolocation' => 'true',
    'roundTripNVPS' => $roundTripList,
    'companyOverride' => [
        'companyName' => 'Our Child Company'
    ],
    'componentList' => [
        $componentList
    ],
    'document' => [
        'documentId' => '1',
        'overlayId' => '1',
        'prePopulateVariables' => [
            'firstName' => 'Adam'
        ]
    ],
    'imageUpload' => [
        'imageUploadDescription' => 'Upload photo id',
        'imageUploadRequested' => 'true',
    ],
    'standaloneSignatureRequested' => 'true',
    'templateName' => 'SignatureOnly',
    'timeoutMinutes' => '4.5',
    'transactionOrigin' => 'EXT',
    'username' => 'someuser@pdc4u.com',
    'verificationPin' => '1235',
    'postbackUrl' => 'https://www.testpostbackaddress.com'
];
$url = 'https://flow.pdcflow.com/api/v2_0/signatures';
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'someSecretUsername:someSecretPassword');
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
-Send Signature Request with a FILE_UPLOAD component
<?php
$fileUploadList = [
  [
    'fileType' => 'IMAGE',
    'isRequired' => true,
    'description' => 'Upload the Front Image'
  ],
  [
    'fileType' => 'IMAGE',
    'isRequired' => false,
    'description' => 'Upload the Back Image'
  ],
  [
    'fileType' => 'PDF',
    'isRequired' => true,
    'description' => 'Upload the PDF Contract'
  ],
  [
    'fileType' => 'FILE',
    'isRequired' => false,
    'description' => 'Upload the Image or PDF'
  ]
];
$componentList = [
  'componentType' => 'FILE_UPLOAD',
  'data' => [
    'fileUploadList' => $fileUploadList
  ]
];
$data = [
  'firstName' => 'Adam',
  'lastName' => 'Test',
  'maxPinAttempts' => '2',
  'mobileNumber' => '7777777777',
  'emailAddress' => 'frontenduser@pdc4u.com',
  'customMessage' => 'Thank you for buying!',
  'description' => 'Agreement for mortgage.',
  'verificationPin' => '1235',
  'pinDescription' => 'Last four of your social security number',
  'verificationPageHeader' => 'Text that will be displayed at the top of the verification page',
  'redirectLink' => 'https://www.pdcflow.com',
  'requestGeolocation' => 'true',
  'standaloneSignatureRequested' => 'true',
  'templateName' => 'SignatureOnly',
  'timeoutMinutes' => '5',
  'transactionOrigin' => 'EXT',
  'username' => 'someuser@pdc4u.com',
  'componentList' => [
    $componentList
  ]
];
$url = 'https://flow.pdcflow.com/api/v2_0/signatures';
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data)
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'someSecretUsername:someSecretPassword');
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
-Sample Patch Signature
<?php
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/123456';
$patch = [
  'roundTripNVPS' => [
    [
      'rtName'=>'myName',
      'rtValue'=>'myValue'
    ]
   ]
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_PATCH, 1);
$data = json_encode($patch, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_PATCHFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
PATCH a PatchSignature object to update an existing Signature for a specific signatureId.
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/{signatureId}
-Signature Retrieval
<?php
$desiredSignatureId = 12;
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/' . $desiredSignatureId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   my $desiredSignatureId = '1';
   my $url = "https://flow.pdcflow.com/api/v2_0/signatures/$desiredSignatureId";
   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  desiredSignatureId = '1'
  url = "https://flow.pdcflow.com/api/v2_0/signatures/#{desiredSignatureId}"
  c = Curl::Easy.new( url )
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  c.perform
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General signature retrieval will use this method. It will retrieve the details for a signature with the specified id.
Send an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/[signatureId]
-Signature Report Retrieval
<?php
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/search';
$reportParams = [
  'startDate' => '2017-01-01 00:00:00',
  'endDate' => '2017-01-31 23:59:59',
  'firstName' => 'John',
  'lastName' => 'Smith',
  'recordCount' => '1000',
  'reportType' => 'ALL',
  'documentId' => '12345',
  'usernameList' => [
    'demo@domain.com'
  ],
  'locationIdList' => [
    '123456',
    '246801'
  ],
  'searchRoundTripNVPList' => [
    [
      'rtName' => 'employee',
      'rtValueList' => [
        "admin@demo.com",
        "billing@demo.com"
      ]
    ],
    [
      'rtName' => 'purchaseOrderNumber',
      'rtValueList' => [
        "123456",
        "-1",
        "0"
      ]
    ]
  ]
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$reportParams = json_encode($reportParams, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $reportParams);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($reportParams)
  ]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   $reportParams = {
     'startDate' => '2017-01-01 00:00:00',
     'endDate' => '2017-01-31 23:59:59',
     'firstName' => 'John',
     'lastName' => 'Smith',
     'recordCount' => '1000',
     'reportType' => 'ALL',
     'documentId' => '12345',
     'usernameList' => {
       'demo@domain.com'
     },
     'locationIdList' => {
       '123456',
       '246801'
     },
     'searchRoundTripNVPList' => [
       {
         'rtName' => 'employee',
         'rtValueList' => [
           "admin@demo.com",
           "billing@demo.com"
           ]
       },
       {
         'rtName' => 'purchaseOrderNumber',
         'rtValueList' => [
           "123456",
           "-1",
           "0"
         ]
       }
     ]
   };
   $reportParams = JSON::XS->new->utf8->encode ($reportParams);
   my $url = 'https://flow.pdcflow.com/api/v2_0/signatures/search';
   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($reportParams) );
   $req->content( $reportParams );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
     print "Success: " . $response->decoded_content;
   }
   else {
     die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  $reportParams = {
    'startDate' => '2017-01-01 00:00:00',
    'endDate' => '2017-01-31 23:59:59',
    'firstName' => 'John',
    'lastName' => 'Smith',
    'recordCount' => '1000',
    'reportType' => 'ALL',
    'documentId' => '12345',
    'usernameList' => {
      'demo@domain.com'
    },
    'locationIdList' => {
      '123456',
      '246801'
    },
    'searchRoundTripNVPList' => [
      {
        'rtName' => 'employee',
        'rtValueList' => [
          "admin@demo.com",
          "billing@demo.com"
        ]
      },
      {
        'rtName' => 'purchaseOrderNumber',
        'rtValueList' => [
          "123456",
          "-1",
          "0"
        ]
      }
    ]
  };
  url = "https://flow.pdcflow.com/api/v2_0/signatures/search"
  c = Curl::Easy.new
  c.url = 'https://flow.pdcflow.com/api/v2_0/signatures'
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = reportParams.to_json.length
  payload = reportParams.to_json
  c.headers = headers
  c.http_post(payload)
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General signature retrieval will use this method. It will retrieve a list of Signature objects filtered by desired SearchParameters.
Send an HTTP POST request with the desired SearchParameters to:
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/search
-Sample SelfServe
<?php
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/selfserve';
$object = [
  'name' => 'This is the SelfServe name',
  'flowTemplate' => [
      'description' => 'Please sign to agree.',
      'standaloneSignatureRequested' => 'true',
      'document' => [
        'documentId' => '1',
        'overlayId' => '1'
      ]
    ]
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($object, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
POST SelfServe
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/selfserve
-Sample SelfServe Search
<?php
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/selfserve/search';
$searchParameters = [
  'nameList' => ['This is the SelfServe name']
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
POST SelfServeSearch to retrieve a selfServeList which contains a list of SelfServe objects matching the SelfServeSearch provided
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/selfserve/search
-Sample Summary Search
<?php
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/summary';
$searchParameters = [
  'startDate' => 'YYYY-MM-dd HH:mm:ss',
  'columnGroupList' => [
    'month',
    'roundTripNVPS.employee'
  ],
  'searchRoundTripNVPList' => [
    [
      'rtName' => 'employee',
      'rtValueList' => [
        "admin@demo.com",
        "billing@demo.com"
      ]
    ]
  ] 
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
    my $searchParameters = {
        'startDate' => 'YYYY-MM-dd HH:mm:ss',
        'columnGroupList' => [
            'month',
            'roundTripNVPS.employee'
        ],
        'searchRoundTripNVPList' => [
            {
                'rtName' => 'employee',
                'rtValueList' => [
                    "admin@demo.com",
                    "billing@demo.com"
                ]
            }
        ] 
    }
    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://flow.pdcflow.com/api/v2_0/signatures/summary';
    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );
    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );
    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};
if ( $@ ) {
  print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  searchParameters = {
    'startDate' => 'YYYY-MM-dd HH:mm:ss',
    'columnGroupList' => [
      'month',
      'roundTripNVPS.employee'
    ],
    'searchRoundTripNVPList' => [
      {
        'rtName' => 'employee',
        'rtValueList' => [
          "admin@demo.com",
          "billing@demo.com"
        ]
      }
    ]
  }
  c = Curl::Easy.new
  c.url = 'https://flow.pdcflow.com/api/v2_0/signatures/summary'
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = data.to_json.length
  payload = searchParameters.to_json
  c.headers = headers
  c.http_post(payload)
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
POST FlowSummarySearchParameters for a FlowSummarySearch object which contains Flow Summary Totals.
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/summary
-Signature Modification
<?php
$idOfSignatureToModify = 1;
$url = 'https://flow.pdcflow.com/api/v2_0/signatures/' . $idOfSignatureToModify;
$data = [
  'signatureId' => $idOfSignatureToModify,
  'modificationCode' => 'CLOSE',
  'username' => 'frontenduser@pdc4u.com'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
  ]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;
eval {
   my $idOfSignatureToModify = 1;
   my $url = "https://flow.pdcflow.com/api/v2_0/signatures/$idOfSignatureToModify";
   my $data = {
      'signatureId' => $idOfSignatureToModify,
      'modificationCode' => 'CLOSE',
      'username' => 'someuser@pdc4u.com'
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $req = HTTP::Request->new( 'PUT', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  #   idOfSignatureToModify = 1;
  idOfSignatureToModify = 2560;
  url = "https://flow.pdcflow.com/api/v2_0/signatures/#{idOfSignatureToModify}"
  data = {
    'signatureId' => idOfSignatureToModify,
    'modificationCode' => 'CLOSE',
    'username' => 'someuser@pdc4u.com'
  }
  c = Curl::Easy.new
  c.url = url
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers = {}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = data.to_json.length
  payload = data.to_json
  c.headers = headers
  c.http_put(payload)
  #puts JSON.parse c.body_str
  puts c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General signature modification will use this method. It will modify an existing signature request. Currently, only "CLOSE" is supported.
Send an HTTP PUT request, with required data, to:
endpoint: https://flow.pdcflow.com/api/v2_0/signatures/[signatureId]
-Document Upload
<?php
$data = [
  'documentName' => 'HR_Document',
  'documentBase64String' => 'base64encodedString'
];
$url = 'https://flow.pdcflow.com/api/v2_0/documents';
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
  ]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;
eval {
   # read and encode pdf to upload
   my $pdfDocument = 'mydoc.pdf';
   my $pdfContents = read_file( $pdfDocument );
   my $documentData = encode_base64($pdfContents, ""); # encode without newlines
   my $data = {
      'documentName' => 'HR_Document',
      'documentBase64String' => $documentData
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $url = 'https://flow.pdcflow.com/api/v2_0/documents';
   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  # read and encode pdf to upload
  pdfDocument = 'mydoc.pdf'
  file = File.open(pdfDocument, "rb")
  contents = file.read
  file.close
  documentData = Base64.strict_encode64(contents) # encodes without newlines
  data = {
    'documentName' => 'HR_Document',
    'documentBase64String' => documentData
  }
  c = Curl::Easy.new
  c.url = 'https://flow.pdcflow.com/api/v2_0/documents';
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = data.to_json.length
  payload = data.to_json
  c.headers = headers
  c.http_post(payload)
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General document upload requests will use this method. It will upload a document and return a documentId to be used when sending a signature request.
Send an HTTP POST request, with required data, to:
endpoint: https://flow.pdcflow.com/api/v2_0/documents
-Document Retrieval
<?php
$desiredDocumentId = 12;
$url = 'https://flow.pdcflow.com/api/v2_0/documents/' . $desiredDocumentId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   my $desiredDocumentId = '1';
   my $url = "https://flow.pdcflow.com/api/v2_0/documents/$desiredDocumentId";
   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  desiredDocumentId = '1'
  url = "https://flow.pdcflow.com/api/v2_0/documents/#{desiredDocumentId}"
  c = Curl::Easy.new( url )
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  c.perform
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General document retrieval will use this method. It will retrieve the details for an uploaded document with the specified id.
Send an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/documents/[documentId]
-ImageUpload Retrieval
<?php
$desiredImageUploadId = 12;
$url = 'https://flow.pdcflow.com/api/v2_0/imageUploads/' . $desiredImageUploadId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   my $desiredImageUploadId = '1';
   my $url = "https://flow.pdcflow.com/api/v2_0/imageUploads/$desiredImageUploadId";
   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  desiredImageUploadId = '1'
  url = "https://flow.pdcflow.com/api/v2_0/imageUploads/#{desiredImageUploadId}"
  c = Curl::Easy.new( url )
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  c.perform
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General image upload retrieval will use this method. It will retrieve the details for a single image, uploaded by the client, for the given image upload id.
Send an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/imageUploads/[imageUploadId]
A list of all images uploaded by the client may also be obtained by sending the related signature ID in an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/imageUploads/allUploads/[signatureId]
An image upload may also be received by passing the related signature ID in an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/imageUploads?signatureId=[signatureId]
-Transaction Report Retrieval
<?php
$desiredSignatureId = 12;
$url = 'https://flow.pdcflow.com/api/v2_0/transactionReports/' . $desiredSignatureId;
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
eval {
   my $desiredSignatureId = 1;
   my $url = "https://flow.pdcflow.com/api/v2_0/transactionReports/$desiredSignatureId";
   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
begin
  desiredSignatureId = '1'
  url = "https://flow.pdcflow.com/api/v2_0/transactionReports/#{desiredSignatureId}"
  c = Curl::Easy.new( url )
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  c.perform
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
General transaction report retrieval will use this method. It will create and retrieve a detailed report for a signature transaction.
Send an HTTP GET request to:
endpoint: https://flow.pdcflow.com/api/v2_0/transactionReports/[signatureId]
-Migrate Signature Account Directives
<?php
$data = [
  'oldAccountDirective' => '123-1',
  'newAccountDirective' => '123-2'
];
$url = 'https://flow.pdcflow.com/api/v2_0/migrations/accountdirectives';
$curl = curl_init();
curl_setopt($curl, CURLOPT_PATCH, 1);
$data = json_encode($data, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_PATCHFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
  ]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution
$result = curl_exec($curl);
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// View response
print_r(json_decode($result, true));
if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;
eval {
   my $data = {
      'oldAccountDirective' => '123-1',
      'newAccountDirective' => '123-2'
   };
   $data = JSON::XS->new->utf8->encode ($data);
   my $url = 'https://flow.pdcflow.com/api/v2_0/migrations/accountdirectives';
   my $req = HTTP::Request->new( 'PATCH', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );
   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );
   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby
require 'curl'
require 'curb'
require 'json'
require 'base64'
begin
  data = {
    'oldAccountDirective' => '123-1',
    'newAccountDirective' => '123-2'
  }
  c = Curl::Easy.new
  c.url = 'https://flow.pdcflow.com/api/v2_0/migrations/accountdirectives';
  c.http_auth_types = :basic
  c.username = 'SomeSecretUsername'
  c.password = 'SomeSecretPassword'
  c.connect_timeout = 5
  c.timeout = 30
  c.verbose = true
  headers={}
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = data.to_json.length
  payload = data.to_json
  c.headers = headers
  c.http_patch(payload)
  puts JSON.parse c.body_str
  if c.response_code == 200 then
    puts "Success " + c.status
  else
    puts "Error " + c.status
  end
rescue
  puts "Caught: #$!\n"
end
Send an HTTP PATCH request to:
endpoint: https://flow.pdcflow.com/api/v2_0/migrations/accountdirectives
