Home Change Log Guide Examples FAQ crown.com

  1. Accessing the Endpoint
  1. Parsing and Displaying the Data
  1. Sample Code

 

The Crown PRR API has been designed to provide easy access to Crown's extensive product catalog. This implementation guide will walk you through the steps necessary to integrate the PRR API into your applications, ensuring you can retrieve product data efficiently and effectively.

Getting started with the PRR API involves understanding the available endpoints, authentication methods, and data formats. This guide will cover each of these aspects in detail, providing you with the knowledge needed to make successful API calls.

 

 

 

 

Accessing the Endpoint

To access the PRR API, you will need to use the base URL provided in the documentation and modify it accordingly based on the specific data you wish to retrieve. The API supports various query parameters that allow you to filter and sort the product data.

The API's output is formatted in JSON, making it easy to parse and integrate into your applications.

Once you have constructed your API request, you can use standard web code (ex: JavaScript, PHP, etc) to parse out only what you'd like to display and then wrapping that output in your website's existing CSS so it will blend in seamlessly.

i

This implementation guide will refer to parsing data using JavaScript.
However, any code that can process and parse JSON data will work as well.
JavaScript, PHP, even Wordpress plugin's will all work.

The PRR API is only accessible after an account is created to access samples and information like this guide. However, the API is also hardened and protected by various other levels of security. If you follow this guide and are unable to load any data at all or receiving some type of access error, please contact us so we can ensure all the security measures are set correctly for your implementation.

 

 

 

By Location and Language

Our product content distributed by the API is localized by both location and language to ensure that users receive the most relevant information. We strongly recommend using this method to retrieve product data as the entire product list will be exposed in the JSON file for your language and location. This assures you are getting all the relevant content even if you choose not to display certain parts of it at this time.

US/English Endpoint:

https://www.crown.com/graphql/execute.json/product-api/get-product-by-locale;countryAndLanguage=us-en

Referencing the Endpoint using the URL above will load all the products and their information into the JSON output for US/English. This file size is currently 262KB for all the information, and only needs to be referenced once per page load. So, referencing the entire Endpoint's data should not cause any abnormal page load issues due to file size or complexity.

The first part of interacting with the Crown PRR API, will be constructing the data-path URL to gather our data. This can be done in a few different ways, let's look at how to do it via location and language.

Endpoint URL Construction for Location and Language

The recommended way to gather data from our endpoint is to reference data from the endpoint set for your specific region and language combination. This will then list all products available in that location and in that language. Please note as of 10/20/2025, US-English is the only supported method and is expressed as "us-en".

To specify content you'd like to receive from the PRR API in your location and language, you would construct the URL as shown here:

https://www.crown.com/

⬆️  Crown’s secure domain that is providing this data to you.

graphql/execute.json/product-api/

⬆️  Crown’s service to execute this API.

get-product-by-locale;

⬆️  The API command to gather all data by product and by the location.

countryAndLanguage=

⬆️  This defines the parameters to match with the available data to the API and only provide that content.

us-en

⬆️  The parameter of the content you want to show. In this case, we want to see all products sold in the US in English (EN). As more languages and locations are made available to use, we will update the change log posted on our website and notify all users.

* Please note that not all products are available in all regions. Only refer to products in your region.

The final result would be:

https://www.crown.com/graphql/execute.json/product-api/get-product-by-locale;countryAndLanguage=us-en

 

 

 

 

By Specific Product

Our product content distributed by the API is localized by both location and language to ensure that users receive the most relevant information. We strongly recommend using this method to retrieve product data as the entire product list will be exposed in the JSON file for your language and location. This assures you are getting all the relevant content even if you choose not to display certain parts of it at this time. However, you can also target a specific product if you wish to only load that product's information. This is a better use of resources for a page on your site that features just that one product.

To request the endpoint's JSON to only contain information about the one specific product, we will first need to view the full JSON file for your location and language and locate the product's .productBaseCode and use it to reconstruct the URL data-path.

  1. Load the full US-EN endpoint:
  2. Scan through the output and look for the product you require (CTRL+F to help search). Locate the values for the following keys:
    • countryAndLanguage
    • productCategory
    • productBaseCode
  3. Iterate through each instance as every product will have its own specific productBaseCode until you have found the product you want to focus on.
  4. Record the values for the keys:
    • countryAndLanguage
    • productCategory
    • productBaseCode
  5. Construct the URL to target that specific product using the following format:
    Note: the URL reverses the language and location from the countryAndLanguage key to form the end of the URL path. An example is a value of "us-en" for the countryAndLanguage and "en-us" for the URL path.

    https://www.crown.com/graphql/execute.json/product-api/get-product-by-path;path=/content/dam/products/[productCategory]/[productBaseCode]/[productBaseCode]/[countryAndLanguage(reversed)]/[productBaseCode]-[countryAndLanguage(reversed)]-base

