sinanulker/epost-global-php-client

ePost Global Shipping API Production Environment.<BR>Built at 09/25/2024 12:43:58

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/sinanulker/epost-global-php-client

dev-main 2024-12-12 03:02 UTC

This package is not auto-updated.

Last update: 2025-12-25 06:34:26 UTC


README

ePost Global Shipping API Production Environment.
Built at 09/25/2024 12:43:58

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: Bearer
$config = Sinan\Epost\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Sinan\Epost\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new Sinan\Epost\Api\AuthorizeApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $apiInstance->apiV1AuthorizeValidateGet();
} catch (Exception $e) {
    echo 'Exception when calling AuthorizeApi->apiV1AuthorizeValidateGet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AuthorizeApiapiV1AuthorizeValidateGetGET /api/v1/Authorize/ValidateCheck to see if a token is valid
RateApiapiV1RatePostPOST /api/v1/Rate
RateApiapiV1RateServicesGetGET /api/v1/Rate/ServicesList all services.
ShipApiapiV1ShipCloseGetGET /api/v1/Ship/CloseRetrieve a list of Accounts that are ready to be closed.
ShipApiapiV1ShipClosePostPOST /api/v1/Ship/CloseInitiate the end of day procedure.
ShipApiapiV1ShipGetGET /api/v1/ShipRetrieve a list of packages sorted by most recent packages first.
ShipApiapiV1ShipIdVoidGetGET /api/v1/Ship/{id}/VoidVoid a shipment. Required for reship.
ShipApiapiV1ShipPostPOST /api/v1/ShipRequest a shipping label to be created.

Models

Authorization

Authentication schemes defined for the API:

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1
    • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen