CASTINGWORDS STORE API v4

Description

The CastingWords Simple Transcription API v4 is a simplified API to create orders and obtain the resulting transcripts.

There are pre-written API clients in Python and PHP on github to ease integration.

The API is RESTish. The goal is not to follow REST's practices closely, but rather to make an easy API to get up to speed with using a dynamic language or curl. It accepts data as URL encoded key value pairs. An HTTP body of type JSON in a POST request and with content type application/json is also accepted.

Authentication is via a secret key posted in the HTTPS URL or as JSON in the POST Body (preferred). You may retrieve your secret key from you account at https://castingwords.com/customer/info

URLs

All URLS are in the format of

  https://castingwords.com/store/API4/

Output Formats

Currently supported: application/json

Success and Failure

Although all calls return a success message in the data, failures are always indicated via an HTTP code, 401 not authorized for instance. A message will accompany the error. An overview of HTTP status codes is available at http://en.wikipedia.org/wiki/HTTP_status

API Overview

#ID indicates a CastingWords id. The '#' is not literal. All calls require an API Key parameter, which has been omitted for clarity (eg: &api_key=#APIKEY)

Order a transcript

Returns the order and audiofile ids

 POST 
    https://castingwords.com/store/API4/order_url
    ?api_key=#APIKEY&url=http://myaudio.com/audio.mp3
    &sku=TRANS14&SKU=TSTMP1


Get Balance

See your prepay balance.

 GET   
   https://castingwords.com/store/API4/prepay_balance


Get Audiofile Details

See details on an audiofile, including it's current state

 GET   
   https://castingwords.com/store/API4/audiofile/#AUDIOFILEID

Retrieve Transcript

Returns the data of the transcript in the doc type requested by the extention.

 GET
   https://castingwords.com/store/API4/audiofile/#AUDIOFILEID/transcript.#ext


 DEPRECATED:
  GET or POST   
    https://castingwords.com/store/API4/transcript/#AUDIOFILEID.#ext

Order Upgrades on an Audiofile

 POST   
   https://castingwords.com/store/API4/audiofile/#AUDIOFILEID/upgrade?sku=#SKU

Cancel an ordered Audiofile

 POST   
   https://castingwords.com/store/API4/audiofile/#AUDIOFILEID/refund

Get Invoice Details

 POST   
   https://castingwords.com/store/API4/invoice/#INVOICEID


Register Webhook

Set a URL for us to ping on transcript complete

 GET or POST   
   https://castingwords.com/store/API4/webhook?webhook=#URL_ENCODED_HTTP(S)_ENDPOINT

API Calls

order_url

prepay_balance

audiofile/#ID

audiofile/#ID/transcript.#EXT

audiofile/#ID/upgrade

audiofile/#ID/refund

invoice/#ID

webhook

Receive a Webhook call

Webhooks are our async notification system. We do a 1 time HTTP POST to a url that you specify when an event occurs. The payload is application/x-www-form-urlencoded. Currently we support these events:

webhook/test/#TYPE