Rsl.Lotteries

<back to all web services

QueryCustomerOrders

Returns the customer order history

The following routes are available for this service:
GET/customers/{CustomerId}/ordersKnown issues (Pending Dynamics 365 Update 10) - Order status is always Unknown - Payment result and gift information are absent - Order items names, line item id, ticket count and ticket numbers are absent
QueryCustomerOrders Parameters:
NameParameterData TypeRequiredDescription
CustomerIdpathstringYesThe customer identifier
FromCreatedDatequeryDateTime?No
ToCreatedDatequeryDateTime?No
QueryBase Parameters:
NameParameterData TypeRequiredDescription
Skipformint?No
Takeformint?No
OrderByformstringNo
OrderByDescformstringNo
IncludeformstringNo
FieldsformstringNo
MetaformDictionary<string, string>No
Order Parameters:
NameParameterData TypeRequiredDescription
ReceiptNumberformstringNo
OrderIdformstringNoThe order number
CreatedDateformDateTime?No
LastModifiedformDateTime?No
CustomerIdformstringNo
ItemsformList<OrderLineItem>No
StatusformOrderStatus?No
TotalformdecimalNo
CampaignIdformstringNoThe campaign identifier associated to the order
GiftRecipientformContactNoThe order gift recipient
GiftMessageformstringNo
IsGiftformboolNo
RewardTypeformRewardType?No
OrderLineItem Parameters:
NameParameterData TypeRequiredDescription
ArtUnionformstringNo
ProductIdformstringNo
LineItemIdformstringNo
InventTransIdformstringNo
ProductNameformstringNo
ProductTicketCountformint?No
QuantityformintNo
SubTotalformdecimalNo
TicketNumbersformstringNo
DrawDateformDateTime?No
GameTypeformstringNo
ArtUnionDictionaryformDictionary<string, string>No
ArtUnionStatusformArtUnionStatus?No
LineItemStatusformOrderLineItemStatus?No
IsRefundedformbool?No
ArtUnionIdformstringNo
IsVIPDrawformboolNo
ArtUnionStatus Enum:
NameValue
Draft1
Approved2
PreOrder3
Open4
Closed5
Batching6
Sellout7
OrderLineItemStatus Enum:
NameValue
Open1
Closed2
PreOrder3
OrderStatus Enum:
NameValue
Unknown0
Open1
Invoiced4
Cancelled5
Pending6
Contact Parameters:
NameParameterData TypeRequiredDescription
ContactIdformstringNo
TitleformPersonTitle?NoPerson title

Allowable Values

  • Mr
  • Mrs
  • Miss
  • Ms
  • Dr
FirstNameformstringNo
LastNameformstringNo
DateOfBirthformDateTime?No
HomePhoneformstringNo
MobilePhoneformstringNo
EmailformstringNo
AddressformAddressNo
PersonTitle Enum:
Mr
Mrs
Miss
Ms
Dr
Address Parameters:
NameParameterData TypeRequiredDescription
StreetformstringNo
CityformstringNo
ZipCodeformstringNo
StateformstringNo
CountryRegionIdformstringNo
DPIDformintNo
SuburbformstringNo
RewardType Enum:
None
BonusTicket
QueryResponse<T> Parameters:
NameParameterData TypeRequiredDescription
OffsetformintNo
TotalformintNo
ResultsformList<T>No
MetaformDictionary<string, string>No
ResponseStatusformResponseStatusNo

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /customers/{CustomerId}/orders HTTP/1.1 
Host: azs-stg-lotteries-web.azurewebsites.net 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"offset":0,"total":0,"results":[{"receiptNumber":"String","orderId":"String","createdDate":"0001-01-01T00:00:00.0000000","lastModified":"0001-01-01T00:00:00.0000000","customerId":"String","items":[{"artUnion":"String","productId":"String","lineItemId":"String","inventTransId":"String","productName":"String","productTicketCount":0,"quantity":0,"subTotal":0,"ticketNumbers":"String","drawDate":"0001-01-01T00:00:00.0000000","gameType":"String","artUnionDictionary":{"String":"String"},"artUnionStatus":"0","lineItemStatus":"0","isRefunded":false,"artUnionId":"String","isVIPDraw":false}],"status":"Unknown","total":0,"campaignId":"String","giftRecipient":{"contactId":"String","title":"Mr","firstName":"String","lastName":"String","dateOfBirth":"0001-01-01T00:00:00.0000000","homePhone":"String","mobilePhone":"String","email":"String","address":{"street":"String","city":"String","zipCode":"String","state":"String","countryRegionId":"String","dpid":0,"suburb":"String"}},"giftMessage":"String","isGift":true,"rewardType":"None"}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}