Raw PHP Back to Top

Introduction

One of the hidden gems in the Infusionsoft suite of software is the API. The Infusionsoft API enables third-party applications to communicate with Infusionsoft and process, update, and destroy data for a wide variety of uses. You can do things like manage contacts, place orders, send messages, and most other things available for use in the Infusionsoft software.

Making REST Requests

The services documented below are RESTful in nature. They use common REST verbs to create, retrieve, update, and delete data within a given Infusionsoft Account.

All requests except authentication requests made to the Infusionsoft REST API will be to a URL starting with https://api.infusionsoft.com/crm/rest/v1/, and all requests must have an access token appended as the access_token query parameter in order to authenticate the request. A full URL might look like https://api.infusionsoft.com/crm/rest/v1/tasks?access_token=123abc

Requests to the REST API are almost always going to use JSON data in the payload when creating or updating data, and will always contain JSON objects when data is returned.

Helper Libraries

Infusionsoft officially supports the PHP library we created in-house. In addition, there are a number of third party helper libraries created by members of the community that may be useful to you. Many of these libraries are open source, so we encourage you to get into contact with their creators if you find bugs or have ideas for feature requests.

See Available Helper Libraries

Authentication

The Infusionsoft API uses a fairly standard implementation of OAuth 2.0 in order to provide authentication to all API endpoints. In the past, the Infusionsoft API has relied on a simple token based system; while those tokens will remain active until some date in the future for the XML-RPC API, any new implementations and all requests to the REST API will be required to use OAuth 2.0. Rather than re-explain OAuth again, it is more useful to provide a series of documents that have already been created and demonstrate the OAuth protocol, how to implement it in your code, how to troubleshoot, and how to ease development. Before that, though, it is important to have the authorization destinations and necessary details.

Request Permission

The first step in the OAuth flow is to redirect the user to Infusionsoft in order to authorize your application for access. The URL you generate here is where you first send your user in order for them to log in and continue the OAuth flow.

Redirect users to https://signin.infusionsoft.com/app/oauth/authorize along with the required parameters in order to start the OAuth exchange.


Form Parameters

client_id:
string (required)

Application client ID. Labeled as Key in developer portal

redirect_uri:
string (required)

This is the callback URL that Infusionsoft will redirect the users back to after authorization (must be HTTPS). The redirect_uri must be a registered URL in your application. We will not redirect users to any other URLs, so it is important this be properly setup before any authentication attempts.

response_type:
string (required)

The desired grant type, as per the OAuth 2.0 spec. The only current valid value is response_type=code Defaults to code

scope:
string

The scopes required by your application. The only current valid value is scope=full Defaults to full


Returns

Once the user has logged into their Infusionsoft account and authorized your application, they will be redirected back to your application at your specified redirect_uri with a code URL parameter that is used to request an access token.


GET https://signin.infusionsoft.com/app/oauth/authorize
Begins the OAuth flow by asking the user to choose an Infusionsoft account to authenticate with.

curl https://signin.infusionsoft.com/app/oauth/authorize

require("../../src/isdk.php");

$app = new iSDK();
$app->setClientId('CLIENTID');
$app->setSecret('CLIENTSECRET');

echo "<p>Click the link below to allow my application to access your Infusionsoft application.</p>";
echo '<a href="'.$app->getAuthorizationURL().'">Authorize My Application</a>';

$url = $infusionsoft->getAuthorizationUrl();
echo '<a href="' . $url . '">Click here to authorize</a>';

Request an Access Token

Using the code URL parameter returned from the authorization callback, your application can request an access token and refresh token from Infusionsoft.

Requesting an access token requires you to POST to https://api.infusionsoft.com/token


Form Parameters

client_id:
string (required)

Your application's client ID. Labeled as Key in developer portal

client_secret:
string (required)

Your application's client secret

code:
string (required)

The code returned when the user was redirected back to your application

grant_type:
string (required)

The desired grant type, as per the OAuth 2.0 spec. The only current valid value is grant_type=authorization_code Defaults to authorization_code

redirect_uri:
string (required)

The redirect URL from the original authorization request


Returns

The access_token is the token you will use to authenticate requests to the Infusionsoft API, and it expires after the time in the expires_in field (in seconds). In order to get a new valid access token after one has expired, you must use the refresh_token to request a new access token.


