POST frame

Used to create a frame. This will be called with an array of frames to add, the arrays must include all required fields.

When accessed via a POST request this API method will create a new frame. Your HTTP body should consist of JSON similar to the following sample. Attributes differ per environment type so use the GET /api/environment method to determine the required and optional parameters.

Each attribute type/value will be validated to ensure that the data is valid. See the section on errors for how errors are represented.

INPUT

As this method is accessed via a POST request the raw body must be set to JSON as described below. Note that this is sample input for the Roadside environment type and as such the attributes sufficiently cover the required values.


[{
    "LocationDescription": "Some place",
    "SalesCode": "19A",
    "OnRoute": 1,
    "Format": {
        "SpaceFormatID": 1,
        "Width": 1,
        "Height": 4.41,
        "SurfaceArea": 4.41
    },
    "FrameType": 3,
    "Faces": 2,
    "Illumination": 1,
    "LegacySiteNumber": "SITE123456",
    "Tags": [5, 8],
    "Environment": {
        "Type": "roadside",
        "Attributes": [
            {
                "Type": "Address",
                "Value": "address value"
            },
            {
                "Type": "PostCode",
                "Value": "E3 2SQ"
            },
            {
                "Type": "WorldGeodeticCoordinate",
                "Value": "49.76680500,-7.49999999"
            },
            {
                "Type": "SpotLength",
                "Value": "10"
            },
            {
                "Type": "BreakLength",
                "Value": "6"
            },
            {
                "Type": "ShareOfTime",
                "Value": "62.5"
            }
        ]
    },
    "ProductionSpecificationID": 11,
    "MediaOwnerAttributes": {
        "URL": "www.oohspace.co.uk"
    }
}]
        

The table below details the fields used in this example.

parameter type description
FrameID int64 (optional) When creating a frame with an existing FrameID the ID needs to be between 1000000000 and 1999999999
LocationDescription string (optional) location details to be associated with this frame. Must be less than 255 characters
SalesCode string (optional) sales code to be associated with this frame. Must be a three digit alphanumeric code
OnRoute int (required) whether the frame is to be submitted to Route or not, specified by 1 or 0 respectively
Format array (required) an array of format data
Format - SpaceFormatID int (required) SPACE format code to associate with this frame
Format - Width float (required) width for this format accurate to two decimal places between 0.01 and 1000 meters
Format - Height float (required) height for this format accurate to two decimal places between 0.01 and 500 meters
Format - SurfaceArea float (required) surface area for this format accurate to two decimal places between 0.01 and 500000 square meters
FrameType int (required) the type of frame (see GET /api/frame-type for values)
Faces int (required) number of faces that the frame has between 1 and 99
Tags array (optional) an array of tag_id's to associate with this frame (see GET /api/tag for values)
Localities array (optional) an array of locality_id's to associate with this frame (see GET /api/locality for values)
Prohibitions object (optional) a collection of arrays representing different types of prohibitions associated with this frame, including MediaOwnerCategories
Illumination int (required) the type of illumination for the frame (see GET /api/illumination for values)
LegacySiteNumber string (optional) the legacy site number for the frame
Environment array (required) an array of Environment data
Environment - Type string (required) the type of environment for that frame (see GET /api/environment for values)
Environment - Attributes array (required) an array of Environment attributes (see GET /api/environment for values)
Environment - Attributes - Type string (required) the attribute type (see GET /api/environment for values)
Environment - Attributes - Value string (required) the attribute value (see GET /api/environment for values)
MediaOwnerAttributes object (optional) the media owner attribute name and value pair; name must be pre-approved
ProductionSpecificationID int (optional) the unique identifier of a Production/Creative specification to link to the frame. (see GET /api/production-spec for values)

OUTPUT - JSON sample

If accessing POST /api/frame with the body set to the sample JSON above then the following JSON would be returned:


[
    {
        "FrameID": 2000211808,
        "LocationDescription": "Some place",
        "SalesCode": "19A",
        "Format": {
            "Code": "12",
            "SpaceFormatID": 1,
            "Width": 1,
            "Height": 4.41,
            "SurfaceArea": 4.41
        },
        "FrameType": 3,
        "Faces": 2,
        "Illumination": 1,
        "Environment": {
            "Type": "Roadside",
            "Description": "Roadside",
            "Attributes": [
                {
                    "Type": "Address",
                    "Value": "address value"
                },
                {
                    "Type": "PostCode",
                    "Value": "E3 2SQ"
                },
                {
                    "Type": "WorldGeodeticCoordinate",
                    "Value": "49.76680500,-7.49999999"
                },
                {
                    "Type": "SpotLength",
                    "Value": "10"
                },
                {
                    "Type": "BreakLength",
                    "Value": "6"
                },
                {
                    "Type": "ShareOfTime",
                    "Value": "62.5"
                }
            ]
        },
        "Distance": {
            "PrimarySchool": 84374,
            "PrimarySchoolName": "St Agnes Base",
            "SecondarySchool": 87507,
            "SecondarySchoolName": "Five Islands School",
            "SpecialNeedsSchool": 145658,
            "SpecialNeedsSchoolName": "Nancealverne School",
            "FurtherSchool": 145970,
            "FurtherSchoolName": "Penwith College Campus",
            "PlaceOfWorship": null,
            "Playground": null,
            "UpdateDateTime": "2022-03-30 14:55:34"
        },
        "UpdateDateTime": "2022-03-30 14:55:33",
        "IMSUpdatedDateTime": null,
        "ClosedDate": null,
        "PreviousMediaOwner": null,
        "PreviousMediaOwnerID": null,
        "MediaOwner": "Mediatel",
        "MediaOwnerID": 1,
        "MediaOwnerStartDate": "2022-03-30",
        "MediaOwnerEndDate": null,
        "NewMediaOwner": null,
        "NewMediaOwnerID": null,
        "TransferDate": null,
        "LegacySiteNumber": "SITE123456",
        "OnRoute": 1,
        "Tags": [
            5,
            8
        ],
        "Localities": [],
        "Prohibitions": {
            "MediaOwnerCategories": []
        },
        "TownName": "Bow",
        "TvRegionName": "London",
        "ConurbationName": "Greater London",
        "EnvironmentGroup": "Roadside",
        "EnvironmentGroupID": 4,
        "FormatGroup": "12 Sheets",
        "FormatGroupID": 3,
        "LinkedAssetID": null,
        "LinkedAssetReference": null,
        "LinkedAssetDescription": null,
        "RestrictedAssets": [],
        "MediaOwnerAttributes": {
            "URL": "www.oohspace.co.uk"
        },
        "MediaOwnerFrameReference": "",
        "ProductionSpecificationID": 11,
        "ProductionSpecification": "Production/Creative specification name",
        "FrameChanged": true,
        "NewFrameIDGenerated": true
    }
]
        

A "data" element that contains an array of frames as defined within the response for GET /api/frame