JSON or XML
The gateway accepts and answers both. It answers in JSON by default, and in XML to callers that speak XML, deciding in this order:?format=jsonor?format=xmlon the request.- An
Acceptheader naming only one of them. - The format of the request body.
- JSON.
Content-Type: application/json, XML with application/xml.
Results
Errors use the same shape, so the register can show why:
A customer cancelling on the terminal answers
Operation cancelled by customer.
Every response names the gateway version that handled it in the X-Mojo-Gateway-Version header.