Download the PHP package codebes/gripp-sdk without Composer

On this page you can find all versions of the php package codebes/gripp-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gripp-sdk

Gripp SDK for PHP

Latest Version on Packagist Tests PHPStan PHP Version

A PHP SDK for the Gripp (now Exact Gripp) CRM/ERP API. Manage companies, contacts, projects, invoices, time tracking, and 50+ other resources through a fluent query builder with batch operations, auto-pagination, and automatic retries. Works with any PHP 8.1+ application, including Laravel.

Features

Requirements

Installation

Configuration

Option 1: Environment variables

Set GRIPP_API_TOKEN in your .env file or environment:

Then call configure without arguments:

The SDK uses https://api.gripp.com by default. To override, set GRIPP_API_URL in your environment.

Option 2: Explicit configuration

Option 3: Interactive setup

This creates a .env file with your credentials.

Quick Start

Query Builder

The query builder provides a fluent interface for filtering, ordering, and paginating results.

Supported Filter Operators

Operator Description
equals Exact match (default when using two-argument where)
notequals Not equal to
contains String contains
notcontains String does not contain
startswith String starts with
endswith String ends with
greaterthan Greater than
lessthan Less than
greaterequals Greater than or equal to
lessequals Less than or equal to
in Value is in array
notin Value is not in array
isnull Field is null (pass true as value)
isnotnull Field is not null (pass true as value)

Date Helpers

Common date filtering patterns are built into the query builder:

whereModifiedSince() sends two requests, on purpose. Gripp leaves updatedon empty on records that were created and never edited afterwards, so filtering on updatedon alone silently omits every untouched record. The correct condition is updatedon >= $date OR createdon >= $date, and the Gripp API has no OR - every filter in the array is ANDed. So the SDK runs both halves and merges them on id.

Auto-Prefixing

Field names are automatically prefixed with the entity name when using the query builder. Writing Project::where('createdon', ...) produces the filter field project.createdon. Fully qualified fields like project.createdon are left as-is.

Auto-Pagination

Both get() and the query builder's get() automatically paginate through all results. Use limit() when you only want a specific number of results (single API call):

Batch Operations

Group multiple API calls into a single HTTP request for better performance:

Rate Limit Awareness

The transport tracks rate limit headers from API responses and provides hooks for proactive budget management:

The SDK treats both HTTP 429 and HTTP 503 with Gripp error code 1004 (short-burst throttle) as rate limit errors.

Error Handling

The SDK throws specific exceptions for different error types:

Available Resources

All resources support read operations. Resources that also support create, update, and/or delete are indicated below.

Resource Create Read Update Delete
AbsenceRequest x x x x
AbsenceRequestLine x x x x
BulkPrice x x x x
CalendarItem x x x x
Company x x x x
CompanyDossier x x x x
Contact x x x x
Contract x x x x
ContractLine x x x x
Cost x
CostHeading x x x x
Department x x x x
Employee x x x x
EmployeeFamily x x x x
EmployeeTarget x
EmployeeYearlyLeaveBudget x x x
EmploymentContract x x x x
ExternalLink x x x x
File x
Hour x x x x
Invoice x x x x
InvoiceLine x x x x
Ledger x x x x
Memorial x
MemorialLine x
Notification
Offer x x x x
OfferPhase x x x x
OfferProjectLine x x x x
Packet x x x x
PacketLine x x x x
Payment x x x x
PriceException x x x x
Product x x x x
Project x x x x
ProjectPhase x x x x
PurchaseInvoice x x x x
PurchaseInvoiceLine x x x x
PurchaseOrder x x x x
PurchaseOrderLine x x x x
PurchasePayment x x x x
RejectionReason x x x x
RevenueTarget x
Tag x x x x
Task x x x x
TaskPhase x x x x
TaskType x x x x
TimelineEntry x x x x
UmbrellaProject x x x
Unit x x x x
Webhook x x x x
YearTarget x
YearTargetType x

Special resources:

Resource Metadata

Every resource class exposes constants that describe its schema:

Auto-Pagination

Both all() and get() automatically handle pagination, fetching all matching records transparently:

Response Format

All collection methods return Illuminate\Support\Collection instances. Single-record methods return associative arrays or null.

