1. Go to this page and download the library: Download enviopack/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/ */
// Shipment IDs Array. May contain just one element
$shipmentIDS = array(
'111111',
'222222',
'333333',
);
$result = $ep->get_print_labels( $params );
print_r( $result );
array(
"uri" => "The resource URI, relative to https://api.enviopack.com",
"params" => "Optional. Key=>Value array with parameters to be appended to the URL",
"data" => "Optional. Object or String to be sent in POST and PUT requests",
"headers" => "Optional. Key => Value array with custom headers, like content-type: application/x-www-form-urlencoded",
"authenticate" => "Optional. Boolean to specify if the GET method has to authenticate with credentials before request. Set it to false when accessing public APIs"
)
// Get a resource, with optional URL params. Also you can disable authentication for public APIs
$ep->get (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"authenticate" => true
)
);
// Create a resource with "data" and optional URL params.
$ep->post (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"data" => [data]
)
);
// Update a resource with "data" and optional URL params.
$ep->put (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"data" => [data]
)
);
// Delete a resource with optional URL params.
$ep->delete (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
)
)
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.