这是一个工作客户创建请求正文。
Request Body : <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntuitBatchRequest xmlns="http://schema.intuit.com/finance/v3">
<BatchItemRequest operation="create" bId="bID1">
<Customer>
<Organization>false</Organization>
<Title>Job1</Title>
<GivenName>TestCustomer1</GivenName>
<MiddleName>SampleMiddleName1</MiddleName>
<FamilyName>SampleSurname1</FamilyName>
<Suffix>Sr.</Suffix>
<CompanyName>ABCDGTech</CompanyName>
<DisplayName>TestDataCustomerc7bceSample1</DisplayName>
<PrintOnCheckName>Print name</PrintOnCheckName>
<Active>true</Active>
<PrimaryPhone>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>true</Default>
<Tag>Business</Tag>
</PrimaryPhone>
<AlternatePhone>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Business</Tag>
</AlternatePhone>
<Mobile>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Home</Tag>
</Mobile>
<Fax>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Business</Tag>
</Fax>
<PrimaryEmailAddr>
<Address>test@testing.com</Address>
</PrimaryEmailAddr>
<BillAddr>
<Line1>Testing1</Line1>
<Line2>Testing2</Line2>
<Line3>Testing3</Line3>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>KA</CountrySubDivisionCode>
<PostalCode>560097</PostalCode>
</BillAddr>
<ShipAddr>
<Line1>Shipping1</Line1>
<Line2>Shipping1</Line2>
<Line3>Shipping1</Line3>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>KA</CountrySubDivisionCode>
<PostalCode>560097</PostalCode>
</ShipAddr>
<ContactName>Contact Name</ContactName>
<AltContactName>Alternate Name</AltContactName>
<Notes>Testing Notes</Notes>
<Job>false</Job>
<Balance>100055.55</Balance>
<OpenBalanceDate>2013-09-18</OpenBalanceDate>
<BalanceWithJobs>5055.5</BalanceWithJobs>
<CreditLimit>200000</CreditLimit>
<AcctNum>Test020102</AcctNum>
<ResaleNum>40</ResaleNum>
<JobInfo>
<Status>InProgress</Status>
<StartDate>2013-09-16</StartDate>
<ProjectedEndDate>2013-09-23</ProjectedEndDate>
<EndDate>2013-09-23</EndDate>
<Description>In Progress</Description>
</JobInfo>
</Customer>
</BatchItemRequest>
<BatchItemRequest operation="create" bId="bID2">
<Customer>
<Organization>false</Organization>
<Title>Job2</Title>
<GivenName>TestCustomer2</GivenName>
<MiddleName>SampleMiddleName2</MiddleName>
<FamilyName>SampleSurname2</FamilyName>
<Suffix>Sr.</Suffix>
<CompanyName>ABCDGTechTech</CompanyName>
<DisplayName>TestDataCustomerc48aaSample2</DisplayName>
<PrintOnCheckName>Print name</PrintOnCheckName>
<Active>true</Active>
<PrimaryPhone>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>true</Default>
<Tag>Business</Tag>
</PrimaryPhone>
<AlternatePhone>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Business</Tag>
</AlternatePhone>
<Mobile>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Home</Tag>
</Mobile>
<Fax>
<DeviceType>LandLine</DeviceType>
<FreeFormNumber>(650)111-1111</FreeFormNumber>
<Default>false</Default>
<Tag>Business</Tag>
</Fax>
<PrimaryEmailAddr>
<Address>test@testing.com</Address>
</PrimaryEmailAddr>
<BillAddr>
<Line1>Testing1</Line1>
<Line2>Testing2</Line2>
<Line3>Testing3</Line3>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>KA</CountrySubDivisionCode>
<PostalCode>560097</PostalCode>
</BillAddr>
<ShipAddr>
<Line1>Shipping1</Line1>
<Line2>Shipping1</Line2>
<Line3>Shipping1</Line3>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>KA</CountrySubDivisionCode>
<PostalCode>560097</PostalCode>
</ShipAddr>
<ContactName>Contact Name</ContactName>
<AltContactName>Alternate Name</AltContactName>
<Notes>Testing Notes</Notes>
<Job>false</Job>
<Balance>100055.55</Balance>
<OpenBalanceDate>2013-09-18</OpenBalanceDate>
<BalanceWithJobs>5055.5</BalanceWithJobs>
<CreditLimit>200000</CreditLimit>
<AcctNum>Test020102</AcctNum>
<ResaleNum>40</ResaleNum>
<JobInfo>
<Status>InProgress</Status>
<StartDate>2013-09-16</StartDate>
<ProjectedEndDate>2013-09-23</ProjectedEndDate>
<EndDate>2013-09-23</EndDate>
<Description>In Progress</Description>
</JobInfo>
</Customer>
</BatchItemRequest>
</IntuitBatchRequest>
端点 - https://quickbooks.api.intuit.com/v3/company/ {RelamID}/batch?
在您的批处理请求中,BatchItemRequest 标记中缺少[ operation="create" ]。
代码-batchOperation.addEntity(customer, OperationEnum.CREATE, "bID" + i);
希望它会有用。
编辑添加示例查询(使用 V3 java devkit)
Item item = GenerateQuery.createQueryEntity(Item.class);
Item itemIn = getItemFields();
String query = select($(item.getId()), $(item.getDescription())).where($(item.getId()).eq(itemIn.getId())).generate();
QueryResult queryResult = service.executeQuery(query);
生成的请求 URI -https://quickbooks.api.intuit.com/v3/company/791926875/query?query=SELECT+Id%2C+Description+FROM+Item+WHERE+Id+%3D+%27null%27&
方法 - 获取
谢谢