I'm trying to perform batch operations against the Accpac SData API. In the long run, we'd like to be able to update multiple line items simultaneously, but in playing with the API, I'm just attempting to retrieve two oeorders at the same time.
No matter what I've tried, I can't avoid the following error:
Code:<?xml version='1.0' encoding='UTF-8'?>
<sdata:diagnoses xmlns:sdata='http://schemas.sage.com/sdata/2008/1'>
<sdata:diagnosis>
<sdata:severity>error</sdata:severity>
<sdata:sdataCode>BadUrlSyntax</sdata:sdataCode>
<sdata:message>The request cannot be executed via the specified HTTP method</sdata:message>
</sdata:diagnosis>
</sdata:diagnoses>
The relevant information (that I can think of) for my attempt to get two orders is as follows:
The body of the POST request is as follows (domain + company names sanitized):
Code:<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:sdata="http://schemas.sage.com/sdata/2008/1"
xmlns:http="http://schemas.sage.com/sdata/http/2008/1">
<id>https://example.com/SDataServlet/sdata/sageERP/accpac/SAMINC/oeorders/-/$batch</id>
<title/>
<entry>
<id>https://example.com/SDataServlet/sdata/sageERP/accpac/SAMINC/oeorders('1601')</id>
<title/>
<content/>
<http:httpMethod>GET</http:httpMethod>
</entry>
<entry>
<id>https://example.com/SDataServlet/sdata/sageERP/accpac/SAMINC/oeorders('1665')</id>
<title/>
<content/>
<http:httpMethod>GET</http:httpMethod>
</entry>
</feed>
Attempting to GET either of the individual //entry/id values works. E.g. I can GET
Code:https://example.com/SDataServlet/sdata/sageERP/accpac/SAMINC/oeorders('1601')
Does anyone see something obvious that I'm missing?
Thanks,
Ben