Trendsic Platform Service

<back to all web services

CourierOrderReturnRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/courier/orders/{Code}/return
POST,OPTIONS/v1/dispatch/courier/held-pings/{Code}/return
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class CourierOrderRuleView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $PingSecs=0,
        /** @var int */
        public int $MissedWaitMin=0,
        /** @var float */
        public float $MissedFee=0.0,
        /** @var float */
        public float $CancelFee=0.0,
        /** @var bool|null */
        public ?bool $MissedAutoRebook=null,
        /** @var bool|null */
        public ?bool $MissedRequireContact=null,
        /** @var bool|null */
        public ?bool $MissedRequirePhoto=null,
        /** @var string|null */
        public ?string $PayTiming=null,
        /** @var bool|null */
        public ?bool $FinalPriceAfterCount=null,
        /** @var string|null */
        public ?string $PayPlanName=null,
        /** @var float */
        public float $PerPickup=0.0,
        /** @var float */
        public float $PerStop=0.0,
        /** @var float */
        public float $PerMissed=0.0,
        /** @var float */
        public float $PerCancel=0.0,
        /** @var DateTime|null */
        public ?DateTime $AcceptedUtc=null,
        /** @var array<string,string>|null */
        public ?array $Proof=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PingSecs'])) $this->PingSecs = $o['PingSecs'];
        if (isset($o['MissedWaitMin'])) $this->MissedWaitMin = $o['MissedWaitMin'];
        if (isset($o['MissedFee'])) $this->MissedFee = $o['MissedFee'];
        if (isset($o['CancelFee'])) $this->CancelFee = $o['CancelFee'];
        if (isset($o['MissedAutoRebook'])) $this->MissedAutoRebook = $o['MissedAutoRebook'];
        if (isset($o['MissedRequireContact'])) $this->MissedRequireContact = $o['MissedRequireContact'];
        if (isset($o['MissedRequirePhoto'])) $this->MissedRequirePhoto = $o['MissedRequirePhoto'];
        if (isset($o['PayTiming'])) $this->PayTiming = $o['PayTiming'];
        if (isset($o['FinalPriceAfterCount'])) $this->FinalPriceAfterCount = $o['FinalPriceAfterCount'];
        if (isset($o['PayPlanName'])) $this->PayPlanName = $o['PayPlanName'];
        if (isset($o['PerPickup'])) $this->PerPickup = $o['PerPickup'];
        if (isset($o['PerStop'])) $this->PerStop = $o['PerStop'];
        if (isset($o['PerMissed'])) $this->PerMissed = $o['PerMissed'];
        if (isset($o['PerCancel'])) $this->PerCancel = $o['PerCancel'];
        if (isset($o['AcceptedUtc'])) $this->AcceptedUtc = JsonConverters::from('DateTime', $o['AcceptedUtc']);
        if (isset($o['Proof'])) $this->Proof = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Proof']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PingSecs)) $o['PingSecs'] = $this->PingSecs;
        if (isset($this->MissedWaitMin)) $o['MissedWaitMin'] = $this->MissedWaitMin;
        if (isset($this->MissedFee)) $o['MissedFee'] = $this->MissedFee;
        if (isset($this->CancelFee)) $o['CancelFee'] = $this->CancelFee;
        if (isset($this->MissedAutoRebook)) $o['MissedAutoRebook'] = $this->MissedAutoRebook;
        if (isset($this->MissedRequireContact)) $o['MissedRequireContact'] = $this->MissedRequireContact;
        if (isset($this->MissedRequirePhoto)) $o['MissedRequirePhoto'] = $this->MissedRequirePhoto;
        if (isset($this->PayTiming)) $o['PayTiming'] = $this->PayTiming;
        if (isset($this->FinalPriceAfterCount)) $o['FinalPriceAfterCount'] = $this->FinalPriceAfterCount;
        if (isset($this->PayPlanName)) $o['PayPlanName'] = $this->PayPlanName;
        if (isset($this->PerPickup)) $o['PerPickup'] = $this->PerPickup;
        if (isset($this->PerStop)) $o['PerStop'] = $this->PerStop;
        if (isset($this->PerMissed)) $o['PerMissed'] = $this->PerMissed;
        if (isset($this->PerCancel)) $o['PerCancel'] = $this->PerCancel;
        if (isset($this->AcceptedUtc)) $o['AcceptedUtc'] = JsonConverters::to('DateTime', $this->AcceptedUtc);
        if (isset($this->Proof)) $o['Proof'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Proof);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierItemView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $CourierItemID=0,
        /** @var int */
        public int $DispatchOdRequestID=0,
        /** @var int */
        public int $Seq=0,
        /** @var string|null */
        public ?string $TagCode=null,
        /** @var string|null */
        public ?string $Custody=null,
        /** @var bool|null */
        public ?bool $IsOpen=null,
        /** @var bool|null */
        public ?bool $IsMissing=null,
        /** @var string|null */
        public ?string $MissingReason=null,
        /** @var bool|null */
        public ?bool $IsManual=null,
        /** @var bool|null */
        public ?bool $ReTagFlag=null,
        /** @var bool|null */
        public ?bool $Scanned=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CourierItemID'])) $this->CourierItemID = $o['CourierItemID'];
        if (isset($o['DispatchOdRequestID'])) $this->DispatchOdRequestID = $o['DispatchOdRequestID'];
        if (isset($o['Seq'])) $this->Seq = $o['Seq'];
        if (isset($o['TagCode'])) $this->TagCode = $o['TagCode'];
        if (isset($o['Custody'])) $this->Custody = $o['Custody'];
        if (isset($o['IsOpen'])) $this->IsOpen = $o['IsOpen'];
        if (isset($o['IsMissing'])) $this->IsMissing = $o['IsMissing'];
        if (isset($o['MissingReason'])) $this->MissingReason = $o['MissingReason'];
        if (isset($o['IsManual'])) $this->IsManual = $o['IsManual'];
        if (isset($o['ReTagFlag'])) $this->ReTagFlag = $o['ReTagFlag'];
        if (isset($o['Scanned'])) $this->Scanned = $o['Scanned'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CourierItemID)) $o['CourierItemID'] = $this->CourierItemID;
        if (isset($this->DispatchOdRequestID)) $o['DispatchOdRequestID'] = $this->DispatchOdRequestID;
        if (isset($this->Seq)) $o['Seq'] = $this->Seq;
        if (isset($this->TagCode)) $o['TagCode'] = $this->TagCode;
        if (isset($this->Custody)) $o['Custody'] = $this->Custody;
        if (isset($this->IsOpen)) $o['IsOpen'] = $this->IsOpen;
        if (isset($this->IsMissing)) $o['IsMissing'] = $this->IsMissing;
        if (isset($this->MissingReason)) $o['MissingReason'] = $this->MissingReason;
        if (isset($this->IsManual)) $o['IsManual'] = $this->IsManual;
        if (isset($this->ReTagFlag)) $o['ReTagFlag'] = $this->ReTagFlag;
        if (isset($this->Scanned)) $o['Scanned'] = $this->Scanned;
        return empty($o) ? new class(){} : $o;
    }
}

