Update Ship Method for a Shipment
PUThttps://racko-api.ianai.co/v2/shipment/:id/shipmethod
Update Ship Method for a Shipment
Request
Responses
- 200
- 400
- 401
- 403
- 500
Shipment information
Bad request error
Unauthorized error
Token issue like Expired or corrupted
Internal Server error
Authorization: http
name: bearerAuthtype: httpscheme: bearerbearerFormat: JWT
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://racko-api.ianai.co/v2/shipment/:id/shipmethod");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"active\": true,\n \"status\": \"READY\",\n \"doc_number\": \"SHIP-0001\",\n \"created_at\": \"2021-01-01T00:00:00Z\",\n \"ship_datetime\": \"2024-01-10T12:00:00Z\",\n \"due_date\": \"2024-01-31\",\n \"customer_po_number\": \"PO-123\",\n \"shipping_amount\": 10,\n \"discount_amount\": 10,\n \"tax_amount\": 10,\n \"currency\": \"USD\",\n \"exchange_rate\": 1,\n \"msg_from_customer\": \"Please deliver before 5 PM\",\n \"msg_to_customer\": \"Your order is ready for pickup\",\n \"internal_notes\": \"Notes\",\n \"carrier_name\": \"UPS\",\n \"carrier_code\": \"ups\",\n \"service_code\": \"ground\",\n \"is_verified_address\": true,\n \"is_residential\": true,\n \"requested_ship_method\": \"UPS;;ups;;ups_ground\",\n \"custom_fields\": {},\n \"sales_order\": {\n \"id\": \"uuid\",\n \"name\": \"Sales Order 1\"\n },\n \"customer\": {\n \"id\": \"uuid\",\n \"name\": \"XYZ Inc.\"\n },\n \"department\": {\n \"id\": \"uuid\",\n \"name\": \"Department 1\"\n },\n \"location\": {\n \"id\": \"uuid\",\n \"name\": \"Location 1\"\n },\n \"ship_method\": {\n \"id\": \"uuid\",\n \"name\": \"UPS Ground\"\n },\n \"ext_channel\": {\n \"id\": \"uuid\",\n \"name\": \"offline\"\n },\n \"salesrep\": {\n \"id\": \"uuid\",\n \"name\": \"John Doe\"\n },\n \"project_code\": {\n \"id\": \"uuid\",\n \"name\": \"Project 1\"\n },\n \"from_addr\": {\n \"id\": \"uuid\",\n \"person\": \"John\",\n \"company_name\": \"ABC Inc.\",\n \"line1\": \"123 Seirra way\",\n \"line2\": \"Suite 100\",\n \"line3\": \"\",\n \"city\": \"San Pablo\",\n \"state\": \"CA\",\n \"postal_code\": \"94588\",\n \"country\": \"US\",\n \"email\": \"info@xyzinc.com\",\n \"phone\": \"123-456-7890\"\n },\n \"billing_addr\": {\n \"id\": \"uuid\",\n \"person\": \"John\",\n \"company_name\": \"ABC Inc.\",\n \"line1\": \"123 Seirra way\",\n \"line2\": \"Suite 100\",\n \"line3\": \"\",\n \"city\": \"San Pablo\",\n \"state\": \"CA\",\n \"postal_code\": \"94588\",\n \"country\": \"US\",\n \"email\": \"info@xyzinc.com\",\n \"phone\": \"123-456-7890\"\n },\n \"shipping_addr\": {\n \"id\": \"uuid\",\n \"person\": \"John\",\n \"company_name\": \"ABC Inc.\",\n \"line1\": \"123 Seirra way\",\n \"line2\": \"Suite 100\",\n \"line3\": \"\",\n \"city\": \"San Pablo\",\n \"state\": \"CA\",\n \"postal_code\": \"94588\",\n \"country\": \"US\",\n \"email\": \"info@xyzinc.com\",\n \"phone\": \"123-456-7890\"\n },\n \"parcels\": [\n {\n \"weight\": 10,\n \"weight_unit\": \"lb\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimension_unit\": \"in\",\n \"packaging_type\": \"box\",\n \"packaging_preset\": \"small_box\",\n \"is_document\": false,\n \"freight_class\": null\n }\n ],\n \"paid_by\": {\n \"bill_to_party\": \"shipper\",\n \"bill_to_account\": \"123456789\",\n \"bill_to_postal_code\": \"12345\",\n \"bill_to_country_code\": \"US\",\n \"bill_to_my_other_account\": \"987654321\"\n },\n \"shipping_options\": {\n \"merged_split\": null,\n \"merged_ids\": null,\n \"currency\": \"USD\",\n \"insurance\": 10,\n \"shipment_note\": \"Shipment note\",\n \"shipment_date\": \"2024-01-10\",\n \"dangerous_goods\": null,\n \"declared_value\": 10,\n \"paperless_trade\": null,\n \"signature_confirmation\": null,\n \"saturday_delivery\": null,\n \"hold_at_location\": null,\n \"hold_at_location_address\": null,\n \"dry_ice\": true,\n \"dry_ice_weight\": 1.0625,\n \"non_machinable\": true,\n \"do_not_notify_marketplace\": true\n },\n \"international_options\": {\n \"content_type\": \"documents\",\n \"customs_items\": [\n {\n \"description\": \"Description\",\n \"quantity\": 3,\n \"value\": 10,\n \"country_of_origin\": \"US\",\n \"harmonized_system_code\": \"1234567890\"\n }\n ],\n \"non_delivery\": \"return\",\n \"incoterm\": \"DDP\",\n \"customs_options\": {\n \"aes_exemption_code\": \"00000\",\n \"eel_pfc\": \"00000\",\n \"eori_number\": \"00000\",\n \"license_number\": \"00000\",\n \"certificate_number\": \"00000\",\n \"vat_number\": \"00000\"\n }\n },\n \"line_items\": [\n {\n \"line_number\": 1,\n \"item\": {\n \"id\": \"uuid\",\n \"name\": \"Item 1\"\n },\n \"description\": \"Example line item description\",\n \"quantity\": 10,\n \"uom_conversion\": 1,\n \"uom\": {\n \"id\": \"uuid\",\n \"name\": \"Each\"\n },\n \"unit_price\": 1,\n \"amount\": 10,\n \"taxable\": true,\n \"tax_code\": {\n \"id\": \"uuid\",\n \"name\": \"CA Tax 10%\"\n },\n \"measurements\": {\n \"id\": \"uuid\",\n \"weight\": 1,\n \"weight_unit\": \"lbs\",\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"dimension_unit\": \"in\"\n },\n \"binlocation\": {\n \"id\": \"uuid\",\n \"name\": \"Bin 1\"\n },\n \"lot\": {\n \"id\": \"uuid\",\n \"name\": \"LOT123456\"\n },\n \"class_ref\": {\n \"id\": \"uuid\",\n \"name\": \"Class 1\"\n },\n \"expiry_date\": \"2024-01-01\",\n \"serials\": \"SER123456\",\n \"parent\": {\n \"id\": \"uuid\",\n \"name\": \"parent item name\"\n }\n }\n ],\n \"linked_transactions\": [\n {\n \"entity_name\": \"PurchaseOrderLineItem\",\n \"entity_key\": \"uuid\"\n }\n ],\n \"trackings\": [\n {\n \"id\": \"uuid\",\n \"carrier_name\": \"UPS\",\n \"carrier_code\": \"ups\",\n \"status\": \"PENDING\",\n \"tracking_number\": \"1Z1234567890\",\n \"tracking_url\": \"https://www.ups.com/track?tracknum=1Z1234567890\",\n \"info\": {\n \"carrier_tracking_link\": \"https://www.ups.com/track?tracknum=1Z1234567890\",\n \"customer_name\": \"John Doe\",\n \"expected_delivery\": \"2024-01-10\",\n \"note\": \"Shipment has been delivered\",\n \"order_date\": \"2024-01-10\",\n \"order_id\": \"uuid\",\n \"package_weight\": \"10 lbs\",\n \"package_weight_unit\": \"lbs\",\n \"shipment_package_count\": \"1\",\n \"shipment_pickup_date\": \"2024-01-10\",\n \"shipment_delivery_date\": \"2024-01-10\",\n \"shipment_service\": \"UPS Ground\",\n \"shipment_origin_country\": \"US\",\n \"shipment_origin_postal_code\": \"90001\",\n \"shipment_destination_country\": \"US\",\n \"shipment_destination_postal_code\": \"90001\",\n \"shipping_date\": \"2024-01-10\",\n \"signed_by\": \"John Doe\",\n \"source\": \"UPS\"\n },\n \"events\": {\n \"date\": \"2024-01-10\",\n \"description\": \"Shipment has been delivered\",\n \"code\": \"string\",\n \"time\": \"12:00:00\",\n \"location\": \"Los Angeles, CA\",\n \"latitude\": 34.0522,\n \"longitude\": -118.2437\n },\n \"estimated_delivery\": \"string\",\n \"delivered\": false,\n \"delivery_image\": \"base64 string\",\n \"signature_image\": \"base64 string\",\n \"meta_data\": {}\n }\n ],\n \"invoice_url\": \"string\",\n \"overdue\": true,\n \"notify_sync_queue_id\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear