CRATEQ API DOCUMENTATION

INTRODUCTION

Background

The CrateQ API is the back-end engine to the CrateQ Widget and Desktop App, a native, cross-platform desktop app where DJ's can sign-in to one place to access, search, and download accross a growing list of DJ digital outlets and content distributors, A.K.A. DJ record pools (such as SmashVision, Late Night Record Pool, and soon IDJ, Direct Music Service, and more). The CrateQ Widget also operates like a plugin for all the major DJ desktop softwares (Serato, RekordBox, Virual DJ, etc). Features include:

  • Search, preview, queue, and download audio or video from all of your favorite records pools
  • Advance search/filter on all data fields (genre(s)/sub-genre(s), bpm range, editors, mix, keywords, year range, etc) accross all records pools at once
  • Drag and drop files directly from crateQ into any DJ software
  • View and manage your song queue, wish list, playlists, crate, bin, favorites, etc (syncs with your record pool websites and mobile apps)
  • Batch download and auto-download features of song queue
  • Toggle between widget mode, app mode (resizable window), or fullscreen mode allowing users to use crateQ in a live environment
  • Widget mode is designed to float on top of the DJ software and can be positioned anywhere on the screen for easy access
  • Custom column views can be added or removed (artist, title, BPM, genre, release year, editor, length, etc)
Please visit crateq.com For more information.

API Overview

The CrateQ API offers two types of integrations: DJ/DVS Software Integration and DJ Record Pool Integration.

DJ/DVS Software Integration: The CrateQ API has made it simple for DJ/DVS Software providers to integrate licensed DJ Record Pool content into their software and/or platform. With crateQ's growing number of DJ Record Pool providers/partners, the CrateQ API has established a consistant data structure and mapping convention accross all its DJ Record Pools. This normalized-relational data structure simplifies authentication, searching, file retrival/streaming, etc, with its open RESTful API access to the entire data stucture. Other features include:

  • Real-time music content updates from each DJ Record Pool so content data is always synced and indexed, including charts, trending, playlists, download history, etc.
  • Rich search experiences using AI enable Azure Cognitive Services with custom Machine Learning (ML) algorithms for results scoring/weighting, facet navigation and advance filters, synonyms, auto-complete, and text analysis, auto-corrected search terms, and more.
  • Simple sorting (multi-column), paging (customize rows per page), result limits, etc.
  • Secure stream chunked byte array suitable for file streaming and direct file download.
See the DJ/DVS Software Integration documentation for more info.

DJ Record Pool Integration: The CrateQ API Integration includes endpoints to streamline the onboarding and data scyncronization for DJ Record Pools, their respective music catalog, playlists, queues, charts, trending, etc. This allows DJ Record Pool members the ability to leverage CrateQ Widget and Desktop App as an added services. Please visit crateq.com For more information on the features CrateQ Widget and Desktop App.

See the DJ Record Pool Integration documentation for more info.

API Access

The CrateQ API is a set of HTTP endpoints and data models that demonstrates 3rd party integration and configuration. The CrateQ API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use HTTP GET requests with URL parameters/arguments and JSON responses, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing (CORS) from partner domains, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors. For catalog searching, queueing, and download, users must first login via the authentication endpoints described in the User Authentication docuentation, and pass the expiring JSON Web Token (JWT) in the Authorization (Bearer) HTTP Header of the call.

Check out our full documentation to learn about everything you can do with the API. If there is any customization changes needed in results, arguments, format, or anything else to meet your requirements, please Contact Us, and we would be glad to assist.

Requests

API Key: Request authentication is via an API key, which is a required URL parameter. Please Contact Us to receive your API key. If you do not include you API key in your request, you will receive a HTTP 403 (Forbidden) error response. Furthermore, all request are IP restricted. All 3rd party application must provide the IP address(es) that will be accessing the CrateQ API for unrestricted access.

API Queries: Once you've got your API key you can use a browser or any HTTP client to make a simple query/request to the CrateQ API. The API key is passed as a parameter called key along with other search parameters. For example:

https://api.crateq.com/api/User/Add?key=1a7ab675433719c540a6300f17b4a531

