Skip to Content

List Youth Program Contacts

GET
/v1/youthprogramfinder/{userId}/{location}/{radius}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}
Parameters
string


api token is required field
string


userId is required field
string

city,state(reston,va) or state (VA) or zipcode (20191)

location is required field
string

ex: 25

radius is required field
string

use 'Distance' for a search by city,state or zipcode and for sorting, or
use 'Location' for a search by a state and for sorting, or
use 'NAME' for sorting by Name
Default value is 0 for relevance

sortColumns is required field
string

use ASC or DESC
Default value is 0 for relevance

sortDirections is required field
integer

ex: 0

startRecord is required field
integer

ex: 10

limitRecord is required field
boolean

ex: true or false

Example Code

using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Collections.Specialized;
using System.Linq;

namespace CareerOneStopAPISample
{
    class Program
    {
        static void Main(string[] args)
        {
            CreateRequest().Wait();
        }
        private static async Task CreateRequest()
        {
            var qs = new NameValueCollection();
            qs["enableMetaData"] = "value";                        
            
            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")
            {
                Path = "/v1/youthprogramfinder/{userId}/{location}/{radius}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}",
                Query = string.Join("&", qs.AllKeys.Select(key => key + "=" + Uri.EscapeUriString(qs[key])))
            };
            
            using (var http = new HttpClient())
            {
                http.DefaultRequestHeaders.Accept.Clear();
                http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "API Token");
                http.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                var response = await http.GetAsync(uri.Uri).ConfigureAwait(false);
                if (response.IsSuccessStatusCode)
                {
                    var result = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
                }
            }
        }
    }
}
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class CareerOneStopAPISample {
    public static void main(String[] args) throws IOException, URISyntaxException {
	URI uri = new URIBuilder()
		.setScheme("https")
		.setHost("api.careeronestop.org")
		.setPath("/v1/youthprogramfinder/{userId}/{location}/{radius}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}")
                .setParameter("enableMetaData", "value")
		.build();
	CloseableHttpResponse response = null;
	HttpGet httpGet = null;
	try {
		CloseableHttpClient httpClient = HttpClients.createDefault();
		httpGet = new HttpGet(uri);
		httpGet.setHeader("Content-Type","application/json");
		httpGet.setHeader("Authorization", "Bearer API Token");
		response = httpClient.execute(httpGet);
		HttpEntity entity = response.getEntity();
		System.out.println(EntityUtils.toString(entity));
	} finally {
		if(httpGet != null) httpGet.releaseConnection();
		if(response != null) response.close();
	}
   }
}


Response Structure
                        {
  "YouthProgramList": [
    {
      "ID": "string",
      "Name": "string",
      "Address1": "string",
      "Address2": "string",
      "City": "string",
      "StateAbbr": "string",
      "StateName": "string",
      "Zip": "string",
      "Phone": "string",
      "Distance": "string",
      "ProgramType": "string",
      "ProgramTypeNValue": "string",
      "OpenHour": "string",
      "CenterIsOpen": "string",
      "WhyClosed": "string",
      "CenterStatus": "string",
      "GeneralEmail": "string",
      "Latitude": 18.1,
      "Longitude": 19.1,
      "WebSiteUrl": "string",
      "Fax": "string",
      "IsValid": "string",
      "ServiceMessage": "string",
      "Contacts": [
        {
          "ContactName": "string",
          "ContactEmail": "string",
          "ContactPhone": "string"
        }
      ]
    }
  ],
  "RecordCount": 1,
  "AreaValidationErr": "string",
  "SearchedBy": "string",
  "MetaData": {
    "Publisher": "string",
    "Sponsor": "string",
    "LastAccessDate": 3,
    "CitationSuggested": "string",
    "DataSource": [
      {
        "DataName": "string",
        "DataSourceName": "string",
        "DataSourceUrl": "string",
        "DataLastUpdate": "string",
        "DataVintageOrVersion": "string",
        "DataDescription": "string",
        "DataSourceCitation": "string"
      }
    ]
  }
}
                    
                        <YouthProgramFinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels">
  <AreaValidationErr>string</AreaValidationErr>
  <MetaData xmlns:d2p1="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.Core.MetaData">
    <d2p1:CitationSuggested>string</d2p1:CitationSuggested>
    <d2p1:DataSource>
      <d2p1:MetaDataSource>
        <d2p1:DataDescription>string</d2p1:DataDescription>
        <d2p1:DataLastUpdate>string</d2p1:DataLastUpdate>
        <d2p1:DataName>string</d2p1:DataName>
        <d2p1:DataSourceCitation>string</d2p1:DataSourceCitation>
        <d2p1:DataSourceName>string</d2p1:DataSourceName>
        <d2p1:DataSourceUrl>string</d2p1:DataSourceUrl>
        <d2p1:DataVintageOrVersion>string</d2p1:DataVintageOrVersion>
      </d2p1:MetaDataSource>
    </d2p1:DataSource>
    <d2p1:LastAccessDate>3</d2p1:LastAccessDate>
    <d2p1:Publisher>string</d2p1:Publisher>
    <d2p1:Sponsor>string</d2p1:Sponsor>
  </MetaData>
  <RecordCount>1</RecordCount>
  <SearchedBy>string</SearchedBy>
  <YouthProgramList>
    <YouthProgram>
      <Address1>string</Address1>
      <Address2>string</Address2>
      <CenterIsOpen>string</CenterIsOpen>
      <CenterStatus>string</CenterStatus>
      <City>string</City>
      <Contacts>
        <YouthProgramContact>
          <ContactEmail>string</ContactEmail>
          <ContactName>string</ContactName>
          <ContactPhone>string</ContactPhone>
        </YouthProgramContact>
      </Contacts>
      <Distance>string</Distance>
      <Fax>string</Fax>
      <GeneralEmail>string</GeneralEmail>
      <ID>string</ID>
      <IsValid>string</IsValid>
      <Latitude>18.1</Latitude>
      <Longitude>19.1</Longitude>
      <Name>string</Name>
      <OpenHour>string</OpenHour>
      <Phone>string</Phone>
      <ProgramType>string</ProgramType>
      <ProgramTypeNValue>string</ProgramTypeNValue>
      <ServiceMessage>string</ServiceMessage>
      <StateAbbr>string</StateAbbr>
      <StateName>string</StateName>
      <WebSiteUrl>string</WebSiteUrl>
      <WhyClosed>string</WhyClosed>
      <Zip>string</Zip>
    </YouthProgram>
  </YouthProgramList>
</YouthProgramFinder>