Let's walk through the process of figuring out what to submit to the API.
Step #1 - Identify want we want to create - in this case Opportunity
Step #2 - Query the field list for Opportunity
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:MethodAPIFieldListV2>
<tem:strCompanyAccount>{{account}}</tem:strCompanyAccount>
<tem:strLogin>{{login}}</tem:strLogin>
<tem:strPassword>{{password}}</tem:strPassword>
<tem:strSessionID></tem:strSessionID>
<tem:strTable>Opportunity</tem:strTable>
</tem:MethodAPIFieldListV2>
</soap:Body>
</soap:Envelope>
Step #3 - Search field list response for <IsRequired>true</IsRequired>
For Opportunity we see: AssignedTo, CloseDate, Customer, Name, OpportunityStage . Note the list of required fields will change over time and will change based on customization.
Step #3b - If there are required fields I'm not familiar with I will create a record in the UI and query it to see what values I get back. I'm familar with all of the required fields for Opportunity so I am going to skip that step.
Step #4 - Identify which of the required fields are references to other tables, and identify what the reference is
From the required fields, the following are references to other tables: AsssignedTo, Customer, OpportunityStage. I know this because each of these fields is <DataType>DropDown</DataType>
If we look at Customer we see the following:
<Record>
<SupportsAdd>true</SupportsAdd>
<SupportsEdit>true</SupportsEdit>
<IsRequired>true</IsRequired>
<FieldName>Customer</FieldName>
<MaxSize>-1</MaxSize>
<DataType>DropDown</DataType>
<DropdownFromTable>Customer</DropdownFromTable>
<DropdownDisplayField>FullName</DropdownDisplayField>
</Record>
The <DropdownDisplayField> tells us the reference we need to include in our Insert call. In most cases I will query the reference table (in this case Customer) to see examples of the reference field (in this case FullName) so that I understand what to include in my Insert call.
Let's look at a different example - Contacts. This is not a required field but is often useful to fill in when creating an Opportunity. It looks like this:
<Record>
<SupportsAdd>true</SupportsAdd>
<SupportsEdit>true</SupportsEdit>
<IsRequired>false</IsRequired>
<FieldName>Contacts</FieldName>
<MaxSize>-1</MaxSize>
<DataType>DropDown</DataType>
<DropdownFromTable>Contacts</DropdownFromTable>
<DropdownDisplayField>RecordID</DropdownDisplayField>
</Record>
Note that it is referenced from the Contacts table and the reference is RecordID. I can query the Contacts table to get the RecordID for the Contact I want to include in the Opportunity.
Step #5 - I can now create my request to create the Opportunity. Here it is:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:MethodAPIInsertV2>
<tem:strCompanyAccount>{{account}}</tem:strCompanyAccount>
<tem:strLogin>{{login}}</tem:strLogin>
<tem:strPassword>{{password}}</tem:strPassword>
<tem:strSessionID></tem:strSessionID>
<tem:strTable>Opportunity</tem:strTable>
<tem:arrInsertFieldsArray>
<tem:string>Name</tem:string>
<tem:string>CloseDate</tem:string>
<tem:string>Customer</tem:string>
<tem:string>OpportunityStage</tem:string>
<tem:string>AssignedTo</tem:string>
<tem:string>Contacts</tem:string>
</tem:arrInsertFieldsArray>
<tem:arrInsertValueArray>
<tem:string>Another oppty 6</tem:string>
<tem:string>2017-08-31</tem:string>
<tem:string>Big Company</tem:string>
<tem:string>Prospecting</tem:string>
<tem:string>Peter Dyer</tem:string>
<tem:string>4</tem:string>
</tem:arrInsertValueArray>
</tem:MethodAPIInsertV2>
</soap:Body>
</soap:Envelope>
I get a response that looks like this:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<MethodAPIInsertV2Response xmlns="http://tempuri.org/">
<MethodAPIInsertV2Result><?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Success" RecordID="1" ></MethodAPI></MethodAPIInsertV2Result>
</MethodAPIInsertV2Response>
</soap:Body>
</soap:Envelope>