API Methods: GET, POST, and PUT are the HTTP metheds accepted by the API. Only one method is accepted per endpoint.

HTTP Headers: All requests must specify an HTTP header of Content-Type: application/json and Authorization: Bearer JWT_GOES_HERE (please see the User Authentication documentation for more information on obtaining the JWT).

Responses

Data Format: All data endpoint responses from the CrateQ API are formatted in JSON. The responses are minified, so if you want to review the responses in a human readable format you will have to post-process them.

Date Format: All dates in the API are strings in the ISO 8601 "combined date and time representation" format (i.e. 2007-04-05T14:30), using UTC time.

Error Handling

Our API libraries raise exceptions for many reasons, such as invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.

We use conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success and codes in the 4xx range indicate an error that failed. Below are some common errors:

200 (Timeout): The request timed-out (See Timeouts below for more details).

400 (Parameter Required): A required parameter was not included.

403 (Forbidden): Your key parameter was either not included or invalid.

404 (Resource Not Found): Invalid Endpoint/URL.

500 (Exception Thrown): Other miscellaneous exception/error.

Timeouts: Currently, if no results are found after 30 seconds, the CrateQ API will abruptly terminate the request and return no more results. In this case, a HTTP 200 result is still returned. If the HTTP 200 Error Status Code is not returned, the response will be an empty JSON response like the following:

[]

Error Response: Errors always returns the following JSON data model:

Property Name Type Description
status Integer Returns the standard HTTP error status code.
message String Returns a short description of the error.
Error/Exception Sample Response:

    {
        "status":500,
        "message":"Username and Password are required."
    }
    

DJ/DVS SOFTWARE INTEGRATION

Overview

The CrateQ API has made it simple for DJ/DVS Software providers to integrate licensed DJ Record Pool content into their software and/or platform. With crateQ's growing number of DJ Record Pool providers/partners, the CrateQ API has established a consistant data structure and mapping convention accross all its DJ Record Pools. This normalized-relational data structure simplifies authentication, searching, file retrival/streaming, etc, with its open RESTful API access to the entire data stucture. Other features include:

  • Real-time music content updates from each DJ Record Pool so content data is always synced and indexed, including charts, trending, playlists, download history, etc
  • Rich search experiences with facet navigation and advance filters, results scoring/weighting, synonyms, auto-complete, and text analysis, auto-corrected search terms, etc
  • Simple sorting (multi-column), paging (customize rows per page), result limits, etc
  • Secure stream chunked byte array suitable for file streaming and direct file download
The API RESTful data endpoints available for DJ/DVS Software Integration include: Music Catalog, Genres, Genre Categories, Video Resulation, Tools/Mixes, User Authentication and Content Download.

Music Catalog

Description: The primary endpoint to search the music catalog accross all DJ Records Pools included in the CrateQ API. Provides a consistant data structure and mapping convention accross all the DJ Record Pools included in the CrateQ API.

https://api.crateq.com/api/Content/Media?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

URL Filter Parameters/Arguements: keywords, artist, title, genreId, genreCategoryId, playlistId, bpm, mix, editor, advisory, releaseYear, qualityId, groupId, chart, days, originator, searchType (See details below)

