Download the PHP package nusii/nusii-php without Composer
On this page you can find all versions of the php package nusii/nusii-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nusii-php
Nusii PHP
A PHP client library for the Nusii proposal software API.
Requires PHP 8.3+ and uses Guzzle for HTTP requests.
Installation
Install via Composer:
Quick Start
Custom Base URL
For self-hosted or development environments:
Resources
Account
Clients
Proposals
Sections
Line Items
Line items belong to sections. They must be created under a section.
Templates
Templates are read-only.
Proposal Activities
Proposal activities are read-only and track events like views, accepts, and rejections.
Users
Users are read-only.
Themes
Themes are read-only. Note: this endpoint returns a plain array, not a paginated response.
Webhook Endpoints
Available webhook events:
| Event | Description |
|---|---|
proposal_created |
A proposal was created |
proposal_updated |
A proposal was updated |
proposal_destroyed |
A proposal was deleted |
proposal_accepted |
A proposal was accepted by the client |
proposal_rejected |
A proposal was rejected by the client |
proposal_sent |
A proposal was sent to the client |
client_created |
A client was created |
client_updated |
A client was updated |
client_destroyed |
A client was deleted |
proposal_activity_client_viewed |
A client viewed something |
proposal_activity_client_viewed_proposal |
A client viewed a proposal |
Pagination
All list endpoints return a PaginatedResponse object that is both countable and iterable:
Paginating Through All Results
Error Handling
The library throws specific exceptions for different HTTP error codes:
All exceptions extend NusiiException, so you can catch that to handle any API error.
Rate Limiting
The Nusii API allows 100 requests per 30 seconds. Rate limit information is tracked on the client instance:
Testing
Run the unit tests:
Or with Pest directly:
Integration Tests
Integration tests run against a live API server. Set the environment variables and run:
Integration tests are automatically skipped when NUSII_API_KEY is not set.
Authentication
The library uses token authentication. Include your API key when creating the client:
All requests include the header:
You can find your API key in your Nusii account settings under Integrations.
Requirements
- PHP 8.3 or higher
- Guzzle 7.0 or higher
License
MIT