Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top
Table of Contents
exclude.*How will versioning be handled?.

...

Panel
titleImportant Items to Note
  • Authentication is needed for most endpoints. You will need to send an authorization token or do a basic authentication with the call.
  • Dates entered should be in milliseconds in UTC for JSON requests (e.g. 1559651878000) and ISO-8601 standard for XML requests (e.g. 2019-06-04T07:36:53).
  • Dates returned are formatted according to X Dispatch the Operations App global options settings and localized to where the order was picked up/delivered with the timezone noted.
  • When entering the workOrderId parameter it must be in the following format:

    • route stop: r<stopID>
    • on demand pickup: p<orderID>
    • on demand delivery: d<orderID>

How will versioning be handled?

CXT Software will support the latest version, plus one previously published version. Response and Request objects, in addition to URLs, may have properties added with new releases. Business logic within the endpoints may change, and/or permission hardening may be applicable to existing endpoints with new releases 

Requirements

...

.

API Usage

  • You must understand exactly what is being sent, and why, for the various endpoints and all their properties.

  • Assistance can be requested if the EP/property documentation is unclear, and/or you do not understand how a property is intended to be used.

  • Note that endpoints/logic that may be hardened from security, permissions, and/or data integrity standpoint when the Operations App is updated.

Requirements

  • TLS 1.2
    • When calling the web services for CXT Cloud customers (designated by a domain in the format <CXTID>0.cxtsoftware.net), the calling system must connect with TLS 1.2
    • TLS 1.2 is not supported on Windows 2008 R2 or below. The calling system can run Windows 7, 8.1 or 2012 or newer, all of which support TLS 1.2

...

  1. Navigate to URL: https://<domain>/CxtWebService/CXTWCF.svc/api-docs
  2. Authenticate by either getting an authentication token or using basic authentication. See Authenticate. Depending on the user type allowed to access the endpoint, you may need different tokens.  

  3. If getting an authorization token, place token in the Authorization Token box at the top. 

    div

    Image Modified

  4. Make endpoint requests in JSON or XML

...

  • If the "Enforce Address Validation" global option is checked inside X Dispatchthe Operations App, an order/stop will be successfully placed only if the address is validated; the order will fail if the address cannot be validated. If "Enforce Address Validation" is unchecked, the order placement will succeed regardless of validation.
  • Only the geocode (lat/lon) is updated when the addresses can be validated. be validated. 
  • If the "Enforce address validation when using web service" global option is checked inside the Operations App, route stops created through the web service will have address validation enforced.

Attachments

Requirements for uploading a file (attachment creation/update):

...

  • Driver
  • Internet User
  • Human Resource
  • X Dispatch Operations App User

You can see which user type(s) are required for an endpoint under "Implementation Notes". For example, "Allowed requestors: [Inet user]" requires an authenticated internet user and  "Allowed requestors: [Mobile Users]" requires an authenticated driver user.  

Image Modified

To authenticate, select sending an authorization token or doing a basic authentication with the call.

Info

Permissions of the authenticated user(s) are based on their user settings in the Operations App. 

 Token Based Authentication 

...

  • Driver endpoint: /v2/Authentication/Drivers 

    div

    • Valid duration of an authentication token: 30 days  

    Note
    titleX Dispatch User Note
    • "Allow web access" must be enabled on the driver record in the

    X Dispatch
  • Internet User endpoint: /v2/Authentication/InetUser 

    div

    • Valid duration of an authentication token: 20 minutes

    note
    titleX Dispatch User Note
    • "Allow Web Service API" must be enabled on the internet user record in the

    X Dispatch
  • Human Resources endpoint: /v2/Authentication/Worker  

    div


    • Valid duration of an authentication token: 30 days

    note
  • X Dispatch Operations App User endpoint: /v2/Authentication/XdUser 

    Div
    • Valid duration of an authentication token: 3 hours 

Token expiration is automatically extended with each call. 

...

Basic authentication credentials must be sent with every request, base64 encoded and the username must be prefixed with 1 or 4 values to distinguish user type:

  • Driver prefix: DRIVER
    • Internet User prefix: INET
    • Human Resources prefix: WORKER
    X Dispatch
    • Operations App User prefix: XDISPATCH

An example of an internet user with the username "cxtsupport" is "INET-cxtsupport".

...

Creating a new order creates a new on demand order in X Dispatch the Operations App and requires an internet user authorization token. Before creating an order you will need a list of order types if a static order type is not provided. Order types in X Dispatch the Operations App define the timing and level of service for on demand orders. 

...

Implementation Notes: Allowed requestors: [INet user, XDispatch user] The following permissions need to be enabled in X Dispatch the Operations App on the internet user record in the Options tab, Show Rates to see the initialBaseRate and Show Deliver By Time to see the deliveryTime. To see the initialBaseRate the Global Options in X Dispatch the Operations App also needs to have Total Charges enabled in the Internet Options tab. 

...

Creating a new order creates a new on demand order in X Dispatch the Operations App and requires an internet user authorization token. Use this endpoint if a static order type is provided. Order types in X Dispatch the Operations App define the timing and level of service for on demand orders. 

...

You can use the /v2/Orders endpoint to create new on demand order in X Dispatchthe Operations App.

Endpoint URLhttps://XXXX0.cxtsoftware.net/CxtWebService/CXTWCF.svc/api-docs/index.html?url=/CxtWebService/CXTWCF.svc/v2/swagger.json#!/Orders/CxtSoftware_MiddleTier_WebService_CXTWCF_OnDemandOrder_CreateV2 

...

Creating a new route stop creates a new route stop in X Dispatch the Operations App and requires an Operations App (X Dispatch user [XDUser]) user authentication token.

How to Create a Route Stop

You can use the /v2/RouteStops endpoint to create new route stops in X Dispatchthe Operations App.

Endpoint URLhttps://XXXX0.cxtsoftware.net/CxtWebService/CXTWCF.svc/api-docs/index.html?url=/CxtWebService/CXTWCF.svc/v2/swagger.json#!/Route_Stops/CxtSoftware_MiddleTier_WebService_CXTWCF_PostRouteStopV2

SectionRoute Stops

Endpoint: /v2/RouteStops

Implementation Notes: Allowed requestors: [XD User]

...

 Order Status

Internet and X Dispatch Operations App users can get order status data. Including, but not limited to, confirmation, pickup, delivery, and POD details.

...

ParameterDescriptionParameter TypeData Type
onDemandOrderId

The ID of the on demand order to be updated

pathstring

Troubleshooting

...