SendRegning

Create event

Verison: 1.0 (read more)

Request

1
POST /host/events
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
	"name": "Event Name",
	"date": "2014-10-21 08:00",
	"signupCaptcha": true,
	"location": {
		"name": "Oslo Spektrum",
		"address": "Sonja Henies plass 2",
		"zip": "0185",
		"city": "OSLO",
		"country": "NORGE"
	},
	"description": "my description",
	"confirmation": false,
	"price": 12.23,
	"contactPerson": {
		"name": "Mr Contact",
		"email": "jd@event.com",
		"phone": "13131313"
	},
	"participantLimit": 777,
	"smsConfirmation": {
		"enabled": true,
		"message": "my message"
	},
	"registrationDeadline": "2014-10-20 18:00",
	"endDate": "2014-10-21 16:00",
	"taxRate": 25,
	"productNumber": "prod22",
	"showSignupStats": true,
	"discountCodes": {
		"label": "Påmeldingskode",
		"codes": [{
			"code": "Påske 2017",
			"amount": 5.00
		}, {
			"code": "Vårkode",
			"amount": 2.25
		}]
	},
	"customFields": [{
		"number": null,
		"name": "names",
		"type": "TEXT",
		"required": "true",
		"options": null
	}, {
		"number": null,
		"name": "Food",
		"type": "TEXT",
		"required": "true",
		"options": [{
			"value": "PIZZA",
			"price": {
				"productCode": "32",
				"price": 10,
				"taxRate": 8
			}
		}]
	}, {
		"number": null,
		"name": "asd2",
		"type": "BOOLEAN",
		"required": "true",
		"price": {
			"productCode": "42",
			"price": 12,
			"taxRate": 25
		},
		"options": null
	}, {
		"number": null,
		"name": "How many rooms",
		"type": "NUMBER",
		"required": "false",
		"price": {
			"productCode": "42",
			"price": 12,
			"taxRate": 25
		},
		"options": null
	}]
}

Custom field prices can be left out!

Response

HTTP/1.1 201 CREATED

The response contains a Location header referring to the created entity.

e.g.

1
Location: https://www.sendregning.no/host/events/1

Please fetch the entity using the Location value to get the generated number, do not try to parse/regexp the string in any way!