Skip to content

Problem trying to create blank order #6

Open

Description

@swyse5

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!

Activity

  1. mfairch commented on Jul 13, 2015

    @mfairch
    Contributor

    You are missing the API key. Replace "privateKey" with the api key found on the follow page: https://fm260.infusionsoft.com/app/miscSetting/itemWrapper?systemId=nav.admin&settingModuleName=Application&settingTabName=Application

    <?xml version='1.0' encoding='UTF-8'?>
    <methodCall>
      <methodName>InvoiceService.createBlankOrder</methodName>
      <params>
        <param>
          <value><string>privateKey</string></value>
        </param>
        <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>
  2. swyse5 commented on Jul 13, 2015

    @swyse5
    Author

    That worked, thank you. But I don't want to have to use the API key for every call. Is it possible to use the OAuth flow instead? I tried sending the access_token on the calls, like your docs say, but I got an 'Invalid key' error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions