# \TripsApi
All URIs are relative to *https://s3p-osdm.cloud.sqills.com*
[**get_trips_collection_id**](TripsApi.md#get_trips_collection_id) | **GET** /trips-collections/{tripsCollectionId} | Returns a collection of trips.
[**get_trips_id**](TripsApi.md#get_trips_id) | **GET** /trips/{tripId} | Returns a trip element representing a travel trip.
[**post_trips**](TripsApi.md#post_trips) | **POST** /trips-collection | returns a collection of trips for a given OJP trip request
[**post_trips_change**](TripsApi.md#post_trips_change) | **POST** /trips | Returns a new trip for given OJP parameters based on an already existing trip
## get_trips_collection_id
> models::TripCollectionResponse get_trips_collection_id(trips_collection_id, requestor, accept_language, traceparent, tracestate, x_accept_namespace, stop_behavior, page, embed)
Returns a collection of trips.
Returns a collection of trips for a for a given trips collection id. The unique codes of the origin and destination can be resolved using the places service.
### Parameters
**trips_collection_id** | **String** | id of the trips | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
**stop_behavior** | Option<[**StopBehavior**](.md)> | | |
**page** | Option<**String**> | | |
**embed** | Option<[**Vec<models::TripsCollectionResponseContent>**](models::TripsCollectionResponseContent.md)> | Influences whether referenced resources are returned in full or as references only. Default value: ALL | |
### Return type
[**models::TripCollectionResponse**](TripCollectionResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_trips_id
> models::TripResponse get_trips_id(trip_id, requestor, accept_language, traceparent, tracestate, x_accept_namespace, stop_behavior, embed)
Returns a trip element representing a travel trip.
A trip consists of one or more legs for a given tripId. Depending on the embed either references or full location definitions is returned.
### Parameters
**trip_id** | **String** | id of the trip to get. | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
**stop_behavior** | Option<[**StopBehavior**](.md)> | | |
**embed** | Option<[**Vec<models::TripResponseContent>**](models::TripResponseContent.md)> | Influences whether referenced resources are returned in full or as references only. Default value: ALL | |
### Return type
[**models::TripResponse**](TripResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## post_trips
> models::TripCollectionResponse post_trips(trip_search_criteria, requestor, accept_language, traceparent, tracestate, x_accept_namespace, stop_behavior)
returns a collection of trips for a given OJP trip request
Returns trips for a given trip request based on the OJP specification.
### Parameters
**trip_search_criteria** | [**TripSearchCriteria**](TripSearchCriteria.md) | request for trips | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
**stop_behavior** | Option<[**StopBehavior**](.md)> | | |
### Return type
[**models::TripCollectionResponse**](TripCollectionResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## post_trips_change
> models::TripResponse post_trips_change(requestor, accept_language, traceparent, tracestate, stop_behavior, trip_change_criteria)
Returns a new trip for given OJP parameters based on an already existing trip
Returns a new trip for given OJP parameters based on an already existing trip.
### Parameters
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**stop_behavior** | Option<[**StopBehavior**](.md)> | | |
**trip_change_criteria** | Option<[**TripChangeCriteria**](TripChangeCriteria.md)> | request for trips | |
### Return type
[**models::TripResponse**](TripResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)