Get a shipment line item
curl --request GET \
--url https://api.upwell.com/api/rest/shipment_line_items/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.upwell.com/api/rest/shipment_line_items/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.upwell.com/api/rest/shipment_line_items/{id}', 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.upwell.com/api/rest/shipment_line_items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.upwell.com/api/rest/shipment_line_items/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.upwell.com/api/rest/shipment_line_items/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/shipment_line_items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"shipmentLineItem": {
"commodityDescription": "<string>",
"createdAt": "<unknown>",
"deliveryLocationName": "<string>",
"dimensionUnit": "<string>",
"freightClass": "<string>",
"handlingUnit": "<string>",
"handlingUnitQty": "<unknown>",
"hazmatFlag": true,
"height": "<unknown>",
"id": "<string>",
"length": "<unknown>",
"lineNumber": 123,
"nmfcClass": "<string>",
"nmfcNumber": "<string>",
"packageQty": "<unknown>",
"packageUnit": "<string>",
"pickupLocationName": "<string>",
"referenceNumber": "<string>",
"shipmentId": "<string>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"updatedAt": "<unknown>",
"weight": "<unknown>",
"weightUnit": "<string>",
"width": "<unknown>"
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}API Reference
Get a shipment line item
Retrieve a single shipment line item by its sli_ ID.
GET
/
api
/
rest
/
shipment_line_items
/
{id}
Get a shipment line item
curl --request GET \
--url https://api.upwell.com/api/rest/shipment_line_items/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.upwell.com/api/rest/shipment_line_items/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.upwell.com/api/rest/shipment_line_items/{id}', 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.upwell.com/api/rest/shipment_line_items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.upwell.com/api/rest/shipment_line_items/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.upwell.com/api/rest/shipment_line_items/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/shipment_line_items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"shipmentLineItem": {
"commodityDescription": "<string>",
"createdAt": "<unknown>",
"deliveryLocationName": "<string>",
"dimensionUnit": "<string>",
"freightClass": "<string>",
"handlingUnit": "<string>",
"handlingUnitQty": "<unknown>",
"hazmatFlag": true,
"height": "<unknown>",
"id": "<string>",
"length": "<unknown>",
"lineNumber": 123,
"nmfcClass": "<string>",
"nmfcNumber": "<string>",
"packageQty": "<unknown>",
"packageUnit": "<string>",
"pickupLocationName": "<string>",
"referenceNumber": "<string>",
"shipmentId": "<string>",
"sourceSystem": "<string>",
"sourceSystemId": "<string>",
"updatedAt": "<unknown>",
"weight": "<unknown>",
"weightUnit": "<string>",
"width": "<unknown>"
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}Authorizations
Your API key, sent in the Authorization header: Authorization: YOUR_API_KEY. A Bearer prefix is also accepted (Authorization: Bearer YOUR_API_KEY). Keys are created in the Upwell dashboard (Account → API keys) and are scoped to one organization.
Path Parameters
"id" is required (enter it either in parameters or request body)
Response
Responses for GET /api/rest/shipment_line_items/{id}
Shipment Line Items
Show child attributes
Show child attributes
⌘I

