BackofficeApi

<back to all web services

LotteryGetRequest

Backoffice
Requires Authentication
Required role:Backoffice
The following routes are available for this service:
GET/lottery/get
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class BackofficeApi
{

    public static class ImageUrls
    {
        public String preview = null;
        public String small = null;
        public String medium = null;
        public String large = null;
        
        public String getPreview() { return preview; }
        public ImageUrls setPreview(String value) { this.preview = value; return this; }
        public String getSmall() { return small; }
        public ImageUrls setSmall(String value) { this.small = value; return this; }
        public String getMedium() { return medium; }
        public ImageUrls setMedium(String value) { this.medium = value; return this; }
        public String getLarge() { return large; }
        public ImageUrls setLarge(String value) { this.large = value; return this; }
    }

    public static class UserAddress
    {
        public String streetName = null;
        public String streetNumber = null;
        public String postalCode = null;
        public String region = null;
        public String countryCode = null;
        
        public String getStreetName() { return streetName; }
        public UserAddress setStreetName(String value) { this.streetName = value; return this; }
        public String getStreetNumber() { return streetNumber; }
        public UserAddress setStreetNumber(String value) { this.streetNumber = value; return this; }
        public String getPostalCode() { return postalCode; }
        public UserAddress setPostalCode(String value) { this.postalCode = value; return this; }
        public String getRegion() { return region; }
        public UserAddress setRegion(String value) { this.region = value; return this; }
        public String getCountryCode() { return countryCode; }
        public UserAddress setCountryCode(String value) { this.countryCode = value; return this; }
    }

    public static enum TimeRelativeLotteryState
    {
        Draft,
        PublishedUpcoming,
        PublishedActive,
        PublishedEndedDrawWinner,
        PublishedEndedContactWinner,
        Archived;
    }

}

Java LotteryGetRequest DTOs

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

HTTP + JSV

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

GET /lottery/get HTTP/1.1 
Host: backoffice-api.brovs.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	lottery: 
	{
		id: 0,
		startAt: 0001-01-01T00:00:00.0000000+00:00,
		stopAt: 0001-01-01T00:00:00.0000000+00:00,
		images: 
		[
			{
				id: 0,
				imageUrl: 
				{
					preview: String,
					small: String,
					medium: String,
					large: String
				},
				position: 0
			}
		],
		title: String,
		description: String,
		winnerToDisplay: String,
		winner: 
		{
			userId: 0,
			firstName: String,
			lastName: String,
			homeAddress: 
			{
				streetName: String,
				streetNumber: String,
				postalCode: String,
				region: String,
				countryCode: String
			},
			mobilePhone: String,
			mobilePhoneConfirmedAt: 0001-01-01T00:00:00.0000000+00:00,
			email: String,
			emailConfirmedAt: 0001-01-01T00:00:00.0000000+00:00
		},
		countryCode: String,
		state: Draft,
		updatedAt: 0001-01-01T00:00:00.0000000+00:00
	}
}