PHPackages                             iris-crm/php-sdk - 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. [API Development](/categories/api)
4. /
5. iris-crm/php-sdk

ActiveLibrary[API Development](/categories/api)

iris-crm/php-sdk
================

PHP SDK for IRIS CRM

16.7k↑23.8%2PHPCI failing

Since Aug 30Pushed 3y agoCompare

[ Source](https://github.com/iris-crm/php-sdk)[ Packagist](https://packagist.org/packages/iris-crm/php-sdk)[ RSS](/packages/iris-crm-php-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
============

[](#introduction)

Welcome to IRIS’s API!

The API is organized around `REST`. All requests should be made over `SSL`.

All request and response bodies, including errors, are encoded in `JSON`.

Open API
========

[](#open-api)

The Open API provides numerous functions to access or to update your CRM lead and merchant data using simple REST calls.

### You can use the E-Signature API to:

[](#you-can-use-the-e-signature-api-to)

- Generate an e-signature document
- Send an e-signature document
- Download an e-signature document
- Get a list of all lead e-signatures documents
- Get a list of available applications
- Create a new application field mapping
- Get a list of available application field mappings
- Get an application field mapping list
- Update an application field mapping
- Delete an application field mapping

### You can use the Helpdesk API to:

[](#you-can-use-the-helpdesk-api-to)

- Create a new ticket
- Get a list of helpdesk tickets
- Add a ticket comment
- Get detailed ticked information
- Update a ticket
- Delete a ticket
- Upload an attachment to a ticket, comment, checklist, or ticket type
- Download an attachment from a ticket
- Create a new helpdesk ticket type
- Get a list of helpdesk ticket types
- Get details for a helpdesk ticket type
- Update a helpdesk ticket type
- Delete a ticket type
- Download an attachment from a ticket type
- Get a list of available users to notify and assign

### You can use the Lead API to:

[](#you-can-use-the-lead-api-to)

- Create a lead
- Get a list of leads
- Get detailed lead information
- Update a lead
- Create a new lead field
- Get a list of available lead fields
- Get a lead field
- Update a lead field
- Update a lead field order position
- Create a lead field tab
- Get a list of all lead field tabs
- Get a lead field tab
- Update a lead field tab
- Create a lead note
- Get lead notes
- Create a lead appointment
- Get lead appointments
- Populate PDF Document
- Create a lead task
- Get lead tasks
- Assign a user
- Get a list of assigned users
- Unassign a user from a lead
- Upload a document
- Get a list of available documents
- Get a list of available document labels
- Download a document
- Send an email to lead with template
- Get a list of email templates
- Download a mailbox email attachment
- Send an SMS to lead with selected SMS template
- Get list of SMS templates
- Get a list of all lead campaign activity
- Get a list of all lead deletion activity
- Get a list of all lead duplicate activity
- Get a list of all lead links activity
- Get a list of all lead source activity
- Get a list of all lead status activity
- Get a list of available campaigns
- Get a list of available groups
- Get a list of available sources
- Get a list of available statuses
- Get a list of available users

### You can use the Merchant API to:

[](#you-can-use-the-merchant-api-to)

- Get a list of merchants
- Get detailed merchant information
- Update an existing merchant
- Get a list of batches and transactions
- Get a list of chargebacks
- Get a list of retrievals
- Get a list of statements
- Download a statement

### You can use the Residuals API to:

[](#you-can-use-the-residuals-api-to)

- Get residuals summary data
- Get residuals summary with merchant rows
- Get residuals details with merchant rows
- Get residuals line items
- Get residuals templates
- Get a list of users with assigned residuals templates

Generate an API token
=====================

[](#generate-an-api-token)

When you send an API request, you will need to include an API token in your request in order to authenticate your account.

The tokens are generated in the CRM by each user individually, and each user may create one or more tokens.

To generate a new API Token, open your user settings page by clicking on your username in the top-right corner, and clicking on the \*\* Settings \*\* link or you can use the [link](https://iriscrm.com/settings).

Then open the \*\* API Settings \*\* tab, click \*\* Create New API Token \*\*, configure your token’s settings as needed, and click \*\* Add New Token \*\*:

[![](/images/mapi001.png)](/images/mapi001.png)

Your new token will now be created and displayed in a popup window:

[![](/images/mapi002.png)](/images/mapi002.png)

Once the token is created, it will be shown in the list of available API Tokens where you can copy the token, update its settings, or delete it once it’s no longer needed:

[![](/images/mapi003.png)](/images/mapi003.png)

\*\* Note: \*\* The created tokens will inherit the user’s permissions to assigned merchants, leads, groups and processors.

Using the API
=============

[](#using-the-api)

Authentication to the API is performed via `X-API-KEY` header. Requests not properly authenticated will return a `401` error code.

`curl -X GET "https://iriscrm.com/api/v1/merchants/[MID HERE]" -H "accept: application/json" -H "X-API-KEY: [YOURKEY]"`

Note that all requests should be made over `SSL`. All request and response bodies, including errors, are encoded in JSON.

The API returns standard HTTP success or error status codes. In case of errors, additional information about what went wrong will be encoded in the response as JSON.

By default, you can make `120` requests per minute. Check the returned HTTP headers of any API request to see your current rate limit status.

Using the Subscription API
==========================

[](#using-the-subscription-api)

API Subscriptions are used to send information about an event to a URL and trigger an API call. This is more efficient than doing scheduled API calls.

To create a subscription, use the API Settings page or send a request using the instructions in the Subscriptions section below.

All you need to know is the events you want to be subscribed for and the url to which the updates need to be sent.

To create subscriptions using our GUI open tab \*\* API Settings \*\* at \*\*  \*\*:

[![](/images/new-subscription.png)](/images/new-subscription.png)

Authentication
==============

[](#authentication)

Authenticate your account by including your secret key in API requests. Do not share your secret API keys in publicly accessible areas, client-side code, and so forth. Authentication to the API is performed via `X-API-KEY` header. Requests not properly authenticated will return a `401` error code.

Errors
======

[](#errors)

Our API returns standard `HTTP` success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as `JSON`.

Limiting
========

[](#limiting)

You can make `120` requests per minute. If you will reach a limit you will get a `429: Too Many Attempts.` response from the server. Check the returned `HTTP` headers of any API request to see your current rate limit status.

Headers description:

- `X-RateLimit-Limit` tells you the max number of requests you're allowed to make within this application's time period
- `X-RateLimit-Remaining` tells you how many requests you have left within this current time period
- `Retry-After` tells you how many seconds to wait until you try again. (you'll only get `Retry-After` if you've hit the limit).

Change Log
==========

[](#change-log)

### 1.6.0 (2021-03-02)

[](#160-2021-03-02)

#### Created:

[](#created)

- Added `Get pricing templates` endpoint

### 1.5.20 (2021-02-12)

[](#1520-2021-02-12)

#### Updated:

[](#updated)

- Added `filename` property to the `lead.document.uploaded` subscription response

### 1.5.19 (2021-02-17)

[](#1519-2021-02-17)

#### Updated:

[](#updated-1)

- Added deposits endpoint
- Added `authorization_code` property to the chargeback response

### 1.5.18 (2021-01-14)

[](#1518-2021-01-14)

#### Updated:

[](#updated-2)

- Added `id` and `invoice_number` properties to the `transactions` section of the transactions response

### 1.5.16 (2020-12-11)

[](#1516-2020-12-11)

#### Updated:

[](#updated-3)

- Renamed task priority from "Low" to "Normal"

### 1.5.15 (2021-01-18)

[](#1515-2021-01-18)

#### Updated:

[](#updated-4)

- Added `due` value for `sort_by` and `date_filter` parameters on the get a list of Tickets endpoint
- Added `due` parameter on the get a list of Tickets endpoint
- Added `due` parameter on the get detailed information of Tickets endpoint
- Added `only_business_days` parameter on the get a list of Tickets endpoint
- Added `only_business_days` parameter on the get detailed information of Tickets endpoint
- Added `only_business_days` property to the Ticket on the Ticket create endpoint
- Added `only_business_days` property to the Ticket on the Ticket update endpoint
- Added `only_business_days` property to the Ticket Type on the get a list of Ticket Type endpoint
- Added `only_business_days` parameter on the get detailed information of Ticket Type endpoint
- Added `only_business_days` property to the Ticket Type on the Ticket Type create endpoint
- Added `only_business_days` property to the Ticket Type on the Ticket Type update endpoint
- Added `attached_files` property to the Ticket on the Ticket create endpoint
- Added `attached_files` property to the Ticket Checklist on the Ticket create endpoint
- Added `attached_files` property to the Ticket Checklist on the Ticket update endpoint
- Added `attached_files` property to the Ticket Comment on the Comment create endpoint

### 1.5.14 (2020-11-26)

[](#1514-2020-11-26)

#### Updated:

[](#updated-5)

- Added `template_id`, `completed_by`, and `completed_at` properties to the `checklist` section of the ticket create response
- Added `template_id`, `completed_by`, and `completed_at` properties to the `checklist` section of ticket details response
- Added `template_id`, `completed_by`, and `completed_at` properties to the `checklist` section of ticket update response
- Added `template_id`, `completed_by`, and `completed_at` properties to the `checklist` section of ticket's checklist updated subscription response

### 1.5.13 (2020-11-20)

[](#1513-2020-11-20)

#### Updated:

[](#updated-6)

- Added `priority` property to the Ticket Type on the Ticket Type create endpoint
- Added `priority` property to the Ticket Type on the Ticket Type update endpoint

### 1.5.12 (2020-11-02)

[](#1512-2020-11-02)

#### Updated:

[](#updated-7)

- Changed `due_date` property to the datetime format on the ticket create endpoint
- Changed `due_date` property to the datetime format on the ticket update endpoint

### 1.5.11 (2020-10-20)

[](#1511-2020-10-20)

#### Updated:

[](#updated-8)

- Added `notify_assigned_users` property for ticket creation payload.

### 1.5.10 (2020-10-19)

[](#1510-2020-10-19)

#### Updated:

[](#updated-9)

- Added `group_id` property for ticket creation payload.
- Added `group_id` property for ticket update payload.

### 1.5.9 (2020-11-02)

[](#159-2020-11-02)

#### Updated:

[](#updated-10)

- Added `new_files` property for ticket update payload.
- Added `new_files` property for ticket type update payload.

### 1.5.8 (2020-10-20)

[](#158-2020-10-20)

#### Updated:

[](#updated-11)

- Added `preview_images` property for ticket request and response data.
- Added `preview_images` property for ticket comment request and response data.
- Added `preview_images` property for ticket and ticket comment properties.
- Added `preview_images` property for ticket request and response data.

### 1.5.7 (2020-10-05)

[](#157-2020-10-05)

#### Updated:

[](#updated-12)

- Added `notify_assigned_users` property for ticket creation payload.

### 1.5.5 (2020-07-23)

[](#155-2020-07-23)

#### Updated:

[](#updated-13)

- Added endpoint with file labels what can be used for document upload.

### 1.5.5 (2020-10-20)

[](#155-2020-10-20)

#### Updated:

[](#updated-14)

- Added endpoint with file labels what can be used for document upload.

### 1.5.4 (2020-07-13)

[](#154-2020-07-13)

#### Updated:

[](#updated-15)

- Added `files_count` property to the ticket create endpoint response.
- Added `files_count` property to the response of ticket list endpoint.
- Added `files_count` property to the response of ticket detailed information endpoint.
- Added `files_count` property to the ticket update endpoint response.
- Added `files_count` property to the ticket.created subscription data.
- Added `files_count` property to the ticket.updated subscription data.
- Added `files_count` property to the ticket.resolved subscription data.
- Added `files_count` property to the ticket.checklist.updated subscription data.

### 1.5.3 (2020-07-06)

[](#153-2020-07-06)

#### Updated:

[](#updated-16)

- Added `search` filter to the tickets list endpoint.

### 1.5.2 (2020-07-10)

[](#152-2020-07-10)

#### Updated:

[](#updated-17)

- Added `due_date` property to the ticket create endpoint request and response.
- Added `due_date` property to the response of ticket list endpoint.
- Added `due_date` property to the response of ticket detailed information endpoint.
- Added `due_date` property to the ticket update endpoint request and response.
- Added `due_date` property to the ticket.created subscription data.
- Added `due_date` property to the ticket.updated subscription data.
- Added `due_date` property to the ticket.resolved subscription data.
- Added `due_date` property to the ticket.checklist.updated subscription data.

### 1.5.1 (2020-08-10)

[](#151-2020-08-10)

#### Created:

[](#created-1)

- Added a Residuals API to work with your residuals reports.

### 1.4.9 (2020-06-26)

[](#149-2020-06-26)

#### Updated:

[](#updated-18)

- Added `hide_resolved` filter to the tickets list endpoint.

### 1.4.8 (2020-06-12)

[](#148-2020-06-12)

#### Updated:

[](#updated-19)

- Added `set_for`, `set_at`, `set_by`, `modified`, `modified_by`, `date_end`, `confirmed_by`, `seen_by`, `rescheduled`, `rescheduled_by`, and `rescheduled_count` properties to the lead appointments endpoint response.
- Added `set_for`, `set_by`, `modified_by`, `confirmed_by`, `seen_by`, `rescheduled_by`, `rescheduled_count`, `date_filter`, `start_date`, `end_date`, and `done` filters to the lead appointments endpoint.
- Added sorting to the lead appointments endpoint.
- Marked `user` property as deprecated on the lead appointments endpoint response.

### 1.4.7 (2020-05-13)

[](#147-2020-05-13)

#### Updated:

[](#updated-20)

- Added `old_status_id` to lead status activity endpoint.
- Added `new_status_id` to lead status activity endpoint.

### 1.4.6 (2020-05-01)

[](#146-2020-05-01)

#### Created:

[](#created-2)

- Added `lead.signature.generated` subscription endpoint.
- Added `lead.signature.opened` subscription endpoint
- Added `lead.signature.signed` subscription endpoint

#### Updated:

[](#updated-21)

- Added `createdAt` and `createdBy` properties to the `lead.updated` subscription endpoint
- Added `email`, `contact`, `phone` and `address` properties to the `lead.deleted` subscription endpoint
- Added `email`, `contact`, `phone` and `address` properties to the `lead.restored` subscription endpoint
- Added `createdAt` and `createdBy` properties to the `lead.status.updated` subscription endpoint

### 1.4.5 (2020-04-21)

[](#145-2020-04-21)

#### Updated:

[](#updated-22)

- Added `files` property to the ticket creation details endpoint response.
- Added `file` property for each checklist item in the ticket creation details endpoint response.
- Added `files` property to the Helpdesk tickets details endpoint.
- Added `files` property for each comment in the Helpdesk tickets details endpoint.
- Added `file` property for each checklist item in the Helpdesk tickets details endpoint.
- Added `files` property to the Helpdesk ticket update endpoint.
- Added `files` property for each comment in the Helpdesk ticket update endpoint.
- Added `file` property for each checklist item in the Helpdesk ticket update endpoint
- Added `file` property for each checklist item in the ticket type creation details endpoint response.
- Added `file` property for each checklist item on the ticket type endpoint.
- Added `file` property for each checklist item on the ticket type update endpoint.
- Added `files` property for ticket created subscription.
- Added `files` property for ticket updated subscription.
- Added `files` property for ticket resolved subscription.
- Added `files` property for ticket commented subscription.
- Added `files` property for ticket checklist updated subscription.
- Added `file` property for each checklist item on checklist updated subscription.

#### Created:

[](#created-3)

- Added endpoint for download attachments from Ticket Type

### 1.4.4 (2020-04-02)

[](#144-2020-04-02)

#### Updated:

[](#updated-23)

- Added `resolver` filter to the Helpdesk tickets endpoint.

### 1.4.3 (2020-04-01)

[](#143-2020-04-01)

#### Updated:

[](#updated-24)

- Added `status_updated` option for `date_filter` filter to the Helpdesk tickets endpoint.

### 1.4.2 (2020-03-27)

[](#142-2020-03-27)

#### Updated:

[](#updated-25)

- Added `lid` filter to the Helpdesk tickets endpoint.
- Added `mid` filter to the Helpdesk tickets endpoint.

### 1.4.1 (2020-03-20)

[](#141-2020-03-20)

#### Updated:

[](#updated-26)

- Added `hash` and `url` properties to the 'Send an e-signature document' endpoint.

### 1.4.0 (2020-03-05)

[](#140-2020-03-05)

#### Updated:

[](#updated-27)

- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.created` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.updated` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.deleted` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.restored` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.status.updated` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.note.added` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.document.uploaded` subscription.
- Added `assigned_users`, `lead_url` properties to the subscriptions response for the `lead.email.received` subscription.
- Added `ticket_url` and `assigned_users` properties to the subscriptions response for the `ticket.created` subscription.
- Added `ticket_url` and `assigned_users` properties to the subscriptions response for the `ticket.updated` subscription.
- Added `ticket_url` and `assigned_users` properties to the subscriptions response for the `ticket.resolved` subscription.
- Added `ticket_url` and `assigned_users` properties to the subscriptions response for the `ticket.commented` subscription.
- Added `ticket_url` and `assigned_users` properties to the subscriptions response for the `ticket.checklist.updated` subscription.
- Added `application_url`, `identifier` and `lid` properties to the subscriptions response for the `turboapp.submitted` subscription.
- Added `application_url`, `identifier` and `lid` properties to the subscriptions response for the `turboapp.updated` subscription.
- Added `application_url`, `identifier` and `lid` properties to the subscriptions response for the `turboapp.approved` subscription.
- Added `application_url`, `identifier` and `lid` properties to the subscriptions response for the `turboapp.declined` subscription.
- Changed all subscriptions dates properties to the snake case

### 1.3.5 (2020-02-26)

[](#135-2020-02-26)

#### Created:

[](#created-4)

- Added a Helpdesk API to work with your helpdesk data.

### 1.3.4 (2020-02-25)

[](#134-2020-02-25)

#### Updated:

[](#updated-28)

- Added a `lid` property to the "turboapp.submitted" subscription.

### 1.3.3 (2020-02-24)

[](#133-2020-02-24)

#### Updated:

[](#updated-29)

- Added a `salesRep` parameter to 'lead.status.updated' subscription.

### 1.3.2 (2019-11-21)

[](#132-2019-11-21)

#### Updated:

[](#updated-30)

- Added a `expire` parameter to 'Generate an e-signature document' endpoint.
- Added the ability to add multiple signers to the document and added an `expire` parameter to 'Send an e-signature document' endpoint.

### 1.3.1 (2019-11-18)

[](#131-2019-11-18)

#### Updated:

[](#updated-31)

- Rename subscriptions from "application.created" to "turboapp.submitted" and "application.updated" to "turboapp.updated".

#### Created:

[](#created-5)

- Added new subscriptions for "turboapp.approved" event.
- Added new subscriptions for "turboapp.declined" event.

### 1.2.2 (2019-09-03)

[](#122-2019-09-03)

#### Updated:

[](#updated-32)

- Added a `per_page` property to all list endpoints.

### 1.2.1 (2019-08-26)

[](#121-2019-08-26)

#### Updated:

[](#updated-33)

- Added a `leads` property to merchants endpoint.

### 1.2.0 (2019-07-26)

[](#120-2019-07-26)

#### Updated:

[](#updated-34)

- The endpoint for creating API subscriptions has been updated. Status based options have been added to some events.
- The endpoint for updating API subscriptions has been updated. Status based options have been added to some events.

### 1.1.0 (2019-07-24)

[](#110-2019-07-24)

#### Created:

[](#created-6)

- Added an endpoint for getting SMS templates.
- Added new subscriptions for `application.created` event
- Added new subscriptions for `application.updated` event

#### Updated:

[](#updated-35)

- Added a `sic_code` property to merchants endpoint

### 1.0.0 (2019-06-20)

[](#100-2019-06-20)

#### Created:

[](#created-7)

- Added change log.

Requirements
------------

[](#requirements)

PHP 5.5 and later

Installation &amp; Usage
------------------------

[](#installation--usage)

### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), please run:

```
composer require iris-crm/php-sdk

```

Tests
-----

[](#tests)

To run the unit tests:

```
composer install
./vendor/bin/phpunit

```

Getting Started
---------------

[](#getting-started)

Please follow the [installation procedure](#installation--usage) and then run the following:

```
