POST api/{lang}/eventvalidate

Validates the availability of the event.

Note: this API should be called before collecting payment and can be optionally called when the customer selects the event and enters checkout.

Resource URL

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

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

Response Information

Name Description Type Additional Information
Id The id of the event that was validated uniqueidentifier
TotalUsd container of price This value must be passed into eventbook.
 + CurrencyCode string Will always be returned as USD
 + Value decimal The calculated value.
IsValid boolean Indicates if the event is available for sale.
Errors container of errors
 + Code The error code. string
 + Message The reason for the error. string
Questions container of required questions
 + Code The question code. string
 + Title The title of the question. string
 + Type The type of data. string

Example Request (Xml)

POST https://developer.weplann.com/api/es/eventvalidate HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<q1:Event xmlns:q1="http://www.weplann.com" Id="099f7abd-2a29-41aa-9dcd-006e85316e56">
   <q1:ApiKey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</q1:ApiKey>
   <q1:Tickets>
      <q1:Ticket Code="adult">
         <q1:Quantity>2</q1:Quantity>
      </q1:Ticket>
      <q1:Ticket Code="child">
         <q1:Quantity>1</q1:Quantity>
      </q1:Ticket>
   </q1:Tickets>
</q1:Event>

Example Result (XML)

<Event xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="099f7abd-2a29-41aa-9dcd-006e85316e56" xmlns="http://www.weplann.com">
	<TotalUsd CurrencyCode="USD">
		<Value>1432</Value>
	</TotalUsd>
	<IsValid>true</IsValid>
	<Errors/>
	<Questions>
		<Question>
			<Code>FirstName</Code>
			<Title>First Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>LastName</Code>
			<Title>Last Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>Weight</Code>
			<Title>Weight</Title>
			<Type>integer</Type>
		</Question>
		<Question>
			<Code>FirstName</Code>
			<Title>First Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>LastName</Code>
			<Title>Last Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>Weight</Code>
			<Title>Weight</Title>
			<Type>integer</Type>
		</Question>
		<Question>
			<Code>FirstName</Code>
			<Title>First Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>LastName</Code>
			<Title>Last Name</Title>
			<Type>string</Type>
		</Question>
		<Question>
			<Code>Weight</Code>
			<Title>Weight</Title>
			<Type>integer</Type>
		</Question>
	</Questions>
</Event>

Example Request (JSON)

POST https://developer.weplann.com/api/es/eventvalidate HTTP/1.1
Accept: application/json
Content-Type: application/json
{
	"id" : "099f7abd-2a29-41aa-9dcd-006e85316e56",
	"apiKey" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"tickets" : [
		{
			"code" : "adult",
			"quantity" : 2
		},
		{
			"code" : "child",
			"quantity" : 1
		}
	]
}

Example Result (JSON)

{
	"id" : "099f7abd-2a29-41aa-9dcd-006e85316e56",
	"totalUsd" : {
		"currencyCode" : "USD",
		"value" : 1432.0
	},
	"isValid" : true,
	"errors" : [
		
	],
	"questions" : [
		{
			"code" : "FirstName",
			"title" : "First Name",
			"type" : "string"
		},
		{
			"code" : "LastName",
			"title" : "Last Name",
			"type" : "string"
		},
		{
			"code" : "Weight",
			"title" : "Weight",
			"type" : "integer"
		},
		{
			"code" : "FirstName",
			"title" : "First Name",
			"type" : "string"
		},
		{
			"code" : "LastName",
			"title" : "Last Name",
			"type" : "string"
		},
		{
			"code" : "Weight",
			"title" : "Weight",
			"type" : "integer"
		},
		{
			"code" : "FirstName",
			"title" : "First Name",
			"type" : "string"
		},
		{
			"code" : "LastName",
			"title" : "Last Name",
			"type" : "string"
		},
		{
			"code" : "Weight",
			"title" : "Weight",
			"type" : "integer"
		}
	]
}