I am trying to parse the order ID, line item ID from the response of POST call when creating an order and adding line items.
The response getting back is in HTML
Any way to parse the "id" from POST response?
What is the HTML? Is it a 404 response? Are you prefixing the URL with "api" like apisandbox.dev.clover.com? If you don't use the "api" prefix you may get HTML responses for things like resource not found.
Below is the response I get
<code><!doctypehtml>
<html>
<title>
CloverRESTAPIBrowser</title>
<head/>
<body>
<pre>
{"id":"VNGY9XD62QBZ6","orderRef":{"id":"19B28B18CMK4C"},"item":{"id":"RKJM81MBMZ0JW"},"name":"PizzaLarge","alternateName":"LargePizza","price":1099,"printed":false,"createdTime":1449266416000,"orderClientCreatedTime":1449164784000,"exchanged":false,"refunded":false,"isRevenue":true}</pre>
<p>
<ahref="/v3/merchants/xxxx/orders/19B28B18CMK4C/line_items?access_token=4ffcface-xxxx-2e96-11a4-48da68fff91f&return_null_fields=true">
Shownullfields</a>
</p>
</body>
</html>
</code>
Hmm you shouldn't be getting that HTML back, I've not seen that before, hopefully one of my coworkers will know why.
4 People are following this question.