Application & Process Automation
- Getting Started
- Common Usage Scenarios
- Troubleshooting
- Using Custom IDs
- API Method Reference
-
- GetPrograms
- GetForms
- GetFormSchema
- GetProjects
- GetProjectsByNumber
- GetProjectsByData
- CreateNewProject
- GetAllProjectData - Admin only
- GetProjectData
- SetProjectData
- GetActiveAttachment
- GetAttachmentAsAdmin – Admin only
- SetProjectAttachment
- SetAttachmentMetadata
- GetAttachmentMetadata
- SubmitProject
- GetStatusList – Admin only
- GetCustomListChoices
- GetProjectStatusHistory – Admin only
- SetProjectStatus – Admin only
- GetExportProject – Admin only
- CreateMfaSessionToken
- DeleteMfaSessionToken
- SetAssignee
- SetProjectOwner
- GetInquiryThreads – Admin Only
- GetNotesInInquiryThread – Admin Only
- SetInquiryNote – Admin Only
- SetInquiryThreadStatus – Admin Only
- SetInquiryThreadExternalId – Admin Only
- SetProjectStatusReportAs – Admin only
- Code Samples
GetProjectsByData
HTTP verb: POST
Required inputs: ProgramId
Why a POST request and not a GET request?
HTTP specifications say that GET responses can’t depend on a body and with a POST body the request is not restricted by URL length.
Note: Request payloads must include the namespace "http://service.powerclerk.com/api/v1" (see below).
<ProjectByDataRequest xmlns="http://service.powerclerk.com/api/v1/">
<FilterByCurrentStatuses Operation="Exclude">
<Status Id="3X8KK600" />
<Status Id="ApplicationInProcess" />
</FilterByCurrentStatuses>
<FilterByStatusDate Id="ApplicationSubmitted" DateTime="2017-06-08T18:10:01" Operator="lt" />
<DataFields>
<Field Id="9KE8MJ45" Content="12345" Operator="eq"/>
<Field Id="MeterNumber" Content="54321" Operator="eq"/>
</DataFields>
</ProjectByDataRequest>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
<xs:element name="ProjectByDataRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="DataFields" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Field" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Id" type="xs:string" use="required" />
<xs:attribute name="Content" type="xs:string" use="required" />
<xs:attribute name="Operator" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FilterByCurrentStatuses" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="Status">
<xs:complexType>
<xs:attribute name="Id" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="Operation" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="FilterByStatusDate" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Id" type="xs:string" use="required" />
<xs:attribute name="Operator" type="xs:string" use="required" />
<xs:attribute name="DateTime" type="xs:dateTime" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Request XML Nodes and Attributes
<DataFields> Node
Contains the set of data fields, the content to look for and the operator to apply. Only projects that satisfy all conditions are returned.
<Field> Node
Describes the comparison to apply per field.
Attributes:
Id
– Unique identifier of the data field, Custom ID allowable if set. Field MUST be on the dashboard, in a column accessible to the calling user. Read more about Project Views in the Support Center.
Content
– value to look for. For DateTime fields, format MUST be yyyy-MM-dd’T’HH:mm:ss in UTC.
Operator
– identifies the comparison to applied in between the data fields content and the value of the Content attribute. Must be one of:
- “eq” : value must equal
Content
(valid for all data types) - “neq” : value must NOT equal
Content
(valid for all data types) - “lt” : value must be less than
Content
(valid for data types DateTime, Decimal and Integer) - “lte” : value must be less than or equal
Content
(valid for data types DateTime, Decimal and Integer) - “gt” : value must be greater than
Content
(valid for data types DateTime, Decimal and Integer) - “gte” : value must be greater than or equal
Content
(valid for data types DateTime, Decimal and Integer)
<FilterByCurrentStatuses> Node
Contains the statuses that projects must be in that are looked at.
Operation
– If set to “Exclude”, all projects in statuses contained in the list will be excluded. If set to “Include” or omitted, the response only includes projects in those statuses.
<Status> Node
Defines which statuses to filter the results on, based on the Operation attribute of the parent node.
Attributes:
Id
– Unique identifier of the status, Custom ID allowable if set
<FilterByStatusDate> Node
Allows to specify what status in the project history must have reached by what date in order to be included. If this node is not specified, projects are examined regardless of history.
Attributes:
Id
– Unique identifier of the status, Custom ID allowable if set
DateTime
– point in time to compare the given status history entry to. Must be in format yyyy-MM-dd’T’HH:mm:ss in UTC.
Operator
– identifies the comparison to applied in between the data fields content and the value of the DateTime
attribute
<ProjectsResponse RequestTimestamp="2014-10-24T17:00:15.6487539+00:00">
<Projects>
<Project ProjectId="R4NC48YU" ProgramId="1HF29X4P" ProjectNumber="TEST-00001" Status="Set Meter Request Pending" StatusTimestamp="2014-09-05T13:34:39-07:00" LastChangeTimestamp="2014-10-15T09:07:15-07:00"/>
<Project ProjectId="AK6ZP5H9" ProgramId="1HF29X4P" ProjectNumber="TEST-00004" Status="Application in Process" StatusTimestamp="2014-10-10T14:15:04-07:00" LastChangeTimestamp="2014-10-10T14:15:23-07:00"/>
<Project ProjectId="54X25DK7CB" ProgramId="1HF29X4P" ProjectNumber="TEST-00003" Status="Application in Process" StatusTimestamp="2014-10-03T16:22:09-07:00" LastChangeTimestamp="2014-10-03T16:22:08-07:00"/>
<Project ProjectId="9RZ2BR69UP" ProgramId="1HF29X4P" Status="Unsubmitted" StatusTimestamp="2014-10-17T13:09:05-07:00" LastChangeTimestamp="2014-10-17T13:09:09-07:00"/>
<Project ProjectId="F8ZK6BK2CU" ProgramId="1HF29X4P" Status="Unsubmitted" StatusTimestamp="2014-10-21T14:22:13-07:00" LastChangeTimestamp="2014-10-21T14:59:40-07:00"/>
</Projects>
</ProjectsResponse>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
<xs:element name="ProjectsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Projects">
<xs:complexType>
<xs:sequence>
<xs:element name="Project" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="ProjectId" use="required"/>
<xs:attribute type="xs:string" name="ProgramId" use="required"/>
<xs:attribute type="xs:string" name="ProjectNumber" use="optional"/>
<xs:attribute type="xs:string" name="Status" use="required"/>
<xs:attribute type="xs:dateTime" name="StatusTimestamp" use="required"/>
<xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:float" name="SchemaVersion"/>
<xs:attribute type="xs:dateTime" name="RequestTimestamp"/>
</xs:complexType>
</xs:element>
</xs:schema>
<ProjectsResponse RequestTimestamp="2014-10-24T17:00:15.6487539+00:00">
<Projects>
<Project ProjectId="R4NC48YU" ProgramId="1HF29X4P" ProjectNumber="TEST-00001" Status="Set Meter Request Pending" StatusTimestamp="2014-09-05T13:34:39-07:00" LastChangeTimestamp="2014-10-15T09:07:15-07:00" StatusPublicId=”93JH4U3Z”/>
<Project ProjectId="AK6ZP5H9" ProgramId="1HF29X4P" ProjectNumber="TEST-00004" Status="Application in Process" StatusTimestamp="2014-10-10T14:15:04-07:00" LastChangeTimestamp="2014-10-10T14:15:23-07:00" StatusPublicId="SE0BU2DG" />
<Project ProjectId="54X25DK7CB" ProgramId="1HF29X4P" ProjectNumber="TEST-00003" Status="Application in Process" StatusTimestamp="2014-10-03T16:22:09-07:00" LastChangeTimestamp="2014-10-03T16:22:08-07:00" StatusPublicId="SE0BU2DG" />
<Project ProjectId="9RZ2BR69UP" ProgramId="1HF29X4P" Status="Unsubmitted" StatusTimestamp="2014-10-17T13:09:05-07:00" LastChangeTimestamp="2014-10-17T13:09:09-07:00" StatusCustomId="CustomStatusId" StatusPublicId="3X8KK600" />
<Project ProjectId="F8ZK6BK2CU" ProgramId="1HF29X4P" Status="Unsubmitted" StatusTimestamp="2014-10-21T14:22:13-07:00" LastChangeTimestamp="2014-10-21T14:59:40-07:00" StatusCustomId="CustomStatusId" StatusPublicId="3X8KK600" />
</Projects>
</ProjectsResponse>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
<xs:element name="ProjectsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Projects">
<xs:complexType>
<xs:sequence>
<xs:element name="Project" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="ProjectId" use="required"/>
<xs:attribute type="xs:string" name="ProgramId" use="required"/>
<xs:attribute type="xs:string" name="ProjectNumber" use="optional"/>
<xs:attribute type="xs:string" name="Status" use="required"/>
<xs:attribute type="xs:string" name="StatusCustomId" use="required"/>
<xs:attribute type="xs:string" name="StatusPublicId" use="required"/>
<xs:attribute type="xs:dateTime" name="StatusTimestamp" use="required"/>
<xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:float" name="SchemaVersion"/>
<xs:attribute type="xs:dateTime" name="RequestTimestamp"/>
</xs:complexType>
</xs:element>
</xs:schema>
What’s Next?