Overview

The SPACE project provides access to a RESTful API. This will allow partners to integrate their systems with SPACE and allow them to create, update and delete frames. The API will return all output in JSON format and where input is required the HTTP request body should contain JSON.

All references to API methods assume you're using the base of https://oohspace.co.uk/api/

Definitions, Acronyms and Abbreviations

Term Description
SPACE The outdoor industry code allocation system
OISC Outdoor Industry Standards Committee
IMS Inventory Mapping System
REST Representational State Transfer
API Application Programming Interface
JSON JavaScript Object Notation
XML Extensible Markup Language
UI User Interface

Security

Access to the production API must be done via HTTPS and you will be required to supply a username (company_id) and password via HTTP Basic Authentication.

Please note that IP restriction is in place for all methods and requests not coming from an authorised IP address for the company will be rejected.

Headers

The API honours the Accept header returning data in the requested format. At the moment only JSON is supported so ensure that all requests have a Accept header set to application/json.

The Content-Type header is required for POST/PUT requests and, when sending a JSON body, must be set to application/json for all requests.

Errors

Should the system detect a problem with your API request, such as invalid or missing data, the response code will be set to HTTP 422 and JSON returned explaining the errors. Within the errors object you'll find a message providing a general summary of issues. A list of all issues will be returned as well.

OUTPUT - JSON Error sample

{
    "errors": {
        "errors": [
            {
                "resource": "Format",
                "field": "SurfaceArea",
                "code": "missing_field"
            }
        ],
        "message": "Validation failed"
    }
}
                    

All returned elements are strings.

resource describes the resource that the error refers to. In this case there's an issue with the Dimensions resource from the create/update frame method.

field describes the field that the error pertains to. In this case it's the SurfaceArea element with the Dimensions resource.

code provides a description of the error. In this case the SurfaceArea is missing within the Dimensions resource