Get Sweepstake
Currenty not yet public available!
Request:
<getsweepstake id="" externalid="" />
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
getsweepstake["id"] |
int |
yes* |
|
Internal id of sweepstake |
getsweepstake["externalid"] |
varchar |
yes* |
|
External id of sweepstake |
* Either "id" or "externalid" must be given. If both are specified, the externalid will be ignored
Response:
<data>
<externalid></externalid>
<type></type>
<language>de</language>
<title></title>
<titleinternal></titleinternal>
<opener></opener>
<startdatetime>YYYY-mm-dd HH:ii:ss</startdatetime>
<enddatetime>YYYY-mm-dd HH:ii:ss</enddatetime>
<custom1></custom1>
...
<custom10></custom10>
<prices>
<price id="">
<amount><amount>
<title></title>
<description></description>
<value></value>
<media id=""></media>
<winners><winners>
</price>
...
</prices>
<participants></participants>
</data>
Description of XML-Tags:
Element |
Format |
Description |
data->externalid |
varchar(255) |
external ID |
data->type |
drafts|running|finished|archived |
Type of sweepstake |
data->language |
de|en|.. |
|
data->title |
varchar(255) |
|
data->titleinternal |
varchar(255) |
|
data->opener |
varchar(255) |
|
data->startdatetime |
YYYY-mm-dd HH:ii:ss |
|
data->enddatetime |
YYYY-mm-dd HH:ii:ss |
|
data->custom1..10 |
text |
Custom field (defined within template) |
data->prices |
|
List of prices |
data->prices->price["id"] |
int |
ID of price |
data->prices->price->amount |
int |
Number of prices |
data->prices->price->title |
varchar(255) |
Title of price |
data->prices->price->description |
text |
Description of price |
data->prices->price->value |
varchar(255) |
Value of price in Euro |
data->prices->price->media |
varchar(255) |
URL of price picture |
data->prices->price->media["id"] |
varchar(255) |
ID of price picture |
data->prices->price->winners |
int |
Number of winners of this price |
Possible Response-Codes
Get Sweepstake list
Currenty not yet public available!
Request:
<getsweepstakelist>
<search></search>
<type></type>
<page><page>
<pagesize></pagesize>
</getsweepstakelist>
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
sweepstake->search |
varchar |
no |
|
|
sweepstake->type |
drafts|running|finished|archived |
no |
|
Type of sweepstake |
sweepstake->page |
int |
no |
1 |
|
sweepstake->pagesize |
int |
no |
100 |
|
Response:
<data>
<sweepstake id="">
<externalid></externalid>
<type></type>
<language>de</language>
<title></title>
<titleinternal></titleinternal>
<opener></opener>
<startdatetime>YYYY-mm-dd HH:ii:ss</startdatetime>
<enddatetime>YYYY-mm-dd HH:ii:ss</enddatetime>
<custom1></custom1>
...
<custom10></custom10>
<prices>
<price id="">
<amount><amount>
<title></title>
<description></description>
<value></value>
<media id=""></media>
</price>
...
</prices>
<participants></participants>
</sweepstake>
...
</data>
Description of XML-Tags:
Element |
Format |
Description |
sweepstake |
|
|
sweepstake["id"] |
int |
ID |
sweepstake->externalid |
varchar(255) |
external ID |
sweepstake->type |
drafts|running|finished|archived |
Type of sweepstake |
sweepstake->language |
de|en|.. |
|
sweepstake->title |
varchar(255) |
|
sweepstake->titleinternal |
varchar(255) |
|
sweepstake->opener |
varchar(255) |
|
sweepstake->startdatetime |
YYYY-mm-dd HH:ii:ss |
|
sweepstake->enddatetime |
YYYY-mm-dd HH:ii:ss |
|
sweepstake->custom1..10 |
text |
Custom field (defined within template) |
sweepstake->prices |
|
List of prices |
sweepstake->prices->price["id"] |
int |
ID of price |
sweepstake->prices->price->amount |
int |
Number of prices |
sweepstake->prices->price->title |
varchar(255) |
Title of price |
sweepstake->prices->price->description |
text |
Description of price |
sweepstake->prices->price->value |
varchar(255) |
Value of price in Euro |
sweepstake->prices->price->media |
varchar(255) |
URL of price picture |
sweepstake->prices->price->media["id"] |
varchar(255) |
ID of price picture |
Possible Response-Codes
Get participants
Currenty not yet public available!
Request:
<getsweepstakeparticipants id="" externalid="">
<fields>
<field>email</field>
<field>firstname</field>
<field>lastname</field>
...
<field type="formitem">123</field>
</fields>
<order dir="ASC">DateTime</order>
</getsweepstakeparticipants>
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
getsweepstakeparticipants | | | | |
↳ @id |
int |
yes* |
|
Internal id of sweepstake |
↳ @externalid |
varchar |
yes* |
|
External id of sweepstake |
↳ fields |
|
|
|
List of desired fields to return |
↳ field |
|
|
|
Name of desired field (all address fields are possible, or with given id a formitem) |
↳ @type |
address|formitem |
no |
address |
type |
↳ order |
|
|
Created |
Sort result by this field. Can be an address-field or "DateTime" (case sensitive!) to order by datetime of participation. |
↳ @dir |
ASC|DESC |
|
ASC |
Sort direction |
* Either "id" or "externalid" must be given. If both are specified, the externalid will be ignored
Response:
<data>
<participant id="">
<datetime>YYYY-mm-dd HH:ii:ss</datetime>
<priceid></priceid>
<preferredpriceid></preferredpriceid>
<note></note>
<address id="">
<email></email>
<firstname></firstname>
<lastname></lastname>
...
</address>
<formitems>
<formitem id="261"></formitem>
...
</formitems>
</participant>
...
</data>
Description of XML-Tags:
Element |
Format |
Description |
participant |
|
One participant |
participant["id"] |
int |
ID of participation |
participant->datetime |
YYYY-mm-dd HH:ii:ss |
Datetime of participation |
participant->priceid |
int |
ID of price if won; "0" if participant has not won or sweepstake was not evaluated yet. |
participant->preferredpriceid |
int |
ID of preferred price to win (if particiapant hat the opportunity to choose) |
participant->note |
text |
an intrernal note for the participation (currently only via api settable) |
participant->address |
|
List of desired address fields |
participant->address->* |
|
values of address fields |
participant->formitems |
|
List of desired formitem fields |
participant->formitems->* |
|
values of formitem field |
Possible Response-Codes
Add participant
Currenty not yet public available!
Request:
<sweepstakeparticipate id="" externalid="">
<address key="email">jane.doe@example.com</address>
<priceid></priceid>
<sendmail></sendmail>
<note><![CDATA[Test notice]]></note>
</sweepstakeparticipate>
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
sweepstakeparticipate |
|
|
|
Root |
↳ @id |
int |
yes* |
|
Internal id of sweepstake |
↳ @externalid |
varchar |
yes* |
|
External id of sweepstake |
↳ address |
|
|
|
Value of the field specified by type |
↳ @key |
addressfield |
no |
email |
Key field to specify the address |
↳ priceid |
int |
no |
|
ID of price which the participant wins; leave empty if participant has lost, or if the sweepstake will be evaluated later. |
↳ sendmail |
0|1 |
no |
0 |
Send winner mail if specified |
↳ note |
text |
|
|
An internal note for the participation |
* Either "id" or "externalid" must be given. If both are specified, the externalid will be ignored
Response:
The ID of the participation will be returned within response->data
.
Possible Response-Codes
Code |
Description |
2000 |
OK |
7102 |
Error: Already max winners for this price |
Update participant
Currenty not yet public available!
Request:
<updatesweepstakeparticipant id="">
<priceid></priceid>
<note><![CDATA[Test notice]]></note>
<sendmail></sendmail>
</updatesweepstakeparticipant>
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
updatesweepstakeparticipant |
|
|
|
Root |
↳ @id |
int |
yes |
|
Internal id of participation |
↳ priceid |
int |
no |
|
ID of price which the participant wins; leave empty if participant has lost, or if the sweepstake will be evaluated later. |
↳ sendmail |
0|1 |
no |
0 |
Send winner mail if specified |
↳ note |
text |
|
|
An internal note for the participation |
Response:
There is no return value in response->data
.
Possible Response-Codes
Code |
Description |
2000 |
OK |
7102 |
Error: Already max winners for this price |
Delete participant
Currenty not yet public available!
Request:
<deletesweepstakeparticipant id="" />
Description of XML-Tags:
Element |
Format |
Mandatory |
Default |
Description |
updatesweepstakeparticipant["id"] |
int |
yes |
|
Internal id of participation |
Response:
There is no return value in response->data
.
Possible Response-Codes