Application & Process Automation

Getting Started
Authentication & Access
Accounts with Multi-Factor Authentication
Using method GetPrograms
Common Usage Scenarios
Create and Submit a Project
Add/Change Data in an Existing Project
Daily Polling for Project Changes
Troubleshooting
Using Custom IDs
API Method Reference
GetPrograms
URL Format
Response
XML Attributes
Sample Code
GetForms
URL Format
Response
Forms Attributes
AvailableInStatuses and LeadsToStatus
Status Attributes
Sample Code
GetFormSchema
V1 Response
V2 Response
Sample Code
GetProjects
V1 Response
V2 Response
V3 Response
Sample Code
GetProjectsByNumber
V1 Response
V2 Response
Sample Request
Sample Code
GetProjectsByData
Sample Request
Request XML Nodes and Attributes
V1 Response
V2 Response
CreateNewProject
Sample Response
Response XML Attributes
Sample Code
GetAllProjectData - Admin only
Sample Response
XML Attributes
Sample Code
GetProjectData
Sample Response
XML Attributes
Sample Code
SetProjectData
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
GetActiveAttachment
URL Format
Sample Code
GetAttachmentAsAdmin – Admin only
URL Format
SetProjectAttachment
Identifying attachment file types
URL Format
Sample Response
Response XML Attributes
Sample Code
SetAttachmentMetadata
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
GetAttachmentMetadata
URL Format
Sample Response
Response XML Attributes
Sample Code
SubmitProject
URL Format
Sample Response
Response XML Attributes
Sample Code
GetStatusList – Admin only
Sample Code
URL Format
Sample Response
Response XML Attributes
GetCustomListChoices
URL Format
Sample Response
Response XML Attributes
GetProjectStatusHistory – Admin only
URL Format
Sample Response
Response XML Attributes
Sample Code
SetProjectStatus – Admin only
URL Format
Sample Response
Response XML Attributes
Sample Code
GetExportProject – Admin only
Response XML Attributes
Sample Code
URL Format
Sample Response
CreateMfaSessionToken
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
DeleteMfaSessionToken
URL Format
Sample Response
Sample Code
SetAssignee
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
SetProjectOwner
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
GetInquiryThreads – Admin Only
GetNotesInInquiryThread – Admin Only
SetInquiryNote – Admin Only
SetInquiryThreadStatus – Admin Only
SetInquiryThreadExternalId – Admin Only
SetProjectStatusReportAs – Admin only
Code Samples
EncodeAuthorizationHeader
MakeGetRequest
MakePostRequest
MakeGetFileRequest
MakeDeleteRequest
PowerShell

GetFormSchema

Retrieves a list of data fields and attachment associated with the given form. Requires read access to the form’s program and membership in a role that has access to the form in at least one workflow status.
 
HTTP verb: GET
Required inputs: ProgramId, FormId
Optional inputs: version (integer)
 

Path Parameters
Path parameter Description
ProgramId The ID of the program.
FormId The ID of the form to get the form schema of

 

Query string parameters
Name Data Type Required/Optional Description
version Integer Optional If the optional “version” parameter is set format the data to that version. If the “version” parameter is not included the API will default to use Version 1.

 

Version Parameter

The version parameter allows the PowerClerk API to expand and grow as the product grows while keeping the API backwards compatible. The following are acceptable values for the version parameter.
 

Version Content in the version
1 Default content
2 Includes the DataFieldGroupId and DataFieldGroupCustomId

URL Format

Format: https://{BaseURL}/Programs/{ProgramId}/Forms/{FormId}/Schema?version={Version#}
Sample: https://{BaseURL}/Programs/A43FN6B/Forms/47LE2F8/Schema?version=2

Version 1 Response


