Turn parts on an assembly quote
curl --request POST \
--url https://api.provenmetal.com/v1/quotes/{quote_id}/rotations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rotations": [
{
"reference": "<string>",
"degrees": 0
}
],
"reset": false
}
'import requests
url = "https://api.provenmetal.com/v1/quotes/{quote_id}/rotations"
payload = {
"rotations": [
{
"reference": "<string>",
"degrees": 0
}
],
"reset": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({rotations: [{reference: '<string>', degrees: 0}], reset: false})
};
fetch('https://api.provenmetal.com/v1/quotes/{quote_id}/rotations', 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.provenmetal.com/v1/quotes/{quote_id}/rotations",
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([
'rotations' => [
[
'reference' => '<string>',
'degrees' => 0
]
],
'reset' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.provenmetal.com/v1/quotes/{quote_id}/rotations"
payload := strings.NewReader("{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.provenmetal.com/v1/quotes/{quote_id}/rotations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.provenmetal.com/v1/quotes/{quote_id}/rotations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"rotations": [
{}
],
"message": "<string>",
"board_image_url": "<string>"
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}Turn parts on an assembly quote
The MCP’s rotate_parts. Before an assembly quote is paid, when its board picture (JLCPCB’s own view of each part, pin 1 and polarity marks in magenta) shows a part facing the wrong way, or the customer asks: each part turns by degrees counter-clockwise as seen from its own side, added to any turn it has. The price doesn’t change. The reply lists every turn and the board picture drawn with them; the order is placed with the turns.
POST
/
v1
/
quotes
/
{quote_id}
/
rotations
Turn parts on an assembly quote
curl --request POST \
--url https://api.provenmetal.com/v1/quotes/{quote_id}/rotations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rotations": [
{
"reference": "<string>",
"degrees": 0
}
],
"reset": false
}
'import requests
url = "https://api.provenmetal.com/v1/quotes/{quote_id}/rotations"
payload = {
"rotations": [
{
"reference": "<string>",
"degrees": 0
}
],
"reset": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({rotations: [{reference: '<string>', degrees: 0}], reset: false})
};
fetch('https://api.provenmetal.com/v1/quotes/{quote_id}/rotations', 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.provenmetal.com/v1/quotes/{quote_id}/rotations",
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([
'rotations' => [
[
'reference' => '<string>',
'degrees' => 0
]
],
'reset' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.provenmetal.com/v1/quotes/{quote_id}/rotations"
payload := strings.NewReader("{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.provenmetal.com/v1/quotes/{quote_id}/rotations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.provenmetal.com/v1/quotes/{quote_id}/rotations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rotations\": [\n {\n \"reference\": \"<string>\",\n \"degrees\": 0\n }\n ],\n \"reset\": false\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"rotations": [
{}
],
"message": "<string>",
"board_image_url": "<string>"
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"ok": false,
"questions": [
{}
],
"known": {},
"parts": [
{}
],
"off_board_parts": [
{}
],
"retry_after_s": 123,
"checkout_url": "<string>",
"fields": [
{}
]
}Authorizations
Your ProvenMetal API key (pm_live_...). Authorization: Bearer <key> also works.
Path Parameters
Maximum string length:
80Body
application/json
Everything the MCP rotate_parts tool takes, for an assembly quote before it is paid.