🌱 Create

Learn how to use the Carrier Connect API calls to programmatically CREATE new shipments or pickups.

createShipment: Create a new shipping order

The createShipment call enables you to generate a new shipping order using the data provided in the shipment request.

📘

Be aware, that if the shipment already exists, an error will be returned.

Furthermore, you can choose to apply various operations to the shipment, such as label preparation and output. It is even possible to complete the entire processing, including the assignment of a pickup.

{
    "clientSystemId": "YOUR_SYSTEM_ID",
    "clientIdentCode": "CCO_TEMPL",
    "userName": "WSM",
    "resultLanguageIsoCodes": [
        "en"
    ],
    "creationParms": {
        "creationMode": "VALIDATION_OK"
    },
    "shipment": {
        "referenceNumber1": "1001",
        "shippingDate": "20230102",
        "contents": "content",
        "shippingPt": {
            "companyNumber": "V1",
            "initFromCompanyMasterFileData": "true"
        },
        "shippingPtContact": {
            "name": "Max Mustermann",
            "phone": "070 123456"
        },
        "consignee": {
            "name": "AEB SE",
            "street": "Sigmaringer Str. 109",
            "postcode": "70567",
            "city": "Stuttgart",
            "countryISOCode": "DE"
        },
        "consigneeContact": {
            "name": "Erika Müller",
            "phone": "070 123456"
        },
        "carrierIdentCode": "GENERICCARRIER",
        "serviceCode": "STD",
        "termsOfDeliveryCode": "DAP",
        "packages": [
            {
            "packageTypeIdentCode": "K1",
            "packageNumber": "1",
            "referenceNumber1": "Ref.1",
            "grossWeight": {
                "value": "7.500",
                "unit": "kg"
            },
            "dimensions": {
                "length": "19.500",
                "width": "14.500",
                "height": "9.200",
                "identCode": "cm"
            }
            }
        ]
    },
    "processParms": {
        "workstationId": "PDF",
        "documentOutputMode": {
            "mode": "RETURN"
        },
        "documentOutputScope": {
            "scope": "REQUEST"
        },
        "documentPrepareScope": {
            "scope": "REQUEST"
        },
        "processMode": {
            "mode": "EXTENDED"
        },
        "doCompletion": "false"
    }
}
<request>
	<clientSystemId>YOUR_SYSTEM_ID</clientSystemId>
	<!--Replace with your own client code-->
	<clientIdentCode>CCO_TEMPL</clientIdentCode>
	<userName>WSM</userName>
	<resultLanguageIsoCodes>EN</resultLanguageIsoCodes>
	<creationParms>
	   <creationMode>VALIDATION_OK</creationMode>
	</creationParms>
	<shipment>
	   <transactionId/>
	   <referenceNumber1>1002</referenceNumber1>
	   <shippingDate>20230102</shippingDate>
	   <contents>content</contents>
	   <shippingPt>
		  <companyNumber>V1</companyNumber>
		  <initFromCompanyMasterFileData>true</initFromCompanyMasterFileData>
	   </shippingPt>
	   <shippingPtContact>
		  <name>Max Mustermann</name>
		  <phone>070 123456</phone>
	   </shippingPtContact>
	   <consignee>
		  <name>AEB SE</name>
		  <street>Sigmaringer Str. 109</street>
		  <postcode>70567</postcode>
		  <city>Stuttgart</city>
		  <countryISOCode>DE</countryISOCode>
	   </consignee>
	   <consigneeContact>
		  <name>Erika Müller</name>
		  <phone>070 123456</phone>
	   </consigneeContact>
	   <carrierIdentCode>GENERICCARRIER</carrierIdentCode>
	   <serviceCode>STD</serviceCode>
	   <termsOfDeliveryCode>DAP</termsOfDeliveryCode>
	   <packages>
		  <packageTypeIdentCode>K1</packageTypeIdentCode>
		  <packageNumber>1</packageNumber>
		  <referenceNumber1>Ref.1</referenceNumber1>
		  <grossWeight>
			 <value>7.500</value>
			 <unit>kg</unit>
		  </grossWeight>
		  <dimensions>
			 <length>19.500</length>
			 <width>14.500</width>
			 <height>9.200</height>
			 <identCode>cm</identCode>
		  </dimensions>
	   </packages>
	</shipment>
	<processParms>
	   <workstationId>ZEBRA</workstationId>
	   <documentOutputMode>
		  <mode>RETURN</mode>
	   </documentOutputMode>
	   <documentOutputScope>
		  <scope>REQUEST</scope>
	   </documentOutputScope>
	   <documentPrepareScope>
		  <scope>REQUEST</scope>
	   </documentPrepareScope>
	   <processMode>
		  <mode>EXTENDED</mode>
	   </processMode>
	   <doCompletion>false</doCompletion>
	</processParms>
 </request>

Completing the shipment

If you want to close/complete a shipment, you have to set the doCompletion parameter to true. In order to assign a shipment to a pickup it has to be closed/completed.

createPickup: Create a new pickup

The createPickup call allows you to generate a new pickup for the shipments specified in your request.

💡

Certain conditions result in error

Please note, that certain conditions may result in an error, for example, when the shipments cannot be combined into a single pickup due to different carriers being involved.

Additionally, you have the option to manifest the new pickup. This process involves sending the necessary EDI to the carrier and subsequently closing the pickup. If specified in the request, manifest documents will be printed.

{
  "clientSystemId": "YOUR_SYSTEM_ID",
  "clientIdentCode": "CCO_TEMPL",
  "userName": "WSM",
  "resultLanguageIsoCodes": [
    "en"
  ],
  "creationParms": {
    "creationMode": "ONLY_VALID_SHIPMENTS"
  },
  "pickup": {
    "transactionId": "2000006190",
    "referenceNumber1": "2000006190",
    "carrierIdentCode": "GENERICCARRIER",
    "shippingDate": "20230727",
    "shippingPt": {
       "companyNumber": "V1",
       "initFromCompanyMasterFileData": "true"
    },
    "shipments": [
      {
        "referenceNumber1": "1001"
      },
      {
        "referenceNumber1": "1002"
      },
    ]
  },
  "processParms": {
    "doManifest": false,
    "documentOutputMode": {
      "mode": "RETURN"
    },
    "workstationId": "PDF"
  }
}
<clientSystemId>YOUR_SYSTEM_ID</clientSystemId>
<clientIdentCode>CCO_TEMPL</clientIdentCode>
<userName>WSM</userName>
<resultLanguageIsoCodes>
  <isoCode>en</isoCode>
</resultLanguageIsoCodes>
<creationParms>
  <creationMode>ONLY_VALID_SHIPMENTS</creationMode>
</creationParms>
<pickup>
  <transactionId>2000006190</transactionId>
  <referenceNumber1>2000006190</referenceNumber1>
  <carrierIdentCode>GENERICCARRIER</carrierIdentCode>
  <shippingDate>20230727</shippingDate>
  <shippingPt>
    <companyNumber>V1</companyNumber>
    <initFromCompanyMasterFileData>true</initFromCompanyMasterFileData>
  </shippingPt>
  <shipments>
    <shipment>
      <referenceNumber1>1001</referenceNumber1>
    </shipment>
    <shipment>
      <referenceNumber1>1002</referenceNumber1>
    </shipment>
  </shipments>
</pickup>
<processParms>
  <doManifest>false</doManifest>
  <documentOutputMode>
    <mode>RETURN</mode>
  </documentOutputMode>
  <workstationId>PDF</workstationId>
</processParms>

What’s Next

For more in depth information about specific sections of the API have a look at: