Dispatch Track APIs

The following curls can be used for NetSuite-Dispatch track integration.

Get Oauth2 Access Token

curl --location 'https://dtdapi.dispatchtrack.com/api/v1/oauth2/token' 
--header 'Content-Type: application/x-www-form-urlencoded' 
--header 'Accept: application/json' 
--header 'Authorization: Basic {access_token}' 
--data-urlencode 'grant_type=client_credentials'

Delete Orders from DIspatch track

curl --location --request DELETE 'https://dtdapi.dispatchtrack.com/api/v1/delete-order?order_number={dt_order_no}' 
--header 'Accept: application/json' 
--header 'Authorization: Bearer {access_token}'

Get Orders from the dispatch track

curl --location 'https://dtdapi.dispatchtrack.com/api/v1/export' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Authorization: Bearer {access_token}' 
--data '{
 "oneOf": {
  "schedule_date": "",
  "request_date": ""
 },
 "start_time": "",
 "end_time": "",
 "order_number": "{dt_order_no}",
 "account_name": "",
 "status": ""
}'

Add Orders to Dispatch track

curl --location 'https://dtdapi.dispatchtrack.com/api/v1/add-order' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Authorization: Bearer e6f65e7a7c05c9d91ee36a7215a74a1aaaca355b' 
--data '{
 "service_orders": [
  {
   "order_number": "<string>",
   "customer": {
    "first_name": "<string>",
    "last_name": "<string>",
    "name": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zip": "<string>",
    "phone1": "<string>",
    "phone2": "<string>",
    "phone3": "<string>",
    "email": "<string>",
    "preferred_contact_mode": "<string>",
    "latitude": "<string>",
    "longitude": "<string>",
    "customer_id": "<string>",
    "send_survey": "<boolean>",
    "delivery_radius": "<integer>"
   },
   "account_name": "<string>",
   "service_type": "<string>",
   "description": "<string>",
   "status": "New",
   "ready_to_schedule_date": "<string>",
   "schedule_before_date": "<string>",
   "delivery_date": "<string>",
   "delivery_time_window_start": "<string>",
   "delivery_time_window_end": "<string>",
   "amount": "<float>",
   "cod_amount": "<float>",
   "cube": "<float>",
   "weight": "<float>",
   "pieces": "<integer>",
   "delivery_charge": "<float>",
   "taxes": "<float>",
   "skill_level": "<integer>",
   "equipment_type": "<string>",
   "pre_reqs": "<string>",
   "request_delivery_date_str": "<string>",
   "origin": "<string>",
   "schedule_direct_dispatch": "<boolean>",
   "direct_dispatch_phone": "<string>",
   "revoke_direct_dispatch": "<boolean>",
   "additional_fields": {
    "additional_field_one_name": "<string>",
    "additional_field_two_name": "<string>"
   },
   "custom_fields": {
    "custom_field_one_name": "<string>",
    "custom_field_two_name": "<string>"
   },
   "items": [
    {
     "sku_number": "<string>",
     "serial_number": "<string>",
     "description": "<string>",
     "quantity": "<string>",
     "price": "<integer>",
     "line_sequence": "<integer>",
     "service_duration": "<integer>",
     "physical_item": "<boolean>",
     "cube": "<float>",
     "weight": "<float>",
     "length": "<float>",
     "item_note": "<string>",
     "location_code": "<string>",
     "skill_level": "<integer>",
     "location": "<string>",
     "vendor": "<string>",
     "notes": "<string>",
     "sale_number": "<string>",
     "service_time": "<integer>"
    }
   ],
   "notes": [
    {
     "body": "<string>"
    },
    {
     "body": "<string>"
    }
   ]
  }
 ]
}'

Leave a comment

Your email address will not be published. Required fields are marked *