class CourierScanView implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $TagCode=null,
        /** @var string|null */
        public ?string $Stage=null,
        /** @var string|null */
        public ?string $Result=null,
        /** @var DateTime */
        public DateTime $AtUtc=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TagCode'])) $this->TagCode = $o['TagCode'];
        if (isset($o['Stage'])) $this->Stage = $o['Stage'];
        if (isset($o['Result'])) $this->Result = $o['Result'];
        if (isset($o['AtUtc'])) $this->AtUtc = JsonConverters::from('DateTime', $o['AtUtc']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TagCode)) $o['TagCode'] = $this->TagCode;
        if (isset($this->Stage)) $o['Stage'] = $this->Stage;
        if (isset($this->Result)) $o['Result'] = $this->Result;
        if (isset($this->AtUtc)) $o['AtUtc'] = JsonConverters::to('DateTime', $this->AtUtc);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierProofResultView implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Stage=null,
        /** @var string|null */
        public ?string $StepKey=null,
        /** @var string|null */
        public ?string $Value=null,
        /** @var DateTime */
        public DateTime $AtUtc=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Stage'])) $this->Stage = $o['Stage'];
        if (isset($o['StepKey'])) $this->StepKey = $o['StepKey'];
        if (isset($o['Value'])) $this->Value = $o['Value'];
        if (isset($o['AtUtc'])) $this->AtUtc = JsonConverters::from('DateTime', $o['AtUtc']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Stage)) $o['Stage'] = $this->Stage;
        if (isset($this->StepKey)) $o['StepKey'] = $this->StepKey;
        if (isset($this->Value)) $o['Value'] = $this->Value;
        if (isset($this->AtUtc)) $o['AtUtc'] = JsonConverters::to('DateTime', $this->AtUtc);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierEventView implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $Party=null,
        /** @var string|null */
        public ?string $Body=null,
        /** @var DateTime */
        public DateTime $AtUtc=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Party'])) $this->Party = $o['Party'];
        if (isset($o['Body'])) $this->Body = $o['Body'];
        if (isset($o['AtUtc'])) $this->AtUtc = JsonConverters::from('DateTime', $o['AtUtc']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Party)) $o['Party'] = $this->Party;
        if (isset($this->Body)) $o['Body'] = $this->Body;
        if (isset($this->AtUtc)) $o['AtUtc'] = JsonConverters::to('DateTime', $this->AtUtc);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierPhotoView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $PhotoId=0,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $FileName=null,
        /** @var string|null */
        public ?string $Url=null,
        /** @var DateTime|null */
        public ?DateTime $TakenUtc=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PhotoId'])) $this->PhotoId = $o['PhotoId'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['FileName'])) $this->FileName = $o['FileName'];
        if (isset($o['Url'])) $this->Url = $o['Url'];
        if (isset($o['TakenUtc'])) $this->TakenUtc = JsonConverters::from('DateTime', $o['TakenUtc']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PhotoId)) $o['PhotoId'] = $this->PhotoId;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->FileName)) $o['FileName'] = $this->FileName;
        if (isset($this->Url)) $o['Url'] = $this->Url;
        if (isset($this->TakenUtc)) $o['TakenUtc'] = JsonConverters::to('DateTime', $this->TakenUtc);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierPayLineView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $DispatchLoadID=0,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $Label=null,
        /** @var float|null */
        public ?float $Qty=null,
        /** @var float|null */
        public ?float $Rate=null,
        /** @var float */
        public float $Amount=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DispatchLoadID'])) $this->DispatchLoadID = $o['DispatchLoadID'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Label'])) $this->Label = $o['Label'];
        if (isset($o['Qty'])) $this->Qty = $o['Qty'];
        if (isset($o['Rate'])) $this->Rate = $o['Rate'];
        if (isset($o['Amount'])) $this->Amount = $o['Amount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DispatchLoadID)) $o['DispatchLoadID'] = $this->DispatchLoadID;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Label)) $o['Label'] = $this->Label;
        if (isset($this->Qty)) $o['Qty'] = $this->Qty;
        if (isset($this->Rate)) $o['Rate'] = $this->Rate;
        if (isset($this->Amount)) $o['Amount'] = $this->Amount;
        return empty($o) ? new class(){} : $o;
    }
}

