PHP code example of seal / fetchr_sdk

1. Go to this page and download the library: Download seal/fetchr_sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

seal / fetchr_sdk example snippets




$fetchr = new Seal\fetchr_sdk( USER_TOKEN );


/**
 * @param $method_name - метод к которому обращаетесь
 * 
 * @param $data - данные которые передаете 
 * ( структура полностю соответствует данным из документации https://xapidoc.docs.apiary.io/ )
 *
 * @return array
 */

$response = $fetchr->init( $method_name, $data );

	

		$response = $fetchr->init( 'createDropshipOrders', $data );
		

		$response = $fetchr->init( 'createReverseOrders', $data );
		

		$response = $fetchr->init( 'createFulfillmentOrders', $data );
		

		$response = $fetchr->init( 'getFulfillmentSKUInfo', $data );
		

		$response = $fetchr->init( 'getOrderStatus', $data );
		

		$response = $fetchr->init( 'getOrderHistory', $data );
		

		$response = $fetchr->init( 'getBulkOrderStatus', $data );
		

		$response = $fetchr->init( 'getBulkOrderHistory', $data );
		

		$response = $fetchr->init( 'getAWBLink', $data );
		

		$response = $fetchr->init( 'cancelOrder', $data );