API Methods

This page provides technical information about the API endpoints available in the Xtracta App. It is intended to help those who are already familiar with the integration structure and have reviewed example applications similar to their own application.

Connecting to the Xtracta App's API is done purely using the HTTPS protocol enabling end-to-end encryption. If your integration is for desktop software, in almost all cases as long as the computer your integration is running from can access the web, then your users can reach Xtracta's servers - you shouldn't need to modify any firewalls or network setup.

Get Document(s)

https://api-app.xtracta.com/v1/documents

This endpoint allows you to get a list of all documents (and their relating data & images) matching your query parameters OR if you pass a DocumentId, the data for a single document. This method cannot insert data into the Xtracta App. It can only be used to retrieve data.

POST Parameters:

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
document_id1, 2 {integer} The ID of a specific document you want information for
workflow_id1, 2 {integer} The ID of a workflow you want document information for
document_status3
  • pre-processing
  • indexing
  • qa
  • reject
  • complete
  • api-ui-in-progress
  • output-in-progress
Limit the results to documents of a particular status within the workflow
documents_per_page3 {integer} Define the number of documents to be returned. There is a 1,000 maximum limit which is also the default.
page3 {integer} If the number of documents in the request exceeds the definied documents_per_page (or exceeds the maximum allowed) then define what page of results you want.
documents_order3
  • asc
  • desc
How the documents are ordered when they are returned (by document_id)
api_download_status
  • active
  • archived
Define what status the document is in. Usually once you have downloaded the document, you would use the update document method to set it to archived. Thus when running this query you would usually set this parameter to active. By doing this, because previous documents you have downloaded would be in archive status, only new documents you haven't downloaded through the API would be present.
detailed3
  • 1
  • {null}