<FormSchemaResponse SchemaVersion="0" xmlns="http://service.powerclerk.com/api/v1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <FormSchema FormId="Q60TV2AF" ProgramId="1HF29X4P" Title="Net Metering Application - TEST">
        <AvailableInStatuses>
            <Status StatusId="3X8KK600" Name="Unsubmitted" Deleted="false" />
            <Status StatusId="HA8MX4B3" Name="Suspended" Deleted="false" />
        </AvailableInStatuses>
        <LeadsToStatus StatusId="SE0BU2DG" Name="Application in Process" Deleted="false" />
        <DataFields>
            <DataFieldSchema DataFieldId="T2BH2S8Q" Name="System Owner Same As Facility Owner" Label="System Owner/Operator is same as Facility Owner?" Type="Choice" AllowsMultiple="false" Required="false" ReadOnly="false">
                <Choices>
                    <Choice Value="Yes" />
                    <Choice Value="No" />
                    <Choice Value="test'a&quot;b&lt;c&amp;d" />
                </Choices>
            </DataFieldSchema>
            <DataFieldSchema DataFieldId="Y7K4M80T" Name="System Owner First" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="TC1S5MS1" Name="System Owner Last" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="XQ5JZ07A" Name="System Owner Company" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="false" ReadOnly="false" />
            <DataFieldSchema DataFieldId="7UZ7FW9J" Name="System Owner Line 1" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="QT42PN5H" Name="System Owner Line 2" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="Z62NU08K" Name="System Owner State" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="1G1XE93Z" Name="System Owner City" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="XG087KZ6" Name="System Owner Zip Code" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="5MB2FU52" Name="System Owner Phone" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="9YW6587Y" Name="System Owner Email" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="X4JC121E" Name="PV System Inverter Quantity" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="FG95YH30" Name="PV System Inverter Manufacturer" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="PX49AU23" Name="PV System Inverter Model" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="ZU044VZ8" Name="PV System PV Module Quantity" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="GR51SN56" Name="PV System PV Module Manufacturer" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="22FU5824" Name="PV System PV Module Model" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="BW480G7P" Name="PV System PV Module Assigned Inverter" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="MK2HP7S8" Name="PV System PV Module Tilt" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="JN5GZ009" Name="PV System PV Module Azimuth" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="QV7HB9FD" Name="PV System PV Module Tracking" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="26JN87YE" Name="PV System PV Module Monthly Shading" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="MK66BF6W" Name="PV System Nameplate Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="ND0AR5HV" Name="PV System CEC Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="J1J6QV0Y" Name="PV System Estimated Production" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="8G7ES4PP" Name="PV System Design Factor" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="7R1E3J6220GX" Name="PV System Average Inverter Efficiency" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="P67YCF1A604F" Name="PV System PTC Module Rating " Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="AEFPJF9RMGWN" Name="PV System Monthly Estimated Production" Label="PV System Specification" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="QSRABX88Q167" Name="PV System Inverter Nameplate Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="343QKDT2H5AR" Name="PV System Has All Smart Inverters" Label="PV System Specification" Type="Boolean" AllowsMultiple="false" Required="true" ReadOnly="false" />
            <DataFieldSchema DataFieldId="4QG2ZD7V" Name="Possible meter access issues" Label="Possible meter access issues?" Type="Choice" AllowsMultiple="false" Required="true" ReadOnly="false">
                <Choices>
                    <Choice Value="None" />
                    <Choice Value="Dog at residence" />
                    <Choice Value="Locked gate" />
                    <Choice Value="Meter located inside facility/residence" />
                    <Choice Value="Other" />
                </Choices>
            </DataFieldSchema>
        </DataFields>
        <Attachments>
            <AttachmentSchema AttachmentId="3QX3VQ18" Name="Copy Of Utility Bill" Label="Copy of Utility Bill" Required="false" />
        </Attachments>
    </FormSchema>
