Label weight always 16 oz

Every label created appears as shipping weight 16 Oz.
For example I’m using the following code for a 25 Oz shipping:

$username=“username”;
$password=“password”;
$header=[“Authorization”=> “Basic " . base64_encode(”$username:$password")];
$header[“Content-Type”]=“application/json”;
$header[“Accept”]=“application/json”;

$to=[
“city”=>“São Paulo”,
“name”=> “John Doe”,
“zip”=> “01520000”,
“street1”=> “Rua Pires da Mota, 1”,
“street2”=> “”,
“phone”=> “+551155555555”,
“state”=> “SP”,
“country”=> “Brazil”
];
$from=[
“city”=>“Bear”,
“name”=> “Paulo Junior”,
“zip”=>“19701”,
“street1”=>“1 My Street”,
“phone”=>“(302)555-5555”,
“state”=>“DE”,
“country”=>“US”
];

$urlcreateshipment=“https://api.ordoro.com/shipment/M-TEST_ORDORO-1/label/generate/”;

$endicia=[
“shipper_type”=>“endicia”,
“shipper_id”=>111111,
“shipping_method”=>“FirstClassPackageInternationalService”,
“weight”=> 25,
“height”=> 10,
“width”=> 6,
“length”=> 5,
“nondelivery_option”=> “Return”,
“ship_to”=> $to,
“contents_explanation”=> “”,
“email_bill_to”=> false,
“contents_type”=> “Gift”,
“hold_for_pickup”=> 0,
“stealth”=> true,
“ship_date”=> ‘2017-08-09T11:00:00+00:00’,
“ship_from”=> $from,
“email_ship_to”=> false,
“box_shape”=> “Parcel”,
“delivery_confirmation”=> “DeliveryConfirmation”,
“reference_number”=> “M-TEST_ORDORO”,
“customs_forms”=>[
[
“description”=> “T-SHIRT”,
“weight”=> 1,
“country”=> “US”,
“value”=> 27,
“quantity”=> 1
]
],
“value”=> 27
];

$label= Requests::post($urlcreateshipment, $header, json_encode($endicia));

And I get this response for a 16 Oz shipping

object(stdClass)[8]
public ‘shipping_method’ => string ‘FirstClassPackageInternationalService’ (length=37)
public ‘package_tracking’ => string ‘LZxxxxxxxxxxxxxxUS’ (length=13)
public ‘cost’ => float 19.67
public ‘_link’ => string ‘/label/M-TEST_ORDORO-1/’ (length=23)
public ‘id’ => int 1111111
public ‘company_id’ => int 11111111
public ‘print_date’ => null
public ‘insurance’ => null
public ‘params’ =>
object(stdClass)[4]
public ‘shipping_method’ => string ‘FirstClassPackageInternationalService’ (length=37)
public ‘weight’ => float 16
public ‘box_shape’ => string ‘Parcel’ (length=6)
public ‘height’ => int 10
public ‘ship_date’ => string ‘2017-08-09T11:00:00+00:00’ (length=25)
public ‘nondelivery_option’ => string ‘Return’ (length=6)
public ‘delivery_confirmation’ => string ‘DeliveryConfirmation’ (length=20)
public ‘ship_to’ =>
object(stdClass)[11]
public ‘city’ => string ‘São Paulo’ (length=9)
public ‘fax’ => null
public ‘name’ => string ‘John Doe’ (length=8)
public ‘zip’ => string ‘01520000’ (length=8)
public ‘reference_number’ => null
public ‘country’ => string ‘BR’ (length=2)
public ‘company’ => null
public ‘cart_address_id’ => null
public ‘id’ => float 1111111111
public ‘phone’ => string ‘+551155555555’ (length=13)
public ‘state’ => string ‘SP’ (length=2)
public ‘street1’ => string ‘Rua Pires da Mota 1’ (length=19)
public ‘street2’ => string ‘’ (length=0)
public ‘validation’ =>
object(stdClass)[10]

public ‘email’ => null
public ‘contents_explanation’ => string ‘’ (length=0)
public ‘shipper_id’ => int 1111111
public ‘insurance_type’ => string ‘no_insurance’ (length=12)
public ‘reference_number’ => string ‘M-TEST_ORDORO’ (length=13)
public ‘email_bill_to’ => boolean false
public ‘contents_type’ => string ‘Gift’ (length=4)
public ‘hold_for_pickup’ => boolean false
public ‘shipper_type’ => string ‘endicia’ (length=7)
public ‘length’ => int 5
public ‘value’ => int 27
public ‘width’ => int 6
public ‘stealth’ => boolean true
public ‘customs_forms’ =>
array (size=1)
0 =>
object(stdClass)[12]

public ‘ship_from’ =>
object(stdClass)[13]
public ‘city’ => string ‘Bear’ (length=4)
public ‘fax’ => null
public ‘name’ => string ‘Paulo Junior’ (length=12)
public ‘zip’ => string ‘19701’ (length=5)
public ‘reference_number’ => null
public ‘country’ => string ‘US’ (length=2)
public ‘company’ => null
public ‘cart_address_id’ => null
public ‘id’ => float 111111111
public ‘phone’ => string ‘3025555555’ (length=10)
public ‘state’ => string ‘DE’ (length=2)
public ‘street1’ => string ‘1 My Street’ (length=13)
public ‘street2’ => string ‘’ (length=0)
public ‘validation’ =>
object(stdClass)[14]

public ‘email’ => string ‘my@email.com’ (length=21)
public ‘email_ship_to’ => boolean false
public ‘updated’ => string ‘2017-08-08T21:49:36.099483+00:00’ (length=32)
public ‘vendor’ => string ‘endicia’ (length=7)
public ‘void’ => boolean false
public ‘shipper_id’ => int 111111
public ‘_linkraw’ => string ‘/label/1111111/raw/’ (length=20)
public ‘tracking_url’ => string ‘https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=LZxxxxxxxxxxUS’ (length=71)
public ‘tracking’ => string ‘LZxxxxxxxxxxxxUS’ (length=13)
public ‘created’ => string ‘2017-08-08T21:49:35.310330+00:00’ (length=32)
public ‘package_type’ => string ‘Parcel’ (length=6)
public ‘_linkrawdocs’ => null
public ‘shipment_id’ => string ‘M-TEST_ORDORO-1’ (length=15)
public ‘display_shipping_method’ => string ‘First Class Package International’ (length=33)

Hi,

I believe the weight may be coming from the shipment in this scenario. If you get the shipment, what is the weight in the response?

sophie

Yes, The response for the shipment is “weight=1”.
I already solved the problem, I’m using the “PUT” shipment for to place weight information after generate the order and before generate the label.
Thank You.