{"id":22734269,"url":"https://github.com/daurensky/winfreight-php-sdk","last_synced_at":"2025-03-30T02:12:36.471Z","repository":{"id":53818135,"uuid":"521213735","full_name":"daurensky/winfreight-php-sdk","owner":"daurensky","description":"The Winfreight SDK for PHP provides a native interface to the Winfreight API ","archived":false,"fork":false,"pushed_at":"2022-11-07T09:53:43.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T04:35:26.505Z","etag":null,"topics":["nucleus","php-sdk","winfreight"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daurensky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-04T10:00:42.000Z","updated_at":"2022-08-05T15:55:23.000Z","dependencies_parsed_at":"2022-08-19T18:20:43.968Z","dependency_job_id":null,"html_url":"https://github.com/daurensky/winfreight-php-sdk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daurensky%2Fwinfreight-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daurensky%2Fwinfreight-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daurensky%2Fwinfreight-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daurensky%2Fwinfreight-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daurensky","download_url":"https://codeload.github.com/daurensky/winfreight-php-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266239,"owners_count":20749754,"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":["nucleus","php-sdk","winfreight"],"created_at":"2024-12-10T20:19:58.612Z","updated_at":"2025-03-30T02:12:36.446Z","avatar_url":"https://github.com/daurensky.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Winfreight SDK for PHP\n\nThe **Winfreight SDK for PHP** makes it easy for developers to access Winfreight API in their PHP code. You can get\nstarted in minutes by installing the SDK through Composer or by downloading a single zip or phar file from our latest\nrelease.\n\nJump to:\n\n- [Getting started](https://github.com/daurensky/winfreight-php-sdk#getting-started)\n- [Quiz Examples](https://github.com/daurensky/winfreight-php-sdk#quick-examples)\n- [To do](https://github.com/daurensky/winfreight-php-sdk#to-do)\n\n## Getting started\n\n1. Get your username and password of Winfreight API.\n2. Minimum requirements - To run the SDK, your system will need to have PHP \u003e= 7.1.\n3. ``composer require daurensky/winfreight-php-sdk``\n4. Check the [Quiz Examples](https://github.com/daurensky/winfreight-php-sdk#quick-examples)\n\n## Quick Examples\n\n### Authorize client\n```\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Daurensky\\WinfreightPhpSdk\\Winfreight;\n\n$username = {username};\n$password = {password};\n\n// Prev token data\n$accessToken = {prev access token};\n$expiresIn = {prev expires in};\n\n$winfreight = new Winfreight($username, $password);\n$winfreight-\u003esetToken($accessToken, $expiresIn);\n\nif ($winfreight-\u003erottenToken()) {\n    $authorization = $winfreight-\u003erenewToken();\n\n    /*\n     * Your token refresh. Ex:\n     * DB::insert('credentials', [\n     *   'access_token' =\u003e $authorization-\u003egetAccessToken();\n     *   'expires_in'   =\u003e $authorization-\u003egetExpiresIn();\n     * ]);\n    */\n}\n```\n\n### Get data from API\n```\n\u003c?php\n\n$hubCodes = $winfreight-\u003egetHubCodes([\n    'GroupName' =\u003e 'Wintest',\n    'Province'  =\u003e 'Western Cape',\n    'Suburb'    =\u003e 'Constantiavale',\n]);\n\n$servCodee = $winfreight-\u003egetServCode([\n    'GroupName' =\u003e 'Wintest',\n]);\n\n$portalWaybill = $winfreight-\u003ecreatePortalWaybill([\n    'Waybill'          =\u003e 'TEST005',\n    'Date'             =\u003e '2021/01/13',\n    'SenderCustomerID' =\u003e 13,\n    ...\n]);\n```\n\n### To do\n- [ ] [Create Collection](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateCollection)\n- [ ] [Create Waybill](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateWaybill)\n- [ ] [Create Parcel](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateParcel)\n- [ ] [Create Collection Dimensions](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateCollectionDims)\n- [ ] [Get Tracking](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetTracking)\n- [x] [Get Hub Codes](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetHubCodes)\n- [x] [Get Serv Code](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetServCode)\n- [ ] [Get Waybill](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetWaybill)\n- [ ] [Get POD information for multiple waybills](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetPOD)\n- [ ] [Get Quote information](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetQuote)\n- [ ] [Create Waybill Import Header](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateWaybillImportHeader)\n- [ ] [Create Waybill Import Dims and Details](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateWaybillImportDimsAndDetails)\n- [ ] [Delete Waybill](https://cloudplatform.iconnix.co.za/API_Documentation/Home/DeleteWaybill)\n- [ ] [Delete Collection](https://cloudplatform.iconnix.co.za/API_Documentation/Home/DeleteCollection)\n- [ ] [Create Ewaybill Prestored](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateEwaybillPrestored)\n- [ ] [Create Prestored Dimensions](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreatePrestoredDimensions)\n- [ ] [Create POD](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreatePOD)\n- [ ] [Create Track](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreateTrack)\n- [ ] [Create POD Image](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreatePODImageBase64)\n- [x] [Create Portal Waybill](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CreatePortalWaybill)\n- [ ] [Get Label Data](https://cloudplatform.iconnix.co.za/API_Documentation/Home/GetLabel)\n- [ ] [Check Waybill](https://cloudplatform.iconnix.co.za/API_Documentation/Home/CheckIfWaybillExists)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaurensky%2Fwinfreight-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaurensky%2Fwinfreight-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaurensky%2Fwinfreight-php-sdk/lists"}