curl https://api.infusionsoft.com/token -X POST -d card=token_id

{
    "token_type": "bearer",
    "access_token": "axxxxx",
    "expires_in": 3600,
    "refresh_token": "rxxxxx",
    "scope":"full|example.infusionsoft.com"
}

require("../../src/isdk.php");

$app = new iSDK();

if(isset($_GET['code'])){
    $app->setClientId('CLIENTID');
    $app->setSecret('CLIENTSECRET');
    $app->authorize($_GET['code']);

    $app->refreshAccessToken();
}

$infusionsoft->requestAccessToken($_GET['code']);

Refresh an Access Token

After your access token expires, you'll use the refresh token that was provided when your access token was initially granted to request a new access token.

Note: Once a Refresh Token is used to receive a new Access Token, you will be returned a new Refresh Token as well, which will need to be persisted in order to request the next access token.

Refreshing an access token requires you to POST to https://api.infusionsoft.com/token


Form Parameters

grant_type:
string (required)

The desired grant type, as per the OAuth 2.0 spec. The only current valid value is refresh_token Defaults to refresh_token

refresh_token:
string (required)

The refresh token provided when the most recent access_token was granted

Header: Authorization:
string (required)

The word "Basic" concatenated with a base64 encoded string of your client_id, a colon, and your client_secret passed via the Authorization header.

Example pseudo code: 'Basic ' + base64_encode(CLIENT_ID + ':' + CLIENT_SECRET)


Returns

Provides a new access_token that you will use to authenticate subsequent requests to the Infusionsoft API. Like the originally granted token, this expires after the amount of time in the expires_in field (in seconds). You must use the newly provided refresh_token to request a subsequent new access token.

Make sure to also store the new refresh token every time you request and store a new access token.


POST /token
$infusionsoft->refreshAccessToken();

$infusionsoft = new InfusionsoftInfusionsoft(array(
    'clientId' => 'CLIENT_ID',
    'clientSecret' => 'CLIENT_SECRET',
    'redirectUri' => 'REDIRECT_URL',
));

// retrieve the existing token object from storage
$infusionsoft->setToken($yourStoredToken);

$infusionsoft->refreshAccessToken();

POST /token
$infusionsoft->refreshAccessToken();

$infusionsoft = new InfusionsoftInfusionsoft(array(
    'clientId' => 'CLIENTID',
    'clientSecret' => 'CLIENTSECRET',
    'redirectUri' => 'https://example.com/callback',
));

// retrieve the existing token object from storage
$infusionsoft->setToken($yourStoredToken);

return $infusionsoft->refreshAccessToken();

Order

The Order Service is used to create and charge an order.

The Order Object


Attributes

id:

Unique ID of the order

title:
string

Name given to the order

status:
string

Status of the order

recurring:
boolean

Whether or not this is a recurring order

total:
float

Total amount of the order

contact:
nested resource

Object representing the contact assigned to the order

creation_date:
datetime

Date and time the order was created

modification_date:
datetime

Date and time the order was last modified

lead_affiliate_id:
integer

ID of the lead affiliate

sales_affiliate_id:
integer

ID of the sales affiliate

total_paid:
float

Total amount paid

total_due:
float

Total amount due

order_items:
nested resource

List of items attached to the order

The Order Item Object


Attributes

id:
integer

ID of the order item

name:
string

Name of the item

description:
string

Description of the item

type:
string

The type of item

notes:
string

Notes attached to the item

quantity:
integer

Quantity of the item on the order

cost:
float

The cost of the item

price:
float

The price of the item

discount:
float

The total discount for the item

List All Orders

Retrieves a list of all orders


Form Parameters

since:
timestamp

Lower bound limit for the order expressed as a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

until:
timestamp

Upper bound limit for the order expressed as a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

limit:
integer

Specify the total number of results you would like returned per page. Limit 1,000.

offset:
integer

Specify the number of records to offset the results by for paging.

contact_id:
integer

Retrieves orders for the contact ID specified

product_id:
integer

Retrieves orders containing products with the ID specified


GET /orders

