Creating order via XML-RPC

I’m trying to create an order with XML-RPC, this is the body of my request:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>OrderService.placeOrder</methodName>
  <params>
    <param>
      <value><string>somekey</string></value>
    </param>
    <param>
     <value><int>1</int></value>
    </param>
    <param>
      <value><int>0</int></value>
    </param>
    <param>
      <value><int>0</int></value>
    </param>
    <param>
      <value><array>
        <data>
          <value><int>2</int></value>
        </data>
      </array></value>
    </param>
    <param>
      <value><array>
        <data>
          <value><int>0</int></value>
        </data>
      </array></value>
    </param>
    <param>
      <value><boolean>0</boolean></value>
    </param>
    <param>
      <value><array>
        <data>
          <value><string></string></value>
        </data>
      </array></value>
    </param>
    <param>
      <value><int>0</int></value>
    </param>
    <param>
      <value><int>0</int></value>
    </param>
  </params>
</methodCall>

I’m getting this response:

<methodResponse>
    <fault>
        <value>
            <struct>
                <member>
                    <name>faultCode</name>
                    <value>
                        <i4>12</i4>
                    </value>
                </member>
                <member>
                    <name>faultString</name>
                    <value>id must be valid</value>
                </member>
            </struct>
        </value>
    </fault>
</methodResponse>

What I’m doing wrong?

It looks like you may be specifying a subscriptionId that doesn’t exist. Possibly try passing an empty array for the second array value instead?

<param>
      <value><array></array></value>
</param>

I’m passing an empty array and still getting the same message.
I’m using the methods InvoiceService.createBlankOrder and InvoiceService.addOrderItem instead of this one. These methods are working fine.

The contact id has to be an existing contact. You specified the number 1. It is nearly impossible that you have a contact with the id of 1 so pick an existing contacts id number, use that, and try again.