Coder Social home page Coder Social logo

infusionsoft / api-sample-code Goto Github PK

View Code? Open in Web Editor NEW
35.0 76.0 86.0 1.15 MB

Sample API Code for various Languages

C# 0.07% Java 0.06% CSS 0.10% PHP 5.19% Perl 0.07% Python 0.06% Ruby 0.01% ASP.NET 0.02% Visual Basic .NET 0.14% HTML 90.06% JavaScript 0.01% Makefile 0.08% C++ 4.09% Classic ASP 0.04%

api-sample-code's People

Contributors

jeremiahmarks avatar micfai avatar romzombie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-sample-code's Issues

Tables > Invoice Synced Field

Hi,

The synced field should be a boolean. Otherwise, client.DataService.Load(invoiceId) will fail. Here is the code:

region License

// Copyright (c) 2012, EventDay
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

endregion

using System;
using CookComputing.XmlRpc;

namespace InfusionSoft.Tables
{
[XmlRpcMissingMapping(MappingAction.Ignore)]
public class Invoice : Table
{
[XmlRpcMember("Id")]
[Access(Access.Read)]
public int Id { get; set; }

    [XmlRpcMember("ContactId")]
    [Access(Access.Read)]
    public int ContactId { get; set; }

    [XmlRpcMember("JobId")]
    [Access(Access.Read)]
    public int JobId { get; set; }

    [XmlRpcMember("DateCreated")]
    [Access(Access.Read)]
    public DateTime DateCreated { get; set; }

    [XmlRpcMember("InvoiceTotal")]
    [Access(Access.Read)]
    public double InvoiceTotal { get; set; }

    [XmlRpcMember("TotalPaid")]
    [Access(Access.Read)]
    public double TotalPaid { get; set; }

    [XmlRpcMember("TotalDue")]
    [Access(Access.Read)]
    public double TotalDue { get; set; }

    [XmlRpcMember("PayStatus")]
    [Access(Access.Read)]
    public int PayStatus { get; set; }

    [XmlRpcMember("CreditStatus")]
    [Access(Access.Read)]
    public int CreditStatus { get; set; }

    [XmlRpcMember("RefundStatus")]
    [Access(Access.Read)]
    public int RefundStatus { get; set; }

    [XmlRpcMember("PayPlanStatus")]
    [Access(Access.Read)]
    public int PayPlanStatus { get; set; }

    [XmlRpcMember("AffiliateId")]
    [Access(Access.Read)]
    public int AffiliateId { get; set; }

    [XmlRpcMember("LeadAffiliateId")]
    [Access(Access.Read)]
    public int LeadAffiliateId { get; set; }

    [XmlRpcMember("PromoCode")]
    [Access(Access.Read)]
    public string PromoCode { get; set; }

    [XmlRpcMember("InvoiceType")]
    [Access(Access.Read)]
    public string InvoiceType { get; set; }

    [XmlRpcMember("Description")]
    [Access(Access.Read)]
    public string Description { get; set; }

    [XmlRpcMember("ProductSold")]
    [Access(Access.Read)]
    public string ProductSold { get; set; }

    [XmlRpcMember("Synced")]
    [Access(Access.Read)]
    public bool Synced { get; set; }
}

}

Way out of date

I bet the API has changed quite a bit since the last commit in this repository. Please update.

Failing to parse XML-RPC request

When trying to make API calls, I keep getting the following error:

{
  "methodResponse": {
    "fault": {
      "value": {
        "struct": {
          "member": [
            {
              "name": "faultCode",
              "value": {
                "i4": 0
              }
            },
            {
              "name": "faultString",
              "value": "Failed to parse XML-RPC request: Premature end of file."
            }
          ]
        }
      }
    }
  }
}

What should I look for to fix this? Is this an issue on my end or Infusionsoft's? Any help would be appreciated!

Call to undefined method stdClass::getRefreshToken()

$token = serialize(json_decode('{"access_token":"_","token_type":"bearer","expires_in":28800,"refresh_token":"_","scope":"|****.infusionsoft.com"}'));

$infusion = new \Infusionsoft\Infusionsoft([
   'clientId' => '******',
    'clientSecret' => '******',
    'redirectUri' => 'www.example.com',
]);


$infusion->setToken(unserialize($token));

$infusion->refreshAccessToken(); // causing error

$contact = $infusion->contacts()->findByEmail('****@hotmail.com',['FirstName','LastName']);

var_dump($contact);

whats the deal?

PHP Code Sample

I am trying to create a new contact with the provided samples and I get the following error when including this library on my page.

Parse error: syntax error, unexpected 'new' (T_NEW) in \inc\xmlrpc-2.0\lib\xmlrpc.inc on line 595

Any help would be greatly appreciated in resolving this error.

Thank you

Shopping Cart in PHP is not working

Hello, the shopping cart in your php sample is not working... it is success but still the status of the payment in the infusionsoft is UNPAID..

No recordID for opportunities (leads)

I am trying to make a call to the DataService.load API, and specifically to get an opportunity (lead). I am required to search for the recordID of the opportunity, but I can't find that ID. Is there an ID for opportunities? Or is there some sort of other way to search for them?

API looks too old

Getting Lots of issues with following

Deprecated: Assigning the return value of new by reference is deprecated

Assigning the return value of new by reference is deprecated

New to github, new to comments, new new new...

So it seems this is the old way and shouldn't be used in light of the new way.
None the less I could not get this to work.

xmlrpc.inc throws the "DEPRECATED Assigning the return value of new by reference is deprecated" on this =&

I did some research and the resolution was to remove the & and it would run error free. I tried that and the script died at the call "$result = $client->send($call);"

If anyone can assist please do. Otherwise I'm finding a new tree to bark up...

Problem trying to create blank order

When making the following API call:

POST https://fm260.infusionsoft.com/api/xmlrpc

Authorization: Bearer <access_token>
Content-Type: application/xml

<methodCall>
  <methodName>InvoiceService.createBlankOrder</methodName>
  <params>
    <param>
      <value><int>22</int></value>
    </param>
    <param>
      <value><string>hello world</string></value>
    </param>
    <param>
      <value><dateTime.iso8601>20080908T00:00:00</dateTime.iso8601></value>
    </param>
    <param>
      <value><int>2</int></value>
    </param>
    <param>
      <value><int>2</int></value>
    </param>
  </params>
</methodCall>

I always receive the following error:

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
    <fault>
        <value>
            <struct>
                <member>
                    <name>faultCode</name>
                    <value>
                        <i4>0</i4>
                    </value>
                </member>
                <member>
                    <name>faultString</name>
                    <value>No method matching arguments: java.lang.Integer, java.lang.String, java.util.Date, java.lang.Integer</value>
                </member>
            </struct>
        </value>
    </fault>
</methodResponse>

I see I'm not the first to receive an error like this, however I have copy and pasted this request from your API documentation and I can't seem to figure out what I have wrong. My HTTP client is just POSTMAN, as I just wanted to get a request working before I start writing code. Any help would be much appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.