When set to "1" this will return all data about each document being returned (including field data). By default this endpoint will only return summary information about each document (when workflow_id is POSTed - if document_id is POSTed then full information about that document will be supplied by default). Getting detailed information can reduce the number of calls you need to make (as you don't need to make a separate call for each document) but can increase the size of the returned XML which may be superfluous if you only want summary information about a document.

1field is mandatory
2one of these fields must be POSTed and the other left blank
3Only valid if workflow_id POSTed

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<documents_number> A containing element with information about the number of documents within the various workflow stages.
<total> The total number of documents within the workflow (excludes any that have been removed due to the data-deletion policy)
<pre-processing> The number of documents in pre-processing stage. The pre-processing stage includes areas such as image enhancements, automatic data extraction, thumbnail generation etc.
<indexing> The number of documents in indexing status. Indexing is usually only a status used when using the Xtracta App in dashboard mode - most software integrations will not use this status.
<qa> The number of documents in QA (quality assurance) status. Quality Assurance is usually only a status used when using the Xtracta App in dashboard mode - most software integrations will not use this status.
<reject> The number of documents in reject status. Rejected documents need to be fixed up by the user before their validations pass and they can be imported into your system.
<output-in-progress> The number of documents currently in the process of outputting. This will only apply when a workflow has an output such as email, FTP etc. output - all of which are not typically used by API integrators.
<completed> The number of documents in the completed/output status.
<document> This element contains all sub-elements which pertain to a single document. When using the workflow_id POST parameter, there could be multiple documents returned so this shows one document.
<document_url> This is a link to the actual document image in its entirety. This will always be in PDF format, no matter the format of the original source. It is suggested you download the file alongside the data (and link to it within your UI) to make it available for reference within your system.
<image_urls> The Xtracta App generates a JPEG image of each page of the documents it processes. These JPEGs can be used in your application to provide "preview" or the like for a document.
<image_url> This element contains a single JPG preview image. At the end of the filename before the .jpg file extension there is a -1-800 (or similar). The -1 refers to this being the first page and the -800 refers to the JPEG having a horizontal resolution of 800px (vertical size scales accordingly to maintain the original aspect ratio).
<document_id> This element refers to the Document ID for the document. The Xtracta App assigns each document a unique ID which is used for almost all queries or tracking for that document both internally and externally by integrators and end-users. While obviously if you have used the document_id POST parameter this is of little use (since you already knew this!) - it is useful when using the workflow_id parameter. This is because you would use this Id to update the document's status or do any future query on it. We strongly recommend you record this in your system alongside the document data - this doesn't strictly need to be displayed to users but it could be useful for any future troubleshooting so from that perspective it should be shown somewhere within your UI for users.
<document_status> Documents go through a variety of statuses within the Xtracta App. This shows the current status of the document.
<number_of_pages> This shows the number of pages within the document.
<api_download_status> Usually once you have downloaded the document, you would use the update document method to set it to archived. Thus when running this query you would usually set this parameter to active.
<free_form> This element is blank unless you have manually updated it using the update document endpoint. It allows you to add any value to the field you want. This could be used for your own tracking purposes, for example if you have multiple applications which need to access the API you could design your own api_download_status system to deal with such a scenario.
<field_data> This contains the captured data from the document for the fields you have chosen for the workflow. The fields are sub-elements of this and the names you have given the fields will be used to name the elements. If the workflow has repeating field sets, these will be a containing sub element. Each "line" of the field set will be encapsulated by an element called <row>.
<rejection> This is a holding tag which may or may not have sub-content. The rejection tag will encompass any information about rejection for a document (if that document is currently in reject status)
<reason> A container for a reason for rejection.
<reason>-><message> A user readable reason why the rejection has occurred - the message is based on what has been set for the field.
<validation_rules> A container to contain information about what validation rule has been triggered (note this could be empty if the rejection was manually done by the user).
<type> The type of rejection rule triggered. Available reasons include: maths_check, regex & match_value
<rule_id> The ID of the rule that has been triggered
<linked_field> A container that holds information about the field which is linked to the rejection.
<field_id> The ID of the field which has the rejection rule that has been triggered attached to it.
<row_order> If the field that has failed validation is part of a repeating field set, then this is the row where the error was triggered.

Example where document_id POSTed

Sample Request

POST https://api-app.xtracta.com/v1/documents HTTP/1.1
Host: myhost.com
api_key=123&document_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<document>
		<document_id>6375056</document_id>
		<document_status>output</document_status>
		<number_of_pages>1</number_of_pages>
		<api_download_status>active</api_download_status>
		<free_form />
		<document_url>https://web1-akl.xtracta.com/datasource/1/56/d1/GNL423KmV.pdf</document_url>
		<image_url>https://web1-akl.xtracta.com/datasource/1/d5/f0/fw71422145pG-1-0800.jpg</image_url>
		<field_data>
			<field>
				<field_id>1827</field_id>
				<field_name>Date</field_name>
				<field_value>2015-03-01</field_value>
			</field>
			<field>
				<field_id>1828</field_id>
				<field_name>DueDate</field_name>
				<field_value>2015-03-01</field_value>
			</field>
			<field>
				<field_id>1829</field_id>
				<field_name>InvoiceNumber</field_name>
				<field_value>xtracta201503</field_value>
			</field>
			<field>
				<field_id>3073</field_id>
				<field_name>CurrencyCode</field_name>
				<field_value>NZD</field_value>
			</field>
			<field_set>
				<field_set_id>61</field_set_id>
				<field_set_name>LineItem</field_set_name>
				<row>
					<field>
						<field_id>1831</field_id>
						<field_name>Description</field_name>
						<field_value>Payroll</field_value>
					</field>
					<field>
						<field_id>1832</field_id>
						<field_name>Quantity</field_name>
						<field_value>1.00</field_value>
					</field>
					<field>
						<field_id>1833</field_id>
						<field_name>UnitAmount</field_name>
						<field_value>20.00</field_value>
					</field>
				</row>
				<row>
					<field>
						<field_id>1831</field_id>
						<field_name>Description</field_name>
						<field_value>Employees</field_value>
					</field>
					<field>
						<field_id>1832</field_id>
						<field_name>Quantity</field_name>
						<field_value>9.00</field_value>
					</field>
					<field>
						<field_id>1833</field_id>
						<field_name>UnitAmount</field_name>
						<field_value>2.00</field_value>
					</field>
				</row>
			</field_set>
		</field_data>
	</document>
</documents_response>

Example where workflow_id POSTed

Sample Request

POST https://api-app.xtracta.com/v1/documents HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=456&document_status=complete&api_download_status=active&detailed=1

It is vital that the detailed paramater is set to 1 to get this type of output.

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<documents_matching_query>73</documents_matching_query>
	<documents_number>
		<total>71</total>
		<pre-processing>0</pre-processing>
		<indexing>1</indexing>
		<qa>0</qa>
		<reject>0</reject>
		<output-in-progress>0</output-in-progress>
		<completed>70</completed>
	</documents_number>
	<documents_per_page>2</documents_per_page>
	<page>1</page>
	<document>
		<document_id>6389194</document_id>
		<document_status>indexing</document_status>
		<number_of_pages>1</number_of_pages>
		<api_download_status>active</api_download_status>
		<free_form />
		<document_url>https://web1-akl.xtracta.com/datasource/1/3a/62/knsdasdCD4I6.pdf</document_url>
		<image_url>https://web1-akl.xtracta.com/datasource/1/b0/45/SYjasdasdFo8i-1-0800.jpg</image_url>
		<field_data>
			<field>
				<field_id>1827</field_id>
				<field_name>Date</field_name>
				<field_value>2015-03-04</field_value>
			</field>
			<field>
				<field_id>1828</field_id>
				<field_name>DueDate</field_name>
				<field_value />
			</field>
			<field>
				<field_id>1829</field_id>
				<field_name>InvoiceNumber</field_name>
				<field_value>15045</field_value>
			</field>
		</field_data>
	</document>
	<document>
		<document_id>6375795</document_id>
		<document_status>output</document_status>
		<number_of_pages>1</number_of_pages>
		<api_download_status>active</api_download_status>
		<free_form />
		<document_url>https://web1-akl.xtracta.com/datasource/1/60/73/FAdfdsfLD3zU1.pdf</document_url>
		<image_url>https://web1-akl.xtracta.com/datasource/1/95/8b/zFsasdffsd37O-1-0800.jpg</image_url>
		<field_data>
			<field>
				<field_id>1827</field_id>
				<field_name>Date</field_name>
				<field_value>2014-07-30</field_value>
			</field>
			<field>
				<field_id>1828</field_id>
				<field_name>DueDate</field_name>
				<field_value>2014-09-20</field_value>
			</field>
			<field>
				<field_id>1829</field_id>
				<field_name>InvoiceNumber</field_name>
				<field_value>5035</field_value>
			</field>
		</field_data>
	</document>
</documents_response>

Update Document

https://api-app.xtracta.com/v1/documents/update

This endpoint allows you to update a single document with one or two parameters within the Xtracta App. These parameters are mainly designed to allow you to track which documents have been downloaded by your application to ensure processed documents are not picked up for re-downloading.

POST parameters:

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
document_id1 {integer} The ID of a specific document you want information for
api_download_status1
  • active
  • archived
Define what status the document is in. Usually once you have downloaded the document, you would use the update document method to set it to archived. Thus when running this query you would usually set this parameter to active.
freeform

{unicode}

Allows you to add any value to the field you want. This could be used for your own tracking purposes, for example if you have multiple applications which need to access the API you could design your own api_download_status system to deal with such a scenario.
document_status
  • indexing
  • qa
  • reject
  • output
Shift the document to a different status. This will override any validations set in the Xtracta App workflow for that document.
reason

{unicode}

Attach an arbitrary rejection reason to the document. Useful if you run pre-import validation which has requirements that the Xtracta App validation system does not support - you can move the document into rejection status and alert the user to what they need to fix.

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.

Example

Sample Request

POST https://api-app.xtracta.com/v1/documents/update HTTP/1.1
Host: myhost.com
api_key=123&document_id=456789&=api_download_status=archived

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
</documents_response>

Upload Document

https://api-app.xtracta.com/v1/documents/upload

This endpoint allows you to upload a single document to a workflow in the Xtracta App. Because a workflow is linked to a specific geographic processing node, the document should be uploaded to the node that the workflow is located on however as an integrator, you want to have a single API location with which you deal. As such, the API will issue a 307 redirect for your request by analysing the workflow_id and api_key. If your connecting system support 307 redirects, then it should be automatically redirected to the correct node and the document will be POSTed to it. If your connect system does not support 307 redirects, then the App will return you a temporary URL for the geographic node where the workflow is based. If you know this is going to be the case, you can omit the userfile completely to avoid double uploads of files (which could be sizeable).

POST parameters:

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
workflow_id1 {integer} The ID of the workflow you wish to upload the document to.
userfile1

{file}

Define the file you wish to upload. It must be an accepted file type. There is a maximum file size allowed of 50MB per POST. If no file is specified the return will be for a URL for direct POSTing to a regional node (as to avoid 307 redirect). 

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> If you didn't specify a file to upload or your connecting system does not support 307 redirects, this will be the URL on the Xtracta App node (for the chosen workflow) where you can POST the file
<expire> The time the URL will expire. This is expressed in UNIX time
<document_id> Once the document has been successfully uploaded, this is the Document Id that the Xtracta App will have assigned. This Id is used extensively throughout the App so can be useful if you want to track individual documents.

Example (Where 307 redirect is not used)

Sample Request

POST https://api-app.xtracta.com/v1/documents/upload HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=456&userfile={file}

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>203</status>
	<message>userfile is not specified</message>
	<url>https://web1-akl.xtracta.com/v0/documents/upload/UBqvQjgkIxReOHh2t94w.8BH23wqGQDIhO64XA_qrbmmvX3yrGKiEr0LWrGmYiS5MXFLsYBTv.XV8ax5Xg_NqgP41P2S0Lgv</url>
	<expire>1408672099</expire>
</documents_response>

Example (with 307 redirect OR when uploading to the provided URL)

Sample Request

POST https://api-app.xtracta.com/v1/documents/upload HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=456&userfile={file}

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>20</status>
	<message>Succeeded to upload</message>
	<document_id>4950506</document_id>
</documents_response>

Open Document UI

https://api-app.xtracta.com/v1/documents/ui

This endpoint allows you to open a document within the Xtracta App web UI. This allows the document to be fixed should it have an error or if data hasn't been captured, the user can help the App learn by clicking on the pertinent data for a field. 

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
document_id1 {integer} The ID of a specific document you want to open in the UI of the Xtracta App
expire {integer} The length of time the returned URL will be valid for before it expires and cannot be used (and thus must be regenerated). The time will is in seconds. It has a maximum value of 86,400 and a default value of 600.
callback_url

{url}

Open a specific URL when the documents has been processed through the provided URL.
after_api_download_status
  • active
  • archived
Choose which status you wish the document to have after it has been processed through the provided URL. If not set then the value it already had set will not change.

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> The URL which your user can open their browser with to view, fix (if needed) and process their document. Usually you would open a new browser window with this URL.
<expire> The time the URL will expire. This is expressed in UNIX time

Example

Sample Request

POST https://api-app.xtracta.com/v1/documents/ui HTTP/1.1
Host: myhost.com
api_key=123&document_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<url>https://api-app-ui.xtracta.com/main/an_entry/index/d/XXvVBmX.Jdk.rx2OKLOleBzLC__Q3VLbDYYWqvCUrOQ-</url>
	<expire>1426630034</expire>
</documents_response>

Get Database(s)

https://api-app.xtracta.com/v1/databases

This endpoint allows you to get information about what databases exist and the details of those. It provides many options to search on such as group_ids, database name and so on. While unlikely a connector would make use of this endpoint - it can be useful for finding databases in complex or large group structures or for a variety of more-unique applications of the API.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
group_id1, 2 {integer} A Group ID where you want information for all databases that are part of this group.
database_id1, 2 {integer} An Database ID which you want information for such as getting its name and parent group.
database_name1, 2 {unicode} Get all databases which match this name which the API key has access to. While it is impossible to have the same database name within the same group, it is possible to have the same database name in other groups. 

1field is mandatory

2one of these fields must be POSTed and the others left blank

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<database> This element contains all of the further sub-elements with information about the database. This element can repeat if the request returns multiple databases (e.g. where the group_id or database_name are used. 
<id>  The unique ID of the database. 
<name>  The name of the database. 
<group_id> The group ID which the database is a child of.

Example where group_id POSTed OR database_id not POSTed

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1
Host: myhost.com
api_key=123&group_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<database>
		<id>12345678</id>
		<name>Supplier-list</name>
		<group_id>987654321</group_id>
	</database>
	<database>
		<id>123456789</id>
		<name>Item-code-list</name>
		<group_id>987654321</group_id>
	</database>
</databases_response>

 

Example where database_id POSTed

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<database>
		<id>456789</id>
		<name>Suppliers</name>
		<group_id>3</group_id>
	</database>
</databases_response>

Example where database_name POSTed

Sample Request

POST https://api-app.xtracta.com/v0/databases HTTP/1.1
Host: myhost.com
api_key=123&database_name=Suppliers

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<database>
		<id>456789</id>
		<name>Suppliers</name>
		<group_id>3</group_id>
	</database>
</databases_response>

Add Database

https://api-app.xtracta.com/v1/databases/add

This endpoint allows you to add new databases.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_name1 {unicode} The name of the new database to be created. Remember it must be a unique name in the group you want to place it.
group_id {integer} The Group ID you want the database to be put into. If this isn't specified, the system will default to the Group ID that the API key is linked to.

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable
<database_id>  The unique ID of the database.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1
Host: myhost.com
api_key=123&database_name=new_database&group_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<database_id>12345678</database_id>
</databases_response>

Update Database

https://api-app.xtracta.com/v1/databases/update

This endpoint allows you to update a database's name. To modify the columns within the database, please use the column endpoints.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {integer} The ID of the database which you wish to update.
database_name1 {unicode} The new name for the database. Please note there are certain naming convention requirements.

1field is mandatory

Response Information

Element Description
<status>  A status code in response to the operation.
<message> Additional information about the operation - human readable.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/update HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789&database_name=XYZ

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
   <status>200</status>
   <message>The request has been successfully processed</message>
</databases_response>

Delete Database

https://api-app.xtracta.com/v1/databases/delete

This endpoint allows you to delete a database. *WARNING* deleting a database will delete all data and columns also - this action cannot be reversed!

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {integer} The ID of the database which you wish to delete.

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/delete HTTP/1.1
Host: myhost.com
api_key=123&database_id=12345

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>Succeeded to delete the database</message>
</databases_response>

Get Column(s)

https://api-app.xtracta.com/v1/databases/columns

This endpoint allows you get column information for your database(s).

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1, 2 {integer} The ID of a database you want to get the column information for.
column_id1, 2 {integer} The ID of the column you wish to get details for (such as what database it is in, or the name of the column etc.)
column_name1, 2, 3 {unicode} The name of the column you want information for. Note that if more than one column matches the name within the group structure that the utilised API key has access to, then all of those columns will be returned with information including what database they are part of and what group that database is within.
group_id4 {integer} Used in conjunction with the column_name parameter, you can limit the groups in which you will get results for when using the column_name parameter. This is a relatively rarely used parameter and generally only used for very unique requirements/situations.

1field is mandatory

2one of these fields must be POSTed, the others of the same number can be POSTed or left blank at the same time. Note that if any one of these parameters conflict no result will be returned.

4this field is reliant on field (3)

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<column> A containing tag for the sub-elements containing the actual information about each column. There can be multiple columns within each set of this tag.
<column>→<id> The ID of the column
<column>→<name> The name of the column
<column>→<database_id> The database ID the column belongs to

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/columns HTTP/1.1
Host: myhost.com
api_key=123&database_id=12345

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<column>
		<id>12345678</id>
		<name>Column-1</name>
		<database_id>12345</database_id>
		<group_id>12345</group_id>
	</column>
	<column>
		<id>12345679</id>
		<name>Column-2</name>
		<database_id>12345</database_id>
		<group_id>12345</group_id>
	</column>
</databases_response>

Add Column

https://api-app.xtracta.com/v1/databases/column_add

This endpoint allows you to add a new column to an existing database.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {integer} The ID of the database you wish to add the column to.
column_name1 {unicode} The name of the column you wish to add

1field is mandatory

Response Information

Element Description
<result> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<column_id>  The unique ID of the database. 

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/column_add HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789&column_name=Test_column

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<column_id>378</column_id>
</databases_response>

Update Column

https://api-app.xtracta.com/v0/databases/column_update

This endpoint allows you to add new databases.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
column_id1 {integer} The ID of the column you wish to update.
column_name1 {unicode} The new name for the column

1field is mandatory

Response Information

Element Description
<result> A boolean (true OR false) as to whether the operation succeeded.
<error_code> If the <result> was false, the associated error code.
<message> Additional information about the operation. If the <result> was false this will provide brief information about the <error_code> as well as additional supplemental information about the specific query.

Example

Sample Request

POST https://api-app.xtracta.com/v0/databases/column_update HTTP/1.1
Host: myhost.com
api_key=123&column_id=12345&column_name={new_name}

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<xml>
   <message>Succeeded to update the column</message>
</xml>

Delete Column

https://api-app.xtracta.com/v1/databases/column_delete

This endpoint allows you to delete a column from a database. *WARNING*, this is an unrecoverable action and all data within the column that is deleted will be lost.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
column_id1 {integer} The ID of the column you wish to delete. If you aren't sure on what the ID is of the column, use other endpoints like the "Get Columns" endpoint or the Web UI to find the ID of the column you wish to delete. 

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/column_delete HTTP/1.1
Host: myhost.com
api_key=123&column_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
</databases_response>

Get Data

https://api-app.xtracta.com/v1/databases/data

This endpoint allows you to get data from a database. This is useful should you want to get all data for that database or if you want to selectively query for rows of data based on specific conditions (perhaps to ascertain what data the database currently holds and to find whether it needs to be updated).

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {unicode} The ID of the database you want to get data for
limit {integer}

The number of rows that you want to have returned

Default: 100 rows if limit is no specified

offset {integer} If the response contains more rows than the limit which is set, you can choose at what row the result will show. For example if the result has 150 rows and you set the limit as 100 rows (which is also the default if limit is not specified), then your response will lack the last 50 rows. If you set the offset as 100, then you will get the last 50 rows.
conditions {associative array - unicode/integer}

The conditions allow you to set certain parameters which you want to filter the result on. E.g. you may wish to only return rows where certain column(s) contain certain value(s). This would be similar to a SQL environment where you may includes statements such as "WHERE columnA = 'certain value AND WHERE columnB = 'other certain value' etc.

You should POST the conditions as an associative array, for example:

conditions[columnA]=value1&conditions[columnB]=value2

Note, you can pass either the column name or column id within the conditions e.g. conditions[123] is the same as conditions[columnA] (presuming columnA had an ID of 123).

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<data> The unique ID of the database.
<data>→<row> A container for the row of data (including its row_id)
<data>→<row>→<column> The column (and column_id) of the field of data and the data from within the row.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/data HTTP/1.1
Host: myhost.com
api_key=123&database_id_id=456789&conditions[A]=test&conditions[B]=value

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<data>
		<row id="1">
			<column id="61">test</column>
			<column id="62">value</column>
			<column id="63">51234124</column>
		</row>
		<row id="2">
			<column id="61">test</column>
			<column id="62">value</column>
			<column id="63">512363</column>
		</row>
		<row id="3">
			<column id="61">test</column>
			<column id="62">value</column>
			<column id="63">512390789</column>
		</row>
	</data>
</databases_response>

Add Data

https://api-app.xtracta.com/v1/databases/data_add

This endpoint allows you to insert new rows into a given database. It also allows you to delete all existing data as you add new data - potentially making updates of the Xtracta App easier since you do not need to track what data has changed since last sync - you can just re-sync completely. Read below for more information on this aspect to this endpoint.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {integer} The ID of the database which you wish to add data to.
data1 {xml/unicode}

The actual data you wish to upload. This is one of the more complex interactions with the API since you need to submit the XML in a structure which matches the database structure which you are uploading to. You do this by structuring your XML with each row as a parent tag, you then have subtags matching the column_ids for your database with the actual value for that column inside the tag. For example below we want to add two rows of information for a database which has two columns with the first column having id = 1 and the second column having id = 2. Note you do not need to specify the value for each column for all rows if you want to leave that particular cell blank.

<?xml version="1.0" encoding="UTF-8"?>
<xml>
   <row>
      <column id="1">The data for column 1 for this row</column>
      <column id="2">The data for column 2 for this row</column>
   </row>
   <row>
      <column id="1">The data for column 1 for this row</column>
   </row>
</xml>
refresh
  • 1
  • {blank}

If you want to delete all data already in the database, pass the value of 1 with this POST field. Be very careful, this will delete all information! Using this feature is OK for small syncs of perhaps a few columns and few hundred rows but if you are syncing large volumes of data, please use the Update_data endpoint to update existing rows and only use this endpoint (add data) for adding new rows.

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<affected_records> The number of rows that were affected by the operation. Note this could include records that were added AND if you elected to refresh in your call, the existing rows which were deleted.
<data> A container for information about the specific rows that were added.
<data>→<row> The rows (and their Ids) which were added.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/data_add HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789&data={xml here}&refresh=1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<affected_records>4</affected_records>
	<data>
		<row id="50" />
		<row id="51" />
	</data>
</databases_response>

Update Data

https://api-app.xtracta.com/v1/databases/data_update

This endpoint allows you to update data within a database. Unlike the Add Data endpoint with refresh set to 1, using this endpoint allows selective updating leading to greater efficiencies of updating data - you can update individual rows rather than re-uploading your entire dataset each time there is a modification. This comes at the price of complexity in tracking changes so you can upload them - it is generally suggested that you use this endpoint rather than the Add Data endpoint with refresh set to 1 if your dataset is any size other than very small.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id1 {integer} The ID of the database which you wish to update the data of.
data1 {XML/unicode}

This allows you to specify the rows you wish to update and the value for the column(s) you wish to update in that row. Similar to the add data endpoint, this is one of the more complex interactions with the API since you need to submit the XML in a structure which matches the database structure which you are uploading to. You do this by structuring your XML with each row you wish to update as a parent tag. You then have subtags matching the column_ids for your database (which you wish to update) with the actual value for that column inside the tag. You only need to specify the columns you wish to update, if you only want to update selected columns within a row that is fine, any column you don't update will retain its existing data.

When selecting the rows to update you can provide two conditions for selecting the row:

  • row_id - the id of the row as in the Xtracta App. If you use this you would have needed to record the returned row_ids from the add_data endpoint when originally uploading it and store these against the row in your system
  • WHERE style condition - you can use any field's value as a key, it's quite common to store the key in your database as a column just so you can select its related row using this condition for an update. The format you need to use is:
    <row condition="{column_id}='{value}'">

For example we have a database with 10 rows and 3 columns. We have 2 rows which we wish to update all 3 columns for and 1 row which we wish to just update one column. One row will be updated using a WHERE style condition and the other by passing the row_id held by the Xtracta App.

<?xml version="1.0" encoding="UTF-8"?>
<xml>
   <row id="4">
      <column id="1">value1</column>
      <column id="2">value2</column>
      <column id="3">value3</column>
   </row>
   <row id="5">
      <column id="1">value4</column>
      <column id="2">value5</column>
      <column id="3">value6</column>
   </row>
   <row condition="3='sample_value'">
      <column id="2">value7</column>
   </row>
</xml>

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<affected_records> The number of records which were affected by the operation

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/data_update HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789&data={xml here}

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<affected_records>4</affected_records>
</databases_response>

Delete Data

https://api-app.xtracta.com/v1/databases/data_delete

This endpoint allows you to delete data from a database. This can either be an entire row, an entire column or a specific cell (combination of row and column as identifiers for the cell). If you want to delete a specific cell, ensure that you are passing all four POST parameters.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
database_id2 {integer} The ID of the database which you wish to update the data of.
row2 {integer}

The Row ID which you wish to delete (or if you include the column_id in your POST, the row where the cell will be deleted from)

column_id3 {integer}

The column which you wish to delete all data from in it's entirety (note this does not delete the actual column!). If you wish to delete a single cell, then this parameter can be passed alongside the database_id and row parameters.

1field is mandatory

2,3 You must supply either both (2) parameters or the (1) parameter as a minimum. You can post all three parameters together also.

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<affected_records> The number of individual records which were effected in the delete operation.

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/data_delete HTTP/1.1
Host: myhost.com
api_key=123&database_id=456789&row=9214&column_id=8123

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<affected_records>1</affected_records>
</databases_response>

Get Workflow(s)

https://api-app.xtracta.com/v1/workflow

This endpoint allows you to get information about what workflows exist and the details of those. It provides many options to search on such as group_ids, workflow name and so on. It can be useful for finding workflows in complex or large group structures, when provisioning information hasn't been captured or for a variety of more-unique applications of the API.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
group_id1, 2 {integer} A Group ID where you want information for all workflows that are part of this group.
workflow_id1, 2 {integer} A Workflow ID which you want information for such as getting its name and parent group.
workflow_name1, 2 {unicode} Get all workflows which match this name which the API key has access to. While it is impossible to have the same workflow name within the same group, it is possible to have the same workflow name in child groups. 

1field is mandatory

2one of these fields must be POSTed and the others left blank

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<workflow> This element contains all of the further sub-elements with information about the database. This element can repeat if the request returns multiple databases (e.g. where the group_id or database_name are used.
<workflow_id>  The unique ID of the workflow. 
<workflow_name>  The name of the workflow.
<workflow_email> The input email address that accepts documents for the workflow. 
<is_template> Whether the workflow is a template (i.e. can be used in a provisioning profile or to create other workflows from). 
<group_id> The group ID which the workflow is a child of.
<workflow_file_transfer_username>  The username to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_password> The password to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_server> The FQDN of the file transfer server (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_fields> This element contains all of the further sub-elements with information about the workflow fields. This element can repeat if the request returns multiple workflows.
<field> This element contains information about an individual field (or a field part of a field set).
<field_id> The ID of the field. 
<field_name> The name of the field. 
<field_set> This element contains information about a field set (a field set will typically contain other fields).
<field_set_id> The field set ID 
<field_set_name> The name of the field set. 
<is_repeating> Shows whether the field set repeats (is a Yes/No boolean). Most uses of a field set are for repeating data.
<row> This element contains the fields within the field set. 

Example where group_id, workflow_name POSTed (or left blank) OR where workflow_id not POSTed

Sample Request

POST https://api-app.xtracta.com/v1/workflow HTTP/1.1
Host: myhost.com
api_key=123&group_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<workflow_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<workflow>
		<workflow_id>1111</workflow_id>
		<workflow_name>Accounts Payable</workflow_name>
		<workflow_email>abc1234@akl.xtracta.com</workflow_email>
		<is_template>No</is_template>
		<group_id>1111</group_id>
		<workflow_file_transfer>
			<ftp_username>1111</ftp_username>
			<ftp_password>2222</ftp_password>
			<ftp_server>transfer-akl.xtracta.com</ftp_server>
		</workflow_file_transfer>
		<workflow_fields>
			<field>
				<field_id>41269</field_id>
				<field_name>Supplier</field_name>
			</field>
			<field>
				<field_id>1829</field_id>
				<field_name>Invoice Number</field_name>
			</field>
			<field>
				<field_id>1827</field_id>
				<field_name>Date</field_name>
			</field>
			<field>
				<field_id>1828</field_id>
				<field_name>Due Date</field_name>
			</field>			
			<field>
				<field_id>3073</field_id>
				<field_name>Currency Code</field_name>
			</field>
			<field>
				<field_id>41273</field_id>
				<field_name>GST Total</field_name>
			</field>
			<field>
				<field_id>41274</field_id>
				<field_name>Gross Total</field_name>
			</field>
			<field_set>
				<field_set_id>61</field_set_id>
				<field_set_name>LineItem</field_set_name>
				<is_repeating>Yes</is_repeating>
				<row>
					<field>
						<field_id>1831</field_id>
						<field_name>Description</field_name>
					</field>
					<field>
						<field_id>1833</field_id>
						<field_name>Line Total</field_name>
					</field>
				</row>
			</field_set>
		</workflow_fields>
	</workflow>
</workflow_response>

Add Workflow from Template

https://api-app.xtracta.com/v1/workflow/add_from_template

This endpoint allows you to create a new workflow based on a workflow template. If the workflow template is using any database templates, then these databases will be recreated in the group in which you are creating the new workflow in. If that group has databases with the same names, then these will be used instead.

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
group_id {integer} The group where you want to place the new workflow (if left blank will be put in the root group of the API key)
workflow_template_id1 {integer} The Workflow template you wish to create from.
workflow_name1 {unicode} The name of the new workflow to be created
input_account {ASCII} An optional field allowing the override of the default randomly generated email address (the prefix before the @ only)

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<workflow> This element contains all of the further sub-elements with information about the workflow that has just been created.
<workflow_id>  The unique ID of the workflow. 
<workflow_name>  The name of the workflow.
<workflow_email> The input email address that accepts documents for the workflow. 
<workflow_file_transfer_username>  The username to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_password> The password to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_server> The FQDN of the file transfer server (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).

Example

Sample Request

POST https://api-app.xtracta.com/v1/workflow/clone HTTP/1.1
Host: myhost.com
api_key=123&workflow_template_id=456789&workflow_name=Example_workflow&input_account=example1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<workflow_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<workflow>
		<workflow_id>1111</workflow_id>
		<workflow_name>Example_Workflow</workflow_name>
		<workflow_email>example1@akl.xtracta.com</workflow_email>
		<workflow_file_transfer>example1:XKnZkhs5kdex@akl.xtracta.com</workflow_file_transfer>
	</workflow>
	<database />
</workflow_response>

Clone Workflow

https://api-app.xtracta.com/v1/workflow/clone

This endpoint allows you to create a new workflow by cloning from an existing workflow. If the workflow you are cloning from uses any databases, and you are cloning it to a different group than the original was in, any required databases will be recreated in the target group (database structure only - no data will be copied).

POST Parameters

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
group_id {integer} The group where you want to place the new workflow (if left blank will be put in the root group of the API key)
workflow_id1 {integer} The Workflow ID you wish to clone from
workflow_name1 {unicode} The name of the new workflow to be created
input_account {ASCII} An optional field allowing the override of the default randomly generated email address (the prefix before the @ only)

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<workflow> This element contains all of the further sub-elements with information about the workflow that has just been created.
<workflow_id>  The unique ID of the workflow. 
<workflow_name>  The name of the workflow.
<workflow_email> The input email address that accepts documents for the workflow. 
<workflow_file_transfer_username>  The username to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_password> The password to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_server> The FQDN of the file transfer server (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).

Example

Sample Request

POST https://api-app.xtracta.com/v1/workflow/clone HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=456789&workflow_name=Example_workflow&input_account=example1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<workflow_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<workflow>
		<workflow_id>1111</workflow_id>
		<workflow_name>Example_Workflow</workflow_name>
		<workflow_email>example1@akl.xtracta.com</workflow_email>
		<workflow_file_transfer>example1:XKnZkhs5kdex@akl.xtracta.com</workflow_file_transfer>
	</workflow>
	<database />
</workflow_response>

Open Document Dashboard UI

https://api-app.xtracta.com/v1/documents/ui

This endpoint allows you to open directly a number of Xtracta App document related dashboards. This can be useful if you want to quickly enable features such as rejection handling without having to build out your own interface.

The advantage of using this API endpoint:

  • Users do not need to separately login - they can open UI's already logged in and browsed directly to where they need to be
  • The UI is cutdown from the full dashboard - only show users what they need to see
  • You can quickly build out your integration with the Xtracta App and your application - while maintaining an interface which feels just like its part of what the user is using (using the re-branding capabilities of the Xtracta App)

POST Parameters:

ParameterValueDescription
api_key1 {key}

An API key that has access to the resource you want to query for

workflow_id1 {integer}

The Id of the workflow you wish to open the dashboard for.

document_status
  • indexing
  • qa
  • reject

The status of the documents you wish to show. Usually this is set to reject

fields {integer}

Comma separated field names to show the value of against each returned document. Only lower letters, dashes(-) and underscores(_) are used, spaces need to be replaced by underscores. Fields within repeating field sets are not accepted.

expire {integer} The length of time the returned URL will be valid for before it expires and cannot be used (and thus must be regenerated). The time will is in seconds. It has a maximum value of 86,400 and a default value of 600.
documents_per_page {integer} The maximum number of documents to display per page. If this is exceeded then pagination will occur within the dashboard. The default is 10 with a maximum of 100.
page {integer} When pagination occurs, open the defined page number to start with.
documents_order
  • asc
  • desc
Whether the returned documents are sorted ascending or descending based on their document Ids (i.e. older first or newer first).

1field is mandatory

Response Information

ElementDescription
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> The unique URL to open the dashboard that is pre-logged in.
<expire> The time the URL will expire. This is expressed in UNIX time 

Example

Sample Request

POST https://api-app.xtracta.com/v1/documents/ui HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=512&document_status=reject&fields=supplier_name,invoice_number,gross_total

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<url>https://api-app.xtracta.com/v1/documents/index.html?t=jP9fL78S3BqBunXoYmtrZN4M_Ej71XJw7EMQ4l_B39mEZvAmkYR8ycaliLNSHRzVvhaptfJxEACkIddYpi8xKkoyVnyYqT0qbBScMvOqEjq0r6Q8cyCOa6B3OBYqDIzKZ0oEvLQ1BktBCecBtMYJzDXB3dPz3BjYeMei5PvaGe5uPVSvKu9yHmgCvH5FmAK_MhG5xy.Ur92EfpJRb3gbYaaG.y8aLUvmWYnDRmALqsIDlang_Ee8VPujcdZO5A5VCtNDae1jnMmDVjDLQ_QhbM2b.4a8Mw5v8gxTl2.8ZHb3S4DvqJcAbCMSzQoJLtgv</url>
	<expire>1425898940</expire>
</documents_response>

 

Open Document Upload UI

https://api-app.xtracta.com/v1/documents/upload

This endpoint allows you to get a pre-logged in URL for a file upload browser user interface. By using this endpoint, you can quickly provide users with a one-click opened interface to upload large numbers of documents. Like other "Open" API endpoints, when calling this endpoint you will be returned a URL which is time limited which you should open a new browser window with. This browser window will then be linked to the requested workflow and requires no user authentication - it's just click and go for users.

POST Parameters:

Parameter Value Description
api_key1 {key} An API key that has access to the resource you want to query for
workflow_id1 {integer} The ID of a workflow you want to open the interface for

1field is mandatory

Response Information

Element Description
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> The URL to be used to open the browser window with the document upload user interface.
<expire> The time the URL will expire. This is expressed in UNIX time

Example

Sample Request

POST https://api-app.xtracta.com/v1/documents/upload HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<url>https://api-app.xtracta.com/v1/documents/upload.html?t=t_1ZZmdTO1kSOTHATb7ZJwLkmq1lhxtiO02PxgljWN.Qc0zVmjshvz8pKUSFLt.7YhreZz47MVQFAWgHNb6WLa2GKiXem4O9SW.X97TjW2hXiJ3KZKog5bxEV4YXFT.i7C_lNJyYerk-</url>
	<expire>1425900862</expire>
</documents_response>

Open Tracking Dashboard

https://api-app.xtracta.com/v1/tracking/ui

This endpoint allows you to open the file tracking dashboard. This can be useful if you want to quickly enable file-tracking within your application without having to build out your own interace. This is typically used for error display & acknowledgement.

The advantage of using this API endpoint:

  • Users do not need to separately login - they can open UI's already logged in and browsed directly to where they need to be
  • The UI is cutdown from the full dashboard - only show users what they need to see
  • You can quickly build out your integration with the Xtracta App and your application - while maintaining an interface which feels just like its part of what the user is using (using the re-branding capabilities of the Xtracta App)

POST Parameters:

ParameterValueDescription
api_key1 {key}

An API key that has access to the resource you want to query for

workflow_id1 {integer}

The Id of the workflow you wish to open the tracking dashboard for.

status
  • ok
  • error

The status of the documents you wish to show. Usually this is set to error

type
  • email
  • ftp
  • web
  • api

You can choose whether to filter results based on a specific way in which items entered the system (using different input methods).

expire {integer} The length of time the returned URL will be valid for before it expires and cannot be used (and thus must be regenerated). The time will is in seconds. It has a maximum value of 86,400 and a default value of 600.
items_per_page {integer} The maximum number of items to display per page. If this is exceeded then pagination will occur within the dashboard. The default is 10 with a maximum of 100.
page {integer} When pagination occurs, open the defined page number to start with.
order
  • asc
  • desc
Whether the returned items are sorted ascending or descending based on their received dates (i.e. older first or newer first).
timezone {php timezone} Set the timezone you want the returned datetimes to be in. All standard PHP timezones are supported. If nothing is supplied this will default to UTC.

1field is mandatory

Response Information

ElementDescription
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> The unique URL to open the dashboard that is pre-logged in.
<expire> The time the URL will expire. This is expressed in UNIX time 

Example

Sample Request

POST https://api-app.xtracta.com/v1/tracking/ui HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=512&status=error

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<url>https://api-app.xtracta.com/v1/documents/index.html?t=jP9fL78S3BqBunXoYmtrZN4M_Ej71XJw7EMQ4l_B39mEZvAmkYR8ycaliLNSHRzVvhaptfJxEACkIddYpi8xKkoyVnyYqT0qbBScMvOqEjq0r6Q8cyCOa6B3OBYqDIzKZ0oEvLQ1BktBCecBtMYJzDXB3dPz3BjYeMei5PvaGe5uPVSvKu9yHmgCvH5FmAK_MhG5xy.Ur92EfpJRb3gbYaaG.y8aLUvmWYnDRmALqsIDlang_Ee8VPujcdZO5A5VCtNDae1jnMmDVjDLQ_QhbM2b.4a8Mw5v8gxTl2.8ZHb3S4DvqJcAbCMSzQoJLtgv</url>
	<expire>1425898940</expire>
</documents_response>

Open Billing Plan Dashboard

https://api-app.xtracta.com/v1/billings/billing_ui

This endpoint opens the billing upgrade/downgrade/renewal dashboard. This dashboard allows a user to move to a different plan, order a booster pack (if enabled for them) or renew their existing plan before it is set to automatically renew (expedited renewal).

POST Parameters:

ParameterValueDescription
api_key1 {key}

An API key that has access to the resource you want to query for.

group_id {integer}

The Id of the workflow you wish to open the tracking dashboard for. If this is not passed, then the parent group of the API key will be used (in many cases this is the same as the group_id anyway).

expire {integer} The length of time the returned URL will be valid for before it expires and cannot be used (and thus must be regenerated). The time will is in seconds. It has a maximum value of 86,400 and a default value of 600.

1field is mandatory

Response Information

ElementDescription
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<url> The unique URL to open the dashboard that is pre-logged in.
<expire> The time the URL will expire. This is expressed in UNIX time 

Example

Sample Request

POST https://api-app.xtracta.com/v1/billings/billing_ui HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=512&status=error

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<url>https://api-app.xtracta.com/v1/billings/index.html?t=jP9fL78S3BqBunXoYmtrZN4M_Ej71XJw7EMQ4l_B39mEZvAmkYR8ycaliLNSHRzVvhaptfJxEACkIddYpi8xKkoyVnyYqT0qbBScMvOqEjq0r6Q8cyCOa6B3OBYqDIzKZ0oEvLQ1BktBCecBtMYJzDXB3dPz3BjYeMei5PvaGe5uPVSvKu9yHmgCvH5FmAK_MhG5xy.Ur92EfpJRb3gbYaaG.y8aLUvmWYnDRmALqsIDlang_Ee8VPujcdZO5A5VCtNDae1jnMmDVjDLQ_QhbM2b.4a8Mw5v8gxTl2.8ZHb3S4DvqJcAbCMSzQoJLtgv</url>
	<expire>1425898940</expire>
</documents_response>

Provision

https://api-app.xtracta.com/v1/provisioning/provision

The provision endpoint allows you to create a new set of objects (typically everything needed for a new client account). This is based on the provisioning profile you call, the profile may include performing actions such as:

  • Creating a new group
  • Assign a billing plan to the new group
  • Creating a workflow
  • Creating database(s)
  • Generating API key
  • Dynamically building links between workflows & databases

Unlike all other API calls, this endpoint does NOT need an "API key", rather it can also use a "provisioning key". The key reason for doing this is because if you will be using this endpoint from distributed software outside of your direct control and someone were to compromise your API key - it is possible that all of your clients' data will be accessible. Thus unless you are in complete control of the application which will call this endpoint, ONLY use the provisioning_key.

POST Parameters:

Parameter Value Description
api_key1, 2 {key}

An API key that has access to the resource you want to query for

provisioning_key1, 2 {key}

A provisioning key that has access to the profile_id you are calling

profile_id1 {integer}

The ID of a profile you want to provision

identifier1 {unicode}

The unique identification of user who requested the provision. Usually the customer name.

group_name {unicode}

Identifier for the group that will be created within the parent in the Xtracta App. Usually this will be the customer name but could follow your own naming convention.

group_id {integer}

The group in which the account will be provisioned. This will default to the top level for the API key or provisioning key if not passed. This is generally not required for most instances as the API/provisioning key  are at the direct level you wish to provision under.

billing_plan {integer}

Assign a specific billing plan to the newly provisioned group. If not provided the default for the provisioning profile or for the parent group will be used.

1field is mandatory

2one of these fields must be POSTed and the other left blank

Response Information

Element Description
<result> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<group> Information about the newly created group
<group_id> The Group Id given to the newly created group
<group_name> The name of the new group. If you set the name then it will be this (unless you used invalid characters), if you didn't the group name will be automatically generated. 
<billing_plan> Information about the billing plan assigned to the new group
<billing_plan_id>  
<billing_plan_name>  
<billing_plan_details>  
<workflow> A newly created workflow 
<workflow_id> The Id of the newly provisioned workflow
<workflow_name> The name of the newly created workflow 
<workflow_email> The unique input email address for the newly created workflow 
<workflow_file_transfer> The file transfer (S)FTP details for the newly created account 
<database> A holding element containing the information for details about an individual database that has been added.
<database_id> The Database Id of the newly added database 
<database_name> The name of the newly added database 
<column> A holding element for information about each column that has been created within the database.
<column_id> The Column Id of the newly created column
<column_name> The name of the newly created column
<api_key> The new API key, this will be linked to the newly created group.

Example

Sample Request

POST https://api-app.xtracta.com/v1/provisioning/provision HTTP/1.1
Host: myhost.com
provisioning_key=123&profile_id=456789&identifier=Acme%20Industries&group_name=Acme%Industries

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<provisioning_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<group>
		<group_id>124</group_id>
		<group_name>Acme Industries<group_name>
	</group>
	<billing_plan>
		<billing_plan_id>123<billing_plan_id>
		<billing_plan_name>Free<billing_plan_name>
		<billing_plan_details>25 documents free per month.<billing_plan_details>
	</billing_plan>
	<workflow>
		<workflow_id>123<workflow_id>
		<workflow_name>Accounts Payable<workflow_name>
		<workflow_email>tmlo152@sample.xtracta.com<workflow_email>
		<workflow_file_transfer>tmlo152:%2A%28S%40%28%5EDS%26%2A@transfer-sample.xtracta.com<workflow_file_transfer>
	</workflow>
	<database>
		<database_id>1235</database_id>
		<database_name>Suppliers</database_name>
		<column>
			<column_id>51251</column_id>
			<column_name>Supplier Code</column_name>
		</column>
		<column>
			<column_id>62323</column_id>
			<column_name>Supplier Name</column_name>
		</column>
		<column>
			<column_id>635234</column_id>
			<column_name>Address</column_name>
		</column>
	</database>
	<database>
		<database_id>1234</database_id>
		<database_name>Open Purchase Orders</database_name>
		<column>
			<column_id>7634221</column_id>
			<column_name>PO Number</column_name>
		</column>
		<column>
			<column_id>2376812</column_id>
			<column_name>PO Amount</column_name>
		</column>
		<column>
			<column_id>2376812</column_id>
			<column_name>Supplier Code</column_name>
		</column>
	</database>
	<api_key>8901248791478912</api_key>
</provisioning_response>

Order Pack

https://api-app.xtracta.com/v1/billings/booster

If you are using "packs" as part of your billing arrangements with Xtracta, you can use this endpoint to order usage packs. 

POST Parameters:

Parameter Value Description
api_key1 {key}

An API key that has access to the resource you want to query for

pack_id1 {integer}

The group where the provisioning categories you wish to get reside. If not submitted then the group of the API key will be used.

quantity {integer}

The workflow templates which you wish to add to this provisioning profile

purge2
  • delete
  • process

The database templates which you wish to add to this profile

group_id {integer} If this parameter is specified, the profile will be included in this Group Id and a new profile category will be created to contain it within that group.

1field is mandatory

2if the workflow has "stacked documents' i.e. the usage of the workflow ran down to (and thus no further documents could be processed) and further documents arrived they will be stacked, then choose whether to process those documents or delete them. If you choose to process them and there are many, a large amount of your pack may be used or if there are more documents stacked than your pack size, the entire pack will be instantly used. If you choose to delete you could lose documents so be careful.

Response Information

ElementDescription
<status> A boolean (true OR false) as to whether the operation succeeded.
<message> Additional information about the operation. If the <result> was false this will provide brief information about the <error_code> as well as additional supplemental information about the specific query.
<pack> Contains information about the newly ordered pack
<pack>→<id> The Id of the newly ordered pack
<pack>→<plan_name> The name of the newly ordered pack
<pack>→<allowed_documents> The number of documents allowed within the newly ordered pack
<pack>→<price> The price of the new pack (end user price) 
<pack>→<quantity> The quantity of the pack(s) ordered 
<pack>→<group_id> The group Id the pack has been assigned to 
<pack_summary> A container for inform 
<pack_summary>→<total_used_documents>  
<pack_summary>→<total_available_documents>  

Example

Sample Request

POST https://api-app.xtracta.com/v1/billings/booster HTTP/1.1
Host: myhost.com
api_key=123&pack_id=1223&purge=process

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<billings_response>
	<status>200</status>
	<message>Booster Pack order successful</message>
	<pack>
		<id>1</id>
		<plan_name>Booster 100</plan_name>
		<allowed_documents>100</allowed_documents>
		<price>99</price>
		<quantity>2</quantity>
		<group_id>494</group_id>
	</pack>
	<pack_summary>
		<total_used_documents>0</total_used_documents>
		<total_available_documents>200</total_available_documents>
	</pack_summary>
</billings_response>

Renew/Upgrade/Downgrade Plan

This endpoint adds a provisioning profile to a provisioning category. The profile may contain workflow templates, database templates and have a billing plan automatically associated with any new group created from it.

Please note that you cannot exclude a database template if it has been configured within any of your assigned workflows.

POST Parameters:

Parameter Value Description
api_key1 {key}

An API key that has access to the resource you want to query for

profile_name1 {integer}

The group where the provisioning categories you wish to get reside. If not submitted then the group of the API key will be used.

workflow_template_ids {comma separated integer(s)}

The workflow templates which you wish to add to this provisioning profile

database_template_ids {comma separated integer(s)}

The database templates which you wish to add to this profile

billing_plan_id {integer} The billing plan which you want to associate with newly created groups when they are provisioned.
group_id2 {integer} If this parameter is specified, the profile will be included in this Group Id and a new profile category will be created to contain it within that group.
provisioning_category_id2 {integer} The provisioning category Id you wish to add the profile to.

1field is mandatory

1only one of these fields may be POSTed at the same time. If the provisioning_category_id is in the specified group_id no error will occur but it is superfluous to provide both in such a case. If neither are provided, a new profile category with the provisioning profile inside it will be created at the root group of the API key

Response Information

ElementDescription
<status> A boolean (true OR false) as to whether the operation succeeded.
<message> Additional information about the operation. If the <result> was false this will provide brief information about the <error_code> as well as additional supplemental information about the specific query.
<profile_id> Information about the newly created group

Example

Sample Request

POST https://api-app.xtracta.com/v1/provisioning/profile_add HTTP/1.1
Host: myhost.com
api_key=123&profile_name&test-profile&workflow_template_ids=1,4,63&database_template_ids=89,12&billing_plan_id=63&provisioning_category_id=23

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<provisioning_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<profile_id>19</profile_id>
</provisioning_response>

Get Plans & Packs

https://api-app.xtracta.com/v1/plans-packs

This endpoint will return a list of billing plans and packs that are available for the selected group. Details of each plan and pack will be returned also.

POST Parameters:

ParameterValueDescription
api_key1 {key}

An API key that has access to the resource you want to query for

group_id {integer}

The group you wish to get the usage details for. If not submitted then the group of the API key will be used.

plan_id {integer}

Get information about a specific plan id

pack_id {integer}

Get information about a specific pack id

is_parent {integer}  

1field is mandatory

Response Information

ElementDescription
<status> A boolean (true OR false) as to whether the operation succeeded.
<message> Additional information about the operation. If the <result> was false this will provide brief information about the <error_code> as well as additional supplemental information about the specific query.
<plan> Information about the newly created group
<id>  
<plan_name>  
<plan_type>  
<allowed_documents>  
<group_id>  
<price>  
<wholesale_price>  
<pack>  
<id>  
<pack_name>  
<allowed_documents>  
<group_id>  
<price>  
<wholesale_price>  

Example

Sample Request

POST https://api-app.xtracta.com/v1/plans-packs HTTP/1.1
Host: myhost.com
api_key=123

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<billings_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<plan>
		<id>1</id>
		<plan_name>Plan A</plan_name>
		<plan_type>Monthly</plan_type>
		<allowed_documents>250</allowed_documents>
		<group_id>481</group_id>
		<price>155</price>
		<wholesale_price>15</wholesale_price>
	</plan>
	<plan>
		<id>2</id>
		<plan_name>Plan B</plan_name>
		<plan_type>Monthly</plan_type>
		<allowed_documents>500</allowed_documents>
		<group_id>481</group_id>
		<price>195</price>
		<wholesale_price>30</wholesale_price>
	</plan>
	<plan>
		<id>3</id>
		<plan_name>Plan C</plan_name>
		<plan_type>Monthly</plan_type>
		<allowed_documents>1000</allowed_documents>
		<group_id>481</group_id>
		<price>250</price>
		<wholesale_price>50</wholesale_price>
	</plan>
	<plan>
		<id>4</id>
		<plan_name>Plan D</plan_name>
		<plan_type>Monthly</plan_type>
		<allowed_documents>5000</allowed_documents>
		<group_id>481</group_id>
		<price>450</price>
		<wholesale_price>100</wholesale_price>
	</plan>
	<pack>
		<id>1</id>
		<pack_name>Booster 100</pack_name>
		<allowed_documents>100</allowed_documents>
		<group_id>481</group_id>
		<price>195</price>
		<wholesale_price>30</wholesale_price>
	</pack>
</billings_response>

Get Usage

POST https://api-app.xtracta.com/v1/billing/usage

This endpoint provides information about the plan and pack usage details for a particular group. It will give you information about the number of available resources (such as documents, pages, etc. - depending on what your plan(s)/packs(s) are configured with) for the group.

POST Parameters:

Parameter Value Description
api_key1 {key}

An API key that has access to the resource you want to query for

group_id {integer}

The group you wish to get the usage details for. If not submitted then the group of the API key will be used.

1field is mandatory

Response Information

ElementDescription
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<plan> Information about the newly created group
<id>  
<plan_name>  
<price>  
<price_currency>  
<allowed documents>  
<used documents>  
<available_documents>  
<start_date>  
<expiry_date>  
<group_id>  

Example

Sample Request

POST https://api-app.xtracta.com/v1/provisioning/profile_add HTTP/1.1
Host: myhost.com
api_key=123&profile_name&test-profile&workflow_template_ids=1,4,63&database_template_ids=89,12&billing_plan_id=63&provisioning_category_id=23

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<billings_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<plan>
		<id>1</id>
		<plan_name>Plan A</plan_name>
		<price>15</price>
		<price_currency>NZD</price_currency>
		<allowed_documents>250</allowed_documents>
		<used_documents>0</used_documents>
		<available_documents>250</available_documents>
		<start_date>2015-02-27 12:10:04 (GMT)</start_date>
		<expiry_date>2015-03-27 12:10:03 (GMT)</expiry_date>
		<group_id>481</group_id>
	</plan>
</billings_response>

Tracking

https://api-app.xtracta.com/v1/tracking

This endpoint provides information about the plan and pack usgae details for a particular group. It will give you information about the number of available resources (such as documents, pages, etc. - depending on what your plan(s)/packs(s) are configured with) for the group.

POST Parameters:

Parameter Value Description
api_key1 {key}

An API key that has access to the resource you want to query for

workflow_id {integer}

The group you wish to get the usage details for. If not submitted then the group of the API key will be used.

status
  • ok
  • error
The status of the items you wish to show. Usually this is set to error
type
  • email
  • ftp
  • web
  • api
You can choose whether to filter results based on a specific way in which items entered the system (using different input methods).
page {integer} If the number of items in the request exceeds the defined item_per_page (or exceeds the maximum allowed) then define what page of results you want.
items_per_page {integer} | 10-100 The maximum number of items to return. If this is exceeded then pagination will occur. The default is 20 with a minimum of 10 and maximum of 100.
order
  • asc
  • desc
Whether the returned items are sorted ascending or descending based on their document Ids (i.e. older first or newer first).
timezone {php timezone} Set the timezone you want the returned datetimes to be in. All standard PHP timezones are supported. If nothing is supplied this will default to UTC.
detailed
  • 1
  • {null}
If this is set as 1, full information about each input (item) is returned including information such as email subject, body, header, activity history etc. Usually this information is not relevant and because it contains the body element from email - could be quite large from a size perspective. It is however useful if you want to get full information.

1field is mandatory

Response Information

ElementDescription
<status> A status code in response to the operation.
<message> Additional information about the operation - human readable.
<page> Information about the newly created group
<items_per_page> The number of items_per_page that had been set in the query
<items_matching_query> The number of items which matched the criteria you defined. If this exceeds the items_per_page you would then use pagination to get other details (or increase the items_per_page)
<input> A containing element for an input into the workflow. An input could be a single file (e.g. web uploader) or multiple files (e.g. a single email with multiple attachments). 
<input>→<type> The type of input (e.g. email, web uploader etc.)
<input>→<received> The time at ewhich the input was received by the Xtracta App (will include the timzone UTC offset)
<input>→<status> Important | this is whether this input had no problems i.e. the file(s) could be made into documents within the Xtracta App. For everything other than email there is a one-to-one relationship between an input Id and a document however with email, there could be multiple files that were attached. If a single file had a problem and couldn't be made into a document - the whole input will be marked as error.
<input>→<file> A containing element for the file(s) that were part of that input 
<input>→<file>→<status> The status of the individual file that was part of the input. As previously mentioned if it were a one-to-one method like web uploader this would just reflect the status of the input as a whole however with email you may have multiple files per input so you could find exactly which one had a problem.
<input>→<file>→<filename> The filename of the original incoming file as part of that input
<input>→<file>→<file_url> A URL to open the original file (if it was valid)
<input>→<file>→<document_id> If the file could be converted into a document (and thus wouldn't have an error status), the document_id that it became.
<input>→<file>→<activity> A containing element which shows a single step in the history of what has occurred with the file. For example if it did become a document, the stages of processing and timing for each.
<input>→<file>→<activity>→<description> Information about what happened as part of the activity
<input>→<file>→<activity>→<username> If a user interacted with the document at that activity stage (this doesn't support a user who opened the document through the API), who that user was. Most likely to be part of dashboard processing implementations.
<input>→<file>→<activity>→<time> The timestamp of that activity including UTC offset based on your chosen timezone. 
<input>→<from> Email Input Only | The name and email address of the email sender the input was generated from
<input>→<subject> Email Input Only | The subject of the email the input was generated from
<input>→<body> Email Input Only | The body of the email the input was generated from

Example with detailed = {null}

Sample Request

POST https://api-app.xtracta.com/v1/tracking HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=123&timezone=Pacific\Auckland

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<tracking_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<page>1</page>
	<items_per_page>20</items_per_page>
	<items_matching_query>2</items_matching_query>
	<input>
		<id>2309274</id>
		<type>email</type>
		<received>2015-03-17T00:00:05+13:00</received>
		<status>OK</status>
		<file>
			<status>Done</status>
			<filename>wp_201sdsd6_23_59_28_pro.jpg</filename>
			<file_url>https://web1-akl.xtracta.com/datasource/1/8a/33/guasdasdUy.jpg</file_url>
			<document_id>6439060</document_id>
		</file>
	</input>
	<input>
		<id>2306056</id>
		<type>email</type>
		<received>2015-03-16T01:59:25+13:00</received>
		<status>OK</status>
		<file>
			<status>Done</status>
			<filename>INV-973003_16032015.pdf</filename>
			<file_url>https://web1-akl.xtracta.com/datasource/1/61/05/lasdmfs1Z.pdf</file_url>
			<document_id>6429771</document_id>
		</file>
	</input>
</tracking_response>

Example with detailed = 1

Sample Request

POST https://api-app.xtracta.com/v1/tracking HTTP/1.1
Host: myhost.com
api_key=123&workflow_id=123&timezone=Pacific\Auckland&detailed=1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<tracking_response>
	<status>200</status>
	<message>The request has been successfully processed</message>
	<page>1</page>
	<items_per_page>20</items_per_page>
	<items_matching_query>2</items_matching_query>
	<input>
		<id>2309274</id>
		<type>email</type>
		<received>2015-03-17T00:00:05+13:00</received>
		<status>OK</status>
		<file>
			<status>Done</status>
			<filename>wp_2012526_23_59_28_pro.jpg</filename>
			<file_url>https://web1-akl.xtracta.com/datasource/1/8a/33/gu4124dXUy.jpg</file_url>
			<document_id>6439060</document_id>
			<activity>
				<description>Assigned Doc ID</description>
				<username>System</username>
				<time>2015-03-17T00:01:40+13:00</time>
			</activity>
			<activity>
				<description>DataEntry Ready</description>
				<username>System</username>
				<time>2015-03-17T00:07:30+13:00</time>
			</activity>
		</file>
		<from>test@xtracta.com</from>
		<subject />
		<body>Sent from my Windows Phone=</body>
	</input>
	<input>
		<id>2306056</id>
		<type>email</type>
		<received>2015-03-16T01:59:25+13:00</received>
		<status>OK</status>
		<file>
			<status>Done</status>
			<filename>NV-973003_16032015.pdf</filename>
			<file_url>https://web1-akl.xtracta.com/datasource/1/61/05/ldnasdsd1Z.pdf</file_url>
			<document_id>6429771</document_id>
			<activity>
				<description>Assigned Doc ID</description>
				<username>System</username>
				<time>2015-03-16T01:59:36+13:00</time>
			</activity>
			<activity>
				<description>DataEntry Ready</description>
				<username>System</username>
				<time>2015-03-16T02:00:19+13:00</time>
			</activity>
			<activity>
				<description>Indexing Start</description>
				<username>John Doe</username>
				<time>2015-03-16T16:56:06+13:00</time>
			</activity>
			<activity>
				<description>DataEntry Ready</description>
				<username>John Doe</username>
				<time>2015-03-16T16:56:40+13:00</time>
			</activity>
		</file>
		<from>test@xtracta.com</from>
		<subject>fw: Invoice INV-973003</subject>
		<body>Your invoice is attached,</body>
	</input>
</tracking_response>