API Reference

Data Types / Handling

URL Parameters

When working with our API, it's important to understand how to handle data, especially when passing it as part of the URL. Certain parameters like uprns, alternate references, or any other string containing special characters (e.g., #, ?, %, /, , or spaces) require URL encoding to ensure they are transmitted and interpreted correctly.

For our API, data entered in URLs must be encoded twice. This is crucial to ensure that special characters are properly recongised and do not interfere with the API's URL parsing logic. This is because we automatically unparse characters before handling routing but for certain parameters we don't want to effect the routing result by having an extra slash recognised for example.

Encoding parameters

let propertyReference = "ALB/01";

const encodedPropertyReference = encodeURIComponent(encodeURIComponent(propertyReference));
console.log(encodedPropertyReference);
// Output: ALB%252F01
using System;
using System.Net;

public class Program
{
    public static void Main()
    {
        string propertyReference = "ALB/01";

        string encodedPropertyReference = WebUtility.UrlEncode(WebUtility.UrlEncode(propertyReference));
        Console.WriteLine(encodedTwice);
        // Output: ALB%252F01
    }
}

Date Formats

All date time inputs should be provided in ISO8601 format. When inputting a date in the date time field in the documentation it will indicate if your format is valid. Although the API will accept other formats we can't guarantee timezones will be interpreted the same as you're expecting and any data fixes related to this would be considered user error.

  • 2024-10-04T00:00:00
  • 2024-10-04T00:00:00+01:00