{"id":18810972,"url":"https://github.com/shipengine/shipengine-php","last_synced_at":"2025-07-24T20:36:22.169Z","repository":{"id":48027643,"uuid":"309459583","full_name":"ShipEngine/shipengine-php","owner":"ShipEngine","description":"The official PHP SDK for ShipEngine API","archived":false,"fork":false,"pushed_at":"2025-01-09T11:08:48.000Z","size":822,"stargazers_count":15,"open_issues_count":3,"forks_count":12,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-27T00:14:09.985Z","etag":null,"topics":["address-normalization","address-validation","dhl-api","fedex-api","package-tracking","php","rest-api","sdk","shipengine","shipment-tracking","shipping-api","shipping-cost","shipping-label","shipping-rates","tracking-number","ups-api","usps-api"],"latest_commit_sha":null,"homepage":"https://www.shipengine.com/docs/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShipEngine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-02T18:26:51.000Z","updated_at":"2025-01-09T11:08:31.000Z","dependencies_parsed_at":"2024-01-13T01:47:01.439Z","dependency_job_id":"6f7a9508-bb6f-4ba5-a134-13738cfc1571","html_url":"https://github.com/ShipEngine/shipengine-php","commit_stats":{"total_commits":341,"total_committers":9,"mean_commits":"37.888888888888886","dds":"0.22873900293255134","last_synced_commit":"793929de6b5fc45d435e087f5cebfff386d10f5b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShipEngine","download_url":"https://codeload.github.com/ShipEngine/shipengine-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248686719,"owners_count":21145554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address-normalization","address-validation","dhl-api","fedex-api","package-tracking","php","rest-api","sdk","shipengine","shipment-tracking","shipping-api","shipping-cost","shipping-label","shipping-rates","tracking-number","ups-api","usps-api"],"created_at":"2024-11-07T23:23:38.323Z","updated_at":"2025-04-13T08:41:28.542Z","avatar_url":"https://github.com/ShipEngine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ShipEngine](https://shipengine.github.io/img/shipengine-logo-wide.png)](https://shipengine.com)\n\nShipEngine PHP\n==============\n\n[![Build Status](https://github.com/ShipEngine/shipengine-php/workflows/shipengine-php/badge.svg)](https://github.com/ShipEngine/shipengine-php/actions)\n[![Coverage Status](https://coveralls.io/repos/github/ShipEngine/shipengine-php/badge.svg?branch=main\u0026t=SkXqIE)](https://coveralls.io/github/ShipEngine/shipengine-php?branch=main)\n[![Latest Version](https://poser.pugx.org/shipengine/shipengine/v)](//packagist.org/packages/shipengine/shipengine)\n[![License](https://poser.pugx.org/shipengine/shipengine/license)](//packagist.org/packages/shipengine/shipengine)\n![OS Compatibility](https://shipengine.github.io/img/badges/os-badges.svg)\n\nA PHP library built on the [ShipEngine API](https://shipengine.com) offering low-level access as well as convenience methods.\n\n\u003c/hr\u003e\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Quick Start](#quick-start)\n- [Examples](#examples)\n  - [Methods](#methods)\n  - [Class Objects](#class-objects)\n  - [Instantiate ShipEngine Class](#instantiate-shipengine-class)\n- [Testing](#testing)\n- [Linting](#linting)\n- [Contributing](#contributing)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\nQuick Start\n===========\nInstall ShipEngine via [Composer](https://getcomposer.org/):\n```bash\ncomposer require shipengine/shipengine\n```\n- The only configuration requirement is an [API Key](https://www.shipengine.com/docs/auth/#api-keys).\n\n\u003e The following example assumes that you have already set the `SHIPENGINE_API_KEY` environment variable with your Api Key using `putenv()`.\n\nExamples\n========\n\nMethods\n-------\n- [validateAddress](./docs/addressValidateExample.md \"Validate Address method documentation\") - Indicates whether the provided address is valid. If the\n  address is valid, the method returns a normalized version of the address based on the standards of the country in\n  which the address resides.\n- [normalizeAddress](./docs/normalizeAddressExample.md \"Normalize Address method documentation\") - Returns a normalized, or standardized, version of the\n  address. If the address cannot be normalized, an error is returned.\n- [trackPackage](./docs/trackPackageExample.md \"Track Package method documentation\") - Track a package by `packageId` or by `carrierCode` and `trackingNumber`. This method returns\nthe all tracking events for a given shipment.\n\nClass Objects\n-------------\n- [ShipEngine]() - A configurable entry point to the ShipEngine API SDK, this class provides convenience methods\n  for various ShipEngine API Services.\n\nInstantiate ShipEngine Class\n----------------------------\n```php\n\u003c?php declare(strict_types=1);\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse ShipEngine\\ShipEngine;\n\n$apiKey = getenv('SHIPENGINE_API_KEY');\n\n$shipengine = new ShipEngine($apiKey);\n```\n- You can also pass the **ShipEngine** object an **array** containing `configuration` options instead of a **string**.\n```php\n\u003c?php declare(strict_types=1);\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse ShipEngine\\ShipEngine;\n\n$apiKey = getenv('SHIPENGINE_API_KEY');\n\n$config = array(\n    'apiKey' =\u003e $apiKey,\n    'pageSize' =\u003e 75,\n    'retries' =\u003e 3,\n    'timeout' =\u003e \\DateInterval('PT60S')\n);\n\n$shipengine = new ShipEngine($config);\n```\n\nTesting\n=======\n- You can now run all tests using [PHPUnit](https://phpunit.de/):\n_phpunit_\n```bash\ncomposer test\n```\n\nLinting\n=======\nYou can utilize the `composer` script that runs **phpcs**, **phpstan**, and **php-cs-fixer**.\n```bash\ncomposer lint\n```\n\nContributing\n============\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/ShipEngine/shipengine-php/issues)\non GitHub and [submit a pull request](https://github.com/ShipEngine/shipengine-php/pulls).\n\nWe are managing `php environment` with [Nix](https://nixos.org/download.html \"Nix Website\")\nand [Direnv](https://direnv.net/docs/installation.html \"Direnv Install page\"), and we recommend downloading\nthem before contributing to this project.\n\n- The quickest way to install Nix is to open a terminal and run the following command, make sure to follow the\n  instructions output by the installation script:\n  ```bash\n  curl -L https://nixos.org/nix/install | sh\n  ```\n\n- Next, install `Direnv` using one of th methods outlined on their install page here:\n  [Direnv Installation](https://direnv.net/docs/installation.html \"Direnv Install page\")\n\n- Lastly, you will need open your terminal and while this repository the current working directory and run `direnv allow`,\n  this will allow `direnv` to auto-load every time you navigate to the repo. This will automatically load the `Nix`\n  environment which is running the proper version of `PHP and Xdebug (PHP 7.4)` this repository supports/requires.\n  ```bash\n  direnv allow\n  ```\n  - You will need to `cd` out of the project directory after you first install `direnv` and run `direnv allow` from within\n    the project directory, and then `cd` back into the project directory for `direnv` to auto-load the `Nix` environment properly.\n\nThis project also makes use of `pre-commit hooks` to help run lint and tests at time of commit, to leverage this you will\nneed to install [pre-commit](https://pre-commit.com/#installation) and run the following command while in this repo:\n\n```bash\npre-commit install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengine%2Fshipengine-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipengine%2Fshipengine-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengine%2Fshipengine-php/lists"}