| GET | /v1/dispatch/courier/customers |
|---|
export class CourierTrackBusiness
{
public Name: string;
public Phone: string;
public constructor(init?: Partial<CourierTrackBusiness>) { (Object as any).assign(this, init); }
}
export class CourierBookLevel
{
public Code: string;
public Name: string;
public Ready: string;
public WithinMin: number;
public InBy: string;
public Surcharge: number;
public Days: number[] = [];
public DeadlineMin?: number;
public constructor(init?: Partial<CourierBookLevel>) { (Object as any).assign(this, init); }
}
export class HandoffOptions
{
public Hand: boolean;
public Porch: boolean;
public Desk: boolean;
public SigRequired: boolean;
public IdRequired: boolean;
public CodeRequired: boolean;
public constructor(init?: Partial<HandoffOptions>) { (Object as any).assign(this, init); }
}
export class CourierBookProfile
{
public Code: string;
public Name: string;
public Shape: string;
public Template: string;
public UnitOne: string;
public UnitMany: string;
public UnitOneEs: string;
public UnitManyEs: string;
public FacilityNoun: string;
public FacilityNounEs: string;
public FacilityName: string;
public Levels: CourierBookLevel[] = [];
public Asap: boolean;
public Recurring: boolean;
public PayTiming: string;
public FinalAfterCount: boolean;
public CancelFee: number;
public MissedFee: number;
public MissedWaitMin: number;
public ServiceArea: string[] = [];
public Zips: string[] = [];
public Handoffs: HandoffOptions;
public constructor(init?: Partial<CourierBookProfile>) { (Object as any).assign(this, init); }
}
export class CourierBookProfileLink
{
public Code: string;
public Name: string;
public Shape: string;
public constructor(init?: Partial<CourierBookProfileLink>) { (Object as any).assign(this, init); }
}
export class CourierBookPageView
{
public Available: boolean;
public BookingOn: boolean;
public Business: CourierTrackBusiness;
public Profile: CourierBookProfile;
public Profiles: CourierBookProfileLink[] = [];
public CardEnabled: boolean;
public PublishableKey: string;
public AppUrl: string;
public Today: string;
public Weekday: number;
public NowMin: number;
public constructor(init?: Partial<CourierBookPageView>) { (Object as any).assign(this, init); }
}
export class CustomerAppBoot
{
public Profile: string;
public Available: boolean;
public Reason: string;
public AuthMethod: string;
public Slug: string;
public Page: CourierBookPageView;
public ManifestUrl: string;
public constructor(init?: Partial<CustomerAppBoot>) { (Object as any).assign(this, init); }
}
export class CustomerAppAddress
{
public Id: number;
public Label: string;
public Street: string;
public Unit: string;
public City: string;
public Zip: string;
public Lat?: number;
public Lng?: number;
public InArea: boolean;
public constructor(init?: Partial<CustomerAppAddress>) { (Object as any).assign(this, init); }
}
export class CustomerAppCard
{
public Id: number;
public Label: string;
public Brand: string;
public Last4: string;
public IsDefault: boolean;
public constructor(init?: Partial<CustomerAppCard>) { (Object as any).assign(this, init); }
}
export class CustomerAppNotif
{
public Texts: boolean;
public Push: boolean;
public Promos: boolean;
public constructor(init?: Partial<CustomerAppNotif>) { (Object as any).assign(this, init); }
}
export class CustomerAppStep
{
public Key: string;
public Done: boolean;
public Time: string;
public constructor(init?: Partial<CustomerAppStep>) { (Object as any).assign(this, init); }
}
export class CustomerAppOrder
{
public Id: number;
public Code: string;
public Status: string;
public State: string;
public Active: boolean;
public LevelCode: string;
public LevelName: string;
public Units: number;
public UnitsFound?: number;
public Address: string;
public Unit: string;
public Zip: string;
public DropAddress: string;
public RecipientName: string;
public Handoff: string;
public IsAsap: boolean;
public DayIx: number;
public DateText: string;
public StartMin?: number;
public EndMin?: number;
public DriverFirstName: string;
public EtaMin?: number;
public Promise: string;
public PayMode: string;
public Amount: number;
public Charged?: number;
public Tip?: number;
public CardLast4: string;
public RecurrenceId?: number;
public Steps: CustomerAppStep[] = [];
public constructor(init?: Partial<CustomerAppOrder>) { (Object as any).assign(this, init); }
}
export class CustomerAppRecurrence
{
public Id: number;
public Weekday: number;
public StartMin: number;
public EndMin: number;
public Cadence: string;
public LevelCode: string;
public Units: number;
public Handoff: string;
public Address: string;
public Paused: boolean;
public PayMode: string;
public CardLast4: string;
public NextDate: string;
public SkippedDate: string;
public AheadDays: number;
public constructor(init?: Partial<CustomerAppRecurrence>) { (Object as any).assign(this, init); }
}
export class CustomerAppInvoice
{
public Uid: string;
public Number: string;
public DateText: string;
public Total: number;
public Balance: number;
public Paid: boolean;
public constructor(init?: Partial<CustomerAppInvoice>) { (Object as any).assign(this, init); }
}
export class CustomerAppMe
{
public ContactId: number;
public FirstName: string;
public LastName: string;
public Name: string;
public Phone: string;
public NeedsName: boolean;
public BillingMode: string;
public AccountCode: string;
public Addresses: CustomerAppAddress[] = [];
public Cards: CustomerAppCard[] = [];
public Notif: CustomerAppNotif;
public Orders: CustomerAppOrder[] = [];
public Recurring: CustomerAppRecurrence[] = [];
public Invoices: CustomerAppInvoice[] = [];
public Today: string;
public NowMin: number;
public constructor(init?: Partial<CustomerAppMe>) { (Object as any).assign(this, init); }
}
export class CourierBookOrderResponse
{
public Done: boolean;
public NeedsAction: boolean;
public ClientSecret: string;
public SetupIntentId: string;
public Code: string;
public TrackUrl: string;
public IcsUrl: string;
public WindowText: string;
public Promise: string;
public Total: number;
public PayTiming: string;
public CardLast4: string;
public Repeats: string;
public LinkSentBy: string;
public ReopenStep: string;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<CourierBookOrderResponse>) { (Object as any).assign(this, init); }
}
export class CourierCustomerRow
{
public ContactId: number;
public Name: string;
public Phone: string;
public BillingMode: string;
public AccountCode: string;
public Orders: number;
public LastOrderAt?: string;
public Unbilled: number;
public UnbilledAmount: number;
public Cards: number;
public constructor(init?: Partial<CourierCustomerRow>) { (Object as any).assign(this, init); }
}
export class RunResult
{
public Invoices: number;
public Orders: number;
public Total: number;
public Skipped: string[] = [];
public constructor(init?: Partial<RunResult>) { (Object as any).assign(this, init); }
}
export class CustomerAppResponse
{
public Boot: CustomerAppBoot;
public Customer: CustomerAppMe;
public Addresses: CustomerAppAddress[] = [];
public Cards: CustomerAppCard[] = [];
public Notif: CustomerAppNotif;
public Recurring: CustomerAppRecurrence[] = [];
public Booked: CourierBookOrderResponse;
public Sent: boolean;
public Token: string;
public NeedsName: boolean;
public Name: string;
public Url: string;
public ClientSecret: string;
public PublishableKey: string;
public Message: string;
public ReopenStep: string;
public Customers: CourierCustomerRow[] = [];
public Run: RunResult;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<CustomerAppResponse>) { (Object as any).assign(this, init); }
}
export class CourierCustomersRequest
{
public Q: string;
public constructor(init?: Partial<CourierCustomersRequest>) { (Object as any).assign(this, init); }
}
TypeScript CourierCustomersRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/courier/customers HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Boot:
{
Profile: String,
Available: False,
Reason: String,
AuthMethod: String,
Slug: String,
Page:
{
Available: False,
BookingOn: False,
Business:
{
Name: String,
Phone: String
},
Profile:
{
Code: String,
Name: String,
Shape: String,
Template: String,
UnitOne: String,
UnitMany: String,
UnitOneEs: String,
UnitManyEs: String,
FacilityNoun: String,
FacilityNounEs: String,
FacilityName: String,
Levels:
[
{
Code: String,
Name: String,
Ready: String,
WithinMin: 0,
InBy: String,
Surcharge: 0,
Days:
[
0
],
DeadlineMin: 0
}
],
Asap: False,
Recurring: False,
PayTiming: String,
FinalAfterCount: False,
CancelFee: 0,
MissedFee: 0,
MissedWaitMin: 0,
ServiceArea:
[
String
],
Zips:
[
String
],
Handoffs:
{
Hand: False,
Porch: False,
Desk: False,
SigRequired: False,
IdRequired: False,
CodeRequired: False
}
},
Profiles:
[
{
Code: String,
Name: String,
Shape: String
}
],
CardEnabled: False,
PublishableKey: String,
AppUrl: String,
Today: String,
Weekday: 0,
NowMin: 0
},
ManifestUrl: String
},
Customer:
{
ContactId: 0,
FirstName: String,
LastName: String,
Name: String,
Phone: String,
NeedsName: False,
BillingMode: String,
AccountCode: String,
Addresses:
[
{
Id: 0,
Label: String,
Street: String,
Unit: String,
City: String,
Zip: String,
Lat: 0,
Lng: 0,
InArea: False
}
],
Cards:
[
{
Id: 0,
Label: String,
Brand: String,
Last4: String,
IsDefault: False
}
],
Notif:
{
Texts: False,
Push: False,
Promos: False
},
Orders:
[
{
Id: 0,
Code: String,
Status: String,
State: String,
Active: False,
LevelCode: String,
LevelName: String,
Units: 0,
UnitsFound: 0,
Address: String,
Unit: String,
Zip: String,
DropAddress: String,
RecipientName: String,
Handoff: String,
IsAsap: False,
DayIx: 0,
DateText: String,
StartMin: 0,
EndMin: 0,
DriverFirstName: String,
EtaMin: 0,
Promise: String,
PayMode: String,
Amount: 0,
Charged: 0,
Tip: 0,
CardLast4: String,
RecurrenceId: 0,
Steps:
[
{
Key: String,
Done: False,
Time: String
}
]
}
],
Recurring:
[
{
Id: 0,
Weekday: 0,
StartMin: 0,
EndMin: 0,
Cadence: String,
LevelCode: String,
Units: 0,
Handoff: String,
Address: String,
Paused: False,
PayMode: String,
CardLast4: String,
NextDate: String,
SkippedDate: String,
AheadDays: 0
}
],
Invoices:
[
{
Uid: 00000000000000000000000000000000,
Number: String,
DateText: String,
Total: 0,
Balance: 0,
Paid: False
}
],
Today: String,
NowMin: 0
},
Addresses:
[
{
Id: 0,
Label: String,
Street: String,
Unit: String,
City: String,
Zip: String,
Lat: 0,
Lng: 0,
InArea: False
}
],
Cards:
[
{
Id: 0,
Label: String,
Brand: String,
Last4: String,
IsDefault: False
}
],
Notif:
{
Texts: False,
Push: False,
Promos: False
},
Recurring:
[
{
Id: 0,
Weekday: 0,
StartMin: 0,
EndMin: 0,
Cadence: String,
LevelCode: String,
Units: 0,
Handoff: String,
Address: String,
Paused: False,
PayMode: String,
CardLast4: String,
NextDate: String,
SkippedDate: String,
AheadDays: 0
}
],
Booked:
{
Done: False,
NeedsAction: False,
ClientSecret: String,
SetupIntentId: String,
Code: String,
TrackUrl: String,
IcsUrl: String,
WindowText: String,
Promise: String,
Total: 0,
PayTiming: String,
CardLast4: String,
Repeats: String,
LinkSentBy: String,
ReopenStep: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
},
Sent: False,
Token: String,
NeedsName: False,
Name: String,
Url: String,
ClientSecret: String,
PublishableKey: String,
Message: String,
ReopenStep: String,
Customers:
[
{
ContactId: 0,
Name: String,
Phone: String,
BillingMode: String,
AccountCode: String,
Orders: 0,
LastOrderAt: 0001-01-01,
Unbilled: 0,
UnbilledAmount: 0,
Cards: 0
}
],
Run:
{
Invoices: 0,
Orders: 0,
Total: 0,
Skipped:
[
String
]
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}