Operations

POST /orders

Summary Submit a new order
URL /api/v1/orders
Detailed Description Submit a new order for transcription. The order request contains two main elements:
  • Transcription options. This section contains references to the input media to be transcribed. There are three options for specifying input media:
    • A uri returned from a POST to /inputs in the Location header. Use this if the media is either stored in your system, or is accessible at a URL where we can download it.
      First, make a POST to /inputs to send us the media. Next, you can use the returned uri to reference it in the order request.
    • A uri describing a location in S3. If your media is already in S3, our system can pull it from there directly, as long as it is public or has a bucket policy that allows us to download files from it.
      The format for a s3 URI is
      urn:s3:[bucket name]object
      So an example URI might be
      urn:s3:[rev-test-bucket]uploads/2013-10-11/sample.mp3
      To enable our system to pull from your S3 bucket, see Setting up S3 Bucket Policy
    • external_link - this should be used if you have a link to a web page where the media is embedded, but not a link to the media file. We do not attempt to do anything with the link specified this way at the time the API call is made. This is done in contrast to when you post to /inputs with a link to a media file - in that case we do download the file.
      The external_link should only be used when you can't link to the media file directly.
      If the external_link points to a YouTube page, we can determine the duration of the video on that page automatically. Otherwise, you will need to specify the media duration explicitly.

    For any input, you must provide either uri or external_link, but not both. If both or neither is provided, an error is returned.

    For each input, you may explicitly specify the audio length, in seconds, of the video referenced by the input. If you do not specify the audio length, we will attempt to determine it automatically from the input media; however we are not always able to do so. We can generally calculate audio length of files using common audio/video formats (e.g. mp3, aac, quicktime, etc) that are up to 10MB in size. If your files are larger than 10MB or are using an uncommon audio/video format, we strongly recommend you specify the audio length explicitly.

    For each input, you may optionally specify speaker names, a glossary, and/or speaker accents to help improve the quality of your order. The speaker list may have up to 100 entries, and speaker names may be up to 15 characters long. The glossary may have up to 1000 entries, and glossary entries may be up to 255 characters long.

    We currently support the following accents (case-sensitive) with your input file:

    • AmericanNeutral
    • AmericanSouthern
    • Asian
    • Australian
    • British
    • Indian
    • Other
    • Unknown

    We also allow users of the API to specify if transcription should be done using our Verbatim option and to specify if Timestamps should be included.

  • Notification Info. Optionally, you may request that an HTTP post be made to a url of your choice when the order enters a new status (e.g. being transcribed or reviewed) and when it is completed.

Payment will be done by debiting the user's account balance.

Request Headers
  • Authorization - contains client/user API keys
Request Body XML or JSON with the details about the order. See below for an example entity illustrating the fields used.
Response On success, 201 Created.
On error, 400 Bad Request.
Response Headers
  • Location – URI identifying the newly created order. This URI can be used to request details (such as status) of the order. Only present if a 201 response code is returned.
Response Body On success, empty. On error, will contain an <error/> entity with more details.
Error Codes
  • 10001 Missing Inputs - if the order request did not contain any input media
  • 10002 Invalid Input - if one of the input media URIs is invalid, eg does not identify a valid media uploaded via a POST to /inputs
  • 10003 Multiple Service Options Specified - currently, an order can be made for only one of the three services we offer (transcription and caption). The service is specified by including a transcription_options or caption_options element. If more than one such element is included in the request, this error is returned.
  • 10004 Service type is not specified - you must include exactly one of transcription_options or caption_options elements. If none of these are included, this error is returned.
  • 10005 External Link and URI specified - only External Link or URI should be set for input media
  • 10006 Input Location is not specified - neither of External Link and URI set for input media
  • 10007 Cannot connect to the External Link provided
  • 20001 Invalid Media Length - If one of the input medias has a specified audio length that is not a positive integer. This will also be returned if you do not provide the audio length and we are unable to calculate it automatically
  • 20010 Reference Number Too Long Code - the reference number provided longer than 256 characters
  • 20020 Speaker list may not exceed 100 speakers
  • 20021 Speaker names may not exceed 15 characters
  • 20030 Glossary may not exceed 1000 entries
  • 20031 Glossary entries may not exceed 255 characters
  • 20040 Number of provided accents may not exceed 8
  • 20041 One or more provided accents are not supported
  • 30010 Ineligible For Balance Payments - if the user on whose behalf the order request was made is not eligible for paying using account balance
  • 30011 Account Balance Limit Exceeded - if the order request specified payment using account balance, but doing so would exceed the user's balance limit
  • 50000 Field Validation Errors - One or more of the fields are in the wrong format
