Name: {name}
Translator since: {translator_since}
From: {from}
Collaboration with you: {collaboration}
{about}
{fieldofexpertise}
 {name}

Nativy Connect

nativy translations
Description Posts an order to nativy and returns a ranking with up to 3 translators.
URL /connect/order

Parameters
api_key (required) string The public API key of the user. (Details: Authentication )
timestamp (required) string The current UTC timestamp (seconds from 1/1/1970 until UTC now). (Details: Authentication )
api_sign (required) string The timestamp encoded with HMAC SHA1 in use of the private key. (Details: Authentication )
language_from (required) string The short key of the source language of your text. (Details: /languages GET)
language_to (required) string The short key of the language the text should be translated to. (Details: /languages GET)
correction_required (required) bool If true, a corrector will be assigned to the order. A corrector proofreads the translation of the translator and makes suggestions to him if there is something incorrect with the translation.
callbacklink (required) string The URL to which nativy connect posts back to your application at the following events:
  • the payment of the order was successful (?orderid=xyz&paid=1 will be appended to your callbacklink)
  • the translation completed ("?orderid=xyz" will be appended to your callbacklink)
  • the review of a text part completed("?orderid=xyz&text_to_key=xyz" will be appended to your callbacklink)
text_from (required1) array A string/string array of key/value pairs that should be translated by nativy. Provide an unique key for each text part, so you can assign the translated texts to the right place in your application later (see example call below for more details).
new XliffInput (required1) string A string which is formatted as Xliff v1.2 . Each trans-unit must contain exactly one source element. Each trans-unit can contain a note element for further instructions and remarks for translators.
new contentbundlereference (required1) string A string that reffers to a registered contentbundle (Details: /contentbundle POST).
nativy_partner_name string You may provide the name of the application which uses nativy connect (e.g. Drupal, Typo3, Sharepoint).
short_description string A short description of the whole text for the translator, e.g. "Text for a newsletter", "Product description"...
long_description string A more detailed description of the whole text for the translator.
weighting_price int A number between 1 and 10 which indicates how important the price is for the user.
8: low price is very important
2: low price is less important
weighting_duration int A number between 1 and 10 which indicates how important the delivery time is for the user.
8: quick delivery is very important
2: delivery time is less important
weighting_textmatching int A number between 1 and 10 which indicates how important it is that the translators previous translations match to your text.
8: match is very important
2: match is less important
weighting_cooperation int A number between 1 and 10 which indicates how important it is that user has already cooperated with the translator.
8: cooperation is very important
2: cooperation is less important
invoice_name_row_1 string The text for the first row that should be printed on the invoice address.
If this parameter is not provided the first name, last name and degree from the nativy users account will be taken.
invoice_name_row_2 string The text for the second row that should be printed on the invoice address.
If this parameter is not provided the company name from the nativy users account will be taken.
invoice_street string The street that should be printed on the invoice.
If this parameter is not provided the street from the nativy users account will be taken.
invoice_zip string The postal code (ZIP) that should be printed on the invoice.
If this parameter is not provided the postal code from the nativy users account will be taken.
invoice_city string The city that should be printed on the invoice.
If this parameter is not provided the city from the nativy users account will be taken.
invoice_country_code string The country that should be printed on the invoice.
Please specify a country code from the ISO 3166 standard.
If this parameter is not provided the country from the nativy users account will be taken.

1: Only one of these fields is required to contain a none-empty value. If text_from is not empty, then XliffInput will be ignored.


Example call (text_from)

                $url = 'http://www.nativytest.com/connect/order';
        	    $api_key = 'iQU5lBuEjYFvx2EU2o>bp*u02x^Bmie3d}pg-pU^MZ&%mobYM&x7SHY+41u7PHEh';
        	    $private_key = '4i2j_F|=lcqNmxPaxtxsX-veXJ)i+w(hq[_J&(r{Pn[jyT&)xt*Usp3K%B_jv{tP';
        	    $timestamp = gmdate('U');
	            $hmac = hash_hmac('sha1', $timestamp, $private_key); 
	        
	            $text_from1 = array('Key' => 'mnuFile', 'Value' => 'File');
	            $text_from2 = array('Key' => 'mnuHelp', 'Value' => 'Help');
	            $text_from3 = array('Key' => 'about_text', 
	        					    'Value' => 'This is a demo about text.');

	            $order = array(
	        	    'api_key' => $api_key,
 			   	    'api_sign' => $hmac,
 			   	    'timestamp' => $timestamp,
	        	    'callbacklink' => 'http://www.nativytest.com/nativyconnect_callback.php',
	        	    'language_from' => 'en', 
	        	    'language_to' => 'de',
	        	    'text_from' => array($text_from1, $text_from2, $text_from3)
	            );
	        
	            $order = json_encode($order);
	        
	            $ch = curl_init($url); 
	            curl_setopt($ch, CURLOPT_URL, $url); 
			    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
	            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
	            curl_setopt($ch, CURLOPT_POST, 1); 
	            curl_setopt($ch, CURLOPT_POSTFIELDS, $order);
	            $response = curl_exec($ch);
	            curl_close($ch);

        	    echo ($response);
            

Example call (XliffInput)

                $url = 'http://www.nativytest.com/connect/order';
        	    $api_key = 'iQU5lBuEjYFvx2EU2o>bp*u02x^Bmie3d}pg-pU^MZ&%mobYM&x7SHY+41u7PHEh';
        	    $private_key = '4i2j_F|=lcqNmxPaxtxsX-veXJ)i+w(hq[_J&(r{Pn[jyT&)xt*Usp3K%B_jv{tP';
        	    $timestamp = gmdate('U');
	            $hmac = hash_hmac('sha1', $timestamp, $private_key); 
	        
	            $XliffInput = '   
