Core API

The Core API is the underlying interface for all of our partner integrations. This reference document is designed for those interested in integrating Pandexio functionality into their applications or for those interested in exploring API features in detail.

General Notes

This API will evolve. Future versions of this API may add new endpoints or parameters. In order to keep older clients working, the behavior and return value of APIs with given parameter values will not change from the currently documented behavior and return values, with two important exceptions: currently undocumented request parameters (whether they are actually ignored or not) may be given a specific meaning, and objects returned in responses may contain additional keys in the future.

Thus, clients that want to be future-proof should avoid passing undocumented parameters (as they may cause different behavior in the future), and they should avoid strict checks on the keys of objects found in responses.

SSL only

We require that all requests are done over SSL.

UTF-8 encoding

Every string passed to and from the Pandexio API needs to be UTF-8 encoded.

Signing

All requests must be signed as described in Signature Generation.

Projects

/projects/create

DESCRIPTION Create a project and get its unique GUID.
URL STRUCTURE https://api.pandexio.com/projects/create
METHOD POST
PARAMETERS projectName  required  The name of the project to create.
EXAMPLE REQUEST
{ 
  "projectName": "Test Project" 
}
RETURNS The projectId of the new project.
EXAMPLE RESPONSE
    "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b"

/projects/addmember

DESCRIPTION Adds a new member to a project.
URL STRUCTURE https://api.pandexio.com/projects/addmember
METHOD POST
PARAMETERS projectId  required  The id of the project to add the member to.
memberName  required  The email address of the member to be added.
EXAMPLE REQUEST
{ 
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b",
    "memberName": "test1@user.com" 
}
RETURNS No response.
EXAMPLE RESPONSE N/A

/projects/removemember

DESCRIPTION Removes a member from a project.
URL STRUCTURE https://api.pandexio.com/projects/removemember
METHOD POST
PARAMETERS projectId  required  The id of the project to remove the member from.
memberName  required  The email address of the member to remove from the project.
EXAMPLE REQUEST
{ 
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b",
    "memberName": "test1@user.com" 
}
RETURNS No response.
EXAMPLE RESPONSE N/A

/projects/delete

DESCRIPTION Deletes a project.
URL STRUCTURE https://api.pandexio.com/projects/delete
METHOD DELETE
PARAMETERS projectId  required  The id of the project to delete
EXAMPLE REQUEST
{ 
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b"
}
RETURNS No response.
EXAMPLE RESPONSE N/A

/projects/changename

DESCRIPTION Changes the project name.
URL STRUCTURE https://api.pandexio.com/projects/changename
METHOD POST
PARAMETERS projectId  required  The id of the project to rename.
projectName  required  The new name of the project.
EXAMPLE REQUEST
{ 
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b",
    "projectName": "newname" 
}
RETURNS No response.
EXAMPLE RESPONSE N/A

/fetch/projectbyprojectid

DESCRIPTION Fetches a project.
URL STRUCTURE https://api.pandexio.com/fetch/projectbyproject/{projectId}
METHOD GET
PARAMETERS projectId  required  The id of the project to retrieve.
RETURNS A JSON object containing the project details
EXAMPLE RESPONSE
{
  "ProjectId": "e57af378-6bf8-4ec6-8d66-07e411562a4b",
  "ProjectName": "my project",
  "ProjectCreatorName": "spolitakis@pandexio.com",
  "ProjectCreatorFullName": "Simon Politakis",
  "ProjectCreatorThumbnail": "data:image/jpeg;bFFFI88//2Q...==",
  "ProjectCreationDate": "2014-06-27T16:29:48.7514908Z"
}

Documents

/documents/downloadfiles

DESCRIPTION Download one or more files from an external server and add to the specified project.
URL STRUCTURE https://api.pandexio.com/documents/downloadfiles
METHOD POST
PARAMETERS projectId  required  The id of the add the files to.
documentSource  required  One of the predefined document sources. Use 7 for partner.
fileUrls  required  An array of fileUrl objects.
  fileUrl  required  The url if a file to download.
  fileName  required  the name of the file including its extension.
  documentName    The display name of the document.
