GET api/events/{id}

GET /api/events/{id:guid} If successful returns event details and 200 OK Sets Etag header but as yet DOES NOT SUPPORT requests with "If-None-Match" header If Id is null or Guid.Empty returns 400 Bad Request If event not found in active event list in CRM with "show on web" set, returns 404 Not Found For errors contacting CRM returns 502 Bad Gateway All other errors 500

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Guid identifier of event from CRM

globally unique identifier

Required

Body Parameters

None.

Response Information

Resource Description

EventRepresentation
NameDescriptionTypeAdditional information
Id

Unique identifier - same as in CRM

globally unique identifier

None.

Name

name of this event

string

None.

VenueId

Unique identifier of Venue - if no venue assigned yet will be Guid.Empty

globally unique identifier

None.

TicketCapacity

maximum number of tickets that can be sold

integer

None.

TicketsAvailable

Tickets still available

integer

None.

Start

date

None.

Finish

date

None.

Price

decimal number

None.

Tags

Collection of string

None.

Links

Collection of Link

None.

Response Formats

application/json

Sample:
{
  "Id": "45f43c4f-1af8-4080-9a9e-5d78e1aa0388",
  "Name": "sample string 2",
  "VenueId": "f6f2adef-e823-45fb-ab5d-682ec9b7f8a1",
  "TicketCapacity": 4,
  "TicketsAvailable": 5,
  "Start": "2024-08-30T02:24:49.9011538+00:00",
  "Finish": "2024-08-30T02:24:49.9011538+00:00",
  "Price": 8.0,
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "_links": [
    {
      "Rel": "self",
      "Href": "~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "sample string 1",
      "Href": "sample string 2",
      "Title": "sample string 3",
      "IsTemplated": false
    },
    {
      "Rel": "sample string 1",
      "Href": "sample string 2",
      "Title": "sample string 3",
      "IsTemplated": false
    },
    {
      "Rel": "venue",
      "Href": "~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue",
      "Title": null,
      "IsTemplated": false
    }
  ],
  "_embedded": null
}

text/json

Sample:
{
  "Id": "45f43c4f-1af8-4080-9a9e-5d78e1aa0388",
  "Name": "sample string 2",
  "VenueId": "f6f2adef-e823-45fb-ab5d-682ec9b7f8a1",
  "TicketCapacity": 4,
  "TicketsAvailable": 5,
  "Start": "2024-08-30T02:24:49.9011538+00:00",
  "Finish": "2024-08-30T02:24:49.9011538+00:00",
  "Price": 8.0,
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "_links": [
    {
      "Rel": "self",
      "Href": "~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "sample string 1",
      "Href": "sample string 2",
      "Title": "sample string 3",
      "IsTemplated": false
    },
    {
      "Rel": "sample string 1",
      "Href": "sample string 2",
      "Title": "sample string 3",
      "IsTemplated": false
    },
    {
      "Rel": "venue",
      "Href": "~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "venue",
      "Href": "~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue",
      "Title": null,
      "IsTemplated": false
    }
  ],
  "_embedded": null
}

application/xml

Sample:
<EventRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1">
  <Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Href>
  <LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 11</LinkName>
  <Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Href>
      <Rel>self</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
      <Title>sample string 3</Title>
    </Link>
    <Link>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
      <Title>sample string 3</Title>
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
  </Links>
  <Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 9</Rel>
  <Finish>2024-08-30T02:24:49.9011538+00:00</Finish>
  <Id>45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Id>
  <Name>sample string 2</Name>
  <Price>8</Price>
  <Start>2024-08-30T02:24:49.9011538+00:00</Start>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <TicketCapacity>4</TicketCapacity>
  <TicketsAvailable>5</TicketsAvailable>
  <VenueId>f6f2adef-e823-45fb-ab5d-682ec9b7f8a1</VenueId>
</EventRepresentation>

text/xml

Sample:
<EventRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1">
  <Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Href>
  <LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 11</LinkName>
  <Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Href>
      <Rel>self</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
      <Title>sample string 3</Title>
    </Link>
    <Link>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
      <Title>sample string 3</Title>
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue</Href>
      <Rel>venue</Rel>
      <Title i:nil="true" />
    </Link>
  </Links>
  <Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 9</Rel>
  <Finish>2024-08-30T02:24:49.9011538+00:00</Finish>
  <Id>45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Id>
  <Name>sample string 2</Name>
  <Price>8</Price>
  <Start>2024-08-30T02:24:49.9011538+00:00</Start>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <TicketCapacity>4</TicketCapacity>
  <TicketsAvailable>5</TicketsAvailable>
  <VenueId>f6f2adef-e823-45fb-ab5d-682ec9b7f8a1</VenueId>
</EventRepresentation>

application/hal+json

Sample:
{
  "Id": "45f43c4f-1af8-4080-9a9e-5d78e1aa0388",
  "Name": "sample string 2",
  "VenueId": "f6f2adef-e823-45fb-ab5d-682ec9b7f8a1",
  "TicketCapacity": 4,
  "TicketsAvailable": 5,
  "Start": "2024-08-30T02:24:49.9011538+00:00",
  "Finish": "2024-08-30T02:24:49.9011538+00:00",
  "Price": 8.0,
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "_links": {
    "self": {
      "href": "/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388"
    },
    "sample string 1": {
      "href": "sample string 2",
      "title": "sample string 3"
    },
    "venue": {
      "href": "/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue"
    }
  }
}

application/hal+xml

Sample:
<resource rel="sample string 9" href="~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388" name="sample string 11">
  <link rel="sample string 1" href="sample string 2" />
  <link rel="venue" href="~/events/45f43c4f-1af8-4080-9a9e-5d78e1aa0388/venue" />
  <Id>45f43c4f-1af8-4080-9a9e-5d78e1aa0388</Id>
  <Name>sample string 2</Name>
  <VenueId>f6f2adef-e823-45fb-ab5d-682ec9b7f8a1</VenueId>
  <TicketCapacity>4</TicketCapacity>
  <TicketsAvailable>5</TicketsAvailable>
  <Start>8/30/2024 2:24:49 AM</Start>
  <Finish>8/30/2024 2:24:49 AM</Finish>
  <Price>8</Price>
</resource>