@@ -34,16 +34,18 @@ $parcel = $sendcloudClient->parcels()->find(2342);
3434``` php
3535$parcel = $sendcloudClient->parcels();
3636
37+ $parcel->shipment = 10; // Shipping method, get possibilities from $sendCloud->shippingMethods()->all()
38+
3739$parcel->name = 'John Smith';
3840$parcel->company_name = 'ACME';
3941$parcel->address = 'Wellingtonstreet 25';
4042$parcel->city = 'Wellington';
4143$parcel->postal_code = '3423 DD';
4244$parcel->country = 'NL';
43- $parcel->requestShipment = true;
44- $parcel->shipment = 10; // Shipping method, get possibilities from $sendCloud->shippingMethods()->all()
4545$parcel->order_number = 'ORDER2014-52321';
4646
47+ $parcel->requestShipment = true; // Specifically needed to create a shipment after adding the parcel
48+
4749$parcel->save();
4850```
4951
6466 throw new Exception($e->getMessage());
6567}
6668```
69+
70+ ## Create an international parcel
71+ ``` php
72+ $parcel = $sendcloudClient->parcels();
73+
74+ $parcel->shipment = 9; // Shipping method, get possibilities from $sendCloud->shippingMethods()->all()
75+
76+ $parcel->name = 'John Smith';
77+ $parcel->company_name = 'ACME';
78+ $parcel->address = 'Wellingtonstreet 25';
79+ $parcel->city = 'Wellington';
80+ $parcel->postal_code = '3423 DD';
81+ $parcel->country = 'CH';
82+ $parcel->order_number = 'ORDER2014-52321';
83+ $parcel->weight = 20.4;
84+
85+ // For international shipments
86+ $parcel->customs_invoice_nr = 'ORD9923882';
87+ $parcel->customs_shipment_type = 2; // Commercial goods
88+ $parcel->parcel_items = [
89+ [
90+ 'description' => 'Cork',
91+ 'quantity' => 2,
92+ 'weight' => 10.2,
93+ 'value' => 12.93,
94+ 'hs_code' => '992783',
95+ 'origin_country' => 'CN',
96+ ]
97+ ];
98+
99+ $parcel->requestShipment = true; // Specifically needed to create a shipment after adding the parcel
100+
101+ $parcel->save();
102+ ```
0 commit comments