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

Nativy Connect

nativy translations
Description Returns an order from nativy with the translated texts (if already translated).
URL /connect/order/{orderid}

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 )
orderid (required) string The unique id of the order (GUID transformed string).
new xliffFormatted bool If the output should be delivered in Xliff format. (The Xliff output can be found in XliffOutput field of the return object.)
new htmlFormatted bool This parameter can be used in combination with xliffFormatted. Usually the Xliff files should not contain Html code. But it is possible with this flag to let the method know that you want to have the html code included in the result.

Example call

                $url = '';
        	    $api_key = 'iQU5lBuEjYF3e2EU2o>sp*u02K^Bmie3d}pg-pU^MZ&%mobYM&x7SHY+41u7PHEh';
        	    $private_key = '4i2j_F|=lUqNmxPMxtwsX-veXJ)i+w(hq[_J&(r{Pn[jyT&)xfdUsp3K%B_jv{tP';
        	    $timestamp = gmdate('U');
	            $hmac = hash_hmac('sha1', $timestamp, $private_key); 
	            $orderid = 'E7F621BE-0DBC-47C6-947B-10FFB824CE32';
	            $xliffFormatted = False;
	            $htmlFormatted = False;
	            $url = $url 
	        		    . $orderid 
	        		    . '?api_key=' . urlencode($api_key) 
	        		    . '&api_sign=' . urlencode($hmac) 
	        		    . '&xliffFormatted=' . urlencode($xliffFormatted) 
	        		    . '&htmlFormatted=' . urlencode($htmlFormatted) 
	        		    . '×tamp=' . urlencode($timestamp);
	            $ch = curl_init($url); 
	            curl_setopt($ch, CURLOPT_URL, $url); 
	            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
	            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
	            $response = curl_exec($ch);

        	    echo ($response);

Return values

Getting an order returns the same parameters which are used for posting an order (see parameters in /order POST).
Return parameters which are not neccessary (e.g. api_key, text_from) are set to null.
Additionally you get these return parameters:

Return parameters of an order
status  string List of possible status values:
  • orders_status_open

    The order is created, but no translator has been chosen by the user.

  • orders_status_confirmationpending

    Translator (and corrector) have not confirmed yet that they will do the translation/correction.

  • orders_status_inprogress

    Translation (and correction) is in progress.

  • orders_status_translationcomplete

    The translation (and correction) is complete.

  • orders_status_canceled

    The order has been canceled by the user.

text_to  array A string/string array containing the translated texts in a key/value pair for each text block.
new XliffOutput  string A string in the format of Xliff 1.2
new XliffOutputFile  string The address of the Xliff file. (If you prefer to download the Xliff file separately)
charcount  int The number of characters of all texts.
wordcount  int The number of words of all texts.
invoice_number  array The invoice number of the order.
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)

Example return values

                "nativy connect order",
                    {"Key":"3","Value":"Dritter Textblock. (DEMOMODE textblock 3 not translated to jv)"},
                    {"Key":"2","Value":"Zweiter Textblock. (DEMOMODE textblock 2 not translated to jv)"},
                    {"Key":"1","Value":"Hier würde der zu übersetzende<\/b> Text hineinkommen. (DEMOMODE textblock 1 not translated to jv)"}