# Trace and Transaction IDs

The TripServices Stays APIs support a tracking ID that can be used to correlate transactions across workflows, and to provide tracking capabilities if you need to [contact support](/resources/support#mytravelport). This ID can be either a custom value that you send or that Travelport generates if none is sent.

If sent, the tracking ID is sent in a message request header, and returned in both in the response header and response payload.

- In the [v11](/docs/stays/guides/stays-general-guide#api-versions-11-and-12) APIs, the header parameter is **TraceId**.
- In the [v12](/docs/stays/guides/stays-general-guide#api-versions-11-and-12) APIs,  (SearchComplete and SearchComplete Pagination only), the tracking header is **TVP-Trace-Id**.


If you don't send a value in these parameters, the API generates a value. When generated by Travelport, the value is unique to a single transaction and returned in all APIs. In both cases, the value entered or generated is returned in both the header and response payload:

- The response header, either **tvp-trace-id** for v12 or **traceId** for v11.
- In all versions, the response payload object **traceId**.


For more about headers, see [Common Stays API Headers](/docs/stays/general/common-stays-api-headers).

Some APIs also have the header parameter **transactionId**, and some response payloads may return a transactionId object. This object is not consistently returned and not intended for customer use. It should be ignored.

The following example shows traceId as returned in the response payloads of different APIs, first a v11 API and then v12. Note that the second example returns transactionId, which should be ignored.

details
summary
Show Example

```json
{
    "PropertiesResponse": {
        "Properties": {...},
        "traceId": "d81201dc-4648-485c-a83d-29de3ce4dac0",
        ...
```


```json
{
    "traceId": "33f87e85-867b-4865-a09f-5c41d626752f",
    "transactionId": "f949c424-51d4-423e-9408-41b3dcfa7c60",
    "pagination": {
        "page": 1,
        "pageSize": 2,
        "totalPages": 1,
        "totalItems": 2
    },...
```

## Best Practices for Creating a Trace ID

If you choose to generate your own tracking ID, recommended best practice is to generate an ID in the following format:

   xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

   Example: d497d8c9-5a79-4a79-9164-f948989078cc

Do not use static values - each value should be unique for the transaction or transaction workflow to track.