{"id":21233735,"url":"https://github.com/softwarepunt/psinfoodservice-api-client","last_synced_at":"2025-03-15T02:44:04.170Z","repository":{"id":57055034,"uuid":"385447862","full_name":"SoftwarePunt/psinfoodservice-api-client","owner":"SoftwarePunt","description":"Unofficial PHP API Client for PS in foodservice Web API (PS-API)","archived":false,"fork":false,"pushed_at":"2024-02-06T13:25:34.000Z","size":215,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T05:02:31.003Z","etag":null,"topics":["api","foodbook","php","psapi","psinfoodservice"],"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/SoftwarePunt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-07-13T02:26:08.000Z","updated_at":"2022-02-07T15:57:10.000Z","dependencies_parsed_at":"2022-08-24T14:00:27.834Z","dependency_job_id":null,"html_url":"https://github.com/SoftwarePunt/psinfoodservice-api-client","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fpsinfoodservice-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fpsinfoodservice-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fpsinfoodservice-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftwarePunt%2Fpsinfoodservice-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftwarePunt","download_url":"https://codeload.github.com/SoftwarePunt/psinfoodservice-api-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676707,"owners_count":20329432,"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":["api","foodbook","php","psapi","psinfoodservice"],"created_at":"2024-11-21T00:00:16.303Z","updated_at":"2025-03-15T02:44:04.148Z","avatar_url":"https://github.com/SoftwarePunt.png","language":"PHP","readme":"# psinfoodservice-api-client\n***Unofficial* PHP API Client for PS in foodservice Web API (PS-API)**\n\n[![PHPUnit](https://github.com/SoftwarePunt/psinfoodservice-api-client/actions/workflows/phpunit.yml/badge.svg)](https://github.com/SoftwarePunt/psinfoodservice-api-client/actions/workflows/phpunit.yml)\n[![Version](http://poser.pugx.org/softwarepunt/psinfoodservice-api-client/version)](https://packagist.org/packages/softwarepunt/psinfoodservice-api-client)\n\nThis library helps you interact with the PS-API, version 6.\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e🌍 \u003cstrong\u003ePS in foodservice\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://psinfoodservice.nl/\"\u003ehttps://psinfoodservice.nl/\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e📕 \u003cstrong\u003eAPI documentation\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://webapi.psinfoodservice.com/V6/prod/Home/EN\"\u003ehttps://webapi.psinfoodservice.com/V6/prod/Home/EN\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e📦 \u003cstrong\u003eComposer package\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://packagist.org/packages/softwarepunt/psinfoodservice-api-client\"\u003esoftwarepunt/psinfoodservice-api-client\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n⚠ **Heads up - Limited scope:** this library currently only supports retrieving product information. PRs for other API features are welcome. :)\n\n## Installation\n### Requirements\n- PHP 8.2+\n  - with extensions: curl, simplexml \n- [Composer](https://getcomposer.org/)\n\n### Setup\nUse Composer to add the package as a dependency to your project:\n\n```shell\ncomposer require softwarepunt/psinfoodservice-api-client\n```\n\n## Usage\n### Getting started\nTo begin, include the Client and set your credentials and options. \n\n🔒 If you do not have credentials yet, [contact PS in foodservice](https://webapi.psinfoodservice.com/V6/prod/Home/EN) to request them first.\n\n```php\n\u003c?php\n\nuse SoftwarePunt\\PSAPI\\Client;\n\nrequire_once \"vendor/autoload.php\";\n\n$client = new Client();\n$client-\u003esetUsername(\"webapi@yourorg.ps\");\n$client-\u003esetPassword(\"************\");\n$client-\u003esetTimeout(30);\n```\n\nAll implemented API routes will match the URL structure, for example:\n\n```php\n// Example of structure - the code route for \"api/Product/Search\" call:\n$client-\u003eproduct()-\u003esearch(); \n```\n\n### Searching for products\nYou can search for a product by providing parameters. You must select one \"product set\" at minimum; for example: all public products.\n\nYou will typically use this to find a specific product, for example:\n\n```php\nuse SoftwarePunt\\PSAPI\\Models\\Params\\ProductSearchParams;\n\n$searchParams = new ProductSearchParams();\n$searchParams-\u003eShowAllProductSet = true;\n$searchParams-\u003eShowSubscribedProductSet = true; // must be set to explicitly include private data\n$searchParams-\u003eFilterOnEan = \"1213456789125\";\n\n$products = $client-\u003eproduct()-\u003esearch($searchParams);\n$product = $products-\u003eproduct[0];\necho $product-\u003esummary-\u003ename; // PS Citroensnoepje 20g\n```\n\n☝ The objects returned by this library are based on the API's actual XML response structure. They are fully type-hinted and have docblocks where available. \n\n## Development\n\n### Generating entity types\nThis project contains a tool that can generate or update entities from the XSD file provided by PS. All classes in `src/Models/Entities` are generated using this tool. You can use it as follows:\n\nTo use it, manually run the CLI script from the project directory:\n\n```shell\nphp cli/xsdgen.php path/to/PS_XSD.xsd\n```\n\nYou can download the latest XSD via the documentation page:\nhttps://webapi.psinfoodservice.com/V6/prod/Documentation/Xsd","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarepunt%2Fpsinfoodservice-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftwarepunt%2Fpsinfoodservice-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarepunt%2Fpsinfoodservice-api-client/lists"}