class CourierOrderView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $DispatchOdRequestID=0,
        /** @var string|null */
        public ?string $Code=null,
        /** @var int */
        public int $CourierProfileId=0,
        /** @var string|null */
        public ?string $ProfileName=null,
        /** @var string|null */
        public ?string $RouteShape=null,
        /** @var string|null */
        public ?string $UnitOne=null,
        /** @var string|null */
        public ?string $UnitMany=null,
        /** @var int|null */
        public ?int $CourierFacilityId=null,
        /** @var string|null */
        public ?string $FacilityName=null,
        /** @var string|null */
        public ?string $ServiceLevelCode=null,
        /** @var string|null */
        public ?string $LevelName=null,
        /** @var string|null */
        public ?string $Source=null,
        /** @var string|null */
        public ?string $Address=null,
        /** @var string|null */
        public ?string $Unit=null,
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $Zip=null,
        /** @var string|null */
        public ?string $Zone=null,
        /** @var string|null */
        public ?string $PickupContactName=null,
        /** @var string|null */
        public ?string $DropoffAddress=null,
        /** @var string|null */
        public ?string $DropoffUnit=null,
        /** @var string|null */
        public ?string $DropoffCity=null,
        /** @var string|null */
        public ?string $DropoffZip=null,
        /** @var string|null */
        public ?string $DropoffContactName=null,
        /** @var float|null */
        public ?float $Miles=null,
        /** @var int */
        public int $Units=0,
        /** @var int|null */
        public ?int $UnitsFound=null,
        /** @var string|null */
        public ?string $Stage=null,
        /** @var string|null */
        public ?string $CourierStep=null,
        /** @var string|null */
        public ?string $StepLabel=null,
        /** @var string|null */
        public ?string $DriverCode=null,
        /** @var string|null */
        public ?string $DriverName=null,
        /** @var int|null */
        public ?int $DriverContactId=null,
        /** @var int|null */
        public ?int $CourierRunId=null,
        /** @var string|null */
        public ?string $RunCode=null,
        /** @var int|null */
        public ?int $StopSequence=null,
        /** @var int|null */
        public ?int $QueueSequence=null,
        /** @var bool|null */
        public ?bool $IsAsap=null,
        /** @var DateTime|null */
        public ?DateTime $WindowStartUtc=null,
        /** @var DateTime|null */
        public ?DateTime $WindowEndUtc=null,
        /** @var string|null */
        public ?string $WindowText=null,
        /** @var DateTime|null */
        public ?DateTime $DueUtc=null,
        /** @var string|null */
        public ?string $DueText=null,
        /** @var DateTime|null */
        public ?DateTime $PingAfterUtc=null,
        /** @var DateTime|null */
        public ?DateTime $PingExpiresUtc=null,
        /** @var string|null */
        public ?string $CandidateCode=null,
        /** @var string|null */
        public ?string $HeldReason=null,
        /** @var DateTime|null */
        public ?DateTime $HeldUtc=null,
        /** @var string|null */
        public ?string $CustomerName=null,
        /** @var string|null */
        public ?string $CustomerPhone=null,
        /** @var string|null */
        public ?string $Handoff=null,
        /** @var string|null */
        public ?string $GateCode=null,
        /** @var string|null */
        public ?string $Instructions=null,
        /** @var string|null */
        public ?string $DamageNote=null,
        /** @var string|null */
        public ?string $DeliveredToName=null,
        /** @var string|null */
        public ?string $PayMode=null,
        /** @var float|null */
        public ?float $Fare=null,
        /** @var float|null */
        public ?float $FinalPrice=null,
        /** @var float|null */
        public ?float $TipAmount=null,
        /** @var string|null */
        public ?string $CancelledBy=null,
        /** @var string|null */
        public ?string $CancelReason=null,
        /** @var float|null */
        public ?float $CancelFeeApplied=null,
        /** @var float|null */
        public ?float $MissedFeeApplied=null,
        /** @var string|null */
        public ?string $CaptureMode=null,
        /** @var float|null */
        public ?float $AuthorizedAmount=null,
        /** @var float|null */
        public ?float $CapturedAmount=null,
        /** @var float */
        public float $RefundedAmount=0.0,
        /** @var string|null */
        public ?string $ChargeError=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $ArrivedUtc=null,
        /** @var DateTime|null */
        public ?DateTime $PickedUpUtc=null,
        /** @var DateTime|null */
        public ?DateTime $IntakeUtc=null,
        /** @var DateTime|null */
        public ?DateTime $ReadyUtc=null,
        /** @var DateTime|null */
        public ?DateTime $OutForDeliveryUtc=null,
        /** @var DateTime|null */
        public ?DateTime $DeliveredUtc=null,
        /** @var DateTime|null */
        public ?DateTime $MissedUtc=null,
        /** @var DateTime|null */
        public ?DateTime $CancelledUtc=null,
        /** @var bool|null */
        public ?bool $IsClosed=null,
        /** @var int|null */
        public ?int $RebookOfId=null,
        /** @var int|null */
        public ?int $RecurrenceId=null,
        /** @var int|null */
        public ?int $PickupLoadId=null,
        /** @var CourierOrderRuleView|null */
        public ?CourierOrderRuleView $Rule=null,
        /** @var array<CourierItemView>|null */
        public ?array $Items=null,
        /** @var array<CourierScanView>|null */
        public ?array $Scans=null,
        /** @var array<CourierProofResultView>|null */
        public ?array $Proof=null,
        /** @var array<CourierEventView>|null */
        public ?array $Events=null,
        /** @var array<CourierPhotoView>|null */
        public ?array $Photos=null,
        /** @var array<CourierPayLineView>|null */
        public ?array $PayLines=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DispatchOdRequestID'])) $this->DispatchOdRequestID = $o['DispatchOdRequestID'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['CourierProfileId'])) $this->CourierProfileId = $o['CourierProfileId'];
        if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
        if (isset($o['RouteShape'])) $this->RouteShape = $o['RouteShape'];
        if (isset($o['UnitOne'])) $this->UnitOne = $o['UnitOne'];
        if (isset($o['UnitMany'])) $this->UnitMany = $o['UnitMany'];
        if (isset($o['CourierFacilityId'])) $this->CourierFacilityId = $o['CourierFacilityId'];
        if (isset($o['FacilityName'])) $this->FacilityName = $o['FacilityName'];
        if (isset($o['ServiceLevelCode'])) $this->ServiceLevelCode = $o['ServiceLevelCode'];
        if (isset($o['LevelName'])) $this->LevelName = $o['LevelName'];
        if (isset($o['Source'])) $this->Source = $o['Source'];
        if (isset($o['Address'])) $this->Address = $o['Address'];
        if (isset($o['Unit'])) $this->Unit = $o['Unit'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['Zip'])) $this->Zip = $o['Zip'];
        if (isset($o['Zone'])) $this->Zone = $o['Zone'];
        if (isset($o['PickupContactName'])) $this->PickupContactName = $o['PickupContactName'];
        if (isset($o['DropoffAddress'])) $this->DropoffAddress = $o['DropoffAddress'];
        if (isset($o['DropoffUnit'])) $this->DropoffUnit = $o['DropoffUnit'];
        if (isset($o['DropoffCity'])) $this->DropoffCity = $o['DropoffCity'];
        if (isset($o['DropoffZip'])) $this->DropoffZip = $o['DropoffZip'];
        if (isset($o['DropoffContactName'])) $this->DropoffContactName = $o['DropoffContactName'];
        if (isset($o['Miles'])) $this->Miles = $o['Miles'];
        if (isset($o['Units'])) $this->Units = $o['Units'];
        if (isset($o['UnitsFound'])) $this->UnitsFound = $o['UnitsFound'];
        if (isset($o['Stage'])) $this->Stage = $o['Stage'];
        if (isset($o['CourierStep'])) $this->CourierStep = $o['CourierStep'];
        if (isset($o['StepLabel'])) $this->StepLabel = $o['StepLabel'];
        if (isset($o['DriverCode'])) $this->DriverCode = $o['DriverCode'];
        if (isset($o['DriverName'])) $this->DriverName = $o['DriverName'];
        if (isset($o['DriverContactId'])) $this->DriverContactId = $o['DriverContactId'];
        if (isset($o['CourierRunId'])) $this->CourierRunId = $o['CourierRunId'];
        if (isset($o['RunCode'])) $this->RunCode = $o['RunCode'];
        if (isset($o['StopSequence'])) $this->StopSequence = $o['StopSequence'];
        if (isset($o['QueueSequence'])) $this->QueueSequence = $o['QueueSequence'];
        if (isset($o['IsAsap'])) $this->IsAsap = $o['IsAsap'];
        if (isset($o['WindowStartUtc'])) $this->WindowStartUtc = JsonConverters::from('DateTime', $o['WindowStartUtc']);
        if (isset($o['WindowEndUtc'])) $this->WindowEndUtc = JsonConverters::from('DateTime', $o['WindowEndUtc']);
        if (isset($o['WindowText'])) $this->WindowText = $o['WindowText'];
        if (isset($o['DueUtc'])) $this->DueUtc = JsonConverters::from('DateTime', $o['DueUtc']);
        if (isset($o['DueText'])) $this->DueText = $o['DueText'];
        if (isset($o['PingAfterUtc'])) $this->PingAfterUtc = JsonConverters::from('DateTime', $o['PingAfterUtc']);
        if (isset($o['PingExpiresUtc'])) $this->PingExpiresUtc = JsonConverters::from('DateTime', $o['PingExpiresUtc']);
        if (isset($o['CandidateCode'])) $this->CandidateCode = $o['CandidateCode'];
        if (isset($o['HeldReason'])) $this->HeldReason = $o['HeldReason'];
        if (isset($o['HeldUtc'])) $this->HeldUtc = JsonConverters::from('DateTime', $o['HeldUtc']);
        if (isset($o['CustomerName'])) $this->CustomerName = $o['CustomerName'];
        if (isset($o['CustomerPhone'])) $this->CustomerPhone = $o['CustomerPhone'];
        if (isset($o['Handoff'])) $this->Handoff = $o['Handoff'];
        if (isset($o['GateCode'])) $this->GateCode = $o['GateCode'];
        if (isset($o['Instructions'])) $this->Instructions = $o['Instructions'];
        if (isset($o['DamageNote'])) $this->DamageNote = $o['DamageNote'];
        if (isset($o['DeliveredToName'])) $this->DeliveredToName = $o['DeliveredToName'];
        if (isset($o['PayMode'])) $this->PayMode = $o['PayMode'];
        if (isset($o['Fare'])) $this->Fare = $o['Fare'];
        if (isset($o['FinalPrice'])) $this->FinalPrice = $o['FinalPrice'];
        if (isset($o['TipAmount'])) $this->TipAmount = $o['TipAmount'];
        if (isset($o['CancelledBy'])) $this->CancelledBy = $o['CancelledBy'];
        if (isset($o['CancelReason'])) $this->CancelReason = $o['CancelReason'];
        if (isset($o['CancelFeeApplied'])) $this->CancelFeeApplied = $o['CancelFeeApplied'];
        if (isset($o['MissedFeeApplied'])) $this->MissedFeeApplied = $o['MissedFeeApplied'];
        if (isset($o['CaptureMode'])) $this->CaptureMode = $o['CaptureMode'];
        if (isset($o['AuthorizedAmount'])) $this->AuthorizedAmount = $o['AuthorizedAmount'];
        if (isset($o['CapturedAmount'])) $this->CapturedAmount = $o['CapturedAmount'];
        if (isset($o['RefundedAmount'])) $this->RefundedAmount = $o['RefundedAmount'];
        if (isset($o['ChargeError'])) $this->ChargeError = $o['ChargeError'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['ArrivedUtc'])) $this->ArrivedUtc = JsonConverters::from('DateTime', $o['ArrivedUtc']);
        if (isset($o['PickedUpUtc'])) $this->PickedUpUtc = JsonConverters::from('DateTime', $o['PickedUpUtc']);
        if (isset($o['IntakeUtc'])) $this->IntakeUtc = JsonConverters::from('DateTime', $o['IntakeUtc']);
        if (isset($o['ReadyUtc'])) $this->ReadyUtc = JsonConverters::from('DateTime', $o['ReadyUtc']);
        if (isset($o['OutForDeliveryUtc'])) $this->OutForDeliveryUtc = JsonConverters::from('DateTime', $o['OutForDeliveryUtc']);
        if (isset($o['DeliveredUtc'])) $this->DeliveredUtc = JsonConverters::from('DateTime', $o['DeliveredUtc']);
        if (isset($o['MissedUtc'])) $this->MissedUtc = JsonConverters::from('DateTime', $o['MissedUtc']);
        if (isset($o['CancelledUtc'])) $this->CancelledUtc = JsonConverters::from('DateTime', $o['CancelledUtc']);
        if (isset($o['IsClosed'])) $this->IsClosed = $o['IsClosed'];
        if (isset($o['RebookOfId'])) $this->RebookOfId = $o['RebookOfId'];
        if (isset($o['RecurrenceId'])) $this->RecurrenceId = $o['RecurrenceId'];
        if (isset($o['PickupLoadId'])) $this->PickupLoadId = $o['PickupLoadId'];
        if (isset($o['Rule'])) $this->Rule = JsonConverters::from('CourierOrderRuleView', $o['Rule']);
        if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('CourierItemView', $o['Items']);
        if (isset($o['Scans'])) $this->Scans = JsonConverters::fromArray('CourierScanView', $o['Scans']);
        if (isset($o['Proof'])) $this->Proof = JsonConverters::fromArray('CourierProofResultView', $o['Proof']);
        if (isset($o['Events'])) $this->Events = JsonConverters::fromArray('CourierEventView', $o['Events']);
        if (isset($o['Photos'])) $this->Photos = JsonConverters::fromArray('CourierPhotoView', $o['Photos']);
        if (isset($o['PayLines'])) $this->PayLines = JsonConverters::fromArray('CourierPayLineView', $o['PayLines']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DispatchOdRequestID)) $o['DispatchOdRequestID'] = $this->DispatchOdRequestID;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->CourierProfileId)) $o['CourierProfileId'] = $this->CourierProfileId;
        if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
        if (isset($this->RouteShape)) $o['RouteShape'] = $this->RouteShape;
        if (isset($this->UnitOne)) $o['UnitOne'] = $this->UnitOne;
        if (isset($this->UnitMany)) $o['UnitMany'] = $this->UnitMany;
        if (isset($this->CourierFacilityId)) $o['CourierFacilityId'] = $this->CourierFacilityId;
        if (isset($this->FacilityName)) $o['FacilityName'] = $this->FacilityName;
        if (isset($this->ServiceLevelCode)) $o['ServiceLevelCode'] = $this->ServiceLevelCode;
        if (isset($this->LevelName)) $o['LevelName'] = $this->LevelName;
        if (isset($this->Source)) $o['Source'] = $this->Source;
        if (isset($this->Address)) $o['Address'] = $this->Address;
        if (isset($this->Unit)) $o['Unit'] = $this->Unit;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->Zip)) $o['Zip'] = $this->Zip;
        if (isset($this->Zone)) $o['Zone'] = $this->Zone;
        if (isset($this->PickupContactName)) $o['PickupContactName'] = $this->PickupContactName;
        if (isset($this->DropoffAddress)) $o['DropoffAddress'] = $this->DropoffAddress;
        if (isset($this->DropoffUnit)) $o['DropoffUnit'] = $this->DropoffUnit;
        if (isset($this->DropoffCity)) $o['DropoffCity'] = $this->DropoffCity;
        if (isset($this->DropoffZip)) $o['DropoffZip'] = $this->DropoffZip;
        if (isset($this->DropoffContactName)) $o['DropoffContactName'] = $this->DropoffContactName;
        if (isset($this->Miles)) $o['Miles'] = $this->Miles;
        if (isset($this->Units)) $o['Units'] = $this->Units;
        if (isset($this->UnitsFound)) $o['UnitsFound'] = $this->UnitsFound;
        if (isset($this->Stage)) $o['Stage'] = $this->Stage;
        if (isset($this->CourierStep)) $o['CourierStep'] = $this->CourierStep;
        if (isset($this->StepLabel)) $o['StepLabel'] = $this->StepLabel;
        if (isset($this->DriverCode)) $o['DriverCode'] = $this->DriverCode;
        if (isset($this->DriverName)) $o['DriverName'] = $this->DriverName;
        if (isset($this->DriverContactId)) $o['DriverContactId'] = $this->DriverContactId;
        if (isset($this->CourierRunId)) $o['CourierRunId'] = $this->CourierRunId;
        if (isset($this->RunCode)) $o['RunCode'] = $this->RunCode;
        if (isset($this->StopSequence)) $o['StopSequence'] = $this->StopSequence;
        if (isset($this->QueueSequence)) $o['QueueSequence'] = $this->QueueSequence;
        if (isset($this->IsAsap)) $o['IsAsap'] = $this->IsAsap;
        if (isset($this->WindowStartUtc)) $o['WindowStartUtc'] = JsonConverters::to('DateTime', $this->WindowStartUtc);
        if (isset($this->WindowEndUtc)) $o['WindowEndUtc'] = JsonConverters::to('DateTime', $this->WindowEndUtc);
        if (isset($this->WindowText)) $o['WindowText'] = $this->WindowText;
        if (isset($this->DueUtc)) $o['DueUtc'] = JsonConverters::to('DateTime', $this->DueUtc);
        if (isset($this->DueText)) $o['DueText'] = $this->DueText;
        if (isset($this->PingAfterUtc)) $o['PingAfterUtc'] = JsonConverters::to('DateTime', $this->PingAfterUtc);
        if (isset($this->PingExpiresUtc)) $o['PingExpiresUtc'] = JsonConverters::to('DateTime', $this->PingExpiresUtc);
        if (isset($this->CandidateCode)) $o['CandidateCode'] = $this->CandidateCode;
        if (isset($this->HeldReason)) $o['HeldReason'] = $this->HeldReason;
        if (isset($this->HeldUtc)) $o['HeldUtc'] = JsonConverters::to('DateTime', $this->HeldUtc);
        if (isset($this->CustomerName)) $o['CustomerName'] = $this->CustomerName;
        if (isset($this->CustomerPhone)) $o['CustomerPhone'] = $this->CustomerPhone;
        if (isset($this->Handoff)) $o['Handoff'] = $this->Handoff;
        if (isset($this->GateCode)) $o['GateCode'] = $this->GateCode;
        if (isset($this->Instructions)) $o['Instructions'] = $this->Instructions;
        if (isset($this->DamageNote)) $o['DamageNote'] = $this->DamageNote;
        if (isset($this->DeliveredToName)) $o['DeliveredToName'] = $this->DeliveredToName;
        if (isset($this->PayMode)) $o['PayMode'] = $this->PayMode;
        if (isset($this->Fare)) $o['Fare'] = $this->Fare;
        if (isset($this->FinalPrice)) $o['FinalPrice'] = $this->FinalPrice;
        if (isset($this->TipAmount)) $o['TipAmount'] = $this->TipAmount;
        if (isset($this->CancelledBy)) $o['CancelledBy'] = $this->CancelledBy;
        if (isset($this->CancelReason)) $o['CancelReason'] = $this->CancelReason;
        if (isset($this->CancelFeeApplied)) $o['CancelFeeApplied'] = $this->CancelFeeApplied;
        if (isset($this->MissedFeeApplied)) $o['MissedFeeApplied'] = $this->MissedFeeApplied;
        if (isset($this->CaptureMode)) $o['CaptureMode'] = $this->CaptureMode;
        if (isset($this->AuthorizedAmount)) $o['AuthorizedAmount'] = $this->AuthorizedAmount;
        if (isset($this->CapturedAmount)) $o['CapturedAmount'] = $this->CapturedAmount;
        if (isset($this->RefundedAmount)) $o['RefundedAmount'] = $this->RefundedAmount;
        if (isset($this->ChargeError)) $o['ChargeError'] = $this->ChargeError;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->ArrivedUtc)) $o['ArrivedUtc'] = JsonConverters::to('DateTime', $this->ArrivedUtc);
        if (isset($this->PickedUpUtc)) $o['PickedUpUtc'] = JsonConverters::to('DateTime', $this->PickedUpUtc);
        if (isset($this->IntakeUtc)) $o['IntakeUtc'] = JsonConverters::to('DateTime', $this->IntakeUtc);
        if (isset($this->ReadyUtc)) $o['ReadyUtc'] = JsonConverters::to('DateTime', $this->ReadyUtc);
        if (isset($this->OutForDeliveryUtc)) $o['OutForDeliveryUtc'] = JsonConverters::to('DateTime', $this->OutForDeliveryUtc);
        if (isset($this->DeliveredUtc)) $o['DeliveredUtc'] = JsonConverters::to('DateTime', $this->DeliveredUtc);
        if (isset($this->MissedUtc)) $o['MissedUtc'] = JsonConverters::to('DateTime', $this->MissedUtc);
        if (isset($this->CancelledUtc)) $o['CancelledUtc'] = JsonConverters::to('DateTime', $this->CancelledUtc);
        if (isset($this->IsClosed)) $o['IsClosed'] = $this->IsClosed;
        if (isset($this->RebookOfId)) $o['RebookOfId'] = $this->RebookOfId;
        if (isset($this->RecurrenceId)) $o['RecurrenceId'] = $this->RecurrenceId;
        if (isset($this->PickupLoadId)) $o['PickupLoadId'] = $this->PickupLoadId;
        if (isset($this->Rule)) $o['Rule'] = JsonConverters::to('CourierOrderRuleView', $this->Rule);
        if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('CourierItemView', $this->Items);
        if (isset($this->Scans)) $o['Scans'] = JsonConverters::toArray('CourierScanView', $this->Scans);
        if (isset($this->Proof)) $o['Proof'] = JsonConverters::toArray('CourierProofResultView', $this->Proof);
        if (isset($this->Events)) $o['Events'] = JsonConverters::toArray('CourierEventView', $this->Events);
        if (isset($this->Photos)) $o['Photos'] = JsonConverters::toArray('CourierPhotoView', $this->Photos);
        if (isset($this->PayLines)) $o['PayLines'] = JsonConverters::toArray('CourierPayLineView', $this->PayLines);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierOrderResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<CourierOrderView>|null */
        public ?array $Orders=null,
        /** @var CourierOrderView|null */
        public ?CourierOrderView $Order=null,
        /** @var string|null */
        public ?string $Message=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Orders'])) $this->Orders = JsonConverters::fromArray('CourierOrderView', $o['Orders']);
        if (isset($o['Order'])) $this->Order = JsonConverters::from('CourierOrderView', $o['Order']);
        if (isset($o['Message'])) $this->Message = $o['Message'];
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Orders)) $o['Orders'] = JsonConverters::toArray('CourierOrderView', $this->Orders);
        if (isset($this->Order)) $o['Order'] = JsonConverters::to('CourierOrderView', $this->Order);
        if (isset($this->Message)) $o['Message'] = $this->Message;
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class CourierOrderReturnRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Code=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Code'])) $this->Code = $o['Code'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Code)) $o['Code'] = $this->Code;
        return empty($o) ? new class(){} : $o;
    }
}

PHP CourierOrderReturnRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>