Examples

This page collects example request for several scenarios. All the examples here point to the staging environment API. The examples make use of curl and jq command line tools.

All examples here are ready to roll once the Etrux-key header is populated with your API key. Please let us know of any problems!

For the full schema for each endpoint, please refer to the API spec.

Auth test endpoint

Quick sample to check your API key is successfully authorized.

evotrux@example:~$ curl -X GET -H "Accept: application/json; indent-4" -H 'Content-Type: application/json' -H 'Etrux-key: [API_KEY]' 'https://3xje7yxnal.execute-api.us-west-2.amazonaws.com/development-env/beta/test-auth' | jq .

Shipment Creation Recipes

Public Shipment

  • Public shipment visible to all Evotrux carriers.
  • All partner carriers will be notified of this shipment, since shipment visibility defaults to ALL_CARRIER_NETWORK when notification_settings_type is not specified.
  • “Book Now” not enabled.
  • Custom name “Shipment REF123”.
  • Second route point does not include postal code or address, since they are not required.
evotrux@example:~$ curl -X POST -H "Accept: application/json; indent-4" -H 'Content-Type: application/json' -H 'Etrux-key: [API_KEY]' -d '{
  "shipment": {
    "service": "TRUCK_LOAD",
    "weight_lb": 120.5,
    "commodity_freetext": "Bricks",
    "special_requirements": "Must have insurance",
    "additional_details": "Carrier must come early.",
    "custom_name": "Shipment REF123"
  },
  "route": [
    {
      "point": {
        "stop_type": "ORIGIN",
        "stop_operation": "PICKUP",
        "start_time": "2050-01-01",
        "end_time": "2050-01-15",
        "point_number": 1
      },
      "point_location": {
        "address": "179 Example Street",
        "country": "CA",
        "city": "Winnipeg",
        "province": "MB",
        "postal": "R3T 2M1"
      }
    },
    {
        "point": {
            "stop_type": "DESTINATION",
            "stop_operation": "DROPOFF",
            "start_time": "2050-01-01",
            "end_time": "2050-01-15",
            "point_number": 2
        },
        "point_location": {
            "country": "CA",
            "city": "Winnipeg",
            "province": "MB"
        }
    }
  ],
  "equipment_types": [
    "AUTO_HAULER_CAR_CARRIER", "STEP_DECK_DROP_DECK"
  ]
}' 'https://3xje7yxnal.execute-api.us-west-2.amazonaws.com/development-env/beta/shipments' | jq .

Public Shipment notifying only select carriers

  • Public shipment visible to all Evotrux carriers.
  • notification_settings_type is set to SELECTED_NETWORK_CARRIERS. Only the partner partner@email.com will receive a notification for this shipment - though the rest of partners will still be able to see and quote the shipment through the loadboard.
  • Note: Even if the partner email specified does not belong to an evotrux acccount, they will receive an email notification.
  • Book now attributes added, but set to null.
evotrux@example:~$ curl -X POST -H "Accept: application/json; indent-4" -H 'Content-Type: application/json' -H 'Etrux-key: [API_KEY]' -d '{
  "shipment": {
    "service": "TRUCK_LOAD",
    "weight_lb": 120.5,
    "commodity_freetext": "Bricks",
    "special_requirements": "Must have insurance",
    "additional_details": "Carrier must come early.",
    "custom_name": "Shipment REF123",
    "book_now_price": null,
    "book_now_currency": null
  },
  "route": [
    {
      "point": {
        "stop_type": "ORIGIN",
        "stop_operation": "PICKUP",
        "start_time": "2050-01-01",
        "end_time": "2050-01-15",
        "point_number": 1
      },
      "point_location": {
        "address": "179 Example Street",
        "country": "CA",
        "city": "Winnipeg",
        "province": "MB",
        "postal": "R3T 2M1"
      }
    },
    {
        "point": {
            "stop_type": "DESTINATION",
            "stop_operation": "DROPOFF",
            "start_time": "2050-01-01",
            "end_time": "2050-01-15",
            "point_number": 2
        },
        "point_location": {
            "country": "CA",
            "city": "Winnipeg",
            "province": "MB"
        }
    }
  ],
  "equipment_types": [
    "AUTO_HAULER_CAR_CARRIER", "STEP_DECK_DROP_DECK"
  ],
  "notification_settings_type": "SELECTED_NETWORK_CARRIERS",
  "notification_settings_emails": ["partner@email.com"]
}' 'https://3xje7yxnal.execute-api.us-west-2.amazonaws.com/development-env/beta/shipments' | jq .

