PHPackages                             enviopack/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. enviopack/sdk

ActiveLibrary[API Development](/categories/api)

enviopack/sdk
=============

EnvíoPack SDK Api Integration Library

v0.1.9(8y ago)02651MITPHP

Since Feb 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mgscreativa/enviopack-sdk-php)[ Packagist](https://packagist.org/packages/enviopack/sdk)[ RSS](/packages/enviopack-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (11)Used By (0)

EnvíoPack SDK Api Integration Library
=====================================

[](#envíopack-sdk-api-integration-library)

- [Install](#install)
- [Specific methods](#specific-methods)
- [Generic methods](#generic-methods)

Install
-------

[](#install)

### With Composer

[](#with-composer)

From command line

```
composer require enviopack/sdk:0.1.9

```

As a dependency in your project's composer.json

```
{
    "require": {
        "enviopack/sdk": "0.1.9"
    }
}
```

### By downloading

[](#by-downloading)

1. Clone/download this repository
2. Copy `lib/enviopack.php` to your project's desired folder.

Specific methods
----------------

[](#specific-methods)

### Configure your credentials

[](#configure-your-credentials)

- Get your **API\_KEY** and **SECRET\_KEY** in the following address:

```
require_once ('enviopack.php');

$ep = new EnvioPackApi ("API_KEY", "SECRET_KEY");
```

### Methods

[](#methods)

#### Check credentials

[](#check-credentials)

```
$result = $ep->check_credentials();

print_r( $result );
```

#### Get default store source address

[](#get-default-store-source-address)

```
$result = $ep->source_address();

print_r( $result );
```

#### Get source address by ID

[](#get-source-address-by-id)

```
$params = array
(
    'id' => '1081',
);

$result = $ep->source_address( $params );

print_r( $result );
```

#### Get shipment quotes from available couriers

[](#get-shipment-quotes-from-available-couriers)

```
$params = array
(
    'provincia'       => 'Z', // Santa Cruz
    'codigo_postal'   => '9400',
    'peso'            => '0.35',
    'paquetes'        => '20x2x10',
    'despacho'        => 'S',
    'modalidad'       => 'D',
    'direccion_envio' => '1081', // Change with your source address ID
);

$result = $ep->get_quote( $params );

print_r( $result );
```

#### Quote customer home delivery price

[](#quote-customer-home-delivery-price)

```
$params = array
(
    'provincia'     => 'Z', // Santa Cruz
    'codigo_postal' => '9400',
    'peso'          => '0.35',
    'paquetes'      => '20x2x10',
    'direccion_envio' => '1081', // Change with your source address ID
);

$result = $ep->quote_home_delivery_price( $params );

print_r ($result);
```

#### Quote customer branch delivery price

[](#quote-customer-branch-delivery-price)

```
$params = array
(
    'provincia'     => 'Z', // Santa Cruz
    'codigo_postal' => '9400',
    'peso'          => '0.35',
    'paquetes'      => '20x2x10',
    'direccion_envio' => '1081', // Change with your source address ID
);

$result = $ep->quote_branch_delivery_price( $params );

print_r ($result);
```

#### Create order

[](#create-order)

```
$params = array
(
    "id_externo" => 'external_reference', // Change this
    "nombre"     => 'John',
    "apellido"   => 'Doe',
    "email"      => 'john@doe.com',
    "telefono"   => '1111-5555',
    "localidad"  => 'Río Gallegos',
    "provincia"  => 'Z', // Santa Cruz
    "monto"      => '252.52',
    "fecha_alta" => date( "c" ),
    "pagado"     => true,
);

$result = $ep->create_order( $params );

print_r( $result );
```

#### Create shipment

[](#create-shipment)

```
$params = array
(
    "pedido"          => '222555', // Get this from create_order()
    "direccion_envio" => '1081',
    "destinatario"    => 'John Doe',
    "confirmado"      => true,
    "paquetes"        => array(
        array(
            "alto"  => 20,
            "ancho" => 2,
            "largo" => 10,
            "peso"  => 0.35,
        )
    ),
    "despacho"        => "S",
    "modalidad"       => "D",
    "servicio"        => 'N',
    "correo"          => 'oca',
    "calle"           => 'Av. José de San Martín',
    "numero"          => '457',
    "piso"            => null,
    "depto"           => null,
    "codigo_postal"   => '9400',
    "provincia"       => 'Z', // Santa Cruz
    "localidad"       => '133', // Río Gallegos
);

$result = $ep->create_shipment( $params );

print_r( $result );
```

#### Get PDF print labels

[](#get-pdf-print-labels)

```
// Shipment IDs Array. May contain just one element
$shipmentIDS  = array(
    '111111',
    '222222',
    '333333',
);

$result = $ep->get_print_labels( $params );

print_r( $result );
```

Generic methods
---------------

[](#generic-methods)

You can access any resource from the [EnvíoPack API](https://www.enviopack.com/documentacion/cotiza-un-envio/) using the generic methods. The basic structure is:

`$ep->[method]($request)`

where `request` can be:

```
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"
)
```

Examples:

```
// 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"
        )
    )
);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

10

Last Release

3002d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1f16bb8a00e10ae15390a76d36182c9cc8f95c802d869a963d898dd196fcc13?d=identicon)[mgscreativa](/maintainers/mgscreativa)

---

Top Contributors

[![mgscreativa](https://avatars.githubusercontent.com/u/1286632?v=4)](https://github.com/mgscreativa "mgscreativa (17 commits)")

---

Tags

sdkenviopack

### Embed Badge

![Health badge](/badges/enviopack-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/enviopack-sdk/health.svg)](https://phpackages.com/packages/enviopack-sdk)
```

###  Alternatives

[appwilio/cdek-sdk

CDEK API SDK (cdek.ru)

406.5k](/packages/appwilio-cdek-sdk)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

223.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