{
    "orders": [
        {
            "id": 1288,
            "title": "Email Testing Order (10/9/2013)",
            "status": "UNPAID",
            "recurring": null,
            "total": 500,
            "contact": {
                "id": 3,
                "email": "victor.miller@infusionsoft.com",
                "first_name": "Email",
                "last_name": "Testing",
                "company_name": "IBN",
                "job_title": "Chief Go-Go Dancer"
            },
            "creation_date": "2013-10-09T16:15:24.000-07:00",
            "modification_date": "2013-12-12T10:30:48.000-07:00",
            "lead_affiliate_id": 0,
            "sales_affiliate_id": 0,
            "total_paid": 360,
            "total_due": 500,
            "order_items": [
                {
                    "id": 31,
                    "name": "Howling Monkey",
                    "description": "",
                    "type": "Product",
                    "notes": null,
                    "quantity": 1,
                    "cost": 0,
                    "price": 100,
                    "discount": null,
                    "product": {
                        "id": 1,
                        "name": "Howling Monkey",
                        "sku": "",
                        "description": "",
                        "shippable": false,
                        "taxable": false
                    }
                },
                {
                    "id": 5130,
                    "name": "Baby Monkey",
                    "description": "",
                    "type": "Product",
                    "notes": "",
                    "quantity": 1,
                    "cost": 0,
                    "price": 100,
                    "discount": null,
                    "product": {
                        "id": 1,
                        "name": "Baby Monkey",
                        "sku": "",
                        "description": "",
                        "shippable": false,
                        "taxable": false
                    }
                }
            ],
            "url": "https://api.infusionsoft.com/crm/rest/v1/orders/1288"
        },
        {
            "id": 1548,
            "title": "Email Testing Order (10/9/2013)",
            "status": "UNPAID",
            "recurring": null,
            "total": 500,
            "contact": {
                "id": 3,
                "email": "victor.miller@infusionsoft.com",
                "first_name": "Email",
                "last_name": "Testing"
                "company_name": "IBN",
                "job_title": "Chief Go-Go Dancer"
            },
            "creation_date": "2013-10-09T16:15:24.000-07:00",
            "modification_date": "2013-12-12T10:30:48.000-07:00",
            "lead_affiliate_id": 0,
            "sales_affiliate_id": 0,
            "total_paid": 360,
            "total_due": 500,
            "order_items": [
                {
                    "id": 145,
                    "name": "Spider Monkey",
                    "description": "",
                    "type": "Product",
                    "notes": null,
                    "quantity": 1,
                    "cost": 0,
                    "price": 100,
                    "discount": null,
                    "product": {
                        "id": 1,
                        "name": "Spider Monkey",
                        "sku": "",
                        "description": "",
                        "shippable": false,
                        "taxable": false
                    }
                },
                {
                    "id": 1340,
                    "name": "Sock Monkey",
                    "description": "",
                    "type": "Product",
                    "notes": "",
                    "quantity": 1,
                    "cost": 0,
                    "price": 100,
                    "discount": null,
                    "product": {
                        "id": 1,
                        "name": "Sock Monkey",
                        "sku": "",
                        "description": "",
                        "shippable": false,
                        "taxable": false
                    }
                }
            ],
            "url": "https://api.infusionsoft.com/crm/rest/v1/orders/1548"
        }
    ],
    "count": 2,
    "next": null,
    "previous": null
    "sync_token": "MFDLJSDUiFiiuds"
}

$orders = $infusionsoft->orders->all();

// optionally filtered to a specific contact

$orders = $infusionsoft->orders->where('contact_id', '1')->get();

Retrieve an Order

Retrieves a single order along with the order items and the contact attached to the order.


GET /orders/id

{
  "id": 1288,
  "title": "Email Testing Order (10/9/2013)",
  "status": "UNPAID",
  "recurring": null,
  "total": 500,
  "contact": {
    "id": 3,
    "email": "victor.miller@infusionsoft.com",
    "first_name": "Email",
    "last_name": "Testing"
  },
  "creation_date": "2013-10-09T16:15:24.000-07:00",
  "modification_date": "2013-12-12T10:30:48.000-07:00",
  "lead_affiliate_id": 0,
  "sales_affiliate_id": 0,
  "total_paid": 360,
  "total_due": 500,
  "order_items": [
    {
      "id": 31,
      "name": "Howling Monkey",
      "description": "",
      "type": "Product",
      "notes": null,
      "quantity": 1,
      "cost": 0,
      "price": 100,
      "discount": null,
      "product": {
        "id": 1,
        "name": "Howling Monkey",
        "sku": "",
        "description": "",
        "shippable": false,
        "taxable": false
      }
    },
    {
      "id": 5130,
      "name": "Baby Monkey",
      "description": "",
      "type": "Product",
      "notes": "",
      "quantity": 1,
      "cost": 0,
      "price": 100,
      "discount": null,
      "product": {
        "id": 1,
        "name": "Baby Monkey",
        "sku": "",
        "description": "",
        "shippable": false,
        "taxable": false
      }
    }
  ],
  "url": "https://api.infusionsoft.com/crm/rest/v1/orders/1288"
}

