Walkthrough: Create Job

Car Delivery Network API DocumentationCar Delivery Network

This walkthrough creates a job on CDN.

Prerequisites

Testing the API

  1. Post a Jobs collection containing a single Job to the API:

    JSON
    $ curl -X POST -H "Content-Type:application/json" -d \
    '[
       {
          "Notes":"These notes are sent to the driver",
          "ServiceRequired":1,
          "JobInitiator":"Katie Finch(Car Delivery Network)",
          "Customer":{
             "AddressLines":"7280 NW 87th Terr.",
             "City":"Kansas City",
             "Contact":"Car Delivery Network",
             "OrganisationName":"Car Delivery Network, Inc.",
             "QuickCode":"AB12345",
             "StateRegion":"MO",
             "ZipPostCode":"64153"
          },
          "Pickup":{
             "Destination":{
                "AddressLines":"7280 NW 87th Terr.",
                "City":"Kansas City",
                "Contact":"Car Delivery Network",
                "OrganisationName":"Car Delivery Network, Inc.",
                "QuickCode":"XY12345",
                "StateRegion":"MO",
                "ZipPostCode":"64153"
             },
             "RequestedDate":"\/Date(1369872000000)\/"
          },
          "Dropoff":{
             "Destination":{
                "AddressLines":"9211 Forney Rd",
                "City":"Mesquite",
                "OrganisationName":"Mesquite Auto Ramp",
                "QuickCode":"DE12345",
                "StateRegion":"TX",
                "ZipPostCode":"75227"
             },
             "RequestedDate":"\/Date(1369872000000)\/",
             "RequestedDateIsExact":true
          },
          "Vehicles":[
             {
                "Make":"Benz",
                "Model":"Velo",
                "Registration":"1894",
                "Vin":"JFJGIZB7JK6HLBIIO"
             }
          ]
       }
    ]' \
    https://go.cardeliverynetwork.com/en/openapi/jobs?apikey=xxx-xxx-xxx
    XML
    $ curl -X POST -H "Content-Type:application/xml" -d \
    '<Jobs xmlns="http://schemas.datacontract.org/2004/07/CarDeliveryNetwork.Api.Data" 
          xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Job>
        <Customer>
          <AddressLines>7280 NW 87th Terr.</AddressLines>
          <City>Kansas City</City>
          <Contact>Car Delivery Network</Contact>
          <OrganisationName>Car Delivery Network, Inc.</OrganisationName>
          <QuickCode>AB12345</QuickCode>
          <StateRegion>MO</StateRegion>
          <ZipPostCode>64153</ZipPostCode>
        </Customer>
        <Dropoff>
          <Destination>
            <AddressLines>9211 Forney Rd</AddressLines>
            <City>Mesquite</City>
            <OrganisationName>Mesquite Auto Ramp</OrganisationName>
            <QuickCode>DE12345</QuickCode>
            <StateRegion>TX</StateRegion>
            <ZipPostCode>75227</ZipPostCode>
          </Destination>
          <RequestedDate>2013-05-30</RequestedDate>
          <RequestedDateIsExact>true</RequestedDateIsExact>
        </Dropoff>
        <JobInitiator>Katie Finch(Car Delivery Network)</JobInitiator>
        <Notes>These notes are sent to the driver</Notes>
        <Pickup>
          <Destination>
            <AddressLines>7280 NW 87th Terr.</AddressLines>
            <City>Kansas City</City>
            <Contact>Car Delivery Network</Contact>
            <OrganisationName>Car Delivery Network, Inc.</OrganisationName>
            <QuickCode>XY12345</QuickCode>
            <StateRegion>MO</StateRegion>
            <ZipPostCode>64153</ZipPostCode>
          </Destination>
          <RequestedDate>2013-05-30</RequestedDate>
        </Pickup>
        <ServiceRequired>Transported</ServiceRequired>
        <Vehicles>
          <Vehicle>
            <Make>Benz</Make>
            <Model>Velo</Model>
            <Registration>1894</Registration>
            <Vin>JFJGIZB7JK6HLBIIO</Vin>
          </Vehicle>
        </Vehicles>
      </Job>
    </Jobs>' \
    https://go.cardeliverynetwork.com/en/openapi/jobs?apikey=xxx-xxx-xxx

    You should receive a JSON/XML response containing the job that was created.

  2. Login to CDN and have a look at what was created under: Create > Quoted Work > Quoted.

See Also

Reference