For example, the data-path URL for the SP-1500 Forklift would be:

  • countryAndLanguage: us-en
  • productCategory: Forklifts
  • productBaseCode: SP-1500

The final result would be:

https://www.crown.com/graphql/execute.json/product-api/get-product-by-path;path=/content/dam/products/forklifts/sp-1500/sp-1500/en-us/sp-1500-en-us-base

Visiting that endpoint URL in your browser you will see the same JSON construction as the full Endpoint, but this one will only include information about the SP-1500.

This method is recommended for pages that are dedicated to a single product as it will reduce the amount of data being transferred and parsed on your page.

 

 

 

 

Parsing and Displaying the Data

Once you have accessed the PRR API endpoint and retrieved the JSON data, the next step is to parse and display the information on your website or application. This involves extracting the relevant data fields from the JSON response and formatting them for presentation.

Grouping by Product Category

Our product content distributed by the API is categorized by several key/value pairs in the endpoint’s JSON file that you can reference. Using the data-path for your Language and Location, you can then further isolate what is displayed with local JavaScript (or your parsing language of choice for JSON).

Since JSON is designed to be human-readable, you can reference the endpoint to find a key/value pair that you’d like to use to parse out the specific products you wish to share.

A primary example of that type of parsing and sorting would be based on the “Product Category”. This would allow you to display all of our products that are in one category (ex: Counterbalance).

The key to reference in your code to extract that from the JSON would be localizedProductFeature.forkliftType

Available categories (.forkliftType):

  • Automated
  • Electric Counterbalance Forklifts
  • IC Counterbalance Forklifts
  • Man Up Order Pickers
  • Pallet Trucks
  • Reach Trucks
  • Stackers

You can categorize or sub-categorize on drive-train power type as well with localizedProductFeature.powerType

Available powertrains (.powerType):

  • Diesel
  • Electric
  • LPG
  • Manual

 

 

 

 

Sample Code

We have included some sample JavaScript code with this implementation guide to help better understand how web developers can work with the Crown PRR API.

Code samples in this guide or other help articles regarding the Crown PRR API should be regarded as learning samples and will still require your company's web developers to code and style accurately for your site.

Sample JavaScript

The script below is a sample to be used for testing and to help to understand how best to parse data out of the API. This is not meant to be the only code you need. The web developers for the site that will utilize our API can refer to this and expand or create their own unique code for your unique site.



/*
  Crown PRR API – simple filter example
  - Fetches the full product list for US English
  - Filters to forkliftType === "Stackers" (case-insensitive)
  - Prints a few fields into #data-container
*/

const url = "https://www.crown.com/graphql/execute.json/product-api/get-product-by-locale;countryAndLanguage=us-en";
const targetType = "Stackers"; // <-- change this if you want a different category

const container = document.getElementById("data-container");
if (container) container.textContent = "Loading data...";

fetch(url)
  .then(res => {
    if (!res.ok) throw new Error("Network/API error");
    return res.json();
  })
  .then(json => {
    // Safely grab the items array (fallback to empty array if anything is missing)
    const items = json?.data?.baseProductList?.items ?? [];

    // Filter by forklift type (case-insensitive)
    const matches = items.filter(p => {
      const type = p?.localizedProductFeature?.forkliftType;
      return typeof type === "string" && type.toLowerCase() === targetType.toLowerCase();
    });

    // Build a simple HTML output
    const html = matches.map(p => {
      const seriesId = p?.productSeries?.seriesId ?? "(no seriesId)";
      const type     = p?.localizedProductFeature?.forkliftType ?? "(no type)";
      const power    = p?.localizedProductFeature?.powerType ?? "(no powerType)";

      return `
        <div>
          <p><strong>Series ID:</strong> ${seriesId}</p>
          <p><strong>Forklift Type:</strong> ${type}</p>
          <p><strong>Power Type:</strong> ${power}</p>
          <hr>
        </div>
      `;
    }).join("");

    // Render results (or a friendly message if none)
    if (container) {
      container.innerHTML = html || `No matching products found for "${targetType}".`;
    }
  })
  .catch(err => {
    console.error("Error fetching API data:", err);
    if (container) container.textContent = "Error loading data.";
  });

 

 

 

 

Sample HTML

The HTML provided below is a sample that can be used if you want to have the JavaScript in a separate JS file. The sample JavaScript (above) will target the various HTML tag ID strings to place the code output where it needs to go.

Again, this code is being provided as a sample and could even be copy and pasted into your own web environment, possibly with slight changes, for testing. Your site's developers will know how best to code for and implement the end result of the API's endpoint JSON.


<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Crown Dealer API | Filter Example</title>
	<script src="example.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
	<!-- Data output container -->
	<div id="data-container" class="product-detail-inner-wrapper">
		Loading data...
	</div>

	<div class="scroll-back-to-top">
		<a href="#navigation">Scroll Back to Top ^</a>
	</div>

	<!-- Link to external JS file -->
	<script src="script-filter-example.js"></script>
</body>
</html>