Video REST API JSON Data

The following JSON data is only returned when a valid access token is sent with a REST API request.

See Restricting REST API Data for how to get an access token.

Video Access Options

Each video will return a wpvs_access_options key with the following key value data.

Note: Some key values may not appear if no data has been added. For example, if a video does not have a Rental Price, no rental_details will be available in the JSON data.

{
wpvs_access_options: {
membership_ids: ["DayTest"], free_for_users: false, purchase_price: "1500", rental_details: { rental_price: "500", rental_type: "hours", rental_expires: "24" }}

User Has Access

Each video will return a boolean wpvs_has_access key, indicating if the requesting user as access to that video.

{
wpvs_has_access: true | false,
}

Video HTML (Embed Code)

The video HTML or embed code will only be provided if the requesting user has access to the video.

{
video_html: "video HTML code appears here",
}

Video Download Link

The video download link will only appear if the user has access to the video and a Download Link has been provided for the video.

{
video_download_link: "video download URL will appear here",
}