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 Method | REST Endpoint | Method | Notes |
|---|---|---|---|
AWSP_CatalogGetList | /api/catalog/events | GET | Returns list of events |
AWSP_CatalogGetRates | /api/catalog/rates | GET | Returns rates for events |
Venue Endpoints
| SOAP Method | REST Endpoint | Method | Notes |
|---|---|---|---|
AWSP_VenueGetList | /api/catalog/venues | GET | Returns list of venues |
AWSP_VenueGetDetail | /api/catalog/venues/{id} | GET | Returns venue details |
Order Endpoints
| SOAP Method | REST Endpoint | Method | Notes |
|---|---|---|---|
AWSP_OrderBook | /api/orders/book | POST | Book an order |
AWSP_OrderConfirm | /api/orders/confirm | POST | Confirm 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 Field | REST Query Parameter | Type | Notes |
|---|---|---|---|
dateFrom | dateFrom | DateTime | ISO 8601 format |
dateTo | dateTo | DateTime | ISO 8601 format |
id_Venue | venueId | int | Optional |
ListID_Catalog | eventIds | int[] | Optional, comma-separated |
Get Rates Request
| SOAP Field | REST Query Parameter | Type | Notes |
|---|---|---|---|
id_Catalog | eventIds | int[] | 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
- Start with pre-production environment - Test all endpoints before going live
- Compare responses - Verify data structure matches your expectations
- Test error cases - Ensure error handling works correctly
- 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
- Learn about error handling in REST
- Review best practices for REST integration
- Explore the API Reference