POST api/Dispatch/CreateTrip

Use this to create a new trip

Request Information

URI Parameters

None.

Body Parameters

CreateTripParm
NameDescriptionTypeAdditional information
auth

Unique authorization identifier

string

Required

Max length: 36

Name

The Name of the trip

string

Required

Max length: 30

Instructions

Special instructions for the courier related to the trip

string

Max length: 500

TripTemplateID

Create trip using the trip template

integer

None.

AutoAssign

Auto assign stops after creating trip

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "auth": "sample string 1",
  "Name": "sample string 2",
  "Instructions": "sample string 3",
  "TripTemplateID": 1,
  "AutoAssign": true
}

application/xml, text/xml

Sample:
<CreateTripParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mnx.WebApi.Transportation.Models">
  <AutoAssign>true</AutoAssign>
  <Instructions>sample string 3</Instructions>
  <Name>sample string 2</Name>
  <TripTemplateID>1</TripTemplateID>
  <auth>sample string 1</auth>
</CreateTripParm>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CreateTripResp
NameDescriptionTypeAdditional information
IsSuccessful

Method was successful (true/false)

boolean

None.

ErrorMessage

If unsuccessful, the error message

string

None.

TripID

The Trip identifier of the created trip

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "IsSuccessful": true,
  "ErrorMessage": "sample string 2",
  "TripID": 3
}

application/xml, text/xml

Sample:
<CreateTripResp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mnx.WebApi.Transportation.Models">
  <ErrorMessage>sample string 2</ErrorMessage>
  <IsSuccessful>true</IsSuccessful>
  <TripID>3</TripID>
</CreateTripResp>