Create Fulfillment
curl --request POST \
--url https://production-api.puppetvendors.com/v1/fulfillments \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"trackingNumber": "<string>",
"shippingCarrier": "<string>",
"trackingUrl": "<string>",
"lineItemsToFulfill": [
{}
]
}
'import requests
url = "https://production-api.puppetvendors.com/v1/fulfillments"
payload = {
"trackingNumber": "<string>",
"shippingCarrier": "<string>",
"trackingUrl": "<string>",
"lineItemsToFulfill": [{}]
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trackingNumber: '<string>',
shippingCarrier: '<string>',
trackingUrl: '<string>',
lineItemsToFulfill: [{}]
})
};
fetch('https://production-api.puppetvendors.com/v1/fulfillments', 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://production-api.puppetvendors.com/v1/fulfillments",
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([
'trackingNumber' => '<string>',
'shippingCarrier' => '<string>',
'trackingUrl' => '<string>',
'lineItemsToFulfill' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <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://production-api.puppetvendors.com/v1/fulfillments"
payload := strings.NewReader("{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<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://production-api.puppetvendors.com/v1/fulfillments")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/v1/fulfillments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyFulfillments
Create Fulfillment
Fulfill line items with tracking information
POST
/
v1
/
fulfillments
Create Fulfillment
curl --request POST \
--url https://production-api.puppetvendors.com/v1/fulfillments \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"trackingNumber": "<string>",
"shippingCarrier": "<string>",
"trackingUrl": "<string>",
"lineItemsToFulfill": [
{}
]
}
'import requests
url = "https://production-api.puppetvendors.com/v1/fulfillments"
payload = {
"trackingNumber": "<string>",
"shippingCarrier": "<string>",
"trackingUrl": "<string>",
"lineItemsToFulfill": [{}]
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trackingNumber: '<string>',
shippingCarrier: '<string>',
trackingUrl: '<string>',
lineItemsToFulfill: [{}]
})
};
fetch('https://production-api.puppetvendors.com/v1/fulfillments', 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://production-api.puppetvendors.com/v1/fulfillments",
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([
'trackingNumber' => '<string>',
'shippingCarrier' => '<string>',
'trackingUrl' => '<string>',
'lineItemsToFulfill' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <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://production-api.puppetvendors.com/v1/fulfillments"
payload := strings.NewReader("{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<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://production-api.puppetvendors.com/v1/fulfillments")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/v1/fulfillments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trackingNumber\": \"<string>\",\n \"shippingCarrier\": \"<string>\",\n \"trackingUrl\": \"<string>\",\n \"lineItemsToFulfill\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyOverview
Submit line items for fulfillment with tracking details. This creates a fulfillment in Shopify and updates the line item records in PuppetVendors.Use Cases
- Automate fulfillment from a third-party warehouse or 3PL system
- Bulk-fulfill orders by scripting API calls from a shipping platform
- Connect non-Shopify fulfillment services to your multi-vendor workflow
Request Body
string
required
Shipment tracking number.
string
required
Shipping carrier name (e.g.
"Royal Mail", "UPS", "FedEx").string
required
URL for tracking the shipment.
array
required
Array of calculated line item IDs (PuppetVendors
_id values) to fulfill.Response
200
{
"fulfillments": [
{
"type": "success",
"lineItemId": "...",
"message": "Fulfillment completed successfully."
}
]
}
Partial Failure
If some items fail to fulfill, each item reports individually:200
{
"fulfillments": [
{ "type": "success", "lineItemId": "abc...", "message": "Fulfillment completed successfully." },
{ "type": "error", "lineItemId": "def...", "message": "Already fulfilled" }
]
}
Example
curl -X POST https://api.puppetvendors.com/v1/fulfillments \
-H "Content-Type: application/json" \
-H "x-access-token: YOUR_JWT_TOKEN" \
-d '{
"trackingNumber": "RM123456789GB",
"shippingCarrier": "Royal Mail",
"trackingUrl": "https://tracking.royalmail.com/RM123456789GB",
"lineItemsToFulfill": ["64a1b2c3d4e5f6...", "64a1b2c3d4e5f7..."]
}'
Was this page helpful?
⌘I