Skip to main content

SOAP to REST Migration Guide

This guide helps you migrate from the legacy SOAP API (AparteConnect2) to the modern REST API (TempsReel).

Overview

The TempsReel REST API replaces the SOAP-based AparteConnect2 service with a modern, JSON-based REST interface. This migration provides:

  • Simpler integration - Standard HTTP/REST instead of SOAP
  • Better performance - Lighter payloads and faster responses
  • Modern tooling - Works with any HTTP client
  • Interactive documentation - Try endpoints directly from the portal

Migration Strategy

1. Identify Your SOAP Endpoints

Review your current SOAP calls and map them to REST endpoints using the table below.

2. Update Authentication

SOAP: Authentication via context parameter
REST: Authentication via x-tenant header

- <context>your-context</context>
+ x-tenant: your-tenant-id

3. Convert Request/Response Formats

SOAP: XML-based requests and responses
REST: JSON-based requests and responses

4. Update Error Handling

SOAP: SOAP faults
REST: HTTP status codes + JSON error responses (ProblemHttpResult)

Endpoint Mapping

Catalog Endpoints

SOAP MethodREST EndpointMethodNotes
AWSP_CatalogGetList/api/catalog/eventsGETReturns list of events
AWSP_CatalogGetRates/api/catalog/ratesGETReturns rates for events

Venue Endpoints

SOAP MethodREST EndpointMethodNotes
AWSP_VenueGetList/api/catalog/venuesGETReturns list of venues
AWSP_VenueGetDetail/api/catalog/venues/{id}GETReturns venue details

Order Endpoints

SOAP MethodREST EndpointMethodNotes
AWSP_OrderBook/api/orders/bookPOSTBook an order
AWSP_OrderConfirm/api/orders/confirmPOSTConfirm an order

Code Examples

Before (SOAP)

var client = new AparteConnectSoapClient();
var context = new Context { Value = "your-context" };
var request = new CatalogGetListRequest
{
context = context,
dateFrom = DateTime.Parse("2024-01-01"),
dateTo = DateTime.Parse("2024-01-31")
};
var response = await client.AWSP_CatalogGetListAsync(request);

After (REST)

var client = new HttpClient
{
BaseAddress = new Uri("http://tempsreel-pre.connect.tickandlive.com/")
};
client.DefaultRequestHeaders.Add("x-tenant", "your-tenant-id");

var response = await client.GetAsync(
"api/catalog/events?dateFrom=2024-01-01T00:00:00Z&dateTo=2024-01-31T23:59:59Z"
);
var events = await response.Content.ReadFromJsonAsync<CatalogEventsResponse>();

Field Mapping

Get Events Request

SOAP FieldREST Query ParameterTypeNotes
dateFromdateFromDateTimeISO 8601 format
dateTodateToDateTimeISO 8601 format
id_VenuevenueIdintOptional
ListID_CatalogeventIdsint[]Optional, comma-separated

Get Rates Request

SOAP FieldREST Query ParameterTypeNotes
id_CatalogeventIdsint[]Required, comma-separated

Common Migration Patterns

Date Format

SOAP: Various formats
REST: ISO 8601 format (2024-01-01T00:00:00Z)

Array Parameters

SOAP: ListID_Catalog (array in XML)
REST: eventIds=1,2,3 (comma-separated query parameter)

Error Handling

SOAP: SOAP faults with error codes
REST: HTTP status codes + JSON error details

{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "Bad Request",
"status": 400,
"detail": "Invalid date range"
}

Testing Your Migration

  1. Start with pre-production environment - Test all endpoints before going live
  2. Compare responses - Verify data structure matches your expectations
  3. Test error cases - Ensure error handling works correctly
  4. Monitor performance - REST should be faster than SOAP

Need Help?

  • Review the complete SOAP endpoint reference in the TempsReel repository (docs/AparteConnect2_Soap_Endpoints.md)
  • Check the API Reference for REST endpoint details
  • Contact xxxxxxxxxxxx@tickandlive.com for migration assistance

Next Steps