| POST,OPTIONS | /v1/dispatch/courier/orders/{Code}/return | ||
|---|---|---|---|
| POST,OPTIONS | /v1/dispatch/courier/held-pings/{Code}/return |
import Foundation
import ServiceStack
public class CourierOrderReturnRequest : Codable
{
public var code:String
required public init(){}
}
public class CourierOrderResponse : Codable
{
public var orders:[CourierOrderView] = []
public var order:CourierOrderView
public var message:String
public var responseStatus:ResponseStatus
required public init(){}
}
public class CourierOrderView : Codable
{
public var dispatchOdRequestID:Int
public var code:String
public var courierProfileId:Int
public var profileName:String
public var routeShape:String
public var unitOne:String
public var unitMany:String
public var courierFacilityId:Int?
public var facilityName:String
public var serviceLevelCode:String
public var levelName:String
public var source:String
public var address:String
public var unit:String
public var city:String
public var zip:String
public var zone:String
public var pickupContactName:String
public var dropoffAddress:String
public var dropoffUnit:String
public var dropoffCity:String
public var dropoffZip:String
public var dropoffContactName:String
public var miles:Double?
public var units:Int
public var unitsFound:Int?
public var stage:String
public var courierStep:String
public var stepLabel:String
public var driverCode:String
public var driverName:String
public var driverContactId:Int?
public var courierRunId:Int?
public var runCode:String
public var stopSequence:Int?
public var queueSequence:Int?
public var isAsap:Bool
public var windowStartUtc:Date?
public var windowEndUtc:Date?
public var windowText:String
public var dueUtc:Date?
public var dueText:String
public var pingAfterUtc:Date?
public var pingExpiresUtc:Date?
public var candidateCode:String
public var heldReason:String
public var heldUtc:Date?
public var customerName:String
public var customerPhone:String
public var handoff:String
public var gateCode:String
public var instructions:String
public var damageNote:String
public var deliveredToName:String
public var payMode:String
public var fare:Double?
public var finalPrice:Double?
public var tipAmount:Double?
public var cancelledBy:String
public var cancelReason:String
public var cancelFeeApplied:Double?
public var missedFeeApplied:Double?
public var captureMode:String
public var authorizedAmount:Double?
public var capturedAmount:Double?
public var refundedAmount:Double
public var chargeError:String
public var createdAt:Date?
public var arrivedUtc:Date?
public var pickedUpUtc:Date?
public var intakeUtc:Date?
public var readyUtc:Date?
public var outForDeliveryUtc:Date?
public var deliveredUtc:Date?
public var missedUtc:Date?
public var cancelledUtc:Date?
public var isClosed:Bool
public var rebookOfId:Int?
public var recurrenceId:Int?
public var pickupLoadId:Int?
public var rule:CourierOrderRuleView
public var items:[CourierItemView] = []
public var scans:[CourierScanView] = []
public var proof:[CourierProofResultView] = []
public var events:[CourierEventView] = []
public var photos:[CourierPhotoView] = []
public var payLines:[CourierPayLineView] = []
required public init(){}
}
public class CourierOrderRuleView : Codable
{
public var pingSecs:Int
public var missedWaitMin:Int
public var missedFee:Double
public var cancelFee:Double
public var missedAutoRebook:Bool
public var missedRequireContact:Bool
public var missedRequirePhoto:Bool
public var payTiming:String
public var finalPriceAfterCount:Bool
public var payPlanName:String
public var perPickup:Double
public var perStop:Double
public var perMissed:Double
public var perCancel:Double
public var acceptedUtc:Date?
public var proof:[String:String] = [:]
required public init(){}
}
public class CourierItemView : Codable
{
public var courierItemID:Int
public var dispatchOdRequestID:Int
public var seq:Int
public var tagCode:String
public var custody:String
public var isOpen:Bool
public var isMissing:Bool
public var missingReason:String
public var isManual:Bool
public var reTagFlag:Bool
public var scanned:Bool
required public init(){}
}
public class CourierScanView : Codable
{
public var tagCode:String
public var stage:String
public var result:String
public var atUtc:Date
required public init(){}
}
public class CourierProofResultView : Codable
{
public var stage:String
public var stepKey:String
public var value:String
public var atUtc:Date
required public init(){}
}
public class CourierEventView : Codable
{
public var kind:String
public var party:String
public var body:String
public var atUtc:Date
required public init(){}
}
public class CourierPhotoView : Codable
{
public var photoId:Int
public var kind:String
public var fileName:String
public var url:String
public var takenUtc:Date?
required public init(){}
}
public class CourierPayLineView : Codable
{
public var dispatchLoadID:Int
public var kind:String
public var label:String
public var qty:Double?
public var rate:Double?
public var amount:Double
required public init(){}
}
Swift CourierOrderReturnRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/courier/orders/{Code}/return HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CourierOrderReturnRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Code>String</Code>
</CourierOrderReturnRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Message>String</Message>
<Order>
<Address>String</Address>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<AuthorizedAmount>0</AuthorizedAmount>
<CancelFeeApplied>0</CancelFeeApplied>
<CancelReason>String</CancelReason>
<CancelledBy>String</CancelledBy>
<CancelledUtc>0001-01-01T00:00:00</CancelledUtc>
<CandidateCode>String</CandidateCode>
<CaptureMode>String</CaptureMode>
<CapturedAmount>0</CapturedAmount>
<ChargeError>String</ChargeError>
<City>String</City>
<Code>String</Code>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRunId>0</CourierRunId>
<CourierStep>String</CourierStep>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DamageNote>String</DamageNote>
<DeliveredToName>String</DeliveredToName>
<DeliveredUtc>0001-01-01T00:00:00</DeliveredUtc>
<DispatchOdRequestID>0</DispatchOdRequestID>
<DriverCode>String</DriverCode>
<DriverContactId>0</DriverContactId>
<DriverName>String</DriverName>
<DropoffAddress>String</DropoffAddress>
<DropoffCity>String</DropoffCity>
<DropoffContactName>String</DropoffContactName>
<DropoffUnit>String</DropoffUnit>
<DropoffZip>String</DropoffZip>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<Events>
<CourierEventView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Body>String</Body>
<Kind>String</Kind>
<Party>String</Party>
</CourierEventView>
</Events>
<FacilityName>String</FacilityName>
<Fare>0</Fare>
<FinalPrice>0</FinalPrice>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<HeldReason>String</HeldReason>
<HeldUtc>0001-01-01T00:00:00</HeldUtc>
<Instructions>String</Instructions>
<IntakeUtc>0001-01-01T00:00:00</IntakeUtc>
<IsAsap>false</IsAsap>
<IsClosed>false</IsClosed>
<Items>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Items>
<LevelName>String</LevelName>
<Miles>0</Miles>
<MissedFeeApplied>0</MissedFeeApplied>
<MissedUtc>0001-01-01T00:00:00</MissedUtc>
<OutForDeliveryUtc>0001-01-01T00:00:00</OutForDeliveryUtc>
<PayLines>
<CourierPayLineView>
<Amount>0</Amount>
<DispatchLoadID>0</DispatchLoadID>
<Kind>String</Kind>
<Label>String</Label>
<Qty>0</Qty>
<Rate>0</Rate>
</CourierPayLineView>
</PayLines>
<PayMode>String</PayMode>
<Photos>
<CourierPhotoView>
<FileName>String</FileName>
<Kind>String</Kind>
<PhotoId>0</PhotoId>
<TakenUtc>0001-01-01T00:00:00</TakenUtc>
<Url>String</Url>
</CourierPhotoView>
</Photos>
<PickedUpUtc>0001-01-01T00:00:00</PickedUpUtc>
<PickupContactName>String</PickupContactName>
<PickupLoadId>0</PickupLoadId>
<PingAfterUtc>0001-01-01T00:00:00</PingAfterUtc>
<PingExpiresUtc>0001-01-01T00:00:00</PingExpiresUtc>
<ProfileName>String</ProfileName>
<Proof>
<CourierProofResultView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Stage>String</Stage>
<StepKey>String</StepKey>
<Value>String</Value>
</CourierProofResultView>
</Proof>
<QueueSequence>0</QueueSequence>
<ReadyUtc>0001-01-01T00:00:00</ReadyUtc>
<RebookOfId>0</RebookOfId>
<RecurrenceId>0</RecurrenceId>
<RefundedAmount>0</RefundedAmount>
<RouteShape>String</RouteShape>
<Rule>
<AcceptedUtc>0001-01-01T00:00:00</AcceptedUtc>
<CancelFee>0</CancelFee>
<FinalPriceAfterCount>false</FinalPriceAfterCount>
<MissedAutoRebook>false</MissedAutoRebook>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<PayPlanName>String</PayPlanName>
<PayTiming>String</PayTiming>
<PerCancel>0</PerCancel>
<PerMissed>0</PerMissed>
<PerPickup>0</PerPickup>
<PerStop>0</PerStop>
<PingSecs>0</PingSecs>
<Proof xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Proof>
</Rule>
<RunCode>String</RunCode>
<Scans>
<CourierScanView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Result>String</Result>
<Stage>String</Stage>
<TagCode>String</TagCode>
</CourierScanView>
</Scans>
<ServiceLevelCode>String</ServiceLevelCode>
<Source>String</Source>
<Stage>String</Stage>
<StepLabel>String</StepLabel>
<StopSequence>0</StopSequence>
<TipAmount>0</TipAmount>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
<WindowEndUtc>0001-01-01T00:00:00</WindowEndUtc>
<WindowStartUtc>0001-01-01T00:00:00</WindowStartUtc>
<WindowText>String</WindowText>
<Zip>String</Zip>
<Zone>String</Zone>
</Order>
<Orders>
<CourierOrderView>
<Address>String</Address>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<AuthorizedAmount>0</AuthorizedAmount>
<CancelFeeApplied>0</CancelFeeApplied>
<CancelReason>String</CancelReason>
<CancelledBy>String</CancelledBy>
<CancelledUtc>0001-01-01T00:00:00</CancelledUtc>
<CandidateCode>String</CandidateCode>
<CaptureMode>String</CaptureMode>
<CapturedAmount>0</CapturedAmount>
<ChargeError>String</ChargeError>
<City>String</City>
<Code>String</Code>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRunId>0</CourierRunId>
<CourierStep>String</CourierStep>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DamageNote>String</DamageNote>
<DeliveredToName>String</DeliveredToName>
<DeliveredUtc>0001-01-01T00:00:00</DeliveredUtc>
<DispatchOdRequestID>0</DispatchOdRequestID>
<DriverCode>String</DriverCode>
<DriverContactId>0</DriverContactId>
<DriverName>String</DriverName>
<DropoffAddress>String</DropoffAddress>
<DropoffCity>String</DropoffCity>
<DropoffContactName>String</DropoffContactName>
<DropoffUnit>String</DropoffUnit>
<DropoffZip>String</DropoffZip>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<Events>
<CourierEventView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Body>String</Body>
<Kind>String</Kind>
<Party>String</Party>
</CourierEventView>
</Events>
<FacilityName>String</FacilityName>
<Fare>0</Fare>
<FinalPrice>0</FinalPrice>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<HeldReason>String</HeldReason>
<HeldUtc>0001-01-01T00:00:00</HeldUtc>
<Instructions>String</Instructions>
<IntakeUtc>0001-01-01T00:00:00</IntakeUtc>
<IsAsap>false</IsAsap>
<IsClosed>false</IsClosed>
<Items>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Items>
<LevelName>String</LevelName>
<Miles>0</Miles>
<MissedFeeApplied>0</MissedFeeApplied>
<MissedUtc>0001-01-01T00:00:00</MissedUtc>
<OutForDeliveryUtc>0001-01-01T00:00:00</OutForDeliveryUtc>
<PayLines>
<CourierPayLineView>
<Amount>0</Amount>
<DispatchLoadID>0</DispatchLoadID>
<Kind>String</Kind>
<Label>String</Label>
<Qty>0</Qty>
<Rate>0</Rate>
</CourierPayLineView>
</PayLines>
<PayMode>String</PayMode>
<Photos>
<CourierPhotoView>
<FileName>String</FileName>
<Kind>String</Kind>
<PhotoId>0</PhotoId>
<TakenUtc>0001-01-01T00:00:00</TakenUtc>
<Url>String</Url>
</CourierPhotoView>
</Photos>
<PickedUpUtc>0001-01-01T00:00:00</PickedUpUtc>
<PickupContactName>String</PickupContactName>
<PickupLoadId>0</PickupLoadId>
<PingAfterUtc>0001-01-01T00:00:00</PingAfterUtc>
<PingExpiresUtc>0001-01-01T00:00:00</PingExpiresUtc>
<ProfileName>String</ProfileName>
<Proof>
<CourierProofResultView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Stage>String</Stage>
<StepKey>String</StepKey>
<Value>String</Value>
</CourierProofResultView>
</Proof>
<QueueSequence>0</QueueSequence>
<ReadyUtc>0001-01-01T00:00:00</ReadyUtc>
<RebookOfId>0</RebookOfId>
<RecurrenceId>0</RecurrenceId>
<RefundedAmount>0</RefundedAmount>
<RouteShape>String</RouteShape>
<Rule>
<AcceptedUtc>0001-01-01T00:00:00</AcceptedUtc>
<CancelFee>0</CancelFee>
<FinalPriceAfterCount>false</FinalPriceAfterCount>
<MissedAutoRebook>false</MissedAutoRebook>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<PayPlanName>String</PayPlanName>
<PayTiming>String</PayTiming>
<PerCancel>0</PerCancel>
<PerMissed>0</PerMissed>
<PerPickup>0</PerPickup>
<PerStop>0</PerStop>
<PingSecs>0</PingSecs>
<Proof xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</Proof>
</Rule>
<RunCode>String</RunCode>
<Scans>
<CourierScanView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Result>String</Result>
<Stage>String</Stage>
<TagCode>String</TagCode>
</CourierScanView>
</Scans>
<ServiceLevelCode>String</ServiceLevelCode>
<Source>String</Source>
<Stage>String</Stage>
<StepLabel>String</StepLabel>
<StopSequence>0</StopSequence>
<TipAmount>0</TipAmount>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
<WindowEndUtc>0001-01-01T00:00:00</WindowEndUtc>
<WindowStartUtc>0001-01-01T00:00:00</WindowStartUtc>
<WindowText>String</WindowText>
<Zip>String</Zip>
<Zone>String</Zone>
</CourierOrderView>
</Orders>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</CourierOrderResponse>