{"id":22491819,"url":"https://github.com/always-open/shipengine","last_synced_at":"2025-08-03T00:31:10.197Z","repository":{"id":41866169,"uuid":"442516102","full_name":"always-open/ShipEngine","owner":"always-open","description":"Wrapper and classes for ShipEngine API (https://www.shipengine.com/)","archived":false,"fork":false,"pushed_at":"2024-03-14T08:54:23.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"3.x","last_synced_at":"2024-11-24T19:20:40.624Z","etag":null,"topics":["hacktoberfest","laravel","php","shipengine"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/always-open.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-28T16:10:48.000Z","updated_at":"2024-02-18T01:36:10.000Z","dependencies_parsed_at":"2024-02-18T02:27:11.426Z","dependency_job_id":"fd0f744c-c1fc-4907-94cb-2bca2813f72f","html_url":"https://github.com/always-open/ShipEngine","commit_stats":{"total_commits":56,"total_committers":4,"mean_commits":14.0,"dds":0.2321428571428571,"last_synced_commit":"7887922f4448ceca62dd553c403c69131493fbf4"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/always-open%2FShipEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/always-open%2FShipEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/always-open%2FShipEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/always-open%2FShipEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/always-open","download_url":"https://codeload.github.com/always-open/ShipEngine/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228508031,"owners_count":17931263,"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":["hacktoberfest","laravel","php","shipengine"],"created_at":"2024-12-06T18:11:21.224Z","updated_at":"2024-12-06T18:11:21.905Z","avatar_url":"https://github.com/always-open.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShipEngine\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/always-open/shipengine.svg?style=flat-square)](https://packagist.org/packages/always-open/shipengine)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/always-open/shipengine/run-tests?label=tests)](https://github.com/always-open/shipengine/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/always-open/shipengine/Check%20\u0026%20fix%20styling?label=code%20style)](https://github.com/always-open/shipengine/actions?query=workflow%3A\"Check+%26+fix+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/always-open/shipengine.svg?style=flat-square)](https://packagist.org/packages/always-open/shipengine)\n\u003ca href=\"https://codeclimate.com/github/always-open/ShipEngine/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/6817ad06980c52a8343d/maintainability\" /\u003e\u003c/a\u003e\n\nWrapper around ShipEngine API\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require always-open/shipengine\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"shipengine-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | ShipEngine configurations\n    |--------------------------------------------------------------------------\n    |\n    | API Key used to authenticate with ShipEngine APIs.\n    | https://www.shipengine.com/docs/auth/\n    |\n    */\n    'credentials' =\u003e [\n        'key' =\u003e env('SHIP_ENGINE_API_KEY'),\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | ShipEngine configurations\n    |--------------------------------------------------------------------------\n    |\n    | Values used to set configuration of ShipEngine API integration.\n    |\n    */\n    'endpoint' =\u003e [\n        'version'  =\u003e env('SHIP_ENGINE_API_VERSION', 'v1'),\n        'base'     =\u003e env('SHIP_ENGINE_ENDPOINT', 'https://api.shipengine.com/'),\n    ],\n    'retries'  =\u003e env('SHIP_ENGINE_RETRIES', 1),\n    'response' =\u003e [\n        'as_object' =\u003e env('SHIP_ENGINE_RESPONSE_AS_OBJECT', false),\n        'page_size' =\u003e env('SHIP_ENGINE_RESPONSE_PAGE_SIZE', 50),\n    ],\n    'timeout' =\u003e 'PT10S',\n];\n```\n\n## Usage\n\n### Config\nTo use the ShipEngine wrapper you must first instantiate a new instance.\n\nBy default, the config information is read out of the config file but can be overridden on the fly. This can be done \nwhen instantiating a new instance, which will impact all subsequent calls, or when making the call.\n```php\n// Use default config settings from `config/shipengine.php`\n$shipengine = new AlwaysOpen\\ShipEngine\\ShipEngine();\n// Override config which will impact all calls made with this instance\n$config = new \\AlwaysOpen\\ShipEngine\\ShipEngineConfig(['asObject' =\u003e true]);\n$custom_shipengine = new AlwaysOpen\\ShipEngine\\ShipEngine($config);\n// Override config on a single specific call\n$shipengine-\u003elistShipments(config: ['asObject' =\u003e true]);\n```\n\n### Making calls\nTo make calls to the ShipEngine API you must have credentials setup within ShipEngine itself. Those API credentials will \nthen be used by this library to handle the calls and responses.\n\n**_NOTE:_** This library is still in the 0.x.x stages and not all endpoints are fully mapped. We are working towards 100% \ncoverage of existing API endpoints.\n\nMethod names should match documentation names of API endpoints from official [ShipEngine API Docs](https://shipengine.github.io/shipengine-openapi/).\n\n#### Example calls\nHere is a sample of how to get a listing of shipments as well as the difference between `asObject =\u003e false` and `asObject =\u003e true`.\n```php\n$shipengine = new AlwaysOpen\\ShipEngine\\ShipEngine();\n$shipengine-\u003elistShipments();\n//[\n//    \"shipments\" =\u003e [\n//        [\n//            \"shipment_id\" =\u003e \"se-123456789\",\n//            \"carrier_id\" =\u003e \"se-123456\",\n//            ...\n//        ],\n//        [...],\n//    ],\n//    \"total\" =\u003e 12,\n//    \"page\" =\u003e 1,\n//    \"pages\" =\u003e 1,\n//    \"links\" =\u003e [\n//        \"first\" =\u003e [\n//             \"href\" =\u003e \"https://api.shipengine.com/v1/shipments?page=1\u0026page_size=25\",\n//        ],\n//        \"last\" =\u003e [\n//             \"href\" =\u003e \"https://api.shipengine.com/v1/shipments?page=1\u0026page_size=25\",\n//        ],\n//        \"prev\" =\u003e [],\n//        \"next\" =\u003e [],\n//     ],\n//];\n$shipengine-\u003elistShipments(config: ['asObject' =\u003e true]);\n// [\n//     \"shipments\" =\u003e [\n//       AlwaysOpen\\ShipEngine\\DTO\\Shipment {#4070\n//           +shipment_id: \"se-123456789\",\n//           +carrier_id: \"se-123456\",\n//            ...\n//        ],\n//        [...],\n//    ],\n//    \"total\" =\u003e 12,\n//    \"page\" =\u003e 1,\n//    \"pages\" =\u003e 1,\n//    \"links\" =\u003e [\n//        \"first\" =\u003e [\n//             \"href\" =\u003e \"https://api.shipengine.com/v1/shipments?page=1\u0026page_size=25\",\n//        ],\n//        \"last\" =\u003e [\n//             \"href\" =\u003e \"https://api.shipengine.com/v1/shipments?page=1\u0026page_size=25\",\n//        ],\n//        \"prev\" =\u003e [],\n//        \"next\" =\u003e [],\n//     ],\n//];\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [AlwaysOpen](https://github.com/AlwaysOpen)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falways-open%2Fshipengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falways-open%2Fshipengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falways-open%2Fshipengine/lists"}