#!/bin/bash
# ReplaceShipmentLineItems -- REST curl example
# Pre-configured for the DM Web Services test environment.
# Replace YOUR_TOKEN below with your Bearer token.
BASE_URL="https://webservices.nebulasuite.net"
TOKEN="YOUR_TOKEN"

curl -X POST "${BASE_URL}/api/public/v1/shipping/ReplaceShipmentLineItems" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "dmLoadNumber": 4363968,
    "lineItems": [
      {
        "pieces": 2, "weight": 120, "length": 48, "width": 40, "height": 36,
        "description": "Office Chair", "sku": "CHAIR-001", "packagingType": "Pallet",
        "class": "92.5", "unitValue": 299.99, "hazardousMaterial": false, "lineNumber": 1
      },
      {
        "pieces": 1, "weight": 60, "length": 30, "width": 24, "height": 24,
        "description": "Desk Lamp", "sku": "LAMP-002", "packagingType": "Carton",
        "class": "85", "unitValue": 79.99, "hazardousMaterial": false, "lineNumber": 2
      }
    ]
  }'
