{"id":13609752,"url":"https://github.com/netinternet/parasut-v4","last_synced_at":"2026-01-11T16:53:21.730Z","repository":{"id":49658299,"uuid":"128724190","full_name":"netinternet/parasut-v4","owner":"netinternet","description":"Parasut Php Api V4","archived":false,"fork":false,"pushed_at":"2023-09-01T15:49:09.000Z","size":43,"stargazers_count":52,"open_issues_count":1,"forks_count":26,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-10T08:34:36.267Z","etag":null,"topics":["composer-package","parasut","php"],"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/netinternet.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2018-04-09T06:22:15.000Z","updated_at":"2024-08-01T19:43:35.861Z","dependencies_parsed_at":"2024-08-01T19:43:31.513Z","dependency_job_id":"76cc3b3d-2294-4d9a-9f32-14db8848ebaf","html_url":"https://github.com/netinternet/parasut-v4","commit_stats":{"total_commits":45,"total_committers":8,"mean_commits":5.625,"dds":0.4,"last_synced_commit":"ac1ed799221038d3b60d10a711d2669504c08dd0"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netinternet%2Fparasut-v4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netinternet%2Fparasut-v4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netinternet%2Fparasut-v4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netinternet%2Fparasut-v4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netinternet","download_url":"https://codeload.github.com/netinternet/parasut-v4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248629977,"owners_count":21136355,"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":["composer-package","parasut","php"],"created_at":"2024-08-01T19:01:37.719Z","updated_at":"2026-01-11T16:53:21.691Z","avatar_url":"https://github.com/netinternet.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Parasut PHP Client\n\n**Parasut Api V4 with PHP**\n\n## Install\n```\ncomposer require netinternet/parasut-v4\n```\n\n## Usage\n```php\n\u003c?php\nuse Parasut;\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$client = new Client([\n    \"client_id\" =\u003e \"xxxxxxx\",\n\t\"username\" =\u003e \"xxxxxx\",\n\t\"password\" =\u003e \"xxxxxxxx\",\n\t\"grant_type\" =\u003e \"password\",\n\t\"redirect_uri\" =\u003e \"urn:ietf:wg:oauth:2.0:oob\",\n    'company_id' =\u003e \"xxxxx\"\n]);\n\n// automatically get access token and save src/token.ini\n```\n\n* Create a new Customer Account\n\n```php\n$customer = array (\n    'data' =\u003e\n        array (\n            'type' =\u003e 'contacts',\n            'attributes' =\u003e array (\n                    'email' =\u003e 'email-address',\n                    'name' =\u003e 'username', // REQUIRED\n                    'short_name' =\u003e 'xxxx',\n                    'contact_type' =\u003e 'person', // or company\n                    'district' =\u003e 'Pamukkale',\n                    'city' =\u003e 'Denizli',\n                    'address' =\u003e 'xxxxxxx',\n                    'phone' =\u003e '+90xxxxxxxxxx',\n                    'account_type' =\u003e 'customer', // REQUIRED\n                    'tax_number' =\u003e 'xxxxxxxx ', // TC no for person\n                    'tax_office' =\u003e 'Pamukkale'\n            ),\n            \"relationships\" =\u003e array (  // not required\n                \"category\" =\u003e array (\n                    \"data\" =\u003e array (\n                        \"id\" =\u003e \"xxx\",\n                        \"type\" =\u003e \"item_categories\"\n                    )\n                )\n            )\n        ),\n);\n$client-\u003ecall(Parasut\\Account::class)-\u003ecreate($customer);\n// or\n$account = new Parasut\\Account($client);\n$account-\u003ecreate($customer);\n```\n\n* Create Invoice\n\n```php\n$invoice = array (\n    'data' =\u003e array (\n       'type' =\u003e 'sales_invoices', // Required\n       'attributes' =\u003e array (\n           'item_type' =\u003e 'invoice', // Required\n           'description' =\u003e 'Description',\n           'issue_date' =\u003e '2018-03-19', // Required\n           'due_date' =\u003e '2018-03-19',\n           'invoice_series' =\u003e 'test',\n           'invoice_id' =\u003e 1,\n           'currency' =\u003e 'TRL'\n       ),\n       'relationships' =\u003e array (\n           'details' =\u003e array (\n               'data' =\u003earray (\n                   0 =\u003e array (\n                       'type' =\u003e 'sales_invoice_details',\n                       'attributes' =\u003e array (\n                           'quantity' =\u003e 1,\n                           'unit_price' =\u003e 29.90,\n                           'vat_rate' =\u003e 18,\n                           'description' =\u003e 'Hosting'\n                       ),\n                       \"relationships\" =\u003e array (\n                           \"product\" =\u003e array (\n                               \"data\" =\u003e array (\n                                   \"id\" =\u003e \"xxxxx\", \n                                   \"type\" =\u003e \"products\"\n                               )\n                           )\n                       )\n                   ),\n                   1 =\u003e array (\n                       'type' =\u003e 'sales_invoice_details',\n                       'attributes' =\u003e array (\n                           'quantity' =\u003e 1,\n                           'unit_price' =\u003e 19.90,\n                           'vat_rate' =\u003e 18,\n                           'discount_type' =\u003e 'percentage',\n                           'discount_value' =\u003e 10,\n                           'description' =\u003e 'Domain'\n                       ),\n                       \"relationships\" =\u003e array (\n                           \"product\" =\u003e array (\n                               \"data\" =\u003e array (\n                                   \"id\" =\u003e \"xxxxxx\",\n                                   \"type\" =\u003e \"products\"\n                               )\n                           )\n                       )\n                   ),\n               ),\n           ),\n           'contact' =\u003e array (\n               'data' =\u003e array (\n                   'id' =\u003e 'xxxx',\n                   'type' =\u003e 'contacts'\n               )\n           )\n       ),\n    )\n);\n$client-\u003ecall(Parasut\\Invoice::class)-\u003ecreate($invoice);\n```\n\n* Add Payment\n\n```php\n$payArr = array(\n    \"data\" =\u003e array(\n        \"type\" =\u003e \"payments\",\n        \"attributes\" =\u003e array(\n            \"description\" =\u003e \"xxxx x x  xxxx x x \",\n            \"account_id\" =\u003e \"xxx\", // bank account id on Parasut\n            \"date\" =\u003e \"2018-03-19\",\n            \"amount\" =\u003e 56.42,\n            \"exchange_rate\" =\u003e 1.0\n        )\n    )\n);\n$id = xxx; // Invoice id\n$client-\u003ecall(Parasut\\Invoice::class)-\u003epay($id, $payArr);\n```\n\n* Create E Archive Invoice\n\n```php\n$invArr = array (\n    \"data\" =\u003e array(\n        \"type\" =\u003e \"e_archives\",\n        \"relationships\" =\u003e array (\n            \"sales_invoice\" =\u003e array (\n                \"data\" =\u003e array (\n                    \"id\" =\u003e xxxx, // Invoice Id\n                    \"type\" =\u003e \"sales_invoices\"\n                )\n            )\n        )\n    )\n);\n$client-\u003ecall(Parasut\\Invoice::class)-\u003ecreate_e_archive($invArr);\n```\n\n* Create Product\n\n```php\n$productArr = array(\n    'data' =\u003e array (\n        'type' =\u003e 'products',\n        'attributes' =\u003e array (\n            'name' =\u003e 'xxxx xx x x x x xx '\n        )\n    )\n);\n$client-\u003ecall(Parasut\\Product::class)-\u003ecreate($productArr);\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetinternet%2Fparasut-v4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetinternet%2Fparasut-v4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetinternet%2Fparasut-v4/lists"}