</FormSchemaResponse>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
  <xs:element name="FormSchemaResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="FormSchema">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AvailableInStatuses">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Status" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="StatusId" use="required"/>
                            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                            <xs:attribute type="xs:string" name="Name" use="required"/>
                            <xs:attribute type="xs:boolean" name="Deleted" use="required"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="LeadsToStatus">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute type="xs:string" name="StatusId" use="required"/>
                      <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                      <xs:attribute type="xs:string" name="Name" use="required"/>
                      <xs:attribute type="xs:boolean" name="Deleted" use="required"/>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="DataFields">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="DataFieldSchema" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType mixed="true">
                        <xs:sequence>
                          <xs:element name="Choices" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Choice" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                         <xs:attribute type="xs:string" name="Value" use="required"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:string" name="DataFieldId" use="required"/>
                        <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                        <xs:attribute type="xs:string" name="Name" use="required"/>
                        <xs:attribute type="xs:string" name="Label" use="required"/>
                        <xs:attribute type="xs:string" name="Type" use="required"/>
                        <xs:attribute type="xs:boolean" name="AllowsMultiple" use="required"/>
                        <xs:attribute type="xs:boolean" name="Required" use="required"/>
                        <xs:attribute type="xs:boolean" name="ReadOnly" use="required"/>
                        <xs:attribute type="xs:string" name="Default" use="optional"/>
                        <xs:attribute type="xs:byte" name="Min" use="optional"/>
                        <xs:attribute type="xs:byte" name="Max" use="optional"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Attachments">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="AttachmentSchema" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="AttachmentId" use="required"/>
                            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                            <xs:attribute type="xs:string" name="Name" use="required"/>
                            <xs:attribute type="xs:string" name="Label" use="required"/>
                            <xs:attribute type="xs:boolean" name="Required" use="required"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute type="xs:string" name="FormId" use="required"/>
            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
            <xs:attribute type="xs:string" name="ProgramId" use="required"/>
            <xs:attribute type="xs:string" name="Title" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute type="xs:float" name="SchemaVersion"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

Attributes

FormId – Unique identifier for the form
CustomId – Optional, admin-set unique-within-this-program identifier for the form
ProgramId – Unique identifier for the program
Title – Form title

and

<AvailableInStatuses> – A list of statuses in which the form is available
<LeadsToStatus> – Successful submission of the form will move a project into this status

Attributes

StatusId – Unique identifier for the status
CustomId – Optional, admin-set unique-within-this-program identifier for the status
Name – Status name

Attributes

DataFieldId – Unique identifier for the data field
CustomId – Optional, admin-set unique-within-this-program identifier for the data field
Name – Data field name
Label – The label the datafield uses on the Form on the UI
Type – One of the following: String, Integer, Decimal, DateTime, Choice, Boolean
AllowsMultiple – Boolean. If true, this data field is a multi-instance data field
Required – Boolean. If true, data field must contain a data value in order to submit the form
ReadOnly – Boolean. If true, data field is readonly on this form and cannot be used to enter data values
Default – Default value for the data field
Min – Minimum value for the data field
Max – Maximum value for the data field
 
A DataField element with Type=Choice represents a dropdown or multiple choice list, in which the user selects from a list of pre-defined values. Every Choice-type DataField element contains a Choices child element, which lists the input values available to the user for that data field.

Attributes

Value – The value for the choice

Attributes

AttachmentId – Unique identifier for the attachment
CustomId – Optional, admin-set unique-within-this-program identifier for the attachment
Name – Attachment name
Label – The label the attachment uses on the Form on the UI
Required – Boolean. If true, attachment must have an associated uploaded file in order to submit the form

Version 2 Response


