Analyze Spare Part
POST
/
api
/
spare-parts
/
analyze
Analyze Spare Part
curl --request POST \
--url https://api.example.com/api/spare-parts/analyze \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'customer_reference=<string>' \
--form 'site_type=<string>' \
--form 'country=<string>' \
--form 'system_manufacturer=<string>' \
--form 'system_model=<string>' \
--form 'system_type=<string>' \
--form 'approximate_installation_year=<string>' \
--form 'energy_source=<string>' \
--form 'suspected_component=<string>' \
--form 'observed_failure=<string>' \
--form 'technician_note=<string>' \
--form 'urgency=<string>' \
--form intent=find_replacementimport requests
url = "https://api.example.com/api/spare-parts/analyze"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"customer_reference": "<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"
}
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('customer_reference', '<string>');
form.append('site_type', '<string>');
form.append('country', '<string>');
form.append('system_manufacturer', '<string>');
form.append('system_model', '<string>');
form.append('system_type', '<string>');
form.append('approximate_installation_year', '<string>');
form.append('energy_source', '<string>');
form.append('suspected_component', '<string>');
form.append('observed_failure', '<string>');
form.append('technician_note', '<string>');
form.append('urgency', '<string>');
form.append('intent', 'find_replacement');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.example.com/api/spare-parts/analyze', 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/analyze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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/analyze"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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/analyze")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/spare-parts/analyze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"extracted": {
"manufacturer": "<string>",
"brand_or_logo": "<string>",
"model_number": "<string>",
"serial_number": "<string>",
"part_number": "<string>",
"component_type": "<string>",
"visible_markings": [
"<string>"
],
"confidence": 0
},
"search_queries": [
"<string>"
],
"context_used": {
"customer_reference": "<string>",
"site_type": "<string>",
"country": "Germany",
"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"
},
"context_warnings": [
"<string>"
],
"recommended_next_actions": [
"<string>"
],
"sales_relevance": {
"reason": "<string>",
"likely_replacement_needed": true
},
"notes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
multipart/form-data
Response
Successful Response
Available options:
openai, mock, fallback Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Analyze Spare Part
curl --request POST \
--url https://api.example.com/api/spare-parts/analyze \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'customer_reference=<string>' \
--form 'site_type=<string>' \
--form 'country=<string>' \
--form 'system_manufacturer=<string>' \
--form 'system_model=<string>' \
--form 'system_type=<string>' \
--form 'approximate_installation_year=<string>' \
--form 'energy_source=<string>' \
--form 'suspected_component=<string>' \
--form 'observed_failure=<string>' \
--form 'technician_note=<string>' \
--form 'urgency=<string>' \
--form intent=find_replacementimport requests
url = "https://api.example.com/api/spare-parts/analyze"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"customer_reference": "<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"
}
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('customer_reference', '<string>');
form.append('site_type', '<string>');
form.append('country', '<string>');
form.append('system_manufacturer', '<string>');
form.append('system_model', '<string>');
form.append('system_type', '<string>');
form.append('approximate_installation_year', '<string>');
form.append('energy_source', '<string>');
form.append('suspected_component', '<string>');
form.append('observed_failure', '<string>');
form.append('technician_note', '<string>');
form.append('urgency', '<string>');
form.append('intent', 'find_replacement');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.example.com/api/spare-parts/analyze', 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/analyze",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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/analyze"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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/analyze")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/spare-parts/analyze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer_reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"site_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_manufacturer\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_model\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"system_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"approximate_installation_year\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"energy_source\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"suspected_component\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"observed_failure\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"technician_note\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"urgency\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"intent\"\r\n\r\nfind_replacement\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"extracted": {
"manufacturer": "<string>",
"brand_or_logo": "<string>",
"model_number": "<string>",
"serial_number": "<string>",
"part_number": "<string>",
"component_type": "<string>",
"visible_markings": [
"<string>"
],
"confidence": 0
},
"search_queries": [
"<string>"
],
"context_used": {
"customer_reference": "<string>",
"site_type": "<string>",
"country": "Germany",
"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"
},
"context_warnings": [
"<string>"
],
"recommended_next_actions": [
"<string>"
],
"sales_relevance": {
"reason": "<string>",
"likely_replacement_needed": true
},
"notes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}