Skip to content

Search

Adv Search Coach Services

POST https://api.stretch.com/api/v1/search

Input Fields / Form-Data / JSON

Query Parameter Type Description Example
page integer
limit integer 20
type coach
gender Gender or none
male
languages array List of all possible languages
price {'min': 100.0, 'max': 10000.0}
days array default: _['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']_ List of all possible days in current location
services array List of all possible service types
['Assisted stretching', 'Static Stretching']
addressId string (uuid)
lng number 55.1254
lat number 25.1254
radius integer 100000
direction asc
order default: _distance_ distance
time array List of all possible time in current location

Code sample

curl -X POST \
  --url "https://api.stretch.com/api/v1/search" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -d '{
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }'
import requests

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

try:
    payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    response = requests.post("https://api.stretch.com/api/v1/search", headers=headers, json=payload)
    print(response.json())
except requests.exceptions.HTTPError as errh:
    print("HTTP Error:", errh)
except requests.exceptions.RequestException as errex:
    print("Exception request:", errex)
<?php

$url = "https://api.stretch.com/api/v1/search";
$headers = array(
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
);


$payload = array(
    {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
);

$data_string = json_encode($payload);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FAILONERROR, true);curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    $error_msg = curl_error($ch);
    echo "Exception request: " . $error_msg;
} else {
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != 200) {
        echo "HTTP Error: " . curl_getinfo($ch, CURLINFO_HTTP_CODE);
    } else {
        echo $response;
    }
}

curl_close($ch);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.io.OutputStream;

public class Main {
    public static void main(String[] args) {
        String url = "https://api.stretch.com/api/v1/search";
        String accessToken = "YOUR_ACCESS_TOKEN";
        String payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    };

        try {
            URL apiUrl = new URL(url);
            HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json");
            connection.setRequestProperty("Authorization", "Bearer " + accessToken);

            connection.setDoOutput(true);
            OutputStream outputStream = connection.getOutputStream();
            outputStream.write(payload.getBytes("UTF-8"));
            outputStream.flush();
            outputStream.close();

            int responseCode = connection.getResponseCode();

            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder content = new StringBuilder();
                while ((inputLine = in.readLine()) != null) {
                    content.append(inputLine);
                }
                in.close();
                System.out.println(content.toString());
            } else {
                System.out.println("HTTP Error: " + responseCode);
            }
            connection.disconnect();
        } catch (MalformedURLException e) {
            System.out.println("Exception request: " + e.getMessage());
        } catch (IOException e) {
            System.out.println("Exception request: " + e.getMessage());
        }
    }
}
require 'net/http'
require 'uri'
require 'json'

url = 'https://api.stretch.com/api/v1/search'
access_token = 'YOUR_ACCESS_TOKEN'
payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }.to_json

uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => "Bearer #{access_token}"
}

begin
  request = Net::HTTP::Post.new(uri.request_uri, headers)
  request.body = payload
  response = http.request(request)

  if response.code.to_i == 200
    puts JSON.parse(response.body)
  else
    puts "HTTP Error: #{response.code}"
  end
rescue => e
  puts "Exception request: #{e.message}"
end
const axios = require('axios');

const url = 'https://api.stretch.com/api/v1/search';
const headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
};

const payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    };

axios
  .post(url, payload, { headers })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    if (error.response) {
      console.log('HTTP Error:', error.response.status);
    } else {
      console.log('Exception request:', error.message);
    }
  });
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

async Task Main() {
  using(var client = new HttpClient()) {
    client.DefaultRequestHeaders.Add("Content-Type", "application/json");

    var payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    var content = new StringContent(payload, Encoding.UTF8, "application/json");
    var response = await client.PostAsync(new Uri("https://api.stretch.com/api/v1/search"), content);


    if (response.IsSuccessStatusCode) {
      var content = await response.Content.ReadAsStringAsync();
      Console.WriteLine(content);
    } else {
      Console.WriteLine($"Request failed with status code: {(int)response.StatusCode}");
    }
  }
}
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "bytes"
    "encoding/json"
)