Argument Name Default Type Description
keywords (Optional) (Empty) String Searches the artist, title, and editor properties. Returns all records containing the search value in ANY of the three properties.
artist (Optional) (Empty) String Searches the artist property. Returns all records containing the search value.
title (Optional) (Empty) String Searches the title property. Returns all records containing the search value.
editor (Optional) (Empty) String Searches the editor property. Returns all records containing the search value.
genreId (Optional) (Empty) String Searches the genreId property ( See Genres Documentation for details ). Supports exact matches OR multiple genreId's separated by a "," comma character (i.e. categoryId=2 or categoryId=7,3,4).
categoryId (Optional) (Empty) Integer Searches the genre categoryId property ( See Genres Categories Documentation for details ). Supports exact matches OR multiple genre categoryId's seperated by a "," comma character (i.e. categoryId=2 or categoryId=7,3,4).
bpm (Optional) (Empty) Integer Searches the bpm property. Supports exact matches, multiple bpm's seperated by a "," comma character, OR a bpm range seperated by a "-" (hyphen character) (i.e. bpm=120, bpm=80,100,120, or bpm=80-90).
playlistId (Optional) (Empty) Integer Searches the playlistId property. Returns exact matches (i.e. playlistId=2).
releaseYear (Optional) (Empty) Integer Searches the releaseYear property. Supports exact matches, multiple releaseYear's seperated by a "," comma character, OR a releaseYear range seperated by a "-" (hyphen character) (i.e. releaseYear=2018, releaseYear=2000,2010,2015, or releaseYear=2000-2002).
mix (Optional) (Empty) String Searches the mix property ( See Mix/Tools Documentation for options ). Supports exact matches or multiple mixes seperated by a "," comma character (i.e. mix=Extended or mix=Instrumental,Short Edit, Intro).
advisory (Optional) (Empty) Enum (String) Searches the advisory property. Advisory identifies if the track/release is "Clean" or "Dirty". Returns exact matches (i.e. advisory=Dirty).
qualityId (Optional) (Empty) Integer Searches the qualityId property ( See Video Resolutions Documentation for options ). Supports exact matches or multiple mixes seperated by a "," comma character (i.e. qualityId=3 or qualityId=1,2,3).
groupId (Optional) (Empty) String Searches the groupId property. Supports exact matches (i.e. groupId=32415). When there are several mixes or versions of the same song, this is the identifier that groups them.

Music Catalog Properties: Always returns the following JSON data model, with the default sort by date desc:

Property Name Type Description
mediaId Integer Unique Identifier
artist String Artist
title String Song Title
genre String Name/Title of the Genre
bpm Integer Beats Per Minute
advisory Enum (String) Clean/Explicit
editor String Audio and/or Video Editor
length String Song Duration (MM:SS format)
size String Download File Size (in MB)
tool String Mix/tool of the song
releaseYear Integer Release Year of song (YYYY format)
quality String Quality of the Video Resolution
date Date Publish Date of the song (YYYY-MM-DD format)
preview String URL to stream preview
downloaded Boolean Downloaded before
video Boolean Video included
audio Boolean Audio included
source String DJ record pool source of song
auth String Temporary token used to download file
img String Image screen shot of video (only applicable to videos)
queueId Integer Unique Identifier for an existing song in the queue
Music Catalog Sample Response:
        
    {
        "records":174,420,
        "message":"0-100",
        "pages":1,745,
        "page":1,
        "sort":"date",
        "dir":"desc",
        "data":[
            {
                "mediaId":570291,
                "artist":"Yung Berg ft Junior",
                "title":"Sexy Lady [Xtendz] - qHD - Clean",
                "genre":"Old School / Classics",
                "bpm":93,
                "length":"03:38",
                "size":"75.26 MB",
                "tool":"Xtendz",
                "editor":"",
                "advisory":"Clean",
                "releaseYear":2007,
                "quality":"HD 1080",
                "preview":"https://api.crateq.com/api/Content/Preview/141416?token=2346660125566434",
                "date":"2019-02-04",
                "auth":"8cbf85588eb8d4b74ec6d44123fa0fe57693357c",
                "queueId":0,
                "downloaded":false,
                "audio":true,
                "video":true,
                "source":"smashvidz",
                "img":"/images/SV_33056_SZ_CN_HD_pv.jpg"
            },
            {
                "mediaId":570722,
                "artist":"Gesaffelstein n The Weeknd",
                "title":"Lost In The Fire [124-101] - HD - Dirty",
                "genre":"Transition",
                "bpm":101,
                "length":"03:50",
                "size":"82.12 MB",
                "tool":"DMS",
                "editor":"PeteDown",
                "advisory":"Dirty",
                "releaseYear":2019,
                "quality":"",
                "preview":"https://api.crateq.com/api/Content/Preview/141453?token=56750058332055u3y630quot;,
                "date":"2019-02-04",
                "auth":"522d0b62a704010570dce33a76e2bfebbb72c49a",
                "queueId":0,
                "downloaded":false,
                "audio":true,
                "video":true,
                "source":"dms",
                "img":"/images/SV_33064_DMS_DY_qHD_pv.jpg"
            },
            [etc...]
        ]
    }
    

User Authentication

