You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
Authenticate
Call PwsAuthenticate to get your SessionTicket and DocumentServerUrl.
<!-- Request -->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/">
<soapenv:Header/>
<soapenv:Body>
<pws:PwsAuthenticate>
<pws:serviceRequest>
<req:RequestId>1</req:RequestId>
<req:AccountCode>my-account-code</req:AccountCode>
<req:Password>my-password</req:Password>
<req:UserName>jdoe@acme.com</req:UserName>
</pws:serviceRequest>
</pws:PwsAuthenticate>
</soapenv:Body>
</soapenv:Envelope>
<!-- Response -->
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsAuthenticateResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsAuthenticateResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
<Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
<ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2022-02-13T04:22:54.4566169Z</ServerTimestampUtc>
<a:RedirectUrl i:nil="true"/>
<a:SessionTicket>AAAAAAAAAAAAAAAAAAAAAA==</a:SessionTicket>
<a:AccountIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:AccountCode>my-account-code</b:AccountCode>
<b:AccountId i:nil="true"/>
<b:AccountUid>1111111111111111111</b:AccountUid>
</a:AccountIdentity>
<a:UserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA - 11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:UserIdentity>
<a:SuperUserFlag>false</a:SuperUserFlag>
<a:DocumentServerUrl>https://doc2.projectorpsa.com/1</a:DocumentServerUrl>
<a:Account xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:AccountCode>my-account-code</b:AccountCode>
<b:AccountId i:nil="true"/>
<b:AccountUid>1111111111111111111</b:AccountUid>
<b:Name>Acme Inc.</b:Name>
</a:Account>
<a:User xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA - 11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
<b:EmailAddress>jdoe@acme.com</b:EmailAddress>
<b:FirstName>John</b:FirstName>
<b:LastName>Doe</b:LastName>
<b:MiddleName i:nil="true"/>
</a:User>
<a:GaAccountId>1111</a:GaAccountId>
<a:GaUserHash>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</a:GaUserHash>
<a:MobileBaseUrl>https://m.projectorpsa.com</a:MobileBaseUrl>
<a:PortalBaseUrl>https://app.projectorpsa.com</a:PortalBaseUrl>
</PwsAuthenticateResult>
</PwsAuthenticateResponse>
</s:Body>
</s:Envelope>
Get Folder
Files are stored in "folders" on our servers. There are many potential folders so you need to ask for a specific one. For example, I would like the resume folder for John Smith. See PwsGetFolder to understand the folder type and references that must be passed.
To upload receipts or issues you must send them to UserReceiptPoolFolder or UserIssueAttachmentPoolFolder. Once in the pool folder they can be associated with an expense document, cost card, or issue. See the last steps in this page for an example.
<!-- Request -->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:doc="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
<soapenv:Header/>
<soapenv:Body>
<pws:PwsGetFolder>
<pws:serviceRequest>
<req:RequestId>2</req:RequestId>
<req:SessionTicket>AAAAAAAAAAAAAAAAAAAAAA==</req:SessionTicket>
<doc:FolderTypeCode>ResourceResumeFolder</doc:FolderTypeCode>
<doc:ResourceIdentity>
<com:ResourceDisplayName>John Doe</com:ResourceDisplayName>
<com:ResourceReferenceSystemId>AA-11</com:ResourceReferenceSystemId>
<com:ResourceUid>1111111111111111111</com:ResourceUid>
</doc:ResourceIdentity>
</pws:serviceRequest>
</pws:PwsGetFolder>
</soapenv:Body>
</soapenv:Envelope>
<!-- Response --> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsGetFolderResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsGetFolderResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<ResponseId xmlns="http://projectorpsa.com/CommonServices/">2</ResponseId>
<Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
<ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2022-02-13T04:44:52.7734859Z</ServerTimestampUtc>
<a:FolderIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:FolderId i:nil="true"/>
<b:FolderUid>1111111111111111111</b:FolderUid>
</a:FolderIdentity>
<a:AssociatedEntityDescription>John Doe</a:AssociatedEntityDescription>
<a:CanAddAssociationsFlag>false</a:CanAddAssociationsFlag>
<a:CanAddDocumentsFlag>true</a:CanAddDocumentsFlag>
<a:CanAddLinksFlag>true</a:CanAddLinksFlag>
<a:CanAddNotesFlag>false</a:CanAddNotesFlag>
<a:CanAddVersionsFlag>true</a:CanAddVersionsFlag>
<a:CanDeleteDocumentsFlag>true</a:CanDeleteDocumentsFlag>
<a:CanSearchDocumentsFlag>true</a:CanSearchDocumentsFlag>
<a:CanViewDocumentsFlag>true</a:CanViewDocumentsFlag>
<a:RequireDocumentDataFlag>false</a:RequireDocumentDataFlag>
<a:RequireUniqueFilenamesFlag>true</a:RequireUniqueFilenamesFlag>
</PwsGetFolderResult>
</PwsGetFolderResponse>
</s:Body>
</s:Envelope>
Get Existing File Reference (Optional)
If you are uploading a new file you can skip this step. If you'd like to update an existing file then call PwsGetFolderContents. This returns all existing files and their documentRefUid. You'll use this UID to specify what should be updated.
<!-- Request -->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:doc="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
<soapenv:Header/>
<soapenv:Body>
<pws:PwsGetFolderContents>
<pws:serviceRequest>
<req:RequestId>3</req:RequestId>
<req:SessionTicket>AAAAAAAAAAAAAAAAAAAAAA==</req:SessionTicket>
<doc:FolderIdentity>
<com:FolderUid>1111111111111111111</com:FolderUid>
</doc:FolderIdentity>
</pws:serviceRequest>
</pws:PwsGetFolderContents>
</soapenv:Body>
</soapenv:Envelope>
<!-- Response -->
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsGetFolderContentsResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsGetFolderContentsResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/DocumentManagement/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<ResponseId xmlns="http://projectorpsa.com/CommonServices/">3</ResponseId>
<Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
<ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2022-02-13T04:51:59.4991753Z</ServerTimestampUtc>
<a:Folder>
<FolderId i:nil="true" xmlns="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<FolderUid xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">1111111111111111111</FolderUid>
<a:CreatedByUserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA - 11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:CreatedByUserIdentity>
<a:CreatedTimestamp>2014-04-16T16:33:41.86Z</a:CreatedTimestamp>
<a:DeletedByUserIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:DeletedTimestamp i:nil="true"/>
<a:Documents>
<a:PwsDocument>
<DocumentRefId i:nil="true" xmlns="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<DocumentRefUid xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">1111111111111111111</DocumentRefUid>
<a:CreatedByUserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA-11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:CreatedByUserIdentity>
<a:CreatedTimestamp>2022-02-13T04:51:50.367Z</a:CreatedTimestamp>
<a:CurrentVersion>
<DocumentVersionId i:nil="true" xmlns="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<DocumentVersionUid xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">1111111111111111111</DocumentVersionUid>
<a:Comments i:nil="true"/>
<a:CreatedByUserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA-11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:CreatedByUserIdentity>
<a:CreatedTimestamp>2022-02-13T04:51:50.367Z</a:CreatedTimestamp>
<a:DocumentArchiveIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:VersionNumber>1</a:VersionNumber>
</a:CurrentVersion>
<a:DeletedByUserIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:DeletedTimestamp i:nil="true"/>
<a:DocumentName>JDResume.docx</a:DocumentName>
<a:DocumentSize>19441</a:DocumentSize>
<a:DocumentUri i:nil="true"/>
<a:LockedByUserIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:LockedTimestamp i:nil="true"/>
<a:MimeType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</a:MimeType>
<a:ModifiedByUserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA-11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:ModifiedByUserIdentity>
<a:ModifiedTimestamp>2022-02-13T04:51:50.367Z</a:ModifiedTimestamp>
<a:SupportPreviewFlag>false</a:SupportPreviewFlag>
<a:SupportThumbnailFlag>false</a:SupportThumbnailFlag>
<a:DocumentData>
<a:DataItems/>
<a:DocumentDataDetail>
<a:AssociatedItemIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:ItemId i:nil="true"/>
<b:ItemType>R</b:ItemType>
<b:ItemUid>1111111111111111111</b:ItemUid>
<b:ReferenceType i:nil="true"/>
</a:AssociatedItemIdentity>
<a:Associations/>
<a:Notes i:nil="true"/>
<a:AssociatedItemDescription>John Doe</a:AssociatedItemDescription>
</a:DocumentDataDetail>
</a:DocumentData>
<a:EditDeleteFlag>true</a:EditDeleteFlag>
<a:NumberPages i:nil="true"/>
<a:ArchiveIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:EditDeletePermissionFlag>true</a:EditDeletePermissionFlag>
<a:ReceiptLockedFlag>false</a:ReceiptLockedFlag>
<a:DocumentTicket>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</a:DocumentTicket>
</a:PwsDocument>
</a:Documents>
<a:FolderName>John Doe</a:FolderName>
<a:FolderTypeCode>ResourceResumeFolder</a:FolderTypeCode>
<a:ModifiedByUserIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:UserDisplayName>John Doe</b:UserDisplayName>
<b:UserId i:nil="true"/>
<b:UserReferenceSystemId>AA - 11</b:UserReferenceSystemId>
<b:UserUid>1111111111111111111</b:UserUid>
</a:ModifiedByUserIdentity>
<a:ModifiedTimestamp>2014-04-16T16:33:41.86Z</a:ModifiedTimestamp>
<a:AttachmentNotes/>
<a:CanAddAssociationsFlag>false</a:CanAddAssociationsFlag>
<a:CanAddDocumentsFlag>true</a:CanAddDocumentsFlag>
<a:CanAddLinksFlag>true</a:CanAddLinksFlag>
<a:CanAddNotesFlag>false</a:CanAddNotesFlag>
<a:CanAddVersionsFlag>true</a:CanAddVersionsFlag>
<a:CanSearchDocumentsFlag>true</a:CanSearchDocumentsFlag>
<a:RequireDocumentDataFlag>false</a:RequireDocumentDataFlag>
<a:RequireUniqueFilenamesFlag>true</a:RequireUniqueFilenamesFlag>
<a:UploadFolderIdentity i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<a:AssociatedEntityDescription>John Doe</a:AssociatedEntityDescription>
<a:CanDeleteDocumentsFlag>true</a:CanDeleteDocumentsFlag>
</a:Folder>
</PwsGetFolderContentsResult>
</PwsGetFolderContentsResponse>
</s:Body>
</s:Envelope>
Post New File
Do not use a SOAP request to upload files. Instead POST the file to the DocumentServerUrl you obtained in the first step of this help page. Specify your session ticket, folder, optional file reference, and the file as POST parameters.
// Request
// POST resume URL: https://doc2.projectorpsa.com/1/AjxAddDocument
docServer .+ "/AjxAddDocument";
// New File Post Parameters
sessionTicket
folderUid
file
// Updated File Post Parameters
sessionTicket
folderUid
documentRefUid
file
//Response SUCCESS
{
"DocumentRefId": 1111111,
"DocumentRefUid": "1111111111111111111",
"VersionNumber": 1,
"DocumentName": "JDResume.docx",
"DocumentSize": 510396,
"NumberPages": null,
"ModifiedBy": {
"UserId": 111111,
"UserUid": "1111111111111111111",
"UserDisplayName": "John Doe"
},
"ModifiedOn": "/Date(1644724588113)/",
"MimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"DocumentTicket": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"DocumentVersionId": 1111111,
"CreatedBy": {
"UserId": 111111,
"UserUid": "1111111111111111111",
"UserDisplayName": "John Doe"
},
"CreatedOn": "/Date(1644724588113)/",
"VersionCreatedBy": {
"UserId": 111111,
"UserUid": "1111111111111111111",
"UserDisplayName": "John Doe"
},
"VersionCreatedOn": "/Date(1644724588113)/",
"refid": null,
"Status": 0,
"Messages": []
}
// Response FAILIRE
{
"refid": null,
"Status": 2,
"Messages": [
{
"Type": 2,
"Code": 75012,
"Mnemonic": "DocumentStorageCapacityExceeded",
"Text": "Your company has exceeded its Projector storage space. Please delete some documents or contact your Projector administrator about increasing your company's storage capacity.",
"Redirect": null,
"State": 1,
"ExpectedErrorFlag": true
}
]
}
Associate with Expense Document or Cost Card (Optional)
If you uploaded to the UserReceiptPoolFolder or UserIssueAttachmentPoolFolder you'll have one more step to perform. You need to associate the file with either an Expense Document, Cost Card, or Issue.
- Expense Document - a container that has many cost cards. For example, a flight, a meal, and a hotel stay. I take one picture of all three receipts and associate it with the expense document
- Cost card - a single expense for a meal. I take a picture of the one receipt and associate it
- Issue - not explained here, but works the same as cost card
Call PwsSaveExpenseDocumentCostCard and specify the SaveReceipts object.