func main() {
    url := "https://api.stretch.com/api/v1/search"
    accessToken := "YOUR_ACCESS_TOKEN"

    client := &http.Client{}
    payload := map[string]string{
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "be5425f8-eba7-4a19-8316-25d527df64c5",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    jsonPayload, err := json.Marshal(payload)

    req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload))

    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer "+accessToken)

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }
    defer resp.Body.Close()

    if resp.StatusCode == http.StatusOK {
        body, err := ioutil.ReadAll(resp.Body)
        if err != nil {
            fmt.Println("Exception request:", err)
            return
        }
        fmt.Println(string(body))
    } else {
        fmt.Println("HTTP Error:", resp.StatusCode)
    }
}
import 'dart:convert';
import 'package:http/http.dart' as http;

void main() async {
  final url = 'https://api.stretch.com/api/v1/search';
  final accessToken = 'YOUR_ACCESS_TOKEN';

  final headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer $accessToken',
  };

  final payload = jsonEncode(application/json);

  try {
    final response = await http.post(Uri.parse(url), headers: headers, body: payload);
    if (response.statusCode == 200) {
      print(jsonDecode(response.body));
    } else {
      print('HTTP Error: ${response.statusCode}');
    }
  } catch (e) {
    print('Exception request: $e');
  }
}
Response

SearchOut

    [{
        "coachId": "7848f895-7afe-4699-97ff-b22107fa67f2",
        "distance": 55.12,
        "firstName": "string",
        "lastName": "string",
        "phone": "string",
        "whatsapp": "string",
        "rating": 55.12,
        "avatarUrl": "string",
        "type": "string",
        "price": 55.12,
        "minPrice": 55.12,
        "maxPrice": 55.12,
        "summary": "string",
        "priceCurrency": "string",
        "mediaType": "string",
        "mediaUrl": "string",
        "mediaPreviewUrl": "string",
        "verified": False,
        "sessionCount": 1234,
        "requiresParking": False,
        "serviceTypes": [],
        "languages": "object",
        "favorite": False
    },{
        "coachId": "d1557fbf-502a-441d-a035-2d26fc8ebba8",
        "distance": 55.12,
        "firstName": "string",
        "lastName": "string",
        "phone": "string",
        "whatsapp": "string",
        "rating": 55.12,
        "avatarUrl": "string",
        "type": "string",
        "price": 55.12,
        "minPrice": 55.12,
        "maxPrice": 55.12,
        "summary": "string",
        "priceCurrency": "string",
        "mediaType": "string",
        "mediaUrl": "string",
        "mediaPreviewUrl": "string",
        "verified": False,
        "sessionCount": 1234,
        "requiresParking": False,
        "serviceTypes": [],
        "languages": "object",
        "favorite": False
    }]

HTTPValidationError

{
    "detail": []
}

Adv Search Coach Counts

POST https://api.stretch.com/api/v1/search/count

Input Fields / Form-Data / JSON

Query Parameter Type Description Example
page integer
limit integer 20
type coach
gender Gender or none
male
languages array List of all possible languages
price {'min': 100.0, 'max': 10000.0}
days array default: _['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']_ List of all possible days in current location
services array List of all possible service types
['Assisted stretching', 'Static Stretching']
addressId string (uuid)
lng number 55.1254
lat number 25.1254
radius integer 100000
direction asc
order default: _distance_ distance
time array List of all possible time in current location

Code sample

curl -X POST \
  --url "https://api.stretch.com/api/v1/search/count" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"\
  -d '{
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }'
import requests

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

try:
    payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    response = requests.post("https://api.stretch.com/api/v1/search/count", headers=headers, json=payload)
    print(response.json())
except requests.exceptions.HTTPError as errh:
    print("HTTP Error:", errh)
except requests.exceptions.RequestException as errex:
    print("Exception request:", errex)
<?php

$url = "https://api.stretch.com/api/v1/search/count";
$headers = array(
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
);


$payload = array(
    {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
);

$data_string = json_encode($payload);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FAILONERROR, true);curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    $error_msg = curl_error($ch);
    echo "Exception request: " . $error_msg;
} else {
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != 200) {
        echo "HTTP Error: " . curl_getinfo($ch, CURLINFO_HTTP_CODE);
    } else {
        echo $response;
    }
}

curl_close($ch);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.io.OutputStream;

public class Main {
    public static void main(String[] args) {
        String url = "https://api.stretch.com/api/v1/search/count";
        String accessToken = "YOUR_ACCESS_TOKEN";
        String payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    };

