| GET,PUT | /v1/c/app/me |
|---|
export class CustomerAppSessionRequest
{
public Slug: string;
public Profile: string;
public constructor(init?: Partial<CustomerAppSessionRequest>) { (Object as any).assign(this, init); }
}
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 CustomerAppMeRequest extends CustomerAppSessionRequest
{
public Name: string;
public constructor(init?: Partial<CustomerAppMeRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript CustomerAppMeRequest 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.
PUT /v1/c/app/me HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CustomerAppMeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Profile>String</Profile>
<Slug>String</Slug>
<Name>String</Name>
</CustomerAppMeRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CustomerAppResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Addresses>
<CustomerAppAddress>
<City>String</City>
<Id>0</Id>
<InArea>false</InArea>
<Label>String</Label>
<Lat>0</Lat>
<Lng>0</Lng>
<Street>String</Street>
<Unit>String</Unit>
<Zip>String</Zip>
</CustomerAppAddress>
</Addresses>
<Booked>
<CardLast4>String</CardLast4>
<ClientSecret>String</ClientSecret>
<Code>String</Code>
<Done>false</Done>
<IcsUrl>String</IcsUrl>
<LinkSentBy>String</LinkSentBy>
<NeedsAction>false</NeedsAction>
<PayTiming>String</PayTiming>
<Promise>String</Promise>
<ReopenStep>String</ReopenStep>
<Repeats>String</Repeats>
<ResponseStatus xmlns:d3p1="http://schemas.servicestack.net/types">
<d3p1:ErrorCode>String</d3p1:ErrorCode>
<d3p1:Message>String</d3p1:Message>
<d3p1:StackTrace>String</d3p1:StackTrace>
<d3p1:Errors>
<d3p1:ResponseError>
<d3p1:ErrorCode>String</d3p1:ErrorCode>
<d3p1:FieldName>String</d3p1:FieldName>
<d3p1:Message>String</d3p1:Message>
<d3p1:Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:KeyValueOfstringstring>
<d6p1:Key>String</d6p1:Key>
<d6p1:Value>String</d6p1:Value>
</d6p1:KeyValueOfstringstring>
</d3p1:Meta>
</d3p1:ResponseError>
</d3p1:Errors>
<d3p1:Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d3p1:Meta>
</ResponseStatus>
<SetupIntentId>String</SetupIntentId>
<Total>0</Total>
<TrackUrl>String</TrackUrl>
<WindowText>String</WindowText>
</Booked>
<Boot>
<AuthMethod>String</AuthMethod>
<Available>false</Available>
<ManifestUrl>String</ManifestUrl>
<Page>
<AppUrl>String</AppUrl>
<Available>false</Available>
<BookingOn>false</BookingOn>
<Business>
<Name>String</Name>
<Phone>String</Phone>
</Business>
<CardEnabled>false</CardEnabled>
<NowMin>0</NowMin>
<Profile>
<Asap>false</Asap>
<CancelFee>0</CancelFee>
<Code>String</Code>
<FacilityName>String</FacilityName>
<FacilityNoun>String</FacilityNoun>
<FacilityNounEs>String</FacilityNounEs>
<FinalAfterCount>false</FinalAfterCount>
<Handoffs>
<CodeRequired>false</CodeRequired>
<Desk>false</Desk>
<Hand>false</Hand>
<IdRequired>false</IdRequired>
<Porch>false</Porch>
<SigRequired>false</SigRequired>
</Handoffs>
<Levels>
<CourierBookLevel>
<Code>String</Code>
<Days xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:int>0</d7p1:int>
</Days>
<DeadlineMin>0</DeadlineMin>
<InBy>String</InBy>
<Name>String</Name>
<Ready>String</Ready>
<Surcharge>0</Surcharge>
<WithinMin>0</WithinMin>
</CourierBookLevel>
</Levels>
<MissedFee>0</MissedFee>
<MissedWaitMin>0</MissedWaitMin>
<Name>String</Name>
<PayTiming>String</PayTiming>
<Recurring>false</Recurring>
<ServiceArea xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</ServiceArea>
<Shape>String</Shape>
<Template>String</Template>
<UnitMany>String</UnitMany>
<UnitManyEs>String</UnitManyEs>
<UnitOne>String</UnitOne>
<UnitOneEs>String</UnitOneEs>
<Zips xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</Zips>
</Profile>
<Profiles>
<CourierBookProfileLink>
<Code>String</Code>
<Name>String</Name>
<Shape>String</Shape>
</CourierBookProfileLink>
</Profiles>
<PublishableKey>String</PublishableKey>
<Today>String</Today>
<Weekday>0</Weekday>
</Page>
<Profile>String</Profile>
<Reason>String</Reason>
<Slug>String</Slug>
</Boot>
<Cards>
<CustomerAppCard>
<Brand>String</Brand>
<Id>0</Id>
<IsDefault>false</IsDefault>
<Label>String</Label>
<Last4>String</Last4>
</CustomerAppCard>
</Cards>
<ClientSecret>String</ClientSecret>
<Customer>
<AccountCode>String</AccountCode>
<Addresses>
<CustomerAppAddress>
<City>String</City>
<Id>0</Id>
<InArea>false</InArea>
<Label>String</Label>
<Lat>0</Lat>
<Lng>0</Lng>
<Street>String</Street>
<Unit>String</Unit>
<Zip>String</Zip>
</CustomerAppAddress>
</Addresses>
<BillingMode>String</BillingMode>
<Cards>
<CustomerAppCard>
<Brand>String</Brand>
<Id>0</Id>
<IsDefault>false</IsDefault>
<Label>String</Label>
<Last4>String</Last4>
</CustomerAppCard>
</Cards>
<ContactId>0</ContactId>
<FirstName>String</FirstName>
<Invoices>
<CustomerAppInvoice>
<Balance>0</Balance>
<DateText>String</DateText>
<Number>String</Number>
<Paid>false</Paid>
<Total>0</Total>
<Uid>00000000-0000-0000-0000-000000000000</Uid>
</CustomerAppInvoice>
</Invoices>
<LastName>String</LastName>
<Name>String</Name>
<NeedsName>false</NeedsName>
<Notif>
<Promos>false</Promos>
<Push>false</Push>
<Texts>false</Texts>
</Notif>
<NowMin>0</NowMin>
<Orders>
<CustomerAppOrder>
<Active>false</Active>
<Address>String</Address>
<Amount>0</Amount>
<CardLast4>String</CardLast4>
<Charged>0</Charged>
<Code>String</Code>
<DateText>String</DateText>
<DayIx>0</DayIx>
<DriverFirstName>String</DriverFirstName>
<DropAddress>String</DropAddress>
<EndMin>0</EndMin>
<EtaMin>0</EtaMin>
<Handoff>String</Handoff>
<Id>0</Id>
<IsAsap>false</IsAsap>
<LevelCode>String</LevelCode>
<LevelName>String</LevelName>
<PayMode>String</PayMode>
<Promise>String</Promise>
<RecipientName>String</RecipientName>
<RecurrenceId>0</RecurrenceId>
<StartMin>0</StartMin>
<State>String</State>
<Status>String</Status>
<Steps>
<CustomerAppStep>
<Done>false</Done>
<Key>String</Key>
<Time>String</Time>
</CustomerAppStep>
</Steps>
<Tip>0</Tip>
<Unit>String</Unit>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
<Zip>String</Zip>
</CustomerAppOrder>
</Orders>
<Phone>String</Phone>
<Recurring>
<CustomerAppRecurrence>
<Address>String</Address>
<AheadDays>0</AheadDays>
<Cadence>String</Cadence>
<CardLast4>String</CardLast4>
<EndMin>0</EndMin>
<Handoff>String</Handoff>
<Id>0</Id>
<LevelCode>String</LevelCode>
<NextDate>String</NextDate>
<Paused>false</Paused>
<PayMode>String</PayMode>
<SkippedDate>String</SkippedDate>
<StartMin>0</StartMin>
<Units>0</Units>
<Weekday>0</Weekday>
</CustomerAppRecurrence>
</Recurring>
<Today>String</Today>
</Customer>
<Customers>
<CourierCustomerRow>
<AccountCode>String</AccountCode>
<BillingMode>String</BillingMode>
<Cards>0</Cards>
<ContactId>0</ContactId>
<LastOrderAt>0001-01-01T00:00:00</LastOrderAt>
<Name>String</Name>
<Orders>0</Orders>
<Phone>String</Phone>
<Unbilled>0</Unbilled>
<UnbilledAmount>0</UnbilledAmount>
</CourierCustomerRow>
</Customers>
<Message>String</Message>
<Name>String</Name>
<NeedsName>false</NeedsName>
<Notif>
<Promos>false</Promos>
<Push>false</Push>
<Texts>false</Texts>
</Notif>
<PublishableKey>String</PublishableKey>
<Recurring>
<CustomerAppRecurrence>
<Address>String</Address>
<AheadDays>0</AheadDays>
<Cadence>String</Cadence>
<CardLast4>String</CardLast4>
<EndMin>0</EndMin>
<Handoff>String</Handoff>
<Id>0</Id>
<LevelCode>String</LevelCode>
<NextDate>String</NextDate>
<Paused>false</Paused>
<PayMode>String</PayMode>
<SkippedDate>String</SkippedDate>
<StartMin>0</StartMin>
<Units>0</Units>
<Weekday>0</Weekday>
</CustomerAppRecurrence>
</Recurring>
<ReopenStep>String</ReopenStep>
<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>
<Run>
<Invoices>0</Invoices>
<Orders>0</Orders>
<Skipped xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Skipped>
<Total>0</Total>
</Run>
<Sent>false</Sent>
<Token>String</Token>
<Url>String</Url>
</CustomerAppResponse>