Update Shipment

Find below more details on how you can update a shipment

Update Shipment

PATCH https://api-sandbox.shiplemon.com/v1/shipments/:id

Request Body

Important! you should include always the entire object that you want to update

Request

Example request body

curl -x POST https://api-sandbox.shiplemon.com/v1/shipments/:id  \
    -H "x-api-key: <YOUR_API_KEY>" \
    -H "Content-Type: application/json"  \
    -d '{
    "metadata": {
       "some_key_1": true,
       "some_key_2": "some value",
       "some_key_3": 3
       }
    }'

Response

Returns the updated shipment

{
  "invoice_id": null,
  "partner_credentials_used": true,
  "related_order_id": null,
  "incoming_order_id": null,
  "return_request_id": null,
  "payment_ref": "ownaccount",
  "payment_amount": 9.72,
  "state": "created",
  "driver": "boxnow",
  "pickup_ref": null,
  "pickup_list_ref": null,
  "tracking_ref": "2338891501",
  "tracking_url": null,
  "tracking_status": "PRE_TRANSIT",
  "tracking_history": [
    {
      "status": "DELIVERED",
      "status_date": "2023-11-20T00:00:01.992Z",
      "status_details": "ΠΑΡΑΔΟΣΗ ΑΠΟ ΔΙΑΝΟΜΕΑ"
    },
    {
      "status": "EXCEPTION",
      "status_date": "2023-11-20T00:00:02.195Z",
      "status_details": "ΑΚΥΡΩΣΗ ΑΠΟ ΔΙΑΝΟΜΕΑ"
    },
    {
      "status": "TRANSIT",
      "status_date": "2023-11-20T00:00:02.075Z",
      "status_details": "ΕΚΦΟΡΤΩΣΗ ΑΠΟ ΜΕΤΑΦΟΡΙΚΟ ΜΕΣΟ"
    },
    {
      "status": "PRE_TRANSIT",
      "status_date": "2023-11-20T00:00:02.064Z",
      "status_details": "ΔΗΜΙΟΥΡΓΙΑ ΣΥ.ΔΕ.ΤΑ. ΑΠΟ ΠΕΛΑΤΗ"
    }
  ],
  "tracking_history_last_updated_at": "2022-08-08T09:15:00.947Z", 
  "label_url": "https://static.shiplemon.com/sandbox/labels/boxnow/2338891501.pdf",
  "child_vouchers": [
    {
      "tracking_ref": "2338891501",
      "tracking_url": "",
      "label_url": "https://static.shiplemon.com/sandbox/labels/boxnow/2338891501.pdf"
    }
  ],
  "address_from": { 
    "country":"GR", 
    "zip":"14451",
    "name": "Kostas Papadopoulos", 
    "company": "Papadopoulou IKE", 
    "address": "Papadopoulou 23",
    "address2": "Floor 2"
    "city": "Athens",
    "phone": "+306900000000",
    "email": "example@gmail.com"
    "country": "GR",
    "notes": "call me"            
  },
  "address_to": {
    "name": "SG2",
    "country": "GR",
    "state": "I",
    "city": "Athens",
    "zip": "14451",
    "address": "Kolokotroni 2",
    "email": "example2@gmail.com",
    "phone": "+306900000000"
  },
  "items": [
    {
      "width": 20,
      "height": 20,
      "length": 20,
      "weight": 1600,
      "label": "Box",
      "notes": "Box",
      "invoice_lines": [
        {
          "country_of_origin": "GR",
          "description": "glasses-RETURN TO ORIGIN",
          "commodity_code": "9004.90.10",
          "quantity": "1",
          "value": 10,
          "weight": 500
        }
      ]
    }
  ],
  "pickup": { // if date not provided pickup is null
    "date": "2023-11-22",
    "time": "11:00-17:00"
  },
  "pickup_at": null,
  "delivered_at": null,
  "refunded_at": null,
  "rate": {
    "id": "boxnow_next-day_40b892de-02ea-47f7-85d9-f9dccef1144f",
    "friendly_name": "BoxNow",
    "driver": "boxnow",
    "provider": {
      "name": "BOXNOW",
      "image": "https://static.shiplemon.com/providers/boxnow.svg"
    },
    "service": {
       "code": "next-day",
       "name": "Next Day",
       "estimated_delivery_in_days": 2
    },
    "total_amount": 9.72,
    "total_without_tax_amount": 7.84,
    "tax_amount": 1.88,
    "currency": "EUR",
    "has_cash_on_delivery": false,
    "has_custom_credentials": false,
    "has_shipment_pickup_combined": false,
    "has_pickup": true,
    "transportation": "road",
    "has_mass_printing": false,
    "has_customs_invoice_upload": false,
    "has_insurance_ability": false,
    "has_saturday_delivery": false,
    "has_same_day_pickup": false,
    "pickup_slot_length_in_hours": 2,
    "pickup_same_day_latest_at": null,
    "pickup_earliest_at": null,
    "pickup_latest_at": null,
    "metadata": {
      "items": [
        {
          "width": 20,
          "height": 20,
          "length": 20,
          "weight": 1600,
          "label": "Box",
          "notes": "Box",
          "compartment_size": 1,
          "invoice_lines": [
            {
              "country_of_origin": "GR",
              "description": "glasses-RETURN TO ORIGIN",
              "commodity_code": "9004.90.10",
              "quantity": "1",
              "value": 10,
              "weight": 500
            }
          ]
        }
      ],
      "address_from": { 
        "country":"GR", 
        "zip":"14451",
        "name": "Kostas Papadopoulos", 
        "company": "Papadopoulou IKE", 
        "address": "Papadopoulou 23",
        "address2": "Floor 2"
        "city": "Athens",
        "phone": "+306900000000",
        "email": "example@gmail.com"
        "country": "GR",
        "notes": "call me"            
      },
      "address_to": {
        "name": "SG2",
        "country": "GR",
        "state": "I",
        "city": "Athens",
        "zip": "14451",
        "address": "Kolokotroni 2",
        "email": "example2@gmail.com",
        "phone": "+306900000000"
      },
    }
  },
  "cash_on_delivery": 0,
  "extras": {
    "insurance_amount": 100, // number or undefined
    "is_customs_invoice_document": false, // boolean or undefined
    "is_saturday_delivery": false // boolean or undefined
  },
  "metadata" {
    "some_key_1": "some value",
    "some_key_2": true
  },
  "created_at": "2023-11-21T12:51:51.422Z",
  "updated_at": "2023-11-21T12:51:51.422Z"
}

Last updated