Skip to main content
POST
/
api
/
spare-parts
/
search
Search Spare Part Suppliers
curl --request POST \
  --url https://api.example.com/api/spare-parts/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "queries": [
    "<string>"
  ],
  "manufacturer": "<string>",
  "model_number": "<string>",
  "part_number": "<string>",
  "component_type": "<string>",
  "visible_markings": [
    "<string>"
  ],
  "site_type": "<string>",
  "country": "<string>",
  "system_manufacturer": "<string>",
  "system_model": "<string>",
  "system_type": "<string>",
  "approximate_installation_year": "<string>",
  "energy_source": "<string>",
  "suspected_component": "<string>",
  "observed_failure": "<string>",
  "technician_note": "<string>",
  "urgency": "<string>",
  "intent": "find_replacement"
}
'
import requests

url = "https://api.example.com/api/spare-parts/search"

payload = {
"queries": ["<string>"],
"manufacturer": "<string>",
"model_number": "<string>",
"part_number": "<string>",
"component_type": "<string>",
"visible_markings": ["<string>"],
"site_type": "<string>",
"country": "<string>",
"system_manufacturer": "<string>",
"system_model": "<string>",
"system_type": "<string>",
"approximate_installation_year": "<string>",
"energy_source": "<string>",
"suspected_component": "<string>",
"observed_failure": "<string>",
"technician_note": "<string>",
"urgency": "<string>",
"intent": "find_replacement"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
queries: ['<string>'],
manufacturer: '<string>',
model_number: '<string>',
part_number: '<string>',
component_type: '<string>',
visible_markings: ['<string>'],
site_type: '<string>',
country: '<string>',
system_manufacturer: '<string>',
system_model: '<string>',
system_type: '<string>',
approximate_installation_year: '<string>',
energy_source: '<string>',
suspected_component: '<string>',
observed_failure: '<string>',
technician_note: '<string>',
urgency: '<string>',
intent: 'find_replacement'
})
};

fetch('https://api.example.com/api/spare-parts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/spare-parts/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queries' => [
'<string>'
],
'manufacturer' => '<string>',
'model_number' => '<string>',
'part_number' => '<string>',
'component_type' => '<string>',
'visible_markings' => [
'<string>'
],
'site_type' => '<string>',
'country' => '<string>',
'system_manufacturer' => '<string>',
'system_model' => '<string>',
'system_type' => '<string>',
'approximate_installation_year' => '<string>',
'energy_source' => '<string>',
'suspected_component' => '<string>',
'observed_failure' => '<string>',
'technician_note' => '<string>',
'urgency' => '<string>',
'intent' => 'find_replacement'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.example.com/api/spare-parts/search"

payload := strings.NewReader("{\n \"queries\": [\n \"<string>\"\n ],\n \"manufacturer\": \"<string>\",\n \"model_number\": \"<string>\",\n \"part_number\": \"<string>\",\n \"component_type\": \"<string>\",\n \"visible_markings\": [\n \"<string>\"\n ],\n \"site_type\": \"<string>\",\n \"country\": \"<string>\",\n \"system_manufacturer\": \"<string>\",\n \"system_model\": \"<string>\",\n \"system_type\": \"<string>\",\n \"approximate_installation_year\": \"<string>\",\n \"energy_source\": \"<string>\",\n \"suspected_component\": \"<string>\",\n \"observed_failure\": \"<string>\",\n \"technician_note\": \"<string>\",\n \"urgency\": \"<string>\",\n \"intent\": \"find_replacement\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/api/spare-parts/search")
.header("Content-Type", "application/json")
.body("{\n \"queries\": [\n \"<string>\"\n ],\n \"manufacturer\": \"<string>\",\n \"model_number\": \"<string>\",\n \"part_number\": \"<string>\",\n \"component_type\": \"<string>\",\n \"visible_markings\": [\n \"<string>\"\n ],\n \"site_type\": \"<string>\",\n \"country\": \"<string>\",\n \"system_manufacturer\": \"<string>\",\n \"system_model\": \"<string>\",\n \"system_type\": \"<string>\",\n \"approximate_installation_year\": \"<string>\",\n \"energy_source\": \"<string>\",\n \"suspected_component\": \"<string>\",\n \"observed_failure\": \"<string>\",\n \"technician_note\": \"<string>\",\n \"urgency\": \"<string>\",\n \"intent\": \"find_replacement\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/spare-parts/search")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"queries\": [\n \"<string>\"\n ],\n \"manufacturer\": \"<string>\",\n \"model_number\": \"<string>\",\n \"part_number\": \"<string>\",\n \"component_type\": \"<string>\",\n \"visible_markings\": [\n \"<string>\"\n ],\n \"site_type\": \"<string>\",\n \"country\": \"<string>\",\n \"system_manufacturer\": \"<string>\",\n \"system_model\": \"<string>\",\n \"system_type\": \"<string>\",\n \"approximate_installation_year\": \"<string>\",\n \"energy_source\": \"<string>\",\n \"suspected_component\": \"<string>\",\n \"observed_failure\": \"<string>\",\n \"technician_note\": \"<string>\",\n \"urgency\": \"<string>\",\n \"intent\": \"find_replacement\"\n}"

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "title": "<string>",
      "url": "<string>",
      "display_url": "<string>",
      "snippet": "<string>",
      "source": "web",
      "match_score": 0,
      "matched_identifiers": [
        "<string>"
      ],
      "match_reasons": [
        "<string>"
      ]
    }
  ],
  "warning": "<string>",
  "notes": [
    "<string>"
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Body

application/json
queries
string[]
manufacturer
string | null
model_number
string | null
part_number
string | null
component_type
string | null
visible_markings
string[]
site_type
string | null
country
string | null
system_manufacturer
string | null
system_model
string | null
system_type
string | null
approximate_installation_year
string | null
energy_source
string | null
suspected_component
string | null
observed_failure
string | null
technician_note
string | null
urgency
string | null
intent
string
default:find_replacement

Response

Successful Response

mode
enum<string>
required
Available options:
brave,
disabled,
fallback
results
SupplierCandidate · object[]
required
warning
string
required
notes
string[]
required