| POST,OPTIONS | /v1/book/{Slug}/orders | ||
|---|---|---|---|
| POST,OPTIONS | /v1/book/{Slug}/orders/confirm |
"use strict";
export class CourierBookOrderResponse {
/** @param {{Done?:boolean,NeedsAction?:boolean,ClientSecret?:string,SetupIntentId?:string,Code?:string,TrackUrl?:string,IcsUrl?:string,WindowText?:string,Promise?:string,Total?:number,PayTiming?:string,CardLast4?:string,Repeats?:string,LinkSentBy?:string,ReopenStep?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
Done;
/** @type {boolean} */
NeedsAction;
/** @type {string} */
ClientSecret;
/** @type {string} */
SetupIntentId;
/** @type {string} */
Code;
/** @type {string} */
TrackUrl;
/** @type {string} */
IcsUrl;
/** @type {string} */
WindowText;
/** @type {string} */
Promise;
/** @type {number} */
Total;
/** @type {string} */
PayTiming;
/** @type {string} */
CardLast4;
/** @type {string} */
Repeats;
/** @type {string} */
LinkSentBy;
/** @type {string} */
ReopenStep;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CourierBookOrderRequest {
/** @param {{Slug?:string,Profile?:string,TurnstileToken?:string,Level?:string,WindowId?:string,Recur?:string,Address?:string,Unit?:string,City?:string,Zip?:string,Lat?:number,Lng?:number,PickupName?:string,DropAddress?:string,DropUnit?:string,DropCity?:string,DropZip?:string,DropLat?:number,DropLng?:number,RecipientName?:string,Units?:number,Handoff?:string,GateCode?:string,Note?:string,Name?:string,Phone?:string,Email?:string,SmsConsent?:boolean,Terms?:boolean,PaymentMethodId?:string,SetupIntentId?:string,QuotedTotal?:number,Lang?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Slug;
/** @type {string} */
Profile;
/** @type {string} */
TurnstileToken;
/** @type {string} */
Level;
/** @type {string} */
WindowId;
/** @type {string} */
Recur;
/** @type {string} */
Address;
/** @type {string} */
Unit;
/** @type {string} */
City;
/** @type {string} */
Zip;
/** @type {?number} */
Lat;
/** @type {?number} */
Lng;
/** @type {string} */
PickupName;
/** @type {string} */
DropAddress;
/** @type {string} */
DropUnit;
/** @type {string} */
DropCity;
/** @type {string} */
DropZip;
/** @type {?number} */
DropLat;
/** @type {?number} */
DropLng;
/** @type {string} */
RecipientName;
/** @type {number} */
Units;
/** @type {string} */
Handoff;
/** @type {string} */
GateCode;
/** @type {string} */
Note;
/** @type {string} */
Name;
/** @type {string} */
Phone;
/** @type {string} */
Email;
/** @type {boolean} */
SmsConsent;
/** @type {boolean} */
Terms;
/** @type {string} */
PaymentMethodId;
/** @type {string} */
SetupIntentId;
/** @type {?number} */
QuotedTotal;
/** @type {string} */
Lang;
}
JavaScript CourierBookOrderRequest 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/book/{Slug}/orders HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CourierBookOrderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Address>String</Address>
<City>String</City>
<DropAddress>String</DropAddress>
<DropCity>String</DropCity>
<DropLat>0</DropLat>
<DropLng>0</DropLng>
<DropUnit>String</DropUnit>
<DropZip>String</DropZip>
<Email>String</Email>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Lang>String</Lang>
<Lat>0</Lat>
<Level>String</Level>
<Lng>0</Lng>
<Name>String</Name>
<Note>String</Note>
<PaymentMethodId>String</PaymentMethodId>
<Phone>String</Phone>
<PickupName>String</PickupName>
<Profile>String</Profile>
<QuotedTotal>0</QuotedTotal>
<RecipientName>String</RecipientName>
<Recur>String</Recur>
<SetupIntentId>String</SetupIntentId>
<Slug>String</Slug>
<SmsConsent>false</SmsConsent>
<Terms>false</Terms>
<TurnstileToken>String</TurnstileToken>
<Unit>String</Unit>
<Units>0</Units>
<WindowId>String</WindowId>
<Zip>String</Zip>
</CourierBookOrderRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierBookOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<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: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>
<SetupIntentId>String</SetupIntentId>
<Total>0</Total>
<TrackUrl>String</TrackUrl>
<WindowText>String</WindowText>
</CourierBookOrderResponse>