Login / Register 0207 684 6242

Transactional API

< API documentation

The transactional API will enable visa applications to be created and tracked by authenticated third party applications.

The API plugin is instantiated using the following URL:

http://www.djbvisas.com/api/tx/

Response formats

By default the API returns XML but if required JSON, YAML and serialised PHP arrays could be supported. Please enquire with our team for other formats.

Authentication and security

The API is private. You must authenticate by passing an auth-token querystring value in the call to the API (either GET querystring or POST values).

An example token might look like this. It needs to be passed with every request.

/api/tx/?auth-token=8ca221bb

To list entries of the applications section:

/api/tx/:applications

To list entries of the travellers section:

/api/tx/:travellers

To read a specific application:

/api/tx/:applications/:entry_id

To read a specific traveler:

/api/tx/:traveler/:entry_id

The default XML response looks like:

<response>
    <pagination total-entries="3" total-pages="1" entries-per-page="10" current-page="1"/>
    <section id="1" handle="applications">Applications</section>
    <entry id="1">
        ...
    </entry>
    <entry id="2">
        ...
    </entry>
    <entry id="3">
        ...
    </entry>
</response>

Querystring parameters can be added for finer control of the data returned:

  • fields a comma-delimited list of field handles (XML element names) to include for each entry
  • limit the number of entries to return per page
  • page the page number, if pagination is being used
  • sort the field handle (XML element name) to sort by
  • order the sort direction (asc, desc, rand)
  • groupby the field handle (XML element name) to group by

For example to get a list of the latest 5 applications:

/api/tx/applications/?fields=title,body,date&limit=5&sort=date&order=desc

Pagination can be returned by adding system:pagination to the value of the fields list e.g.

/api/tx/applications/?fields=title,body,system:pagination

Additionally you can filter entries using data source filtering syntax. Use a filter array in the querystring:

/api/tx/applications/?filter[title]=regexp:Nick&filter[date]=later+than+today

To create an entry you can send an HTTP POST to the section URL. The format of the POST should follow exactly the field names returned in the reading API method, i.e. fields[title]. For example:

<form method="post" action="/api/tx">
    <input name="fields[title]" />
    <textarea name="fields[content]"></textarea>
    <input type="submit" />
</form>

The XML result looks like:

<response id="..." result="success" type="created">
    <message>Entry created successfully.</message>
    <post-values>
        <title>...</title>
        <content>...</title>
    </post-values>
</response>

Multiple entries can be created by sending arrays of fields e.g. fields[0][title], fields[1][title].

To update an existing entry, you have two options. Either include an id in the POST array and post it to the section handle (as above), or omit the id and post to the entry URL directly. For example:

/api/tx/31

The XML response looks like:

<response id="31" result="success" type="edited">
    <message>Entry edited successfully.</message>
    <post-values>
        ...
    </post-values>
</response>

To delete an entry send an HTTP DELETE request to the entry's URL (the same URL as if reading the entry's data), such as:

curl -X DELETE /api/tx/123

The XML response looks like:

<response id="123" result="success" type="deleted">
    <message>Entry deleted successfully.</message>
</response>

Track an application

Passport number *
Date of birth *

Quick visa search