Network-wide private shipment

  • notification_settings_type is set to PRIVATE_SHIPMENT_ALL_NETWORK - Private shipment only visible to carriers in the shipper’s network. Consequently only quote-able by partner carriers.
  • Book now turned on. Any partner carrier will be able to instantly book the shipment at $100 USD
  • email_notification_settings is set to MUTE (Default is ALL) - shipper will not receive email notifications for quotes created on the shipment.
evotrux@example:~$ curl -X POST -H "Accept: application/json; indent-4" -H 'Content-Type: application/json' -H 'Etrux-key: [API_KEY]' -d '{
  "shipment": {
    "service": "TRUCK_LOAD",
    "weight_lb": 120.5,
    "commodity_freetext": "Bricks",
    "special_requirements": "Must have insurance",
    "additional_details": "Carrier must come early.",
    "custom_name": "Shipment REF123",
    "book_now_price": 100,
    "book_now_currency": "USD"
  },
  "route": [
    {
      "point": {
        "stop_type": "ORIGIN",
        "stop_operation": "PICKUP",
        "start_time": "2050-01-01",
        "end_time": "2050-01-15",
        "point_number": 1
      },
      "point_location": {
        "address": "179 Example Street",
        "country": "CA",
        "city": "Winnipeg",
        "province": "MB",
        "postal": "R3T 2M1"
      }
    },
    {
        "point": {
            "stop_type": "DESTINATION",
            "stop_operation": "DROPOFF",
            "start_time": "2050-01-01",
            "end_time": "2050-01-15",
            "point_number": 2
        },
        "point_location": {
            "country": "CA",
            "city": "Winnipeg",
            "province": "MB"
        }
    }
  ],
  "equipment_types": [
    "AUTO_HAULER_CAR_CARRIER", "STEP_DECK_DROP_DECK"
  ],
  "notification_settings_type": "PRIVATE_SHIPMENT_ALL_NETWORK",
  "notification_settings_emails": [],
  "email_notification_settings": "MUTE"
}' 'https://3xje7yxnal.execute-api.us-west-2.amazonaws.com/development-env/beta/shipments' | jq .

Private shipment

  • notification_settings_type is set to PRIVATE_SHIPMENT - The shipment will only visible to partner carriers specified in notification_settings_emails, in this case the evotrux carrier account corresponding to carrier@partner.com.
  • email_notification_settings is set to ALL
  • Note: partner emails specified in notification_settings_emails must be existing evotrux carrier accounts.
  • A mid route point is specified.
evotrux@example:~$ curl -X POST -H "Accept: application/json; indent-4" -H 'Content-Type: application/json' -H 'Etrux-key: [API_KEY]' -d '{
  "shipment": {
    "service": "TRUCK_LOAD",
    "weight_lb": 120.5,
    "commodity_freetext": "Bricks",
    "special_requirements": "Must have insurance",
    "additional_details": "Carrier must come early.",
    "custom_name": "Shipment REF123",
    "book_now_price": 100,
    "book_now_currency": "USD"
  },
  "route": [
    {
      "point": {
        "stop_type": "ORIGIN",
        "stop_operation": "PICKUP",
        "start_time": "2050-01-01",
        "end_time": "2050-01-15",
        "point_number": 1
      },
      "point_location": {
        "address": "179 Example Street",
        "country": "CA",
        "city": "Winnipeg",
        "province": "MB",
        "postal": "R3T 2M1"
      }
    },
    {
        "point": {
            "stop_type": "MID",
            "stop_operation": "DROPOFF",
            "start_time": "2050-01-01",
            "end_time": "2050-01-15",
            "point_number": 2
        },
        "point_location": {
            "country": "CA",
            "city": "Edmonton",
            "province": "AB"
        }
    },
    {
        "point": {
            "stop_type": "DESTINATION",
            "stop_operation": "DROPOFF",
            "start_time": "2050-01-01",
            "end_time": "2050-01-15",
            "point_number": 3
        },
        "point_location": {
            "country": "CA",
            "city": "Vancouver",
            "province": "BC"
        }
    }
  ],
  "equipment_types": [
    "AUTO_HAULER_CAR_CARRIER", "STEP_DECK_DROP_DECK"
  ],
  "notification_settings_type": "PRIVATE_SHIPMENT",
  "notification_settings_emails": ["carrier@partner.com"],
  "email_notification_settings": "ALL"
}' 'https://3xje7yxnal.execute-api.us-west-2.amazonaws.com/development-env/beta/shipments' | jq .