Create a simple transport as a shipper

A simple transport consists in a single delivery from an origin site A to a destination site B. Remember our Transport - Segment - Delivery models ? If you haven't yet, please have a look at it ;-)

Step 1: Get your API Token

Get the API token

Step 2: Get your company's primary key (pk)

You can find your own company's pk by going to the address book on the web app, to the category "Carriers". And clicking on your own company will show the pk in the address bar (you will be on the page https://www.dashdoc.eu/app/address-book/companies/YOUR_PK/ )

Step 3: Create your first transport!

Remember to send your API token in the request headers, see:

Make an authenticated request

Below is an JSON example of a simple transport. You can copy / paste this example to create your first transport. All you need to do is replace the value YOUR_COMPANY_PK by the actual pk you got at step 2. Feel free to fill in the data with what you want! The JSON must be sent as the body of the request to https://www.dashdoc.eu/api/v4/transports/ .

JSON body
{
    "carrier_address": {
        "company": {
            "name": "Carrier name",
            "country": "FR"
        },
        "address": "Carrier address",
        "postcode": "12345",
        "city": "Carrier city",
        "country": "FR"
    },
    "deliveries": [
        {
            "shipper_address": {
                "address": "Shipper address",
                "postcode": "12345",
                "city": "Shipper city",
                "country": "FR",
                "company": {
                    "pk": "YOUR_COMPANY_PK"
                }
            },
            "shipper_reference": "Shipper reference",
            "origin": {
                "address": {
                	"address": "Loading address",
	                "postcode": "12345",
	                "city": "Loading city",
	                "country": "FR",
	                "company": {
	                    "name": "Loading company",
	                    "country": "FR"
	                }
                },
                "reference": "Loading reference",
                "loading_instructions": "Loading instructions"
            },
            "destination": {
                "address": {
                	"address" : "Unloading address",
	                "postcode": "12345",
	                "city": "Unloading city",
	                "country": "FR",
	                "company": {
	                    "name": "Unloading company",
	                    "country": "FR"
	                }
                },
                "reference": "Unloading reference",
                "unloading_instructions": "Unloading instructions"
            },
            "planned_loads": [
                {
                    "weight": "12345",
                    "category": "pallets",
                    "quantity": "24",
                    "description": "Load description",
                    "refrigerated": false,
                    "dangerous_goods_category": null
                }
            ]
        }
    ],
    "segments": [
        {
            "origin": {
                "address": {
                	"address": "Loading address",
	                "postcode": "12345",
	                "city": "Loading city",
	                "country": "FR",
	                "company": {
	                    "name": "Loading company",
	                    "country": "FR"
	                }
                },
                "reference": "Loading reference",
                "loading_instructions": "Loading instructions"
            },
            "destination": {
                "address": {
                	"address" : "Unloading address",
	                "postcode": "12345",
	                "city": "Unloading city",
	                "country": "FR",
	                "company": {
	                    "name": "Unloading company",
	                    "country": "FR"
	                }
                },
                "reference": "Unloading reference",
                "unloading_instructions": "Unloading instructions"
            },
            "trailers": [
                {
                    "license_plate": "AB123CD"
                }
            ],
            "vehicle": {
                "license_plate": "EF456GH"
            }
        }
    ]
}

Step 4: Customize your data

Congratulations on creating your first transport !

Now access the Transport Creation API Reference to find all the fields you might need to completely set-up transport creation.

You might want to send:

  • trucker assignment

  • more details about load or multiple loads

  • dates and times for pick up and delivery

  • set business privacy between origin and destination sites

  • make it a multiple rounds transport

  • even more

Get in touch with your project manager and we'll go through your business needs to help you use API possibilities the best way

Last updated