        try {
            URL apiUrl = new URL(url);
            HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json");
            connection.setRequestProperty("Authorization", "Bearer " + accessToken);

            connection.setDoOutput(true);
            OutputStream outputStream = connection.getOutputStream();
            outputStream.write(payload.getBytes("UTF-8"));
            outputStream.flush();
            outputStream.close();

            int responseCode = connection.getResponseCode();

            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder content = new StringBuilder();
                while ((inputLine = in.readLine()) != null) {
                    content.append(inputLine);
                }
                in.close();
                System.out.println(content.toString());
            } else {
                System.out.println("HTTP Error: " + responseCode);
            }
            connection.disconnect();
        } catch (MalformedURLException e) {
            System.out.println("Exception request: " + e.getMessage());
        } catch (IOException e) {
            System.out.println("Exception request: " + e.getMessage());
        }
    }
}
require 'net/http'
require 'uri'
require 'json'

url = 'https://api.stretch.com/api/v1/search/count'
access_token = 'YOUR_ACCESS_TOKEN'
payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }.to_json

uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => "Bearer #{access_token}"
}

begin
  request = Net::HTTP::Post.new(uri.request_uri, headers)
  request.body = payload
  response = http.request(request)

  if response.code.to_i == 200
    puts JSON.parse(response.body)
  else
    puts "HTTP Error: #{response.code}"
  end
rescue => e
  puts "Exception request: #{e.message}"
end
const axios = require('axios');

const url = 'https://api.stretch.com/api/v1/search/count';
const headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
};

const payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    };

axios
  .post(url, payload, { headers })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    if (error.response) {
      console.log('HTTP Error:', error.response.status);
    } else {
      console.log('Exception request:', error.message);
    }
  });
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

async Task Main() {
  using(var client = new HttpClient()) {
    client.DefaultRequestHeaders.Add("Content-Type", "application/json");

    var payload = {
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    var content = new StringContent(payload, Encoding.UTF8, "application/json");
    var response = await client.PostAsync(new Uri("https://api.stretch.com/api/v1/search/count"), content);


    if (response.IsSuccessStatusCode) {
      var content = await response.Content.ReadAsStringAsync();
      Console.WriteLine(content);
    } else {
      Console.WriteLine($"Request failed with status code: {(int)response.StatusCode}");
    }
  }
}
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "bytes"
    "encoding/json"
)

func main() {
    url := "https://api.stretch.com/api/v1/search/count"
    accessToken := "YOUR_ACCESS_TOKEN"

    client := &http.Client{}
    payload := map[string]string{
        "page": 0,
        "limit": 20,
        "type": "coach",
        "gender": "male",
        "languages": [],
        "price": ,
        "days": [],
        "services": [],
        "addressId": "baa98c03-6e90-4c51-97d6-708790ac815e",
        "lng": 55.1254,
        "lat": 25.1254,
        "radius": 100000,
        "direction": "asc",
        "order": "distance",
        "time": []
    }
    jsonPayload, err := json.Marshal(payload)

    req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload))

    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer "+accessToken)

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }
    defer resp.Body.Close()

    if resp.StatusCode == http.StatusOK {
        body, err := ioutil.ReadAll(resp.Body)
        if err != nil {
            fmt.Println("Exception request:", err)
            return
        }
        fmt.Println(string(body))
    } else {
        fmt.Println("HTTP Error:", resp.StatusCode)
    }
}
import 'dart:convert';
import 'package:http/http.dart' as http;

void main() async {
  final url = 'https://api.stretch.com/api/v1/search/count';
  final accessToken = 'YOUR_ACCESS_TOKEN';

  final headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer $accessToken',
  };

  final payload = jsonEncode(application/json);

  try {
    final response = await http.post(Uri.parse(url), headers: headers, body: payload);
    if (response.statusCode == 200) {
      print(jsonDecode(response.body));
    } else {
      print('HTTP Error: ${response.statusCode}');
    }
  } catch (e) {
    print('Exception request: $e');
  }
}
Response

SearchCountOut

{
    "total": 0
}

HTTPValidationError

{
    "detail": []
}

Search Coach Filter

GET https://api.stretch.com/api/v1/search/filter

Filters out the coach information using the search query made by the user.

Code sample

curl -X GET \
  --url "https://api.stretch.com/api/v1/search/filter" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}