EXAMPLE REQUEST
{
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b",
    "documentSource": 7,
    "fileUrls": [
        { 
            "fileUrl": "https://s3.amazonaws.com/pandexio_test_good/feature-flow.v1.jpg", 
            "fileName": "file1.jpg", 
            "documentName": "file1"  },
        { 
            "fileUrl": "https://s3.amazonaws.com/pandexio_test_good/growthhacking-120502082450-phpapp01.pdf",
            "fileName": "file2.pdf", 
            "documentName": "file2" },
        { 
            "fileUrl": "https://s3.amazonaws.com/pandexio_test_good/Oregon%20Residential%20Lease%20Agreement.docx", 
            "fileName": "file3.docx", 
            "documentName": "file3" },
        { 
            "fileUrl": "https://s3.amazonaws.com/pandexio_test_good/ui%20elements.pdf", 
            "fileName": "file4.pdf", 
            "documentName": "file4" }
    ]
}
RETURNS A JSON object containing the document ID's and the status of each download.
EXAMPLE RESPONSE
[
    {
        "DocumentId": "00d50771-0daa-4b87-b4ca-f948e990c03a",
        "DocumentName": "file1",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "8120f84c-0572-46f3-bf9b-906bbcde215d",
        "DocumentName": "file2",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "08f2ba45-03ae-47a2-8e6a-5512bf22710c",
        "DocumentName": "file3",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "ad4eaa4f-beb7-4e9e-b192-6a58abd04fd6",
        "DocumentName": "file4",
        "Success": true,
        "Message": null   }
]
OTHER INFOOn success the message will be null.
On failure the message will contain the reason for failure.
If any of the files fail validation the http status code will 206.
If all files fail validation or, for example, a bogus project id was passed in, the http status code will be 400.
A 200 status is returned when there are no errors.

/documents/capturewebsite

DESCRIPTION Capture a webpage and add to the specified project.
URL STRUCTURE https://api.pandexio.com/documents/capturewebsite
METHOD POST
PARAMETERS projectId  required  The id of the add the web page to.
documentSource  required  One of the predefined document sources. Use 7 for partner.
webSiteUrl  required  The URL of the web page to be captured.
documentName  required  The display name of the document.
EXAMPLE REQUEST
{
    "projectId": "34ade35e-6d5f-4c9f-a062-8c6daaf1b86b",
    "documentSource": 7,
    "webSiteUrl": "https://www.yahoo.com/",  
    "documentName": "Yahoo!"  
}
RETURNS The document ID for the captured web page.
EXAMPLE RESPONSE
    "354d94d7-be36-4386-bc7d-f92322a31c4f"

/documents/uploadfiles

DESCRIPTION Upload one or more files. This endpoint accepts three parameters: an array of files, projectId, document source, posted by a standard upload control or explicitly via code.
URL STRUCTURE https://api.pandexio.com/documents/uploadfiles
METHOD POST
DATA TYPE multipart/form-data
PARAMETERS projectId  required  The id of the project to add the files to.
documentSource  required  One of the predefined document sources. Use 7 for Partner.
files  required  The file data.
EXAMPLE REQUEST
POST https://api.pandexio.com/documents/uploadfiles
     ?PdxPublicKey=1AE174B2ED52&PdxRequestSignature=ZnhcgKMoEOucN8q2ffg3cu%2bLpSA%3d
     &PdxTimestamp=2013-11-14T00%3a55%3a12Z&PdxEmail=jsmith%40company.com
     &PdxFullName=John%20Smith HTTP/1.1