Billability and Invoiceability

CodeBes\GrippSdk\Features\Billability computes two measures from hours, project lines and invoice lines. In Dutch they have different names, and they answer different questions.

Measure Dutch Question Formula
Billability declarabiliteit How much of the time went to paid work? hours on paid project lines / all hours
Invoiceability facturabiliteit How much of the paid work was actually invoiced? invoiced hours / hours on paid project lines

Ten hours on a paid project line are 100% billable. If five of them end up on an invoice, invoiceability is 50%.

Why invoiceability is exact for some hours and estimated for others

Whether an hour counts as invoiced depends on the invoice basis (invoicebasis) of the project line it was written on, because Gripp records the link between hours and invoices differently per basis:

Invoice basis Dutch How Gripp links the invoice Precision
COSTING Nacalculatie Every invoiced hour carries hour.invoiceline. Exact, per hour
BUDGETED Begroot Every invoiced hour carries hour.invoiceline. Exact, per hour
FIXED Fixed No hour ever carries hour.invoiceline. The invoice line points at the project line (invoiceline.part) with a quantity. Exact per project line; per person only when one person worked on the line
NONBILLABLE Niet doorbelasten Not invoiced. Not part of invoiceability

This was verified against a full year of live Gripp data: for Nacalculatie and Begroot, the quantity on every invoice line in hours equals the sum of the hours linked to it, and not a single hour on a Fixed line had an invoice line. The limit is in how Gripp records Fixed invoicing, not in the SDK. No API call can tell who a Fixed invoice line was for.

For Fixed lines the SDK therefore works per project line:

  1. Over the line's whole life. All hours ever written on the line are set against all hour quantities ever invoiced on it, regardless of the requested period. Fixed work is often invoiced up front or in instalments, so comparing within one period would pair invoices with the wrong work.
  2. Not capped at the hours worked. Sell and invoice 35 hours, work 10, and those 10 hours count as 35 invoiced hours: 350% on that line.
  3. Split pro rata when a line is shared. When several people wrote hours on the line, each of their hours gets the line's ratio of invoiced hours to hours written. This is the only assumption in the calculation: totals per line, per project and per team add up exactly.
  4. Credit lines count negative on the project line they point at.
  5. Lines invoiced in other units are left out. Pieces (stuks), a fixed price (prijs) or any unit other than uur has no hour quantity to compare with. Unit.hoursperunit does not help, because Gripp returns 1 for every unit. These hours are reported as unmeasurable_hours and excluded from the percentage.

Every invoiceability result says how much of it is exact:

Key Meaning
billable_hours Hours on Fixed, Nacalculatie and Begroot lines
invoiced_hours Invoiced hours as described above; can exceed the hours worked on Fixed lines
uninvoiced_hours Billable hours not covered by invoicing
exact_hours Nacalculatie and Begroot hours, and Fixed hours on lines that one person worked on or that were never invoiced
estimated_hours Fixed hours on shared, invoiced lines, split pro rata
unmeasurable_hours Fixed hours on lines invoiced in units other than hours
invoiceability_percentage invoiced_hours / (billable_hours - unmeasurable_hours) * 100
by_invoice_basis Billable and invoiced hours per invoice basis

To make Fixed work exact per person, it has to be recorded differently in Gripp: one project line per person on Fixed projects, or the Begroot basis, where Gripp does link hours to invoices.

Cost. Invoiceability fetches the period's hours, plus the lifetime hours and invoice lines of every Fixed line in the period, 100 lines per request. For a team of about twenty people over a full year that took 206 API calls, around 100 seconds and 212 MB of memory, above PHP's default memory_limit of 128 MB. Raise the limit, or ask per employee or per quarter and add up the hours. forTeam() loads the same hours and needs the same memory.

uninvoicedHours() lists hours without hour.invoiceline. That includes every hour on a Fixed line, invoiced or not, so do not use it to find uninvoiced Fixed work.

Testing

Or directly:

Changelog

Please see the GitHub Releases page for more information on what has changed recently.

Contributing

Contributions are welcome! Please open a pull request against the main branch. All PRs require:

License

MIT - see LICENSE for details.


All versions of gripp-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codebes/gripp-sdk contains the following files

Loading the files please wait ...