$order = $infusionsoft->orders()->find($id);

Product

The Product Service is used to manage products stored in Infusionsoft. You can add, update and find products in addition to managing follow up sequences, tags and action sets.

The Product Object

Products are representations of goods for sale within the user's Infusionsoft account.


Attributes

id:
integer

Unique identifier for the product.

product_name:
string

The name of the product

product_desc:
string

A description of the product

product_short_desc:
string

A short description of the product

product_price:
float

The price per unit of the product

sku:
string

The product sku

sub_category_id:
string

The product sub-category ID

status:
integer

Whether the product is active 1 or inactive 0

subscription_only:
boolean

If the product should be sold only as a subscription and not a one-time product

url:
string

The URL link to the product resource

product_options:
nested resource

The customizable options the product may have. (e.g color, size, text, etc.)

subscription_plans:
nested resource

If the product is to be sold as a subscription, the list of subscription plans associated to the product

JSON Body

JSON Body

The Product Options Object

Options attached to a specific product. Product options are only available as a nested resource within a product.


Attributes

id:
integer

Unique identifier for the option

name:
string

The name of the option

label:
string

The displayable name of the option

required:
boolean

If this option is required for purchase.

type:
string

The type of option. Valid values are Variable or FixedList

min_chars:
integer

For Variable-type option, the minimum number of characters that must be entered.

max_chars:
integer

For Variable-type option, the maximum number of characters that can be entered.

can_start_with_character:
boolean

For Variable-type option, indicates if the text can begin with a character.

can_start_with_number:
boolean

For Variable-type option, indicates if the text can begin with a number (0-9).

can_contain_character:
boolean

For Variable-type option, indicates if the text may contain characters.

can_contain_number:
boolean

For Variable-type option, indicates if the text may contain numbers (0-9).

can_end_with_character:
boolean

For Variable-type option, indicates if the text can end with a character.

can_end_with_number:
boolean

For Variable-type option, indicates if the text can end with a number (0-9).

allow_spaces:
boolean

For Variable-type option, indicates if apces are allowed in text.

text_message:
string

For Variable-type option, the message to display of the user does not follow the specified rules.

display_index:
integer

The display order of this option. Starts at 1.

values:
nested object

For FixedList-type option, the list of option values to choose from.

JSON Body

JSON Body

The Option Values Object

Option values are a list of available options for a given product option.


Attributes

id:
integer

Unique identifier for the option value

label:
string

The name of the option value

sku:
string

The sku of this option value

is_default:
boolean

If this option is selected by default

index:
integer

The order (1 = highest) this value is displayed in the list of values

price_adjustment:
float

The amount to adjust from the product price when this value is chosen. Negative values indicate subtraction from the price

The Subscription Object

Subscriptions represent recurring purchases of the same product, subject to options set by the Infusionsoft user.


Attributes

id:
integer

Unique identifier for the subscription plan

subscription_plan_name:
string

The name of the subscription plan

cycle:
integer

The length of each cycle. (6 = Daily, 3 = Weekly, 2 = Month, 1= Yearly)

frequency:
integer

How many times per cycle the subscription should be charged.

number_of_cycles:
integer

The total number of cycles this plan has before completion. Zero indicates unlimited cycles

subscription_plan_index:
integer

The order (1 = highest) which this plan is listed for display

plan_price:
float

The cost for each cycle of a subscription

active:
boolean

Whether or not this subscription plan is active

List all Products

Returns a list of all products, optionally filtered by status.


Form Parameters

limit:
integer

Limits the results to at most the given value