Description: The CrateQ API will authenticate against all 3rd party DJ Record Pools and DJ/DVS Softwares are required to create a login/sign-in using the method and properties below which will initiate a session and token for the user in the CrateQ API.

Everytime and a song is queued, and before everytime a song or video is downloaded or streamed the CrateQ API will automaically authentication the user.

https://api.crateq.com/api/Auth/Login?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: POST

User Authentication Arguements: username and password (See details below)

Argument Name Default Type Description
username (Empty) String Member/User login/sign-in username (in some cases may be email)
password (Empty) String Member/User login/sign-in password
salt (Optional) (Empty) String Unique string used for encryption salt
key (Empty) String Unique provider key
originator (Empty) String Provider ID

User Authentication Response Properties: Always returns the following JSON data model:

Property Name Type Description
userId Integer Unique Identifier of Member/User
msg (Optional) String Return message that prompts alert for user to see (i.e. Your subscription is expired. Please visit [URL] to renew you subscription.)
status Enum (String) Member/User Account Status (Options: current, pending, expired, suspended, or denied')
country (Optional) String Member/User country
crateq Boolean Override to allow crateQ access for any member/user regardless of status or plan
originator String The ID of the provider be accessed
token String The JSON Web Token (JWT) with encrypted signature and payload for API authentication and access
Authentication Sample Response:
        
    [
        {
            "userId":12345,
            "msg":"",
            "status":"active",
            "country":"",
            "crateq":false,
            "originator":"dms",
            "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjMxMiIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6InNtYXNodmlkekBnbWFpbC5jb20iLCJzdGF0dXMiOiJhY3RpdmUiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9jb3VudHJ5IjoiZXUiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJESiIsImNyYXRlcSI6InRydWUiLCJwbGFuIjoiIiwicmVuZXdhbCI6IjE5MDAtMDEtMDEiLCJleHAiOjE2MjM1NjcwOTYsImlzcyI6Imh0dHBzOi8vYXBpLmNyYXRlcS5jb20iLCJhdWQiOiJodHRwczovL2FwaS5jcmF0ZXEuY29tIn0.ItVwHJGLASLFMFMvp0kd8s4JxkSRmBlknhRpqFhZzDU"
        }
    ]
    

Genres

Description: Provides a list of genres. Related to the Videos Endpoints as each video has a genreId property.

https://api.crateq.com/api/Content/Genres?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

URL Filter Parameters/Arguements: title, categoryId (See details below)

Argument Name Default Type Description
title (Optional) (Empty) String Searches the genre title property. Returns all containing the search value.
categoryId (Optional) (Empty) Integer Searches the genre categoryId property ( See Genres Categories Documentation for options ). Returns only exact matches (i.e. categoryId=2), however, also supports multiple categoryId's separated by a comma (i.e. categoryId=7,3,4).

Genres Response Properties: Always returns the following JSON data model, with the default sort by title asc:

Property Name Type Description
genreId Integer Unique Identifier.
title String Name/Title of the Genre.
category String Name/Title of the Genre Category.
categoryId Integer ID of the Genre Category.
Genres Sample Response:
        
    [
        {
            "genreId":174,
            "title":"4th of July",
            "category":"Holiday",
            "categoryId":4
        },
        {
            "genreId":167,
            "title":"Alt Rock",
            "category":"Other",
            "categoryId":12
        },
        {
            "genreId":161,
            "title":"Classic Dance",
            "category":"EDM",
            "categoryId":2
        },
        [etc...]
    ]
    

Genre Categories

Description: Provides a list of genre categories. Related to the Genres Endpoint as each genre has a categoryId property.

https://api.crateq.com/api/Content/GenreCategories?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

URL Filter Parameters/Arguements: None

Genres Categories Response Properties: Always returns the following JSON data model, with the default sort by title asc:

Property Name Type Description
categoryId Integer Unique Identifier.
title String Name/Title of the Genre Category.
Genres Sample Response:
        
    [
        {
            "categoryId":1,
            "title":"Country"
        },
        {
            "categoryId":2,
            "title":"EDM"
        },
        {
            "categoryId":3,
            "title":"Hip Hop / Urban"
        },
        [etc...]
    ]
    

Video Resolutions

Description: Provides a list of video resolutions available. Related to the Videos Endpoints as each video has a qualityId property.

https://api.crateq.com/api/Content/VideoQualities?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

URL Filter Parameters/Arguements: None

Video Resolutions Response Properties: Always returns the following JSON array with the default sort by pixel_height asc:

Property Name Type Description
qualityId Integer Unique Identifier.
title String Name/Title of the Video Resolution.
pixel_width Integer Resolutions pixel width.
pixel_height Integer Resolutions pixel height.
Video Resoluions Sample Response:
          
    [{
        "qualityId": 0,
        "title": "SD",
        "pixel_height": 360,
        "pixel_width": 640
    },
    {
        "qualityId": 1,
        "title": "qHD 540",
        "pixel_height": 540,
        "pixel_width": 960
    },
    {
        "qualityId": 2,
        "title": "HD 720",
        "pixel_height": 720,
        "pixel_width": 1280
    },
    {
        "qualityId": 3,
        "title": "Full HD 1080",
        "pixel_height": 1080,
        "pixel_width": 1920
    }]
    

Tools / Mixes

Description: Provides a list of track tools/mixes available. Each song/track has a mix string property.

https://api.crateq.com/api/Content/VideoMixes?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

URL Filter Parameters/Arguements: None

Tools / Mixes Response Data: Always returns the following sample JSON string array with the default sort as asc:

          
    ["Acapella","Acapella In","Acapella Out","Club","Extended","Instrumental","Intro","Loop","Remix","Short Edit","Single","Transition"]
    

Content Download Endpoint

The content download endpoint is an RPC (Remote Procedure Call) endpoint where arguments are passed to generate a download file stream. An additional authentication token arguement is required. The auth property is token which is unique for every song in the music catalog response (See Music Catalog Documentation for details). This auth property is also unique for every user and has a 15 minute validation period from the time it is deplayed in the music catalog response.

The CrateQ API has establish a secure HTTP tunnel with each DJ Record Pool to directly access the song or video file return a stream chunked byte array suitable for file streaming or direct file download. This includes a token which expires after a specified period of time.

DJ RECORD POOL INTEGRATION

Overview

The CrateQ API Integration includes endpoints to streamline the onboarding and data scyncronization for DJ Record Pools, their respective music catalog, playlists, queues, charts, trending, etc. This allows DJ Record Pool members the ability to leverage CrateQ Widget and Desktop App as an added services. Please visit crateq.com For more information on the features CrateQ Widget and Desktop App.

The CrateQ API RESTful data endpoints available for DJ Record Pool Integration include: Music Catalog Syncronization, User Authentication, Download/Authentication, Download History and Charts, Content Queue for Batch Downloading, and Download Syncronization

Music Catalog Syncronization

To initialize implementation, DJ Record Pools must provide a one-time data dump of all content data (i.e. artist, title, bpm, etc) and all lookup tables (i.e. genres, etc). CrateQ will create a data migration map DJ Record Pool data structure to automatically map to CrateQ data structure. CrateQ will import all DJ Record Pool music catalog data. Data files must be submitted via Secure File Transfer Protocol (SFTP). Supported data formats are CSV, XML, JSON, and SQL.

Description: For all new, updated, or deleted songs the DJ Record Pool will simply do a POST the following CrateQ API endpoint with the new or updated song data.

http://api.crateq.com/api/UpdateMediaFunction/[your song ID to update]?key=[your DJ Record Pool API key]

HTTP Method: POST

Note: To simplify the updates, specs on POST properties for the updates will be provided once the DJ Record Pool/CrateQ mapping is complete.

Song Update Arguements: originatorId, artist, title, genreIds, genreCategoryId, playlistDate, bpm, length, mix, editor, releaseYear, mediaFile, mediaType, groupId, qualityId and dateUpdated (See details below)

Argument Name Default Type Description
originatorId 0 Integer Your internal unique identifier for the song.
artist (Empty) String Name of the artist(s).
title (Empty) String Title of the song.
genreIds (Empty) String genreId for from the CrateQ genre list (See Genres Documentation for list options). Supports multiple genre ID's seperated by a "," comma character.
genreCategoryId (Optional) 0 Integer genreCategoryId for from the CrateQ genre category list ( See Genres Categories Documentation for list options ).
playlistDate Current UTC Date Date (ISO 8601) Date the song was added to your catalog. Date is in ISO 8601 format (i.e. 2007-04-05T14:30).
bpm 0 Integer BPM is the beats per minute of the song.
length (Empty) String Length of the song in MM:SS time format.
mix (Optional) (Empty) String Mix/tool of the song (See Tools/Mixes Documentation for options).
editor (Optional) (Empty) String Video or audio editor for song.
advisory Clean Enum (String) Advisory identifies if the song is "Clean" or "Explicit".
releaseYear Current Year Integer The 4 digit release year of the song.
mediaFile (Empty) String File name for the downloadable media file.
groupId (Optional) 0 Integer When there are several mixes or versions of the same song, this is the identifier that groups them.
qualityId (Optional) 0 String Applicable to music videos only. The video resolution qualityId ( See Video Resolution Documentation for options ).
dateUpdated Current UTC Date/Time Date (ISO 8601) Date/Time the song data was most recently updated. Date is in ISO 8601 format (i.e. 2007-04-05T14:30).

User Authentication

Description: Participating DJ Record Pool are required to have one of only two open RESTful Endpoint to allow the the CreateQ API to authenticate the member/user. The CrateQ Widget and Desktop App will authenticate against this endpoint each login/sign-in of he app, everytime and song (from the DJ Record Pool's music cataglog) is queued, and before everytime a song or video (from the DJ Record Pool's music cataglog) is downloaded or streamed.

[URL Provided by DJ Record Pool]

HTTP Method: POST

User Authentication Arguements: username and password (See details below)

Argument Name Default Type Description
username (Empty) String Member/User login/sign-in username (in some cases may be password)
password (Empty) String Member/User login/sign-in password

User Authentication Response Properties: Always returns the following JSON data model:

Property Name Type Description
userId Integer Unique Identifier of Member/User
msg (Optional) String Return message that prompts alert for user to see (i.e. Your subscription is expired. Please visit [URL] to renew you subscription.)
status Enum (String) Member/User Account Status (Options: current, pending, expired, suspended, or denied')
plan (Optional) String Member/User subscription plan
renewal Date The subscription renewal or expiration date of the member/user (YYYY-MM-DD format)
country (Optional) String Member/User country
crateq Boolean Override to allow crateQ access for any member/user regardless of status or plan
Authentication Sample Response:
        
    [
        {
            "userId":12345,
            "msg":"",
            "email":"test@test.com",
            "status":"current",
            "plan":"pro",
            "renewal":"2019-06-01",
            "country":"",
            "crateq":false
        }
    ]
    

Content Queue / Batch Download

Description: An endpoint for DJ Record Pool users to view and maintain seperate list know as the "Download Queue". The Download Queue provides the crateQ Desktop Widget a list to batch download all queued tracks on a schedule or automatically (in background mode) when queued from any of the participating DJ Record Pools (via this API), the crateQ mobile app, or crateQ Desktop Widget.

https://api.crateq.com/api/Content/Queue?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: GET

Queue List Properties: Always returns the following JSON data model, with the default sort by queueDate desc:

Property Name Type Description
mediaId Integer Unique Identifier
artist String Artist
title String Song Title
genre String Name/Title of the Genre
bpm Integer Beats Per Minute
advisory Enum (String) Clean/Explicit
editor String Audio and/or Video Editor
length String Song Duration (MM:SS format)
tool String Mix/tool of the song
releaseYear Integer Release Year of song (YYYY format)
quality String Quality of the Video Resolution
date Date Publish Date of the song (YYYY-MM-DD format)
preview String URL to stream preview
downloaded Boolean Downloaded before
video Boolean Video included
audio Boolean Audio included
source String DJ record pool source of song
auth String Temporary token used to download file
img String Image screen shot of video (only applicable to videos)
queueId Integer Unique Identifier for an existing song in the queue
queueDate Date Date song was added to queue (YYYY-MM-DD format)
Download Queue Sample Response:
        
    {
        "records":2,
        "message":"0-2",
        "pages":1,
        "page":1,
        "sort":"queueDate",
        "dir":"desc",
        "data":[
            {
                "mediaId":132692,
                "artist":"Bando Jonez feat LaRon and Polow Da Don",
                "title":"Wet [Dirty Acc]",
                "genre":"R&B",
                "bpm":72,
                "length":"2:18",
                "tool":"Acapella",
                "editor":"",
                "advisory":"Clean",
                "releaseYear":2019,
                "quality":"",
                "preview":"https://api.crateq.com/api/Content/Preview/141453?token=7693u337730o0d23fg35",
                "date":"2019-05-13",
                "auth":"d3236a91ae651eb57b20b8b469950e23a09f5434",
                "queueId":1572993,
                "downloaded":false,
                "audio":true,
                "video":true,
                "source":"lnrp",
                "img":"",
                "queueDate":"2021-04-27"
            },
            {
                "mediaId":283482,
                "artist":"Q-Unique feat Cappadonna, Taking Back Sunday and DJ Eclipse",
                "title":"Verrazzano Villians [Clean]",
                "genre":"Hip-Hop > East",
                "bpm":86,
                "length":"4:49",
                "tool":"Extended",
                "editor":"",
                "advisory":"Clean",
                "releaseYear":2021,
                "quality":"",
                "preview":"https://api.crateq.com/api/Content/Preview/141453?token=3456ydt8898689983",
                "date":"2021-04-25",
                "auth":"f35fd1db93672aab7a2156e42aa0b2b590fcde6b",
                "queueId":1572992,
                "downloaded":false,
                "audio":true,
                "video":true,
                "source":"lnrp",
                "img":"",
                "queueDate":"2021-04-26"
            },
            [etc...]
        ]
    }
    

Update Queue

Description: An endpoint that allows all users of participating DJ Record Pools to add or removes audio and video tracks to the Download Queue.

https://api.crateq.com/api/Content/UpdateQueue?key=1a7ab675433719c540a6300f17b4a531

HTTP Method: POST

Queue Arguements: queueId, mediaId, originatorId, and userId (See details below)

Argument Name Default Type Description
queueId 0 Integer The queueId for and existing track in the queue (will result in the removal of the existing track from the user's queue). For new tracks a zero should be passed here (will result in an insert of the track into the user's queue). NOTE: queueId is not required for removals if the track already exists in the user's queue. The API will check if a track is already in the user's queue before attempting to add it, even if the queueId is zero. If it does exist, the API will assume its a removal request and automatically remove it.
mediaId 0 Integer The crateQ mediaId of the track to be added or removed from the user's queue. Can be left to zero if the DJ Record Pool chooses originatorId instead (see originatorId description for more info).
originatorId 0 Integer The origininal ID used by DJ Record Pool. This can be used instead of the crateQ mediaId, to add or remove a track from the user's queue.
userId 0 Integer The origininal user ID used by DJ Record Pool (and provided at authentication) for whom the queue belongs to.
source (Empty) String DJ Record Pool unique name identifier generated by crateQ.

Update Queue Response Properties: Always returns the following JSON data model:

Property Name Type Description
id Integer Unique Identifier (queueId) from the user's queue.
message String Returns result message (i.e. "Media removed from queue." or "Media added to queue.").
Authentication Sample Response:
        
    [
        {
            "id": 1572989,
            "message": "Media added to queue."
        }
    ]
    

Content Download

The second endpoint DJ Record Pool's are required to create is for content download via RPC (Remote Procedure Call) where an encrypted token and song/user arguments are passed to dynamically generate a download file stream. CrateQ has created code samples for some of the most popular API/Server-Side languages including C#, NodeJS, and PHP so decrypt the arguements and authenticate the token. The auth property is token which is unique for every song in the music catalog response (See Music Catalog Documentation for details). This auth property is also unique for every user and has a 15 minute validation period from the time it is deplayed in the music catalog response.

Contact Us

Got a question? Write us now!

Please complete the form below and click the "Send Message" button. A representative will contact you right away. If you need to speak to someone right away, please call us at (917) 477-7698. Thank you.

{{ctrl.contactError}}

( * ) = Mandatory field

Follow us on Instagram!