I'm using a https POST request with SOAP to call the getSettledBatchList service. I'm getting back a Bad Request 400 response. Why? Here's the request:
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetSettledBatchList xmlns="https://api.authorize.net/soap/v1/">
<merchantAuthentication>
<name>myusername</name>
<transactionKey>mytranskey</transactionKey>
</merchantAuthentication>
<includeStatistics>true</includeStatistics>
<firstSettlementDate>2016-05-01T00:00:01Z</firstSettlementDate>
<lastSettlementDate>2016-05-31T23:59:59Z</lastSettlementDate>
</getSettledBatchList>
</soap:Body>
</soap:Envelope>
06-04-2016 06:21 AM
Additional info: I am adding this header:
"content-type" ; "text/xml; charset=utf-8"
06-04-2016 07:12 AM
More info: Adding a trace resulted in this message: You don't have permission to access "http://api2.authorize.net/soap/v1/Service.asmx" on this server.
(I am using the https version of the URL, so I don't know why the error message says http.)
06-04-2016 11:55 AM
error on the trace or the request?
400 bad request could be data or the header
how are you posting? where are you posting to?
06-04-2016 03:26 PM - edited 06-04-2016 03:28 PM
https://api2.authorize.net/soap/v1/Service.asmx
Sent from a database application (4D) that has an HTTP REQUEST command. I get an abbreviated error when I do the actual request: Error 400 Bad Request. I get the fuller error ("You don't have permission...") when I do the trace.
06-04-2016 03:48 PM
post to just the asmx or
https://api2.authorize.net/soap/v1/Service.asmx/GetSettledBatchList
or you set the soap action?
06-04-2016 05:19 PM
just asmx
06-04-2016 08:08 PM
Probably need to pass it in the header
https://api.authorize.net/soap/v1/Service.asmx?op=GetSettledBatchList
06-05-2016 03:23 AM
Tried it. Same result.
06-05-2016 05:06 AM
Can yu try it other then using the 4D database?
or did you try just using the xml interface?
https://developer.authorize.net/api/reference/#transaction-reporting
Request Method: POST
Sandbox URL: https://apitest.authorize.net/xml/v1/request.api
Production URL: https://api.authorize.net/xml/v1/request.api
XSD URL: https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd
XML Content-Type: text/xml
JSON Content-Type: application/json
06-05-2016 06:34 AM - edited 06-05-2016 06:35 AM