<FormSchema FormId="Q60TV2AF" ProgramId="1HF29X4P" Title="Net Metering Application - TEST">
    <AvailableInStatuses>
        <Status StatusId="3X8KK600" CustomId="customstatus" Name="Unsubmitted" Deleted="false" />
        <Status StatusId="HA8MX4B3" Name="Suspended" Deleted="false" />
    </AvailableInStatuses>
    <LeadsToStatus StatusId="SE0BU2DG" Name="Application in Process" Deleted="false" />
    <DataFields>
        <DataFieldSchema DataFieldId="NY9MS9D3" Name="Application Date" Label="Application Date" Type="DateTime" AllowsMultiple="false" Required="true" ReadOnly="false" Default="currentDate" />
        <DataFieldSchema DataFieldId="H07KU796" Name="Facility Contact City" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="HV8ZV7AY" Name="Facility Contact Company" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="false" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="4QG3FH7N" Name="Facility Contact Email" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="JF3BA1WC" Name="Facility Contact First" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="688TA4T3" Name="Facility Contact Last" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="FP6FS7DG" Name="Facility Contact Line 1" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="Y38YE53M" Name="Facility Contact Line 2" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="DH4MJ7Y9" Name="Facility Contact Phone" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="F9MQ4V49" Name="Facility Contact State" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="FF3A5UA5" Name="Facility Contact Zip Code" Label="Facility Contact" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="DD7EN2PS" />
        <DataFieldSchema DataFieldId="9KE8MJ45" Name="Account Number" Label="Account Number from bill" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="G79NE1GH" Name="Premise Number" Label="Premise Number" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="VH7SU5AX" Name="Meter Number" Label="Meter Number" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="P4QG1P7H" Name="Applicant City" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="CZ9B0KG1" Name="Applicant Company" Label="Applicant" Type="String" AllowsMultiple="false" Required="false" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="MC7E3AR0" Name="Applicant Email" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="73XH0BK1" Name="Applicant First" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="HF1H4FR6" Name="Applicant Last" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="AZ988PB5" Name="Applicant Line 1" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="MV51QW29" Name="Applicant Line 2" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="86DP8K63" Name="Applicant Phone" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="YJ2Z4C38" Name="Applicant State" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="M3BK799M" Name="Applicant Zip Code" Label="Applicant" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="6RP1DY0B" />
        <DataFieldSchema DataFieldId="2SJ6E9N0" Name="Installer City" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="A1R2V11K" Name="Installer Company" Label="Installer" Type="String" AllowsMultiple="false" Required="false" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="6K1T2Q76" Name="Installer Email" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="QY30UU3H" Name="Installer First" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="8KM06611" Name="Installer Last" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="15U8BM8T" Name="Installer Line 1" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="HF818DX6" Name="Installer Line 2" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="RU7355E7" Name="Installer Phone" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="MM1H3AJ3" Name="Installer State" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="6GF1KQ8G" Name="Installer Zip Code" Label="Installer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="EM1QC5BF" />
        <DataFieldSchema DataFieldId="3WE8N4DR" Name="Contractor act customer behalf" Label="Contractor contact person is to be used as contact and is authorized by Customer to receive confidential Customer information and act on behalf of Customer with respect to this agreement as the contact." Type="Boolean" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="T2BH2S8Q" Name="System Owner Same As Facility Owner" Label="System Owner/Operator is same as Facility Owner?" Type="Choice" AllowsMultiple="false" Required="false" ReadOnly="false">
            <Choices>
                <Choice Value="Yes" />
                <Choice Value="No" />
                <Choice Value="test'a&quot;b&lt;c&amp;d" />
            </Choices>
        </DataFieldSchema>
        <DataFieldSchema DataFieldId="1G1XE93Z" Name="System Owner City" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="XQ5JZ07A" Name="System Owner Company" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="false" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="9YW6587Y" Name="System Owner Email" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="Y7K4M80T" Name="System Owner First" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="TC1S5MS1" Name="System Owner Last" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="7UZ7FW9J" Name="System Owner Line 1" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="QT42PN5H" Name="System Owner Line 2" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="5MB2FU52" Name="System Owner Phone" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="Z62NU08K" Name="System Owner State" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="XG087KZ6" Name="System Owner Zip Code" Label="System Owner/Operator" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="NC6MX7YU" DataFieldGroupCustomId="OwnerCustomId" />
        <DataFieldSchema DataFieldId="56D2EB2T" Name="Description of Service" Label="Description of Service:" Type="Choice" AllowsMultiple="false" Required="true" ReadOnly="false">
            <Choices>
                <Choice Value="This is a new generating facility at a currently served location" />
                <Choice Value="This is a change to a generating at a currently served location" />
                <Choice Value="This is a new generating facility at a new service location" />
                <Choice Value="This is a new generating facility in a new subdivision" />
            </Choices>
        </DataFieldSchema>
        <DataFieldSchema DataFieldId="KT3XD46E" Name="Developer" Label="Developer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="7R1E3J6220GX" Name="PV System Average Inverter Efficiency" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="ND0AR5HV" Name="PV System CEC Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="8G7ES4PP" Name="PV System Design Factor" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="J1J6QV0Y" Name="PV System Estimated Production" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="343QKDT2H5AR" Name="PV System Has All Smart Inverters" Label="PV System Specification" Type="Boolean" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="FG95YH30" Name="PV System Inverter Manufacturer" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="PX49AU23" Name="PV System Inverter Model" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="QSRABX88Q167" Name="PV System Inverter Nameplate Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="X4JC121E" Name="PV System Inverter Quantity" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="AEFPJF9RMGWN" Name="PV System Monthly Estimated Production" Label="PV System Specification" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="MK66BF6W" Name="PV System Nameplate Rating" Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="P67YCF1A604F" Name="PV System PTC Module Rating " Label="PV System Specification" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="BW480G7P" Name="PV System PV Module Assigned Inverter" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="JN5GZ009" Name="PV System PV Module Azimuth" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="GR51SN56" Name="PV System PV Module Manufacturer" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="22FU5824" Name="PV System PV Module Model" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="26JN87YE" Name="PV System PV Module Monthly Shading" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="ZU044VZ8" Name="PV System PV Module Quantity" Label="PV System Specification" Type="Integer" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="MK2HP7S8" Name="PV System PV Module Tilt" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="QV7HB9FD" Name="PV System PV Module Tracking" Label="PV System Specification" Type="String" AllowsMultiple="true" Required="true" ReadOnly="false" DataFieldGroupId="RR8477NZ" DataFieldGroupCustomId="GroupCustomId" />
        <DataFieldSchema DataFieldId="X7Z88GG4" Name="Disconnect Switch Manufacturer" Label="Disconnect Switch Manufacturer" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="13GY9J72" Name="Disconnect Switch Model" Label="Disconnect Switch Model" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="1JS0US8Y" Name="Disconnect Switch Rating" Label="Disconnect Switch Rating (amps)" Type="Decimal" AllowsMultiple="false" Required="true" ReadOnly="false" Min="0" />
        <DataFieldSchema DataFieldId="4QG2ZD7V" Name="Possible meter access issues" Label="Possible meter access issues?" Type="Choice" AllowsMultiple="false" Required="true" ReadOnly="false">
            <Choices>
                <Choice Value="None" />
                <Choice Value="Dog at residence" />
                <Choice Value="Locked gate" />
                <Choice Value="Meter located inside facility/residence" />
                <Choice Value="Other" />
            </Choices>
        </DataFieldSchema>
        <DataFieldSchema DataFieldId="VY29DA4D" Name="Other Meter Access Issue" Label="Please Explain" Type="String" AllowsMultiple="false" Required="true" ReadOnly="false" />
        <DataFieldSchema DataFieldId="MC3803AW" Name="Operation date" Label="Anticipated ready-for-operation date" Type="DateTime" AllowsMultiple="false" Required="true" ReadOnly="false" />
    </DataFields>
    <Attachments>
        <AttachmentSchema AttachmentId="3QX3VQ18" Name="Copy Of Utility Bill" Label="Copy of Utility Bill" Required="false" />
    </Attachments>