offset:
integer

The index to where the results should begin

active:
boolean

Searches for producs which are marked as active


GET https://api.infusionsoft.com/crm/rest/v1/products/search

{
    "products": [
        {
         (Product Object)
        },
    ],
    "count": 2,
    "next": null,
    "previous": null,
    "sync_token": "MFDLJSDUiFiiuds"
}

$products = $infusionsoft->products()->all();

// optionally, limit to 5 active products
$products = $infusionsoft->products()->where([
    'limit' => 5, 
    'active' => 'true'
])->get();

Retrieve a Single Product

Retrieves a single product from the authorized Infusionsoft account


GET https://api.infusionsoft.com/crm/rest/v1/products/id

{
    "id" : 1,
    "product_name": "Flux Capacitor",
    "short_description": "Key component required for time travel.",
    "product_price": 5999.99,
    "sku": "FC12GW",
    "subscription_only": false,
    "url": "https://api.infusionsoft.com/crm/rest/v1/products/1",
    "product_options": [ 
        {
            "id": 5,
            "name": "Size",
            "label": "Size",
            "required": true,
            "type": "FixedList",
            "values": [ 
                {
                    "id": 10,
                    "sku": "WK123",
                    "name": "Small",
                    "default": true,
                    "index": 1,
                    "price_adjustment": -15.99
                },
                {
                    "id": 11,
                    "sku": "WK124",
                    "name": "Large",
                    "default": false,
                    "index": 2,
                    "price_adjustment": 5.00
                }
            ]
        }, 
        {
            "id": 15,
            "name": "Engraving",
            "required": true,
            "order": 2,
            "type": "Variable",
            "min_chars": 1,
            "max_chars": 10,
            "can_end_with_character": false,
            "can_end_with_number": true,
            "can_contain_character": true,
            "can_contain_number": true,
            "can_start_with_character": true,
            "can_start_with_number": false,
            "allow_spaces": false,
            "text_message" : "You did something wrong. Do it again."
        }
    ],
    "subscription_plans": [ 
        {
            "id": 15,
            "subscription_plan_name": "Monthly rental, for 12 months",
            "cycle": 2,
            "frequency": 1,
            "number_of_cycles": 12,
            "plan_price": 999.99,
            "active": true,
            "subscription_plan_index": 1
        }
    ],
]

$product = $infusionsoft->products()->find($productId);

Tasks

The Tasks Service allows you to manage tasks for the user you are currently authenticated as. This means that you can easily build an application that manages a logged in user’s tasks simply by having them follow the normal OAuth connection procedure.

The Task Object

Tasks are simple text objects outlining a specific action an individual Infusionsoft user is intending to take. Tasks are always attached to the user that created the task, and can also be manipulated via the Infusionsoft application.


Attributes

id:
integer

An integer that uniquely identifies this task

title:
string

The actual task name (Do this thing)

description:
string

A description of the task defined by the user

type:
string

A string representing the type of Task as defined by the user from a list of types editable in the Infusionsoft application

priority:
string

A string representing the importance of the task. Must be one of three potential string values (Critical, Essential, Non-Essential)

due_date:
string

The time the Task is due, given as GMT in ISO 8601 format

creation_date:
string

The time the Task was created, given as GMT in ISO 8601 format

modification_date:
string

The time the Task was last modified, given as GMT in ISO 8601 format

completion_date:
string

The time the Task was completed, given as GMT in ISO 8601 format

completed:
boolean

Boolean representing whether or not the task was completed

user_id:
integer

The Infusionsoft ID of the user that created the Task


