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

V2 API METHOD TEMPLATE

This is a description for this API method

Request

GET /Requests/{RequestId}/Paths/{PathId}

Path Parameters

Name Value Description
ProgramId string Unique identifier for the program.
ProjectId string Unique identifier for the project.
FormId string Unique or custom identifier for the form.

Optional Query Parameters

Name Value Description
QueryParameter boolean Query parameter.

Request Body

Do not supply a request body with this method.
{
  "Response": {
    "NullableString": null | string,
    "Boolean": boolean,
    "Integer": integer,
    "Object": {
      "Timestamp": timestamp
    }
  }
}
<span class="hljs-punctuation">// POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit

{
</span><span class="hljs-attr">  "Response"</span><span class="hljs-punctuation">: </span><span class="hljs-punctuation">{
</span><span class="hljs-comment">    // [...]
</span><span class="hljs-punctuation">  }
</span><span class="hljs-punctuation">}</span>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
  <xs:element name="ProjectSubmitResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Project">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CurrentStatus">
                <xs:complexType>
                  <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:dateTime" name="Timestamp" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <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="required"/>
            <xs:attribute type="xs:string" name="Url" use="required"/>
            <xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
<!-- POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit -->

<?xml version="1.0" encoding="utf-8"?>
<ProjectSubmitResponse>
  <Project ProjectId="JT2BNFEC26X6" ProgramId="WUSVSQK9XB6N" ProjectNumber="TEST-00002" Url="http://testagency.powerclerk.com/MvcProjects/LandingPage?ProgramId=WUSVSQK9XB6N&amp;ProjectId=JT2BNFEC26X6" LastChangeTimestamp="2022-11-08T10:51:21-08:00">
    <CurrentStatus StatusId="Q1N7XRS60Y52" Name="Unsubmitted" Timestamp="2022-11-08T10:51:20-08:00" />
  </Project>
</ProjectSubmitResponse>

Response Parameters

Name Value Description
NullableString null or string An string that can be null.
Boolean boolean A boolean value.
Integer integer An integer value
Object object An object
Object.Timestamp timestamp Timestamp of the object.

Response

Response Body

{
  "Response": {
    "NullableString": null | string,
    "Boolean": boolean,
    "Integer": integer,
    "Object": {
      "Timestamp": timestamp
    }
  }
}
// POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit

{
  "Response": {
    // [...]
  }
}
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
  <xs:element name="ProjectSubmitResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Project">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CurrentStatus">
                <xs:complexType>
                  <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:dateTime" name="Timestamp" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <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="required"/>
            <xs:attribute type="xs:string" name="Url" use="required"/>
            <xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
<!-- POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit -->

<?xml version="1.0" encoding="utf-8"?>
<ProjectSubmitResponse>
  <Project ProjectId="JT2BNFEC26X6" ProgramId="WUSVSQK9XB6N" ProjectNumber="TEST-00002" Url="http://testagency.powerclerk.com/MvcProjects/LandingPage?ProgramId=WUSVSQK9XB6N&amp;ProjectId=JT2BNFEC26X6" LastChangeTimestamp="2022-11-08T10:51:21-08:00">
    <CurrentStatus StatusId="Q1N7XRS60Y52" Name="Unsubmitted" Timestamp="2022-11-08T10:51:20-08:00" />
  </Project>
</ProjectSubmitResponse>

Response Parameters

Name Value Description
NullableString null or string An string that can be null.
Boolean boolean A boolean value.
Integer integer An integer value
Object object An object
Object.Timestamp timestamp Timestamp of the object.

Sample Code

// Retrieves info about all programs in a given agency.
// Returns a list of <ProgramId, ProgramName> pairs, one for each program in the list.

public List<Tuple<string, string>> GetProgramInfo(string agencyId, string username, string password, string apiKey)
{
    string url = "/Programs?Agency=" + agencyId;
    XDocument xmlResponse = MakeGetRequest(BaseUrl + url, username, password, apiKey);

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

    List<Tuple<string, string>> programs = new List<Tuple<string, string>>();
    foreach (XElement programElement in programElements)
    {
        string programId = programElement.Attribute("ProgramId").Value;
        string programName = programElement.Attribute("ProgramName").Value;
        programs.Add(new Tuple<string,string>(programId, programName));
    }
    return programs;
}
function getPrograms(agencyId) {
    // Use $.ajax jQuery method to execute the API call
    $.ajax({
        type: "GET",
        url: "https://{BaseURL}/Programs?Agency=" + agencyId,
        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
        }
    });
}