agsystemspl / fakturownia-rest-client
PHP client for Fakturownia.pl API
Package info
github.com/agsystemspl/fakturownia-rest-client
pkg:composer/agsystemspl/fakturownia-rest-client
1.0.1
2026-01-16 10:33 UTC
Requires
- php: >=7.0
- agsystemspl/abstract-rest-client: ^1.0
Requires (Dev)
- vlucas/phpdotenv: ^2.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-24 12:36:51 UTC
README
PHP client for Fakturownia or InvoiceOcean API.
Requirements
- PHP >= 7.0
- agsystemspl/abstract-rest-client ^1.0
Installation
Composer
composer require agsystemspl/fakturownia-rest-client
Usage
Client Initialization
use AGSystems\Fakturownia\REST\Client; $accessToken = 'JDxxxxxxxxxxxxxx'; // For Fakturownia (Polish version) $apiUrl = 'https://YOUR_DOMAIN.fakturownia.pl/'; // For InvoiceOcean (English version) // $apiUrl = 'https://YOUR_DOMAIN.invoiceocean.com/'; $client = new Client($accessToken, $apiUrl);
Available Resources
The client supports the following API endpoints:
| Resource | Description |
|---|---|
invoices |
Invoices |
clients |
Clients |
products |
Products |
payments |
Payments |
categories |
Categories |
warehouses |
Warehouses |
warehouse_documents |
Warehouse Documents |
Examples
Fetching Resource Lists
// Get a list of clients with pagination $clients = $client->clients->get([ 'page' => 1, 'per_page' => 25 ]); // Get a list of invoices $invoices = $client->invoices->get();
Fetching a Single Resource
// Get a client by ID $clientData = $client->clients(123)->get(); // Get an invoice by ID $invoice = $client->invoices(456)->get();
Creating a Resource
// Add a new client $newClient = $client->clients->post([ 'client' => [ 'name' => 'Company XYZ', 'tax_no' => '1234567890', 'city' => 'Warsaw' ] ]); // Create an invoice $newInvoice = $client->invoices->post([ 'invoice' => [ 'kind' => 'vat', 'number' => null, 'sell_date' => '2024-01-15', 'issue_date' => '2024-01-15', 'payment_to' => '2024-01-29', 'client_id' => $newClient->id, 'positions' => [ ['name' => 'Service', 'quantity' => 1, 'total_price_gross' => 123.00] ] ] ]);
Updating a Resource
// Update client data $client->clients(123)->put([ 'client' => [ 'name' => 'New Company Name' ] ]);
Deleting a Resource
// Delete a client $client->clients(123)->delete();
Sending Invoice by Email
$client->invoices(456)->send_by_email->post();
API Documentation
Full API documentation:
- Fakturownia (PL): https://app.fakturownia.pl/api
- InvoiceOcean (EN): https://app.invoiceocean.com/api
License
MIT