{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

Retrieve a List of All Tasks

Retrieves a filterable list of the authorized user's tasks. Note that you cannot retrieve tasks for anyone other than the currently authorized user.


Form Parameters

since:
dateTime

Limits the tasks returned to those created after this value, expressed as a timestamp in ISO 8601 format

until:
string

Limits the tasks returned to those created before this value, expressed as a timestamp in ISO 8601 format

limit:
integer

Limits the total number of results returned. You can request a maximum number of 1000 tasks at a time.

offset:
integer

Specifies the number of tasks to offset the returned results

order:
string

Specify how the results of the search shall be ordered (in ascending order). Valid types to sort by include type, priority, due_date. Furthermore, the results may be sorted in descending order if you place a dash ('-') before the value (e.g. order=-priority).

completed:
boolean

Filters the returned results to only tasks that have been marked as complete. Defaults to false

has_due_date:
boolean

Filters the returned results to those that have some value for due_date Defaults to false

user_id:
integer

Filters the returned results to those that are assigned to a specific user.


GET /tasks/search
GET https://api.infusionsoft.com/crm/rest/v1/tasks/search?since=2014-06-01T17:00:00.000Z&until=2014-08-31T17:00:00.000Z&limit=100&offset=100&order=priority&completed=true&has_due_date=true&user_id=45

Retrieve a Synced List of Tasks

The Sync endpoint returns a set of tasks that have been updated or created since the last result set was retrieved, minus any tasks that have been deleted.


Form Parameters

sync_token:
integer (required)

Token representing the last sync request

limit:
integer

Limits the total number of results returned. You can request a maximum number of 1000 tasks at a time.

offset:
integer

Specifies the number of tasks to offset the returned results


GET /tasks/sync
GET https://api.infusionsoft.com/crm/rest/v1/tasks/sync?sync_token=MFDLJSDUiFiiuds

Create a New Task

To create a task simply provide the JSON hash of the task, containing at least the fields title and due_date. All other attributes are optional.


JSON Parameters

title:
string (required)

The title of the task

description:
string

A description of the task title. Supports a maximum length of XX characters.

type:
string

priority:
string

due_date:
date

JSON Body

JSON Body

Returns

After creating a task, a JSON object will be returned, including a contact.id that is automatically set to the ID of the authenticated user making the request.


$example->example();

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

POST https://api.infusionsoft.com/crm/rest/v1/tasks

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

Retrieve a Task

Retrieves a single task


GET https://api.infusionsoft.com/crm/rest/v1/tasks/id

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

Update a Task

Updates a task with only the values provided in the request.


JSON Parameters

taskid:
integer (required)

ID of the task to replace

title:
string (required)

The title of the task

description:
string

A description of the task title. Supports a maximum length of XX characters.

type:
string

priority:
string

due_date:
date

JSON Body

JSON Body

$example->example();

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

PUT https://api.infusionsoft.com/crm/rest/v1/tasks/id

{
  "title": "Replaced title name",
  "type": "Other",
  "priority": 2,
  "due_date": "2014-06-17T17:12:52.000Z",
  "completed": false,
  "completion_date": null,
  "user_id": 1,
  "contact": {
    "id": 1
  }
}

Replace a Task

Replaces a task with the values provided in the request.


JSON Parameters

taskid:
integer (required)

ID of the task to replace

title:
string (required)

The title of the task

description:
string

A description of the task title. Supports a maximum length of XX characters.

type:
string

priority:
string

due_date:
date

JSON Body

JSON Body

$example->example();

{
    "id":3,
    "title":"Birthday",
    "description":"Wrap presents",
    "type":"Other",
    "priority":2,
    "due_date":"2014-06-17T17:12:52.000Z",
    "creation_date":"2014-06-17T17:12:52.000Z",
    "modification_date":"2014-06-12T05:00:00.000Z",
    "completed":false,
    "completion_date":null,
    "user_id":1,
    "contact":{
        "id":0,
        "first_name":"John",
        "last_name":"Smith",
        "email":"john.smith@infusionsoft.com"
    }
    "url":"https://api.infusiontest.com/crm/rest/v1/tasks/3"
}

PUT https://api.infusionsoft.com/crm/rest/v1/tasks/id

{
  "title": "Replaced title name",
  "type": "Other",
  "priority": 2,
  "due_date": "2014-06-17T17:12:52.000Z",
  "completed": false,
  "completion_date": null,
  "user_id": 1,
  "contact": {
    "id": 1
  }
}

Delete a Task

Permanently deletes a task.


DELETE https://api.infusionsoft.com/crm/rest/v1/tasks/id

Appointments

The Appointments Service allows you to manage tasks for the user you are currently authenticated as. This means that you can easily build an application that manages a logged in user’s appointments simply by having them follow the normal OAuth connection procedure.

The Appointment Object

With the Appointment endpoints you can search, create, put, patch and destroy appointments in Infusionsoft. Note that you may only create appointments for the user you are authenticated as.


Attributes

id:

ID of the appointment, auto generated by Infusionsoft

title:

Title of the appointment

description:

Description of the appointment

creation_date:

The date and time the Appointment was created in ISO 8601 format

modification_date:

The date and time the Appointment was last updated in ISO 8601 format

start_date:

The date and time the Appointment starts in ISO 8601 format

end_date:

The date and time the Appointment ends in ISO 8601 format

remind_time:

The number of minutes prior to the start_date to be reminded of the appointment

location:

A string set by the user representing the location of the appointment

recurrence:

A string with value RRULE, EXRULE, RDATE, EXDATE as defined in the iCalendar spec

recurring_appointment_id:

ID shared by all instances of a recurring appointment

Retrieve an Appointment

Retrieves a specific appointment belonging to the authenticated user


Attributes

appointmentid:

ID of the appointment to retrieve


$appointment = $infusionsoft->appointments()->find($id);

Retrieve a Synced List of Appointments

The Sync endpoint returns a set of appointments that have been updated or created since the last result set was retrieved, minus any appointments that have been deleted.


Form Parameters

sync_token:
integer (required)

Token representing the last sync request

limit:
integer

Limits the total number of results returned. You can request a maximum number of 1000 appointments at a time.

offset:
integer

Specifies the number of appointments to offset the returned results


GET /appointments/sync
GET https://api.infusionsoft.com/crm/rest/v1/appointments/sync?sync_token=MFDLJSDUiFiiuds

Create an Appointment

Creates a new appointment as the authenticated user


JSON Parameters

title:
string (required)

The title of the appointment

description:
string

Description of the appointmen

start_date:
string (required)

The date and time the Appointment starts in ISO 8601 format

end_date:
string (required)

The date and time the Appointment ends in ISO 8601 format

remind_time:
string

The number of minutes prior to the start_date to be reminded of the appointment

location:
string

A string set by the user representing the location of the appointment

JSON Body

JSON Body

POST https://api.infusionsoft.com/crm/rest/v1/appointments

{
  "id": 42,
  "title": "A new Appt title",
  "description": "We are doing something fun.",
  "start_date": "2016-07-10T17:00:00.000Z",
  "end_date": "2016-07-10T18:00:00.000Z",
  "remind_time": "15",
  "location": "Starbucks"
  "url": "https://api.infusionsoft.com/crm/rest/v1/appointments/3",
  "recurrence": null,
  "recurring_appointment_id": null
}

Replace an Appointment

Replaces all values of a given appointment


JSON Parameters

title:
string (required)

The title of the appointment

description:
string

Description of the appointmen

start_date:
string (required)

The date and time the Appointment starts in ISO 8601 format

end_date:
string (required)

The date and time the Appointment ends in ISO 8601 format

remind_time:
string

The number of minutes prior to the start_date to be reminded of the appointment

location:
string

A string set by the user representing the location of the appointment

appointmentid:
integer

ID of the appointment to replace

JSON Body

JSON Body

PUT https://api.infusionsoft.com/crm/rest/v1/appointments/id

{
  "id": 42,
  "title": "A new Appt title",
  "description": "We are doing something fun.",
  "start_date": "2016-07-10T17:00:00.000Z",
  "end_date": "2016-07-10T18:00:00.000Z",
  "remind_time": "15",
  "location": "Starbucks"
  "url": "https://api.infusionsoft.com/crm/rest/v1/appointments/3",
  "recurrence": null,
  "recurring_appointment_id": null
}

Update an Appointment

Updates the provided values of a given appointment


JSON Parameters

title:
string

The title of the appointment

description:
string

Description of the appointmen

start_date:
string

The date and time the Appointment starts in ISO 8601 format

end_date:
string

The date and time the Appointment ends in ISO 8601 format

remind_time:
string

The number of minutes prior to the start_date to be reminded of the appointment

location:
string

A string set by the user representing the location of the appointment

appointmentid:
integer

ID of the appointment to replace

JSON Body

JSON Body

PATCH https://api.infusionsoft.com/crm/rest/v1/appointments/id

{
  "id": 42,
  "title": "An updated appointment title",
  "description": "We are doing something fun.",
  "start_date": "2016-07-10T17:00:00.000Z",
  "end_date": "2016-07-10T18:00:00.000Z",
  "remind_time": "15",
  "location": "Starbucks"
  "url": "https://api.infusionsoft.com/crm/rest/v1/appointments/3",
  "recurrence": null,
  "recurring_appointment_id": null
}

Delete an Appointment

Deletes the specified appointment


DELETE https://api.infusionsoft.com/crm/rest/v1/appointments/id

Transactions

The Transactions Service allows you to retrieve information about transactions within an account.

The Transaction Object


Attributes

id:
integer

ID of the transaction as assigned by Infusionsoft

test:
boolean

Boolean indicating whether or not the transaction was a test

amount:
double

Total amount of the transaction

currency:
string

The transaction's currency

gateway:
string

The payment gateway used for the transaction

type:
string

Type of transaction; usually AUTHORIZE or CAPTURE

status:
string

Status of the transaction

errors:
string

Any errors that occurred while attempting the transaction

contact_id:
integer

ID of the Infusionsoft Contact referenced in this transaction

transaction_date:
datetime

The date that the transaction took place in ISO-8601

gateway_account_name:
string

Friendly name of the gateway as assigned within the Infusionsoft account

order_ids:
string

Comma-delimited string of orders associated with this transaction

collection_method:
string

Defines the method of the transaction, one of credit card, paypal, manually


{
    "id":22
    "test":false,
    "amount":100.0,
    "currency":"USD",
    "gateway":"AUTHORIZE",
    "type":"CAPTURE",
    "status":"Successful Transaction",
    "errors":null,
    "contact_id":9,
    "transaction_date":"2013-10-24T14:03:46.000-07:00",
    "gateway_account_name":"Authorize",
    "order_ids":"6",
    "collection_method":"Credit Card"
    "url": "https://api.infusionsoft.com/crm/rest/v1/transactions/42"
}

Retrieve a Transaction

Retrieves a single transaction


GET https://api.infusionsoft.com/crm/rest/v1/transactions/id

{
    "id":22
    "test":false,
    "amount":100.0,
    "currency":"USD",
    "gateway":"AUTHORIZE",
    "type":"CAPTURE",
    "status":"Successful Transaction",
    "errors":null,
    "contact_id":9,
    "transaction_date":"2013-10-24T14:03:46.000-07:00",
    "gateway_account_name":"Authorize",
    "order_ids":"6",
    "collection_method":"Credit Card"
    "url": "https://api.infusionsoft.com/crm/rest/v1/transactions/42"
}

$transactions = $infusionsoft->transactions()->all()

Retrieve a List of All Transactions

Retrieves a filterable list of the authorized account's transactions.


Form Parameters

since:
dateTime

Limits the transactions returned to those created after this value, expressed as a timestamp in ISO 8601 format

until:
string

Limits the transactions returned to those created before this value, expressed as a timestamp in ISO 8601 format

limit:
integer

Limits the total number of results returned. You can request a maximum number of 1000 transactions at a time.

offset:
integer

Specifies the number of transactions to offset the returned results

contact_id:
integer

Filters the returned transactions to those that are assigned to a specific user.


GET https://api.infusionsoft.com/crm/rest/v1/transactions

{
  "transactions": [
    {
      "id": 22,
      "test": false,
      "amount": 100,
      "currency": "USD",
      "gateway": "AUTHORIZE",
      "type": "CAPTURE",
      "status": "Successful Transaction",
      "errors": null,
      "contact_id": 9,
      "transaction_date": "2013-10-24T14:03:46.000-07:00",
      "gateway_account_name": "Authorize",
      "order_ids": "6",
      "collection_method": "Credit Card",
      "url": "https://api.infusionsoft.com/crm/rest/v1/transactions/42"
    },
    {
      "id": 98,
      "test": false,
      "amount": 500,
      "currency": "USD",
      "gateway": "AUTHORIZE",
      "type": "CAPTURE",
      "status": "Successful Transaction",
      "errors": null,
      "contact_id": 33,
      "transaction_date": "2013-11-04T14:03:46.000-07:00",
      "gateway_account_name": "Authorize",
      "order_ids": "54",
      "collection_method": "Credit Card",
      "url": "https://api.infusionsoft.com/crm/rest/v1/transactions/434"
    }
  ],
  "count": 2,
  "next": null,
  "previous": null
}