Web API Docs Single contribution

Navigate

Request

GET /api/projects/:project_id/contributions/:contribution_id/

Request parameters

Parameter Type Description
project_id Integer Unique identifier for the project.
contribution_id Integer Unique identifier for the contribution.

Response

The response contains the GeoJSON encoded contribution.

{
    "id": 2966,
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [
            -0.144415497779846,
            51.54671869005856
        ]
    },
    "properties": {
        "child_friendly": false,
        "name": "The Grafton",
        "address": "20 Prince of Wales Rd, London NW5 3LG",
        "expires_at": "2030-01-12T11:12:38.690Z"
    },
    "display_field": {
        "key": "name",
        "value": "The Grafton"
    },
    "expiry_field": "2030-01-12T11:12:38.690Z",
    "location": {
        "id": 2964,
        "name": null,
        "description": null,
        "created_at": "2014-09-19T15:51:32.790Z"
    },
    "meta": {
        "creator": {
            "id": 2,
            "display_name": "Oliver"
        },
        "isowner": true,
        "updator": null,
        "status": "active",
        "created_at": "2014-09-19T15:51:32.804Z",
        "updated_at": "2014-09-21T15:51:32.804Z",
        "version": 1,
        "category": {
            "id": 40,
            "name": "Pubs",
            "description": "",
            "status": "active",
            "fields": [
                {
                    "id": 117,
                    "name": "Name",
                    "key": "name",
                    "fieldtype": "TextField",
                    "description": "",
                    "status": "active",
                    "required": true
                },
                {
                    "id": 118,
                    "name": "Address",
                    "key": "address",
                    "fieldtype": "TextField",
                    "description": "",
                    "status": "active",
                    "required": false
                },
                {
                    "id": 119,
                    "name": "Average spend",
                    "key": "average_spend",
                    "fieldtype": "NumberField",
                    "description": "How much would a person usually spend?",
                    "status": "active",
                    "required": false
                }
            ],
            "colour": "#0033ff",
            "created_at": "2014-09-17T00:00:00Z"
        }
    },
    "comments": [],
    "review_comments": [],
    "media": []
}

Response codes

Code Reason
200 The contribution has been returned successfully.
404 The project or contribution was not found. For security reasons we do not leak information about private projects, hence we don’t confirm existence private projects to unauthorised users.