Annotated sample request
{
    /* Optional, a reference number for the order meaningful for the client */
    "client_ref": "XB432423",
    /*
       Mandatory, provides information on what needs to be transcribed and
       allows for any transcription options to be set.
    */
    "transcription_options": {
        /*
           Mandatory, contains list of media to transcribe.
           Must have at least one element
        */
        "inputs": [
            {
                /*
                    Length of audio, in seconds rounded up. 
                */
                "audio_length_seconds": 60,
                /*
                    URI of the media, as returned from the call to POST /inputs
                */,
                "uri": "urn:rev:inputmedia:467432fds",
                /*
                    Optional, list of speaker names.
                    Compatible with any input format.
                */
                "speakers": ["John", "Jane", "Sam Jones"],
                /*
                    Optional, list of glossary entries.
                    Compatible with any input format.
                */
                "glossary": ["cryptography", "MD5", "SHA-1", "bcrypt"],
                /*
                    Optional, list of speaker accents.
                    Compatible with any input format.
                */
                "accents": ["British", "AmericanNeutral", "Other"],
            },
            {
                /*
                    URI of the media stored in an S3 bucket. 
                    We will try to calculate the audio length automatically.
                */,
                "uri": "urn:s3:[rev-test-bucket]uploads/2013-10-11/sample.mp3"
            },
            {
                /*
                    YouTube URL, audio length determined automatically.
                */
                "external_link": "http://www.youtube.com/watch?v=UF8uR6Z6KLc"
            },
            {
                /*
                    For any other external link URL audio length is mandatory
                */
                "audio_length_seconds": 300,
                "external_link": "https://vimeo.com/7976699"
            }
        ],
        /*
           Optional, should we transcribe the provided files verbatim?  
           If true, all filler words (i.e. umm, huh) will be included.
        */
        "verbatim": true,
        /*
            Optional, should we include timestamps?
        */
        "timestamps": true
    },
    /*
      Optional, enables receiving notifications about the order status
    */
    "notification": {
        /*
            The url for notifications.
            Mandatory if the notifications element is used.
            Updates will be posted to this URL
        */
        "url": "http://www.clientsite.com/orderupdate",
        /*
           Optional, specifies which notifications are sent. If "Detailed",
           then a notification is sent whenever the order is in a new status
           or has a new comment. If "FinalOnly" (the default), notification is
           sent only when the order is complete.
        */
        "level": "Detailed"
    }
}
                    
<order_request>
    <!--
       Optional, a reference number for the order meaningful for the client
    -->
    <client_ref>XB432423</client_ref>
    <!--
        Mandatory, provides information on what needs to be transcribed and
        allows for any transcription options to be set.
    -->
    <transcription_options>
        <!--
           Mandatory, contains list of media to transcribe.
           Must have at least one element
        -->
        <inputs>
            <input>
                <!--
                    Length of audio, in seconds rounded up. 
                -->
                <audio_length_seconds>600</audio_length_seconds>
                <!--
                   Mandatory, URI of the media, as returned from the call
                   to POST /inputs
                -->
                <uri>urn:rev:inputmedia:467432fds</uri>
                <!--
                   Optional, list of speaker names.
                   Compatible with any input format.
                -->
                <speakers>
                   <speaker>John</speaker>
                   <speaker>Jane</speaker>
                   <speaker>Sam Jones</speaker>
                </speakers>
                <!--
                   Optional, list of glossary entries.
                   Compatible with any input format.
                -->
                <glossary>
                   <entry>cryptography</entry>
                   <entry>MD5</entry>
                   <entry>SHA-1</entry>
                   <entry>bcrypt</entry>
                </glossary>
                <!--
                   Optional, list of speaker accents.
                   Compatible with any input format.
                -->
                <accents>
                   <accent>British</accent>
                   <accent>AmericanNeutral</accent>
                   <accent>Other</accent>
                </accents>
            </input>
            <input>
                <!--
                    URI of the media stored in an S3 bucket. 
                    We will try to calculate the audio length automatically.
                -->
                <uri>urn:s3:[rev-test-bucket]uploads/2013-10-11/sample.mp3</uri>
            </input>
            <input>
                <!--
                   YouTube URL, audio length determined automatically
                -->
                <external_link>http://www.youtube.com/watch?v=UF8uR6Z6KLc</external_link>
            </input>
            <input>
                <!--
                   For any other external URL audio length is mandatory
                -->
                <audio_length_seconds>300</audio_length_seconds>
                <external_link>https://vimeo.com/7976699</external_link>
            </input>
        </inputs>
        <!--
           Optional, should we transcribe the provided files verbatim? 
           If true, all filler words (i.e. umm, huh) will be included.
        -->
        <verbatim>true</verbatim>
        <!--
           Optional, should we include timestamps?
        -->
        <timestamps>true</timestamps>
    </transcription_options>
    <!--
      Optional, enables receiving notifications about the order status
      -->
    <notification>
        <!--
            The url for notifications.
            Mandatory if the notifications element is used.
            Updates will be posted to this URL
        -->
        <url>http://www.clientsite.com/orderupdate</url>
        <!--
           Optional, specifies which notifications are sent. If "Detailed",
           then a notification is sent whenever the order is in a new
           status or has a new comment. If "FinalOnly" (the default),
           notification is sent only when the order is complete.
        -->
        <level>Detailed</level>
    </notification>
</order_request>