PHPackages                             elastly/elastly-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. elastly/elastly-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

elastly/elastly-php
===================

Elastly public API v1: price serving, canonical ingest, write-back claims and webhooks. Authenticate every request with an API key: Authorization: Bearer elastly\_live\_...

0.2.0(1mo ago)01↓66.7%MITPHPPHP ^8.1CI passing

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/elastly/elastly-php)[ Packagist](https://packagist.org/packages/elastly/elastly-php)[ Docs](https://elastly.io/docs/sdk)[ RSS](/packages/elastly-elastly-php/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

Elastly PHP SDK
===============

[](#elastly-php-sdk)

The official PHP client for the [Elastly](https://elastly.io) REST API.

Elastly prices quote and order lines for B2B sellers. Send a line (product, customer, quantity) and get back a price with the reasoning behind it: which pricing rules fired, what each one added, and how confident the engine is. The engine learns from the outcomes you feed back, so prices improve over time.

This client covers the full v1 API:

- **Prices**: price up to 100 lines in one call.
- **Ingest**: push products, customers, quotes, and orders from your own system in staged batches.
- **Write-backs**: pull approved price changes into your system and confirm them once applied.

Install
-------

[](#install)

```
composer require elastly/elastly-php
```

Requires PHP 8.1 or newer.

Authenticate
------------

[](#authenticate)

Create an API key in the dashboard (Settings, then API keys). Keys are scoped: an `erp` key prices lines, a `connector` key ingests data and claims write-backs. Send the key as a bearer token.

Price a line
------------

[](#price-a-line)

```
