{"id":42403962,"url":"https://github.com/dropcart/php-client","last_synced_at":"2026-01-28T01:29:08.218Z","repository":{"id":50984542,"uuid":"120472204","full_name":"dropcart/php-client","owner":"dropcart","description":"This Dropcart PHP Client is the official PHP client for the REST API provided by Dropcart for setting up your own web frontend.","archived":false,"fork":false,"pushed_at":"2023-11-21T10:59:45.000Z","size":7317,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-02T15:43:14.684Z","etag":null,"topics":["client","dropcart","php","software","webshop"],"latest_commit_sha":null,"homepage":null,"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/dropcart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-06T14:43:53.000Z","updated_at":"2022-11-23T15:44:22.000Z","dependencies_parsed_at":"2023-01-23T13:45:17.351Z","dependency_job_id":null,"html_url":"https://github.com/dropcart/php-client","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dropcart/php-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropcart%2Fphp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropcart%2Fphp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropcart%2Fphp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropcart%2Fphp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropcart","download_url":"https://codeload.github.com/dropcart/php-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropcart%2Fphp-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["client","dropcart","php","software","webshop"],"created_at":"2026-01-28T01:29:07.574Z","updated_at":"2026-01-28T01:29:08.213Z","avatar_url":"https://github.com/dropcart.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dropcart PHP Client\n\nSee also GitHub Pages: [https://dropcart.github.io/php-client/](https://dropcart.github.io/php-client/)\n\nDropcart makes it extremely easy setting up an online shop.\nAll orders, payments and invoices are created and processed automatically. There is no need for for pushing the order manually to a wholesaler, or to create a package slip, or whatever. \n\nThis Dropcart PHP Client is the official PHP client for the REST API provided by Dropcart for setting up your own web frontend.\n\n + **English**\n   + [Installation](#installation)\n     + [Via composer](#via-composer-(preferred))\n     + [Standalone](#standalone)\n   + [Usage](#usage)\n   + [Licence](#license)\n   + [Support](#support)\n\n## Installation\n\nInstallation is rather easy. This client is available as a package on [Packagist](https://packagist.org/) and thus addable to your project via composer. \n_This is the preferred method_.\n\nThe client is also available as standalone .zip. \n\n### Via composer (preferred)\n\n```bash\n$ composer require dropcart/dropcart-php-client\n```\n\nAdd `require vendor/autoload.php` to the files where you want to use the client. (`../` is of course relative to where you require the file)\n\n### Standalone\n\n1. Download the latest version of the [build/DropcartPhpClient.zip](https://raw.githubusercontent.com/dropcart/dropcart-php-client/master/build/DropcartPhpClient.zip)\n2. Extract and upload via (S)FTP to your shared hosting just outside of de document root.\n3. Add `require ../vendor/autoload.php` to the files where you want to use the client. (`../` is of course relative to where you require the file)\n\n## Usage\n\nYou'll need your public and private key. Login on the [Dropcart Management Console](https://my.dropcart.nl/login) or [register](https://dropcart.nl) to obtain those keys.\n\n##### **First set your keys**\n```php\n\\Dropcart\\PhpClient\\DropcartClient::setPublicKey('PUBLIC_KEY');\n\\Dropcart\\PhpClient\\DropcartClient::setPrivateKey('PRIVATE_KEY');\n``` \n\n##### **Making a request**\nYou can make request to the different services by calling it as method:\n```php\n\\Dropcart\\PhpClient\\DropcartClient::catalog();\n\\Dropcart\\PhpClient\\DropcartClient::catalog()-\u003eproducts();\n\\Dropcart\\PhpClient\\DropcartClient::catalog()-\u003ebrands();\n\\Dropcart\\PhpClient\\DropcartClient::catalog()-\u003ecategories();\n```\n\nThe latest method is always one of these:\n```php\n-\u003eget(...$args)\n-\u003epost(...$args)\n-\u003eput(...$args)\n-\u003edelete(...$args);\n```\n\nBy doing so the code will generate the appropiate URL with the requested HTTP method. For example\n```php\n\\Dropcart\\PhpClient\\DropcartClient::catalog()-\u003eproducts()-\u003eget(12332);\n// Will make a GET request to:\n// https://rest-api.dropcart.nl/catalog/products/12332\n\n\\Dropcart\\PhpClient\\DropcartClient::catalog(34)-\u003eproducts()-\u003eget();\n// Will make a GET request to:\n// https://rest-api.dropcart.nl/catalog/34/products (this will actually fail because this isn't a valid endpoint)\n```\n\nIf you need to send parameters along with a post or put request you'll use `addParam($name, $value)` or `addParams($array)`\n```php\n\\Dropcart\\PhpClient\\DropcartClient::catalog()-\u003eproducts()-\u003eaddParams([\n\t'name' =\u003e 'New Product',\n\t'description' =\u003e 'A descriptive text about this new and awesome product. You need to buy this, yo!'\n])-\u003epost();\n```\n\n##### **Getting the response**\nThis client uses the amazing [Guzzle](http://docs.guzzlephp.org/en/stable/) for making request. The response are Psr7 Responses.\nYou'll get the wanted JSON by doing:\n```php\ntry {\n\t$response   = \\Dropcart\\PhpClient\\DropcartClient::catalog(34)-\u003eproducts()-\u003eget();\n} catch(DropcartClientException $e) {\n\tdie('Client error:' . $e-\u003egetMessage());\n} catch (\\Exception $e)\n{\n\tdie('Server error:' . $e-\u003egetMessage());\n}\n\t\n$json       = $respons-\u003egetBody();\n``` \n\nFor a global overview of all the REST functions check [REST.md](REST.md)\n\n## License\n\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\n\n## Support\n\nPlease file an GitHub Issue when there are errors in the code.\n\nWhen failing to install please contact us: [info@dropcart.nl](mailto:info@dropcart.nl)\n\n\n## Nederlands\n\nMet Dropcart is het opzetten van een webshop bijzonder eenvoudig. Alle bestellingen, betalingen en facturen worden automatisch aangemaakt en verwerkt. Het is dus niet meer nodig om handmatig een bestelling bij een groothandel in te voeren, pakbon te verzenden etcetera. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropcart%2Fphp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropcart%2Fphp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropcart%2Fphp-client/lists"}