APIMedia API

Media API

Media Details

Video Type Id

A media needs a video type before it can go live.

Video Type IdTitle
1Residential Real Estate
2Business Profile
3Neighborhood Tour
4Market Reports / Updates
5City Highlight / Community Tour
6Miscellaneous
7News
8How-To Guide
9Event
11Profile Video
15Commercial Real Estate
16Hotel
17School Tour
18Things to Do
19Inspection
20Vacation Rental
21Land
22Video Clip
99Private

Media Status Code

When a video is first uploaded to WellcomeMat the returned status code should be 100 File Received. At that point, the encoding system will process the file accordingly, and you can track its encoding status by querying the media. As files become ready, they are immediately pushed into the cloud and out to the CDN delivery service.

Media Status CodeDefinition
000File not received
100File received
200Queued for encoding
310Generating images
320Encoding 720p video
330Encoding 360p video
340Encoding 270p mobile video
350Encoding 480p video
360Encoding 1080p video
400Active
410Encoded, needs a video type to go active
500Inactive
600Encode Failed
700Marked for deletion

Response Types

The following response types are found in Media responses.

type Media = {
    media_id: number;
    hash: string;                       // the primary lookup key for the media, i.e. "5isp21d3cb831kank"
    created: string;                    // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
    replaced: string;                   // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
    data_updated: string;               // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
    status_code: "000"|"100"|"200"|"310"|"320"|"330"|"340"|"350"|"360"|"400"|"410"|"500"|"600"|"700";
    status_message: string;             // message string for Media Status
    status_group: "File Not Received"|"File Received"|"Processing"|"Active"|"Pending"|"Inactive"|"Encode Failed"|"Deleted";
    is_ready: boolean;
    user_id: string;                    // string representation of an integer
    title: string;
    description: string;
    keywords: string;
    customid: string;
    original_file: string;
    original_size_bytes: string;        // string representation of an integer
    original_size_readable: string;     // example: "2.8mb"
    source: string;                     // example: "api", "ingest", "site", "toolset", etc.
    traffic_url: string | null;
    slideshow: "0" | "1";
    video_type: string;                 // string representation of an integer
    location: {
        address: string | null;
        city: string | null;
        state_province: string | null;
        postal_code: string | null;
        latitude: string | null;
        longitude: string | null;
    };
    video: {
        https_url: string;              // base url where the files can be accessed, i.e. `https://{hostname}/`
        v270p: string | null;
        v360p: string | null;
        v480p: string | null;
        v720p: string | null;
        v1080p: string | null;
        length: string;                 // string representation of an integer
        storage_size_bytes: string;     // string representation of an integer
        storage_size_readable: string;  // example: "11.0mb"
    };
    preview: null | {
        https_url: string;              // base url where the files can be accessed, i.e. `https://{hostname}/`
        v270p_preview: string | null;
        v360p_preview: string | null;
        v480p_preview: string | null;
        v720p_preview: string | null;
        v1080p_preview: string | null;
        GIF_preview: string | null;
    };
    image: {
        hash: string;                   // image hash (not a media hash)
        https_url: string;              // base url where the files can be accessed, i.e. `https://{hostname}/`
        large: string;                  // 1920x1080 max
        thumbnail_16x9: string;         // 320x180 scaled+cropped
        play: string;                   // 640x360 scaled+cropped
    };
    photos: {
        https_url: string;              // base url WITHOUT trailing slash i.e. `https://{hostname}`
        seconds: {
            [second: string]: string;   // per-second filename
        };
    };
    links: {
        base: string;
        embed: string;
        share: string;
        unbranded_base: string;
        unbranded_embed: string;
    };
};