JSON versus XML

Choose between JSON and XML formats in the Tradecloud API. Learn about format support, when to use each, and how to implement both JSON and tXML formats.

The Tradecloud API supports both JSON and XML formats to support different integration requirements. This guide explains how to choose the appropriate format for your implementation.

Overview

The Tradecloud API provides two data formats:

  • JSON: The default format for all API endpoints

  • tXML: A proprietary XML format available for specific endpoints

Both formats contain identical data structures and functionality - tXML is a one-to-one mapping of the JSON format.

When to use each format

Use JSON when

  • Building new modern integrations

  • Implementing REST API clients

Use tXML when

  • Integrating with ERP systems that require XML

  • Working with enterprise middleware that requires XML

JSON Format

JSON is the default and recommended format for all Tradecloud API endpoints.

Implementation

All API endpoints support JSON by default. Simply use Content-Type: application/json in your HTTP headers.

For detailed JSON structure and examples, see the JSON body format documentation.

tXML Format

tXML (Tradecloud XML) is a proprietary XML format that provides the same functionality as JSON but in XML structure.

Supported Endpoints

The following API endpoints support tXML format:

Buyer Endpoints

Supplier Endpoints

Webhook Endpoints

Implementation

To use tXML format, set the Content-Type header to application/xml in your HTTP requests.

For detailed tXML structure and examples, see the XML body format documentation.

Viewing tXML Examples

You can view tXML examples in the Swagger UI documentation:

  1. Open the endpoint in Swagger UI

  2. In the "Parameter content type" dropdown, select "application/xml"

  3. The "Example Value" section will show the tXML structure

Getting Additional tXML Support

If you need tXML support for additional API endpoints not currently listed, please contact Tradecloud support with your specific requirements.

Next Steps

Last updated