POST api/{lang}/eventbook

Places an order in the WePlann system.

Resource URL

Tests Spanish: https://sandbox.weplann.com/api/es/eventbook
Production Spanish: https://developer.weplann.com/api/es/eventbook
Tests Portuguese: https://sandbox.weplann.com/api/pt/eventbook
Production Portuguese: https://developer.weplann.com/api/pt/eventbook

Request Parameters

Name Description Type Additional Information Mandatory
Id The id of the event. uniqueidentifier Yes
ApiKey Your private api key. string Yes
WhiteLabelCode Code for your white label site. string No
Tickets container of tickets being purchased Yes
 + Code The ticket code. string Yes
 + Quantity The quantity of tickets being purchased. integer Yes
Email The customers email address. string Max length 256 Yes
PhoneNumber The customers phone number. string Max length 50 Yes
RemoteHost IP Address of the customer placing the order string Yes
CallbackUrl A Url that you would like notifications to be sent. See Callback Web Hook string Max length 256 No
ExternalReference Your Order Number. string Max length 64 No
TotalUsd container of price This value must be passed from eventvalidate. Yes
 + CurrencyCode string Will always be returned as USD Yes
 + Value decimal The calculated value. Yes
Answers container of answers to questions
 + Code The code of the question. string Yes
 + Value The answer to the question. string Yes

Response Information

Name Description Type Additional Information
Id The id of the event that was ordered uniqueidentifier
OrderId The order id in the WePlann system. uniqueidentifier
Reference The WePlann reference. string
TotalUsd container of price This amount that was charged.
 + CurrencyCode string Will always be returned as USD
 + Value decimal The calculated value.
Status The status of the order string valid values are SEE ******
IsValid boolean Indicates if the order was successfully booked.
Event Container about the event purchased.
 + Id The id of the event. uniqueidentifier
 + Tickets container of tickets purchased
 + + Code The ticket code. string
 + + Quantity The quantity of tickets purchased. integer
 + Email The customers email address. string
 + PhoneNumber The customers phone number. string
 + RemoteHost IP Address of the customer placing the order string
 + CallbackUrl A Url that you would like notifications to be sent. See Callback Web Hook string
 + ExternalReference Your Order Number. string
 + TotalUsd container of price
 + + CurrencyCode string Will always be returned as USD
 + + Value decimal
 + Answers container of answers to questions
 + + Code The code of the question. string
 + + Value The answer to the question. string

Example Request (Xml)

POST https://developer.weplann.com/api/es/eventbook HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<?xml version="1.0" encoding="utf-8"?>
<q1:Event Id="ceab2970-fee8-42ac-aeb4-8475bf0f2109" xmlns:q1="http://www.weplann.com">
	<q1:ApiKey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</q1:ApiKey>
	<q1:Tickets>
		<q1:Ticket Code="adult">
			<q1:Quantity>2</q1:Quantity>
		</q1:Ticket>
		<q1:Ticket Code="child">
			<q1:Quantity>0</q1:Quantity>
		</q1:Ticket>
	</q1:Tickets>
	<q1:TestMode>false</q1:TestMode>
	<q1:Email>johndoe@weplann.com</q1:Email>
	<q1:PhoneNumber>555-555-5555</q1:PhoneNumber>
	<q1:RemoteHost>75.132.65.57</q1:RemoteHost>
	<q1:ExternalReference>XYZ 123</q1:ExternalReference>
	<q1:TotalUsd CurrencyCode="USD">
		<q1:Value>234</q1:Value>
	</q1:TotalUsd>
	<q1:Answers>
		<q1:Answer>
			<q1:Code>FirstName</q1:Code>
			<q1:Value>John</q1:Value>
		</q1:Answer>
		<q1:Answer>
			<q1:Code>LastName</q1:Code>
			<q1:Value>Doe</q1:Value>
		</q1:Answer>
	</q1:Answers>
</q1:Event>

Example Result (XML)

<Order xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="8939003a-f189-49b3-bad1-be359c647404" xmlns="http://www.weplann.com">
	<Reference>TEST-21628-ES</Reference>
	<Status>waitsupplier</Status>
	<IsValid>true</IsValid>
	<Event Id="ceab2970-fee8-42ac-aeb4-8475bf0f2109">
		<TotalUsd CurrencyCode="USD">
			<Value>234.0000</Value>
		</TotalUsd>
		<TestMode>false</TestMode>
		<ExternalReference>XYZ 123</ExternalReference>
		<Email>johndoe@weplann.com</Email>
		<PhoneNumber>555-555-5555</PhoneNumber>
		<RemoteHost>75.132.65.57</RemoteHost>
		<Tickets>
			<Ticket Code="adult">
				<Quantity>2</Quantity>
			</Ticket>
		</Tickets>
		<Answers>
			<Answer>
				<Code>FirstName</Code>
				<Value>John</Value>
			</Answer>
			<Answer>
				<Code>LastName</Code>
				<Value>Doe</Value>
			</Answer>
		</Answers>
	</Event>
</Order>

Example Request (JSON)

POST https://developer.weplann.com/api/es/eventbook HTTP/1.1
Accept: application/json
Content-Type: application/json
{
	"testMode" : false,
	"email" : "johndoe@weplann.com",
	"phoneNumber" : "555-555-5555",
	"remoteHost" : "75.132.65.57",
	"callbackUrl" : null,
	"externalReference" : "XYZ 123",
	"totalUsd" : {
		"currencyCode" : "USD",
		"value" : 214
	},
	"answers" : [
		{
			"code" : "FirstName",
			"value" : "John"
		},
		{
			"code" : "LastName",
			"value" : "Doe"
		},
		{
			"code" : "FirstName",
			"value" : "Jane"
		},
		{
			"code" : "LastName",
			"value" : "Doe"
		}
	],
	"id" : "7729b545-2a90-4ef6-afd4-0ecc84f9f7b8",
	"apiKey" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"tickets" : [
		{
			"code" : "adult",
			"quantity" : 2
		}
	]
}

Example Result (JSON)

{
	"id" : "eedca100-a345-4767-98a3-1b39e10bb45f",
	"reference" : "TEST-21627-ES",
	"confirmation" : null,
	"status" : "waitsupplier",
	"isValid" : true,
	"errors" : null,
	"event" : {
		"id" : "7729b545-2a90-4ef6-afd4-0ecc84f9f7b8",
		"apiKey" : null,
		"totalUsd" : {
			"currencyCode" : "USD",
			"value" : 214.0000
		},
		"testMode" : false,
		"externalReference" : "XYZ 123",
		"email" : "johndoe@weplann.com",
		"phoneNumber" : "555-555-5555",
		"remoteHost" : "75.132.65.57",
		"callbackUrl" : null,
		"tickets" : [
			{
				"code" : "adult",
				"quantity" : 2
			}
		],
		"answers" : [
			{
				"code" : "FirstName",
				"value" : "John"
			},
			{
				"code" : "LastName",
				"value" : "Doe"
			},
			{
				"code" : "FirstName",
				"value" : "Jane"
			},
			{
				"code" : "LastName",
				"value" : "Doe"
			}
		]
	}
}