OnTime REST API
OnTime REST API / REST Endpoints Resource Group / api/order/getTotalCost (Post)
In This Topic
    Postapi/order/getTotalCost
    In This Topic

    Resource Path: /sites/{company-id}/api/order/getTotalCost

    Uri: https://secure.ontime360.com/sites/{company-id}/api/order/getTotalCost

    Description
    Calculates and returns the total cost of a standalone Order.
    Request

    The request body is of type Order.

    The full Order object to calculate the total cost for.

    Overview

    Order
    Represents a comprehensive Order record within the OnTime API.
    Dispatcher : string
    The unique Guid identifier referencing the User assigned as the dispatcher for this Order.
    DriverCurrentlyAssigned : string
    The unique Guid identifier referencing the User assigned as the driver for this Order.
    Customer : string
    The unique Guid identifier referencing the Customer assigned to this Order.
    Items : Array[Item]
    The collection of Item objects associated with this Order.
    ID : string
    The unique identifier for this Item record.
    OrderID : string
    The unique Guid identifier referencing the Order record this Item is assigned to.
    TrackingNumber : string
    The tracking number assigned to this Item.
    Description : string
    The description containing any notable details or instructions regarding this Item.
    Comments : string
    Any additional comments associated with this Item.
    Weight : number
    The weight measurement of this Item.
    Height : number
    The height measurement of this Item.
    Width : number
    The width measurement of this Item.
    Length : number
    The length measurement of this Item.
    Department : Department
    The Department associated with this Order.
    ID : string
    The unique identifier of this Department.
    CustomerID : string
    The unique identifier of the Customer associated with this Department.
    Name : string
    The name assigned to this Department.
    CustomerContact : Contact
    The Contact associated with this Order.
    ID : string
    The unique identifier of this Contact.
    CustomerID : string
    The unique identifier of the Customer associated with this Contact.
    Name : string
    The name assigned to this Contact.
    Email : string
    The email address assigned to this Contact.
    Phone : string
    The phone number assigned to this Contact.
    PriceSet : string
    The unique Guid identifier referencing the PriceSet assigned to this Order.
    CollectionAssignedDriver : string
    The unique Guid identifier referencing the User assigned as the collection driver for this Order.
    DeliveryAssignedDriver : string
    The unique Guid identifier referencing the User assigned as the delivery driver for this Order.
    CollectionArrivalWindow : TimeWindow
    The TimeWindow specified for the collection of this Order.
    EarliestTime : string
    The inclusive lower-bound date of the date range assigned to this TimeWindow.
    LatestTime : string
    The inclusive upper-bound date of the date range assigned to this TimeWindow.
    Length : string
    The length of the entire date range assigned to this TimeWindow.
    DeliveryArrivalWindow : TimeWindow
    The TimeWindow specified for the delivery of this Order.
    EarliestTime : string
    The inclusive lower-bound date of the date range assigned to this TimeWindow.
    LatestTime : string
    The inclusive upper-bound date of the date range assigned to this TimeWindow.
    Length : string
    The length of the entire date range assigned to this TimeWindow.
    CollectionLocation : Location
    The collection Location assigned to this Order.
    Zone : Zone
    The Zone record assigned to this Location.
    ID : string
    The unique identifier for this Zone record.
    Name : string
    The name of this Zone.
    PostalCodes : string
    The postal codes assigned to this Zone.
    ID : string
    The unique identifier for this Location record.
    ContactName : string
    The primary contact name associated with this Location.
    CompanyName : string
    The company name associated with this Location.
    AddressLine1 : string
    The street address of this Location.
    AddressLine2 : string
    Additional secondary information related to this Location's steet address.
    City : string
    The city or locality this Location resides within.
    State : string
    The state, province, or other civil entity this Location resides within.
    PostalCode : string
    The assigned postal code this Location resides within.
    Country : string
    The country or other national political entity this Location resides within.
    Comments : string
    Any additional comments associated with this Location.
    Email : string
    The email address assigned to this Location.
    Phone : string
    The phone number assigned to this Location.
    Category : string
    The category assigned to this Location.
    LatitudeLongitude : string
    The comma-delimited pair of geographic latitude/longitude coordinates that is assigned to this Location.
    DeliveryLocation : Location
    The delivery Location assigned to this Order.
    Zone : Zone
    The Zone record assigned to this Location.
    ID : string
    The unique identifier for this Zone record.
    Name : string
    The name of this Zone.
    PostalCodes : string
    The postal codes assigned to this Zone.
    ID : string
    The unique identifier for this Location record.
    ContactName : string
    The primary contact name associated with this Location.
    CompanyName : string
    The company name associated with this Location.
    AddressLine1 : string
    The street address of this Location.
    AddressLine2 : string
    Additional secondary information related to this Location's steet address.
    City : string
    The city or locality this Location resides within.
    State : string
    The state, province, or other civil entity this Location resides within.
    PostalCode : string
    The assigned postal code this Location resides within.
    Country : string
    The country or other national political entity this Location resides within.
    Comments : string
    Any additional comments associated with this Location.
    Email : string
    The email address assigned to this Location.
    Phone : string
    The phone number assigned to this Location.
    Category : string
    The category assigned to this Location.
    LatitudeLongitude : string
    The comma-delimited pair of geographic latitude/longitude coordinates that is assigned to this Location.
    Status : Status
    Gets the status of the current order. This property is read only.
    ID : string
    The unique identifier for this Status record.
    Name : string
    The name assigned to this Status.
    Description : string
    The description containing any notable details or conditions regarding this Status.
    Timestamp : string
    The date and time this Status was applied to an Order.
    Level : string
    The level detailing the status of a given Order. Available Values: [None, Dispatched, AssignedInRoute, Delivered, Cancelled, CancelledBillable, Assigned, Stored, UnassignedStored, Quoted]
    UserDefinedFields : object
    The key-value collection of UserDefinedField objects associated with this Order.
    UserMiscCompensations : Array[UserMiscCompensation]
    The collection of UserMiscCompensation objects associated with this Order.
    User : string
    The unique Guid identifier referencing the User record assigned to this UserMiscCompensation.
    ID : string
    The unique identifier for this UserMiscCompensation record.
    OrderID : string
    The unique Guid identifier referencing the Order record assigned to this UserMiscCompensation.
    Role : string
    The role of the User assigned to the Order for this UserMiscCompensation. Available Values: [None, Dispatcher, Driver]
    Description : string
    The description containing any notable details or conditions regarding this UserMiscCompensation.
    Value : number
    The value being given to the User relative to this UserMiscCompensation.
    Type : string
    The type of compensation being applied to this UserMiscCompensation. Available Values: [None, Money, Time]
    VehicleRequired : VehicleType
    The required VehicleType assigned to this Order.
    ID : string
    The unique identifier for this VehicleType record.
    Name : string
    The identifying name of this VehicleType.
    PriceModifiers : Array[PriceModifier]
    The collection of PriceModifier objects assigned to this Order.
    ID : string
    The unique identifier for this PriceModifier record.
    Name : string
    The name of this PriceModifier.
    CustomValue : number
    The user-defined custom value assigned to this PriceModifier.
    PercentCommissionable : number
    The percentage-based value used to determine the commissionable amount for this PriceModifier.
    Price : number
    The calculated price of this PriceModifier.
    Type : string
    The pre-defined {OnTime.Extensions.SDK.PriceModifierBase.PriceModifierType} detailing the pricing calculation behavior of this PriceModifier. Available Values: [Other, SignatureCapture, CashOnDelivery, DistanceBasePrice, AdHocCharge, Tax]
    Input : string
    The pre-defined {OnTime.Extensions.SDK.PriceModifierBase.InputFieldType} detailing the field-specific behavior used when calculating the pricing of this PriceModifier. Available Values: [None, Weight, Quantity, Mileage, Dimensions, Custom, DeclaredValue, BasePrice, Height, Width, Depth, ZoneLookupTable]
    TaxTotal : number
    The calculated amount of tax applied to this Order.
    Subtotal : number
    The calculated subtotal of this Order.
    ID : string
    The unique identifier for this Order record.
    TrackingNumber : string
    The tracking number assigned to this Order.
    RequestedBy : string
    The name of the party that requested this Order.
    BasePrice : number
    The base price of the Order.
    CODAmount : number
    The collect-on-delivery (COD) amount assigned to this Order.
    BasePriceType : string
    The method used when calculating the base price for this Order. Available Values: [None, ZoneToZone, Distance, FlatRate]
    PriceAdjustment : number
    A flat-amount adjustment value added to the pricing of this Order.
    PriceModifierTotalCost : number
    The calculated sum of all PriceModifiers assigned this Order.
    Description : string
    The description containing any notable details or instructions regarding this Order.
    Comments : string
    Any additional comments associated with this Order.
    DateSubmitted : string
    The date when this Order was originally submitted.
    RouteName : string
    The name of the route associated with this Order.
    StatusLevel : string
    The current status level of this Order. Available Values: [None, Dispatched, AssignedInRoute, Delivered, Cancelled, CancelledBillable, Assigned, Stored, UnassignedStored, Quoted]
    CollectionArrivalDate : string
    Gets the actual collection arrival date of the current order.
    CollectionContactName : string
    The name of collection contact for this Order.
    CollectionCODRequired : boolean
    Indicates if a driver is required to a obtain a 'collect-on-delivery' (COD) amount when collecting this Order.
    CollectionSignatureRequired : boolean
    Indicates if a driver is required to obtain a signature when collecting this Order.
    DeliveryArrivalDate : string
    Gets the actual delivery arrival date of the current order.
    DeliveryContactName : string
    The name of delivery contact for this Order.
    DeliveryCODRequired : boolean
    Indicates if a driver is required to a obtain a 'collect-on-delivery' (COD) amount when delivering this Order.
    DeliverySignatureRequired : boolean
    Indicates if a driver is required to obtain a signature when delivering this Order.
    Distance : number
    The total distance between the collection and delivery Locations.
    Height : number
    The height measurement of the contents included in this Order.
    Width : number
    The width measurement of the contents included in this Order.
    Length : number
    The length measurement of the contents included in this Order.
    Weight : number
    The weight measurement of the contents included in this Order.
    Quantity : integer
    The number of items included in this Order.
    DeclaredValue : number
    The pre-determined value declaration assigned to this Order.
    ReferenceNumber : string
    The reference number assigned to this Order.
    PurchaseOrderNumber : string
    The purchase order number assigned to this Order.
    IncomingTrackingNumber : string
    The incoming tracking number assigned to this Order.
    OutgoingTrackingNumber : string
    The outgoing tracking number assigned to this Order.
    TotalCost : number
    The calculated total cost of this Order.
    SubmissionSource : string
    Identifies the medium through which this Order was originally submitted.
    200 Response

    The response body is of type number.

    Returns the calculated total cost of the Order as a Decimal.
    Fault Responses
    FaultDescription
    Request was improperly formatted, contained invalid data, or contained incorrect values. See response body for more information.
    Authorization key is invalid or no longer exists.
    Authorization key does not have permission to perform this action, or does not have permission to access the requested data. See response body for more information.
    See Also