Host: api.pandexio.com
Connection: keep-alive
Content-Length: 17478
Accept: */*
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
            Chrome/31.0.1650.57 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9EB5D2cCqPQ5jSjL
DNT: 1
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

------WebKitFormBoundary9EB5D2cCqPQ5jSjL
Content-Disposition: form-data; name="files"; filename="sample.pdf"
Content-Type: application/pdf

%PDF-1.2
%????
4 0 obj
<< 
/Linearized 1 
/O 7 
/H [ 1188 200 ] 
/L 16945 
/E 16534 
/N 1 
/T 16748 
>> 
4 31 
0000000016 00000 n 
0000000980 00000 n 
0000001050 00000 n 
0000001388 00000 n 
000>> TRUNCATED....
%%EOF ------WebKitFormBoundary9EB5D2cCqPQ5jSjL
Content-Disposition: form-data; name="projectId"

6c247f27-5bcd-4381-bed8-a60cd10034c9
------WebKitFormBoundary9EB5D2cCqPQ5jSjL
Content-Disposition: form-data; name="documentSource"

7
------WebKitFormBoundary9EB5D2cCqPQ5jSjL--
RETURNS A JSON object containing the document ID's and the status of each upload.
EXAMPLE RESPONSE
[
    {
        "DocumentId": "00d50771-0daa-4b87-b4ca-f948e990c03a",
        "DocumentName": "file1",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "8120f84c-0572-46f3-bf9b-906bbcde215d",
        "DocumentName": "file2",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "08f2ba45-03ae-47a2-8e6a-5512bf22710c",
        "DocumentName": "file3",
        "Success": true,
        "Message": null   },
    {
        "DocumentId": "ad4eaa4f-beb7-4e9e-b192-6a58abd04fd6",
        "DocumentName": "file4",
        "Success": true,
        "Message": null   }
]
OTHER INFOOn success the message will be null.
On failure the message will contain the reason for failure.
If any of the files fail validation the http status code will 206.
If all files fail validation or, for example, a bogus project id was passed in, the http status code will be 400.
A 200 status is returned when there are no errors.

/fetch/documentbydocumentid

DESCRIPTION Fetches a document.
URL STRUCTURE https://api.pandexio.com/fetch/documentbydocumentid/{documentId}
METHOD GET
PARAMETERS documentId  required  The id of the document to retrieve.
RETURNS A JSON object containing the document details
EXAMPLE RESPONSE
{
  "ProjectId": "e57af378-6bf8-4ec6-8d66-07e411562a4b",
  "DocumentId": "9c8c707c-8f0c-4771-b0a6-07200ed0e212",
  "DocumentName": "growthhacking-120502082450-phpapp01.pdf",
  "DocumentThumbnailUrl": "data:image/png;base64,iVBORw0KGg...==",
  "DocumentCreatorName": "spolitakis@pandexio.com",
  "DocumentCreatorFullName": "Simon Politakis",
  "DocumentCreatorThumbnail": "data:image/jpeg;base64,/9j/4AAQEAYABg...==",
  "DocumentCreationDate": "2014-06-27T17:15:55.7657549Z"
}

Snips

/fetch/snipbysnipid

DESCRIPTION Fetches a snip.
URL STRUCTURE https://api.pandexio.com/fetch/snipbysnipid/{snipId}
METHOD GET
PARAMETERS snipId  required  The id of the snip to retrieve.
RETURNS A JSON object containing the snip details
EXAMPLE RESPONSE
{
  "ProjectId": "e57af378-6bf8-4ec6-8d66-07e411562a4b",
  "DocumentId": "9c8c707c-8f0c-4771-b0a6-07200ed0e212",
  "SnipId": "cf311463-802b-4fe5-9db1-a2efe9b85553",
  "SnipTitle": "My First Snip",
  "SnipCreatorEmail": "spolitakis@pandexio.com",
  "SnipCreatorFullName": "Simon Politakis",
  "SnipCreatorThumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...==",
  "SnipCreationDate": "2014-06-27T17:25:56.6491235Z"
}

Webhooks

Webhooks are a way for web apps to get real-time notifications when objects are created of deleted in Pandexio. 

Once you register a URI to receive webhooks, Pandexio will send a signed HTTP request to that URI every time an object is created or deleted.

We are in the process of creating self service tools for webhook URI setup, but in the mean time please contact your customer service representative to help you setup your webhook URI's.

Once your webhook URI is added, your app will start receiving notifications every time an object is created or deleted in Pandexio.

A notification request is an HTTP POST with a JSON body. The JSON has the following format:

{
    "WebhookType": "SnipCreated",
    "TargetId":"1de50d22-cfe6-4c18-9ffc-0350acbf2819",
    "Path":"1de50d22-cfe6-4c18-9ffc-0350acbf2819/cf311463-802b-4fe5-9db1-a2efe9b85553/6hddr63-hhrb-4fe5-6671-7br2e9b85553",
    "TriggeredBy":"jsmith@company.com",
    "TriggerDate":"2014-06-30T19:23:11.1676012Z"
}

The webhook type will be one of the types listed below, with the targetId being the id of the object affected. In the sample webhook above the targetId is the id of the snip that was created.

Webhook TypeDescriptionTargetIdPath
ProjectCreatedProject created.projectIdprojectId
ProjectDeletedProject deleted.projectIdprojectId
ProjectMemberAddedProject member added.projectIduseremail/projectId
ProjectMemberRemovedProject member removed.projectIduseremail/projectId
DocumentCreatedDocument created.documentIddocumentId/projectId
DocumentConversionFailedDocument conversion failed.documentIddocumentId/projectId
DocumentDeletedDocument deleted.documentIddocumentId/projectId
SnipCreatedSnip created.snipIdsnipId/documentId/projectId
SnipDeletedSnip deleted.snipIdsnipId/documentId/projectId
SnipCommentCreatedSnip Comment created.commentIdcommentId/snipId/documentId/projectId