try:
    response = requests.get("https://api.stretch.com/api/v1/search/filter, headers=headers")
    print(response.json())
except requests.exceptions.HTTPError as errh:
    print("HTTP Error:", errh)
except requests.exceptions.RequestException as errex:
    print("Exception request:", errex)
<?php

$url = "https://api.stretch.com/api/v1/search/filter";
$headers = array(
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
);



$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FAILONERROR, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    $error_msg = curl_error($ch);
    echo "Exception request: " . $error_msg;
} else {
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != 200) {
        echo "HTTP Error: " . curl_getinfo($ch, CURLINFO_HTTP_CODE);
    } else {
        echo $response;
    }
}

curl_close($ch);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        String url = "https://api.stretch.com/api/v1/search/filter";
        String accessToken = "YOUR_ACCESS_TOKEN";

        try {
            URL apiUrl = new URL(url);
            HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
            connection.setRequestMethod("GET");
            connection.setRequestProperty("Content-Type", "application/json");
            connection.setRequestProperty("Authorization", "Bearer " + accessToken);

            int responseCode = connection.getResponseCode();

            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder content = new StringBuilder();
                while ((inputLine = in.readLine()) != null) {
                    content.append(inputLine);
                }
                in.close();
                System.out.println(content.toString());
            } else {
                System.out.println("HTTP Error: " + responseCode);
            }
            connection.disconnect();
        } catch (MalformedURLException e) {
            System.out.println("Exception request: " + e.getMessage());
        } catch (IOException e) {
            System.out.println("Exception request: " + e.getMessage());
        }
    }
}
require 'net/http'
require 'uri'
require 'json'

url = 'https://api.stretch.com/api/v1/search/filter'
access_token = 'YOUR_ACCESS_TOKEN'

uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

headers = {
  'Content-Type' => 'application/json',
  'Authorization' => "Bearer #{access_token}"
}

begin
  request = Net::HTTP::Get.new(uri.request_uri, headers)
  response = http.request(request)

  if response.code.to_i == 200
    puts JSON.parse(response.body)
  else
    puts "HTTP Error: #{response.code}"
  end
rescue => e
  puts "Exception request: #{e.message}"
end
const axios = require('axios');

const url = 'https://api.stretch.com/api/v1/search/filter';
const headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
};

axios
  .get(url,{ headers })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    if (error.response) {
      console.log('HTTP Error:', error.response.status);
    } else {
      console.log('Exception request:', error.message);
    }
  });
using System;
using System.Net.Http;

async Task Main() {
  using(var client = new HttpClient()) {
    client.DefaultRequestHeaders.Add("Content-Type", "application/json");var response = await client.GetAsync(new Uri("https://api.stretch.com/api/v1/search/filter")

    if (response.IsSuccessStatusCode) {
      var content = await response.Content.ReadAsStringAsync();
      Console.WriteLine(content);
    } else {
      Console.WriteLine($"Request failed with status code: {(int)response.StatusCode}");
    }
  }
}
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    url := "https://api.stretch.com/api/v1/search/filter"
    accessToken := "YOUR_ACCESS_TOKEN"

    client := &http.Client{}
    req, err := http.NewRequest("GET", url, nil)
    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer "+accessToken)

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Exception request:", err)
        return
    }
    defer resp.Body.Close()

    if resp.StatusCode == http.StatusOK {
        body, err := ioutil.ReadAll(resp.Body)
        if err != nil {
            fmt.Println("Exception request:", err)
            return
        }
        fmt.Println(string(body))
    } else {
        fmt.Println("HTTP Error:", resp.StatusCode)
    }
}
import 'dart:convert';
import 'package:http/http.dart' as http;

void main() async {
  final url = 'https://api.stretch.com/api/v1/search/filter';
  final accessToken = 'YOUR_ACCESS_TOKEN';

  final headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer $accessToken',
  };

  try {final response = await http.get(Uri.parse(url), headers: headers);
    if (response.statusCode == 200) {
      print(jsonDecode(response.body));
    } else {
      print('HTTP Error: ${response.statusCode}');
    }
  } catch (e) {
    print('Exception request: $e');
  }
}
Response

SearchFilterOut

{
    "type": [],
    "gender": [],
    "languages": "object",
    "price": ,
    "days": [],
    "services": []
}

HTTPValidationError

{
    "detail": []
}