File Help This is a demo about text
' $order = array( 'api_key' => $api_key, 'api_sign' => $hmac, 'timestamp' => $timestamp, 'callbacklink' => 'http://www.nativytest.com/nativyconnect_callback.php', 'language_from' => 'en', 'language_to' => 'de', 'XliffInput' => $XliffInput ); $order = json_encode($order); $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $order); $response = curl_exec($ch); curl_close($ch); echo ($response);

Return values

Posting an order returns an array of up to 3 translator/corrector rankings.

ranking_timeout_minutes  int The timespan in minutes how long the translator and corrector calendar entries are locked at nativy. The timeout is 5 minutes at the moment.
Make sure your user has to choose within this time, otherwise the ranking times out and your user has to request a new ranking (call /order POST again).
orderid  string The unique id of the order you posted (GUID transformed string).
rank  1 The rank place (1 to 3) of the offer based on the ranking parameters.
translator_firstname  string The first name of the translator.
translator_picture_link  string A link to nativy which returns the picture of the translator 50x50px.
corrector_firstname  string The first name of the corrector. ((null) if correction_required = false)
corrector_picture_link  string A link to nativy which returns the picture of the corrector 50x50px. ((null) if correction_required = false).
payment_link  string A link to the nativy payment window which your application must call if the user has decided for this translator/corrector.
Your application needs to append a "return_link" parameter to this link ("&return_link=http://...") before calling it, so nativy connect can call this "return_link" after the user has successfully paid.
price_sum_gross  decimal The whole price for the translation (and correction if required) inclusive tax.
price_sum_net  decimal The price for the translation (and correction if required) exclusive tax.
price_sum_tax  decimal The tax for the translation (and correction if required).
price_translator_net  decimal The price for the translator exclusive tax.
price_corrector_net  decimal The price for the corrector exclusive tax. (0 if correction_required = false)
cooperation  int The number of times the translator has worked together with the user.
finishedby  datetime The time the translation will be finished (e.g. /Date(1331964000000+0100)).
textmatching_percent  int The percentage how much the users text matches the translators previous translated texts (0-100).

Example return values

            [{
                "cooperation":0,
                "corrector_firstname":"Veronika",
                "corrector_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=327a91cb-fff3-48b2-90ea-e03c95c14039&Size=PictureFileSmall",
                "finishedby":"\/Date(1331964000000+0100)\/",
                "orderid":"d813eba2-0fb4-4a34-893a-bf0ec7b79f28",
                "payment_link":"http:\/\/test.nativy.com\/client\/nativyconnect_payment.aspx?orderid=d813eba2-0fb4-4a34-893a-bf0ec7b79f28&rank=1&returnlink=xyz",
                "price_corrector_net":2.52,
                "price_sum_gross":6.53,
                "price_sum_net":5.44,
                "price_sum_tax":1.09,
                "price_translator_net":2.92,
                "rank":1,"ranking_timeout_minutes":5,
                "textmatching_percent":0,
                "translator_firstname":"Nicole",
                "translator_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=6438a508-4bd6-41be-bb10-73b306d5a7b6&Size=PictureFileSmall"
             },
             {
                "cooperation":2,
                "corrector_firstname":"Carina",
                "corrector_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=1db3d426-1dee-43fb-bdf9-06e019aeca43&Size=PictureFileSmall",
                "finishedby":"\/Date(1331994600000+0100)\/",
                "orderid":"d813eba2-0fb4-4a34-893a-bf0ec7b79f28",
                "payment_link":"http:\/\/test.nativy.com\/client\/nativyconnect_payment.aspx?orderid=d813eba2-0fb4-4a34-893a-bf0ec7b79f28&rank=2&returnlink=xyz",
                "price_corrector_net":2.45,
                "price_sum_gross":7.10,
                "price_sum_net":5.92,
                "price_sum_tax":1.18,
                "price_translator_net":3.47,
                "rank":2,
                "ranking_timeout_minutes":5,
                "textmatching_percent":0,
                "translator_firstname":
                "Veronika",
                "translator_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=327a91cb-fff3-48b2-90ea-e03c95c14039&Size=PictureFileSmall"
             },
             {
                "cooperation":0,
                "corrector_firstname":"Veronika",
                "corrector_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=327a91cb-fff3-48b2-90ea-e03c95c14039&Size=PictureFileSmall",
                "finishedby":"\/Date(1331991000000+0100)\/",
                "orderid":"d813eba2-0fb4-4a34-893a-bf0ec7b79f28",
                "payment_link":"http:\/\/test.nativy.com\/client\/nativyconnect_payment.aspx?orderid=d813eba2-0fb4-4a34-893a-bf0ec7b79f28&rank=3&returnlink=xyz",
                "price_corrector_net":2.52,
                "price_sum_gross":6.34,
                "price_sum_net":5.28,
                "price_sum_tax":1.06,
                "price_translator_net":2.76,
                "rank":3,
                "ranking_timeout_minutes":5,
                "textmatching_percent":0,
                "translator_firstname":"Renate",
                "translator_picture_link":"http:\/\/test.nativy.com\/ShowImage.ashx?PersonId=f06e2e7a-bd0b-4d83-b82b-bb85144fd87d&Size=PictureFileSmall"
            }
           ]