Operations
POST /orders
| Summary | Submit a new AI Transcription order |
|---|---|
| URL | /api/v1/orders |
| Detailed Description |
Submit a new order for AI Transcription (for Human Transcription, see here). The order request contains two main elements:
Payment will be done by debiting the user's account balance. |
| Request Headers |
|
| 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 |
|
| Response Body | On success, empty. On error, will contain an <error/> entity with more details. |
| Error Codes |
|
| 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 AI transcription options to be set
*/
"automated_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"
},
{
/* 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, source language of the input to be processed */
"inputs_language": "en"
},
/* 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,
has a completed file ready for download, or has a new comment.
- If "FileComplete", then a notification is sent whenever work on a file has been completed
and is ready for download.
- If "FinalOnly" (the default), a notification is sent only when the order is complete.
*/
"level": "Detailed",
/*
Optional, specifies the content-type that notifications will be transmitted with.
- If "FormUrlEncoded" (or omitted), they will be transmitted in application/x-www-form-urlencoded format.
- If "ApplicationJson", they will be transmitted in application/json format.
*/
"content_type": "FormUrlEncoded"
},
/* Optional, customer must have invoicing, it links order to PO, Project, or Department for billing */
"ponumber": "SamplePoNumber01",
/* Optional, id of the workspace the order should be placed in */
"workspace_id": 123456789
}
<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 AI transcription options to be set
-->
<automated_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>
</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, source language of the input to be processed
-->
<inputs_language>en</inputs_language>
</automated_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,
has a completed file ready for download, or has a new comment.
- If "FileComplete", then a notification is sent whenever work on a file has been completed
and is ready for download.
- If "FinalOnly" (the default), a notification is sent only when the order is complete.
-->
<level>Detailed</level>
<!--
Optional, specifies the content-type that notifications will be transmitted with.
- If "FormUrlEncoded" (or omitted), they will be transmitted in application/x-www-form-urlencoded format.
- If "ApplicationJson", they will be transmitted in application/json format.
-->
<content_type>FormUrlEncoded</content_type>
</notification>
<!--
Optional, customer must have invoicing, it links order to PO, Project, or Department for billing
-->
<ponumber>SamplePoNumber01</ponumber>
<!--
Optional, id of the workspace the order should be placed in
-->
<workspace_id>123456789</workspace_id>
</order_request>
|