Overview
This guide explains how to edit consignments when you are setting your own carrier consignment numbers and item references/barcodes. Common edit operations include:
- Adjusting item weights/dimensions
- Adding new items and references
- Removing items and references
This guide is specifically for workflows where you manage carrier consignment IDs and item references/barcodes. For standard editing workflows, see Editing Consignments.
Prerequisites
Before proceeding, ensure you have:
- A created, unmanifested consignment
- The MachShip consignment ID
- Understanding of basic consignment creation
Edit Workflow
Step 1: Create Consignment
When delegating your own consignment numbers and references, use:
POST /apiv2/consignments/createConsignmentwithComplexItems
Required custom fields:
- carrierConsignmentId: At the parent level, this is your carrier-specific consignment ID
- items.consignmentItemReferences.carrierItemReference: Inside each item's references array, this is your carrier-specific barcode
Example request:
{
  "carrierConsignmentId": "2657628002",
  "carrierId": "446",
  "items": [
    {
      "name": "Pallet",
      "quantity": 2,
      "itemType": "Pallet",
      "standardItem": {
        "weight": 270,
        "length": "117",
        "height": "110",
        "width": "117"
      },
      "consignmentItemReferences": [
        {
          "carrierItemReference": "(00)393168610029113320"
        },
        {
          "carrierItemReference": "(00)393168610029113321"
        }
      ]
    }
  ]
}
Important: Store the returned
idvalue. If you can't store it, you can retrieve it later using/apiv2/consignments/returnConsignmentsByCarrierConsignmentIdwith your carrier consignment ID.
Step 2: Retrieve Consignment
Get the current consignment state:
GET /apiv2/consignments/getUnmanifestedConsignmentForEdit
Required parameter:
- id: The MachShip consignment ID from step 1
Step 3: Make Edits
Take the response from step 2 and modify as needed. When working with references:
- Set setItemReferencestotrueat the root level:
{
  "id": 26848234,
  "setItemReferences": true,
  ...
}
- Ensure each item has proper references:
{
 "id": 26848234,
  "setItemReferences": true,
  .....
  "items": [
    {
      .....
      "consignmentItemReferences": [
        {
          "carrierItemReference": "642000123456780000299006"
        }
      ]
    }
  ],
  .....
}
Step 4: Submit Changes
Send your modified payload to:
POST /apiv2/consignments/editUnmanifestedConsignment
Working with References
Adding Items with References
When adding a new item, include both standard item details and references:
{
  "itemType": "Carton",
  "name": "Test Item",
  "quantity": 1,
  "standardItem": {
    "height": 20.00000,
    "weight": 1.00000,
    "length": 20.00000,
    "width": 20.00000
  },
  "consignmentItemReferences": [
    {
      "carrierItemReference": "642000123456780000299006"
    }
  ]
}
Managing References
- 
Adding References: - Set setItemReferencestotrue
- Include complete reference information for each item
 
- Set 
- 
Removing References: - Remove the entire reference object from the item
- Ensure setItemReferencesistrue
 
- 
Updating References: - Modify the carrierItemReferencevalue
- Keep the reference object structure intact
 
- Modify the 
Important Notes
- 
Reference Management: - Always set setItemReferencestotruewhen modifying references
- If references are being ignored, check this setting or verify carrier support
- Some carriers don't support external reference allocation
 
- Always set 
- 
Carrier Support: - Not all carriers support delegated references
- Verify carrier capabilities before implementing this workflow
 
- 
Validation: - References must follow carrier-specific formats
- Verify all references in the response match your expectations
- Complete all reference changes before manifesting
 