</FormSchema>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
  <xs:element name="FormSchemaResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="FormSchema">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AvailableInStatuses">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Status" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="StatusId" use="required"/>
                            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                            <xs:attribute type="xs:string" name="Name" use="required"/>
                            <xs:attribute type="xs:boolean" name="Deleted" use="required"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="LeadsToStatus" minOccurs="0">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute type="xs:string" name="StatusId" use="required"/>
                      <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                      <xs:attribute type="xs:string" name="Name" use="required"/>
                      <xs:attribute type="xs:boolean" name="Deleted" use="required"/>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="DataFields">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="DataFieldSchema" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType mixed="true">
                        <xs:sequence>
                          <xs:element name="Choices" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Choice" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute type="xs:string" name="Value" use="required"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:string" name="DataFieldId" use="required"/>
                        <xs:attribute type="xs:string" name="DataFieldGroupId" use="optional"/>
                        <xs:attribute type="xs:string" name="DataFieldGroupCustomId" use="optional"/>
                        <xs:attribute type="xs:byte" name="HierarchyLevel" use="optional"/>
                        <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                        <xs:attribute type="xs:string" name="Name" use="required"/>
                        <xs:attribute type="xs:string" name="Label" use="required"/>
                        <xs:attribute type="xs:string" name="Type" use="required"/>
                        <xs:attribute type="xs:boolean" name="AllowsMultiple" use="required"/>
                        <xs:attribute type="xs:boolean" name="Required" use="required"/>
                        <xs:attribute type="xs:boolean" name="ReadOnly" use="required"/>
                        <xs:attribute type="xs:string" name="Default" use="optional"/>
                        <xs:attribute type="xs:byte" name="Min" use="optional"/>
                        <xs:attribute type="xs:byte" name="Max" use="optional"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Attachments">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="AttachmentSchema" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="AttachmentId" use="required"/>
                            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
                            <xs:attribute type="xs:string" name="Name" use="required"/>
                            <xs:attribute type="xs:string" name="Label" use="required"/>
                            <xs:attribute type="xs:boolean" name="Required" use="required"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute type="xs:string" name="FormId" use="required"/>
            <xs:attribute type="xs:string" name="CustomId" use="optional"/>
            <xs:attribute type="xs:string" name="ProgramId" use="required"/>
            <xs:attribute type="xs:string" name="Title" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute type="xs:float" name="SchemaVersion"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

