Skip to Content

List Apprenticeship Offices

GET
/v1/apprenticeshipfinder/{userId}/{location}/{radius}
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

Example Code

using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace CareerOneStopAPISample
{
    class Program
    {
        static void Main(string[] args)
        {
            CreateRequest().Wait();
        }
        private static async Task CreateRequest()
        {
    
            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")
            {
                Path = "/v1/apprenticeshipfinder/{userId}/{location}/{radius}"
            };
            
            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/apprenticeshipfinder/{userId}/{location}/{radius}")
		.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
                        {
  "RecordCount": 1,
  "ApprenticeshipOfficeList": [
    {
      "ListFedAppOfficeContact": [
        {
          "ID": "string",
          "Name": "string",
          "Address1": "string",
          "Address2": "string",
          "City": "string",
          "State": "string",
          "Zip": "string",
          "Phone": "string",
          "Fax": "string",
          "ProgramLevel": "string",
          "StateType": "string",
          "Region": "string",
          "ContactName": "string",
          "ContactTitle": "string",
          "ContactEmail": "string",
          "ContactPhone": "string",
          "ContactFax": "string",
          "ContactId": "string"
        }
      ],
      "ListStateAppOfficeContact": [
        {
          "ID": "string",
          "Name": "string",
          "Address1": "string",
          "Address2": "string",
          "City": "string",
          "State": "string",
          "Zip": "string",
          "Phone": "string",
          "Fax": "string",
          "ProgramLevel": "string",
          "StateType": "string",
          "Region": "string",
          "ContactName": "string",
          "ContactTitle": "string",
          "ContactEmail": "string",
          "ContactPhone": "string",
          "ContactFax": "string",
          "ContactId": "string"
        }
      ],
      "ListRegionalAppOfficeContact": [
        {
          "ID": "string",
          "Name": "string",
          "Address1": "string",
          "Address2": "string",
          "City": "string",
          "State": "string",
          "Zip": "string",
          "Phone": "string",
          "Fax": "string",
          "ProgramLevel": "string",
          "StateType": "string",
          "Region": "string",
          "ContactName": "string",
          "ContactTitle": "string",
          "ContactEmail": "string",
          "ContactPhone": "string",
          "ContactFax": "string",
          "ContactId": "string"
        }
      ],
      "State": "string",
      "StateName": "string",
      "StateType": "string",
      "WebsiteURL": "string",
      "Title": "string",
      "Region": "string"
    }
  ]
}
                    
                        <ApprenticeshipOfficeContacts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels">
  <ApprenticeshipOfficeList>
    <StateApprenticeship>
      <ListFedAppOfficeContact>
        <AppOfficeContact>
          <Address1>string</Address1>
          <Address2>string</Address2>
          <City>string</City>
          <ContactEmail>string</ContactEmail>
          <ContactFax>string</ContactFax>
          <ContactId>string</ContactId>
          <ContactName>string</ContactName>
          <ContactPhone>string</ContactPhone>
          <ContactTitle>string</ContactTitle>
          <Fax>string</Fax>
          <ID>string</ID>
          <Name>string</Name>
          <Phone>string</Phone>
          <ProgramLevel>string</ProgramLevel>
          <Region>string</Region>
          <State>string</State>
          <StateType>string</StateType>
          <Zip>string</Zip>
        </AppOfficeContact>
      </ListFedAppOfficeContact>
      <ListRegionalAppOfficeContact>
        <AppOfficeContact>
          <Address1>string</Address1>
          <Address2>string</Address2>
          <City>string</City>
          <ContactEmail>string</ContactEmail>
          <ContactFax>string</ContactFax>
          <ContactId>string</ContactId>
          <ContactName>string</ContactName>
          <ContactPhone>string</ContactPhone>
          <ContactTitle>string</ContactTitle>
          <Fax>string</Fax>
          <ID>string</ID>
          <Name>string</Name>
          <Phone>string</Phone>
          <ProgramLevel>string</ProgramLevel>
          <Region>string</Region>
          <State>string</State>
          <StateType>string</StateType>
          <Zip>string</Zip>
        </AppOfficeContact>
      </ListRegionalAppOfficeContact>
      <ListStateAppOfficeContact>
        <AppOfficeContact>
          <Address1>string</Address1>
          <Address2>string</Address2>
          <City>string</City>
          <ContactEmail>string</ContactEmail>
          <ContactFax>string</ContactFax>
          <ContactId>string</ContactId>
          <ContactName>string</ContactName>
          <ContactPhone>string</ContactPhone>
          <ContactTitle>string</ContactTitle>
          <Fax>string</Fax>
          <ID>string</ID>
          <Name>string</Name>
          <Phone>string</Phone>
          <ProgramLevel>string</ProgramLevel>
          <Region>string</Region>
          <State>string</State>
          <StateType>string</StateType>
          <Zip>string</Zip>
        </AppOfficeContact>
      </ListStateAppOfficeContact>
      <Region>string</Region>
      <State>string</State>
      <StateName>string</StateName>
      <StateType>string</StateType>
      <Title>string</Title>
      <WebsiteURL>string</WebsiteURL>
    </StateApprenticeship>
  </ApprenticeshipOfficeList>
  <RecordCount>1</RecordCount>
</ApprenticeshipOfficeContacts>