Reject read

Description

Rejects a full read (not auditions) that was submitted for a project. Only the owner of the project can execute this operation. The status of the project will change to "disposed". A member of Mr. Bunny's entourage will review the project. In most cases, the amount that you paid to VoiceBunny when posting the project will be credited to your account, including service fees. Otherwise, a member of Mr. Bunny's entourage will contact you with alternatives. If you want to get new reads, you must create the project again. Please keep in mind:

> We don't have strict guidelines for rejecting reads. Feel free to reject any read that you don't like. We want you to be happy with the reads you get.
> Voice actors are able to view the percentage of reads that you have rejected. They are likely to use that info to determine how risky it is to accept your projects.
> Increase the chances of getting reads that you like by providing clear instructions when you post projects. Learn to provide great directions to voice voice actors.

Arguments

= required
= only one of these is required
NameTypeDescriptionDefault value
rejectComments
stringThis text which describes with few words, the reason why one was rejected Read.

Response example

{
  "reads":[
    {
      "id":"1",
      "talentID":false,
      "status":"rejected",
      "project":"2",
      "urls":{
        "part001":{
          "default":"https:\/\/voicebunny.s3.amazonaws.com\/dev\/2_aa70601bd0c0c323872c2d81e93f369f.mp3?h=1",
          "original":"https:\/\/voicebunny.s3.amazonaws.com\/dev\/2_e8861ad42488c482426bc6ae59437b79.wav?h=1"
        }
      },
      "revisions":[
        {
          "id":"1",
          "status":"revisionCanceled",
          "url":"https:\/\/api.voicebunny.com\/reads\/1\/revision\/1"
        }
      ],
      "created":1327403069
    }
  ],
  "timestamp":1568710739
}
<?xml version="1.0" encoding="UTF-8"?>
<reads>
  <read>
    <id>1</id>
    <talentID>0</talentID>
    <status>rejected</status>
    <project>2</project>
    <urls>
      <part001>
        <default>https://voicebunny.s3.amazonaws.com/dev/2_aa70601bd0c0c323872c2d81e93f369f.mp3?h=1</default>
        <original>https://voicebunny.s3.amazonaws.com/dev/2_e8861ad42488c482426bc6ae59437b79.wav?h=1</original>
      </part001>
    </urls>
    <revisions>
      <id>1</id>
      <status>revisionCanceled</status>
      <url>https://api.voicebunny.com/reads/1/revision/1</url>
    </revisions>
    <created>1327403069</created>
  </read>
  <timestamp>1568710739</timestamp>
</reads>

Errors

  • 5013: You are not authorized to modify this project. Only the owner can modify it.
  • 5018: The ID in the url makes reference to a deliverable that does not exist.
  • 5028: This deliverable was already rejected.
  • 5029: This deliverable was already approved.
  • 5049: The "rejectComments" argument cannot be empty.
  • 5072: This deliverable cannot be rejected. This project is not covered by our money back guarantee because you chose to set a budget below our recommended price. Posting this project again using our recommended pricing may bring better results. Please contact us for further assistance.
  • 5077: Deliverables can only be rejected within 28 days of being received. Please contact us for further assistance.

Code example

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )

import groovyx.net.http.*
import groovy.json.*
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*

http = new HTTPBuilder('https://api.voicebunny.com')
http.handler.success = {response, json -> return json}
http.handler.failure = {response, json -> throw new RuntimeException(json.error.code + ' ' + json.error.message)}
def voicebunnyUser = 'xxXXxx'
def voicebunnyToken = 'xxxxXXXXxxxxXXXX'
def readId = 'x'
def data = [
    'rejectComments' : "I didn't like it"
]
http.auth.basic voicebunnyUser, voicebunnyToken
def rejectedRead = http.post(path: 'reads/reject/' + readId, body:data, requestContentType: URLENC)
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.Map.Entry;
import org.apache.commons.codec.binary.Base64;

public class Voicebunny {

    private String user = "xxXXxx";

    private String token = "xxxxXXXXxxxxXXXX";

    private String encodedAuthorization = "";

    private String host = "https://api.voicebunny.com";

    public Voicebunny() {
        String userpassword = user + ":" + token;
        encodedAuthorization = Base64.encodeBase64String(userpassword.getBytes());
    }

    public static void main(String[] args) throws IOException {
        Voicebunny vb = new Voicebunny();
        System.out.println(vb.rejectRead("readId"));
    }

    private String rejectRead(String id) throws UnsupportedEncodingException, MalformedURLException, ProtocolException, IOException {
        Map<String, String> params = new HashMap<String, String>();
        params.put("rejectComments", "The reason why I'm rejecting the read");
        return post("/reads/reject/" + id, params);
    }

    private String post(String resource, Map<String, String> params) throws UnsupportedEncodingException, MalformedURLException, IOException, ProtocolException {
        String data = "";
        for (Entry<String, String> entry : params.entrySet()) {
            if (!data.isEmpty()) {
                data += "&";
            }
            data += (URLEncoder.encode(entry.getKey(), "UTF-8") + "=" + URLEncoder.encode(entry.getValue(), "UTF-8"));
        }

        URL url = new URL(host + "/" + resource);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Authorization", "Basic " + encodedAuthorization);
        connection.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
        wr.write(data);
        wr.flush();
        InputStream in = connection.getInputStream();
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        StringBuffer sb = new StringBuffer();
        String line = "";
        while ((line = reader.readLine()) != null) {
            sb.append(line);
        }
        wr.close();
        reader.close();
        return sb.toString();
    }

}
<?php
$voicebunnyUser = 'xxXXxx';
$voicebunnyToken = 'xxxxXXXXxxxxXXXX';
$readId = 'x';
$url_api = 'https://api.voicebunny.com/reads/reject/' . $readId;
$postVars = array();
$vars = http_build_query($postVars);
$opts = array(
	CURLOPT_URL => $url_api,
	CURLOPT_RETURNTRANSFER => TRUE,
	CURLOPT_INFILESIZE => -1,
	CURLOPT_TIMEOUT => 60,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_POST => TRUE,
	CURLOPT_POSTFIELDS => $vars,
	CURLOPT_USERPWD => $voicebunnyUser . ':' . $voicebunnyToken,
);
$curl = curl_init();
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
print_r($response);
?>
import requests
import simplejson
from requests.auth import HTTPBasicAuth

url = 'https://api.voicebunny.com'
api_id = 'XX'
api_key = "xxxxXXXXxxxxXXXX"
read_id = 'XX'
req = requests.get(url+'/reads/reject/'+read_id,
    auth=HTTPBasicAuth(api_id, api_key),verify=False)
data = simplejson.loads(req.text)
response = data['reads']
require 'faraday'
require 'faraday_middleware'

@conn = nil
@api_id = "XX"
@api_key = "xxxxXXXXxxxxXXXX"
read_id = "X"
resp = nil

@conn = Faraday.new(:url =>("https://"+ @api_id+":"+@api_key +"@api.voicebunny.com"),:ssl => {:verify => false}) do |builder|
	builder.use Faraday::Request::Multipart
	builder.use Faraday::Request::UrlEncoded
	builder.use Faraday::Response::ParseJson
	builder.use Faraday::Adapter::NetHttp		  
end

resp = @conn.get '/projects/reads/reject/'+read_id+'.json'
resp.body