Attributes

FormId – Unique identifier for the form
CustomId – Optional, admin-set unique-within-this-program identifier for the form
ProgramId – Unique identifier for the program
Title – Form title

and

<AvailableInStatuses> – A list of statuses in which the form is available
<LeadsToStatus> – Successful submission of the form will move a project into this status

Attributes

StatusId – Unique identifier for the status
CustomId – Optional, admin-set unique-within-this-program identifier for the status
Name – Status name

Attributes

DataFieldId – Unique identifier for the data field
HierarchyLevel – Optional. The position that the data field is in a custom list form element.
CustomId – Optional, admin-set unique-within-this-program identifier for the data field
Name – Data field name
Label – The label the datafield uses on the Form on the UI
Type – One of the following: String, Integer, Decimal, DateTime, Choice, Boolean
AllowsMultiple – Boolean. If true, this data field is a multi-instance data field
Required – Boolean. If true, data field must contain a data value in order to submit the form
ReadOnly – Boolean. If true, data field is readonly on this form and cannot be used to enter data values
Default – Default value for the data field
Min – Minimum value for the data field
Max – Maximum value for the data field
DataFieldGroupId – Optional. The datafield group that the datafield is a part of
DataFieldGroupCustomId – Optional, admin-set unique-within-this-program identifier for the data field group
 
DataField element with Type=Choice represents a dropdown or multiple choice list, in which the user selects from a list of pre-defined values. Every Choice-type DataField element contains a Choices child element, which lists the input values available to the user for that data field.

Attributes

Value – The value for the choice

Attributes

AttachmentId – Unique identifier for the attachment
CustomId – Optional, admin-set unique-within-this-program identifier for the attachment
Name – Attachment name
Label – The label the attachment uses on the Form on the UI
Required – Boolean. If true, attachment must have an associated uploaded file in order to submit the form

Sample Code


// Retrieves info about all the data fields in a given form.
// Returns a list of <DataFieldId, DataFieldName> pairs, one for each data field in the form.

public List<Tuple<string, string>> GetFormSchemaInfo(string programId, string formId, string username, string password, string apiKey)
{
    string url = "/Programs/" + programId + "/Forms/" + formId + "/Schema";
    XDocument xmlResponse = MakeGetRequest(BaseUrl + url, username, password, apiKey);

    XNamespace ns = "http://service.powerclerk.com/api/v1/";
    List<XElement> dataFieldElements = xmlResponse.Descendants(ns + "DataFieldSchema").ToList();

    List<Tuple<string, string>> dataFields = new List<Tuple<string, string>>();
    foreach (XElement fieldElement in dataFieldElements)
    {
        string fieldId = fieldElement.Attribute("DataFieldId").Value;
        string fieldName = fieldElement.Attribute("Name").Value;
        dataFields.Add(new Tuple<string, string>(fieldId, fieldName));
    }
    return dataFields;
}

function getFormSchema(programId, formId) {
    // Use $.ajax jQuery method to execute the API call
    $.ajax({
        type: "GET",
        url: "https://{BaseURL}/Programs/" + programId + "/Forms/" + formId + "/Schema",
        dataType: "xml",
        beforeSend: function (xhr) {
            xhr.setRequestHeader("Authorization", "Basic " + hashedCredentials);
            xhr.setRequestHeader("X-ApiKey", apiKey);
        },
        success: function (xml) {
            // Display data
        },
        error: function (xhr) {
            // Display error
        }
    });
}

What’s Next?