Integration API v1

The Integration API allows integrating third-party ticketing systems with Enviso. When using the Integration API, you can manage your own events, offers, products, sales points, and access zones. Moreover, using the Ping endpoint you can verify API connectivity.

Terminologies

In the context of using the Integration API, here's a short description of what certain terminologies imply.

Venue

A venue is an organisational unit that is registered on the Enviso Sales application for selling their tickets through one or more sales channels (direct or indirect).

Sales point

A sales point is a physical or virtual location where orders can occur and sales can be made.

Example: Cash register (physical) or Web shop (virtual)

Product

A product is a sellable thing. In the context of the Integration API, this can be referred to as a ticket.

Example: Adult safari ticket is referred to as a product.

Offer

An offer is a bundle of Product(s) made available for selling. It is possible that an offer contains one or multiple products.

Example: An offer could consist of Adult safari ticket. While another offer could consist of two products, Adult safari ticket and Child safari ticket.

Event

An event is a collection of offers that contains the location, timeslots and so on.

Principles

The Integration API is a REST API solution and attempts to conform to the RESTful design principles.

Note

Throughout the document, {version} stands for the first digit of the version in use.

Eg: If you are using version 1.0, {version} would mean v1

Important to know:

  • All connections must be made over HTTPS, not HTTP.

  • All the query parameters are to be passed in lower case.

  • All date and time data in the API request passed/response received are in the UTC-00:00 format.

    • yyyy-MM-ddTHH:mm:ssZ (Eg.: 1994-11-05T13:15:30Z)

Response status codes

The following HTTP status codes are used within the Integration API.

Code

Description

200

OK

The request was successful, resulting in everything working as expected.

201

Created

The request was successful, resulting in the creation of a new resource.

202

Accepted

The request has been accepted for processing, but processing has not been completed.

204

No Content

The request was successfully processed and is not returning any content.

400

Bad Request

The server was unable to understand the request. The request is most likely malformed or a mandatory parameter is missing.

Note

It is recommended to make modifications to the current request and repeat the request.

401

Unauthorised

The request has not been processed because it lacks valid authentication credentials for the target resource.

If the request included valid authentication credentials, then the 401 response indicates that authorisation has been refused for the target resource.

403

Forbidden

The server understood the request but refuses to authorize it.

This probably means you did not pass the API Key (x-api-key) in your request headers.

404

Not Found

The requested resource does not exist.

The resource may be available in the future. Subsequent requests by the client are permissible.

422

Unprocessable Entity

The server understands the content type of the request entity but was unable to process the contained instructions.

For example, this error condition may occur if validation rules to process the entity failed.

429

Too Many Requests

The server received too many requests in a given amount of time.

500

Internal Server Error

The server encountered an unexpected error, which prevented it from fulfilling the request.

502

Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the upstream server.

503

Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

Request headers

  • The request and response data is sent as JSON.

    content-type: application/json
  • The API Key is required to be passed in the HTTP Request Headers.

    x-api-key: your_api_key
  • The Tenant Key is required to be passed in the HTTP Request Headers.

    x-tenantsecretkey: your_tenant_key
  • The Authorization header is required for all endpoints.

    authorization: Bearer SPACE your_jwt_token

Authentication

Contact Vintia support to obtain the Tenant key, API key and API secret key, which you need to start communicating to the API.

Once you have the needed information, you need to authenticate first before you'll be able to call the Integration API.

For this, you'll need to use the Authentication API.

Going live

When going from the staging environment to the production environment:

  • Use the production environment API key and API secret key of the Authentication API.

  • Use the production environment API Key and Tenant key of the Integration API.

    Note

    Contact Vintia support to get your production environment keys of the Authentication API and Integration API.

  • Change the base URL from the staging environment to the production environment.

    • Production environment: https://api.enviso.io/integrationapi

    • Staging environment: https://api.staging-enviso.io/integrationapi

Events

Create event

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/events")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0}")
  .asString();
Request
const data = "{\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0}";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/events");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/events", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": 0,
  "name": "string",
  "description": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "quantity": 0,
  "bookingType": 0,
  "timeslots": [
    {
      "id": 0,
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "isblocked": true
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Get event

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/integrationapi/v1/events/0")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.staging-enviso.io/integrationapi/v1/events/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("GET", "/v1/events/0", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": 0,
  "name": "string",
  "description": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "quantity": 0,
  "bookingType": 0,
  "timeslots": [
    {
      "id": 0,
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "isblocked": true
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Update event

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"id\":0,\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0,\"timeslots\":[{\"id\":0,\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\",\"isblocked\":true}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/v1/events/0")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"id\":0,\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0,\"timeslots\":[{\"id\":0,\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\",\"isblocked\":true}]}")
  .asString();
Request
const data = "{\"id\":0,\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0,\"timeslots\":[{\"id\":0,\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\",\"isblocked\":true}]}";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/v1/events/0");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"id\":0,\"name\":\"string\",\"description\":\"string\",\"startDate\":\"2019-08-24T14:15:22Z\",\"endDate\":\"2019-08-24T14:15:22Z\",\"quantity\":0,\"bookingType\":0,\"timeslots\":[{\"id\":0,\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\",\"isblocked\":true}]}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/v1/events/0", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": 0,
  "name": "string",
  "description": "string",
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z",
  "quantity": 0,
  "bookingType": 0,
  "timeslots": [
    {
      "id": 0,
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "isblocked": true
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Delete event

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/integrationapi/v1/events/0")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.staging-enviso.io/integrationapi/v1/events/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("DELETE", "/v1/events/0", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Activate event

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/active");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/events/0/active")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/events/0/active");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/events/0/active", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Deactivate event

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the event.

Response

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/inactive");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/events/0/inactive")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/events/0/inactive");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/events/0/inactive", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Create time slots

URL parameter

Name

Type

Required

Description

eventid

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "[{\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\"}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("[{\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\"}]")
  .asString();
Request
const data = "[{\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\"}]";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "[{\"start\":\"2019-08-24T14:15:22Z\",\"end\":\"2019-08-24T14:15:22Z\"}]"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/events/0/timeslots", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "createdCount": 0,
  "failed": [
    {
      "id": 0,
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "isblocked": true
    }
  ],
  "created": [
    {
      "id": 0,
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "isblocked": true
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Remove time slots

URL parameter

Name

Type

Required

Description

eventid

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "[{\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("[{\"timeSlotId\":0}]")
  .asString();
Request
const data = "[{\"timeSlotId\":0}]";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "[{\"timeSlotId\":0}]"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("DELETE", "/v1/events/0/timeslots", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Block time slots

URL parameter

Name

Type

Required

Description

eventid

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/block");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "[{\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/block")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("[{\"timeSlotId\":0}]")
  .asString();
Request
const data = "[{\"timeSlotId\":0}]";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/block");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "[{\"timeSlotId\":0}]"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/v1/events/0/timeslots/block", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Unblock time slots

URL parameter

Name

Type

Required

Description

eventid

number

true

The ID of the event.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/unblock");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "[{\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/unblock")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("[{\"timeSlotId\":0}]")
  .asString();
Request
const data = "[{\"timeSlotId\":0}]";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/v1/events/0/timeslots/unblock");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "[{\"timeSlotId\":0}]"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/v1/events/0/timeslots/unblock", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Offers

Create a draft offer from a given event

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/offers");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"eventId\":0,\"productIds\":[0]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/offers")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"eventId\":0,\"productIds\":[0]}")
  .asString();
Request
const data = "{\"eventId\":0,\"productIds\":[0]}";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/offers");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"eventId\":0,\"productIds\":[0]}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/offers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "offerId": 0
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Ping

Ping

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/ping");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/integrationapi/v1/ping")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.staging-enviso.io/integrationapi/v1/ping");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("GET", "/v1/ping", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Products

Create product

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/products");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json", "{\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/products")
  .header("Content-Type", "application/json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}")
  .asString();
Request
const data = JSON.stringify({
  "code": "string",
  "name": "string",
  "price": 0.1,
  "type": "string"
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/products");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/products", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": "number",
  "code": "string",
  "name": "string",
  "price": "decimal",
  "type": "string"      
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Get product

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the product.

Response

Success response code: 200 OK

Parameter

Parameter

Value

type

1 = Ticket

2 = Membership

3 = ProductVoucher

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/products/0");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/integrationapi/products/0")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.staging-enviso.io/integrationapi/products/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("GET", "/products/0", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": "number",
  "code": "string",
  "name": "string",
  "price": "decimal",
  "type": "string"      
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Edit product

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/products");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json", "{\"id\":0,\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/products")
  .header("Content-Type", "application/json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"id\":0,\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}")
  .asString();
Request
const data = JSON.stringify({
  "id": 0,
  "code": "string",
  "name": "string",
  "price": 0.1,
  "type": "string"
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/products");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"id\":0,\"code\":\"string\",\"name\":\"string\",\"price\":0.1,\"type\":\"string\"}"

headers = {
    'Content-Type': "application/json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/products", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": "number",
  "code": "string",
  "name": "string",
  "price": "decimal",
  "type": "string"      
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Archive product

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the product.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/products/0/archive");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/v1/products/0/archive")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/v1/products/0/archive");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/v1/products/0/archive", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Sales points

Create sales point

Response

Success response code: 200 OK

Channel type

Number

Channel type

0

Indirect

1

Direct

Sales channel type

Number

Channel type

1

Online

2

Onsite

3

Reseller

4

B2B

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/salespoints");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"name\":\"string\",\"salesChannelType\":1}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/integrationapi/v1/salespoints")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"name\":\"string\",\"salesChannelType\":1}")
  .asString();
Request
const data = "{\"name\":\"string\",\"salesChannelType\":1}";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.staging-enviso.io/integrationapi/v1/salespoints");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"name\":\"string\",\"salesChannelType\":1}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("POST", "/v1/salespoints", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
{
  "id": "number",
  "name": "string",
  "channelType": "number", // 0 = Indirect, 1 = Direct
  "salesChannelType": "number" // 1 = Online, 2 = Onsite, 3 = Reseller, 4 = B2B
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Edit sales point

URL parameter

Name

Type

Required

Description

id

number

true

The ID of the sales point.

Response

Success response code: 204 No content

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/salespoints/0");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"name\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/integrationapi/v1/salespoints/0")
  .header("Content-Type", "application/json-patch+json")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .body("{\"name\":\"string\"}")
  .asString();
Request
const data = "{\"name\":\"string\"}";

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.staging-enviso.io/integrationapi/v1/salespoints/0");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

payload = "{\"name\":\"string\"}"

headers = {
    'Content-Type': "application/json-patch+json",
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("PUT", "/v1/salespoints/0", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
json
{
  "errors": [
    {
      "message": "string",
      "propertyName": "string",
      "code": 0
    }
  ]
}
json
{
    "errors": [{
        "message": "string",
        "code": "number"
    }]
}

Access control

Gets access zones

Query parameters

Name

Type

Required

Description

pagesize

integer

false

The number of results per page.

Default: 25

Maximum: 25

pagetoken

integer

false

Token to retrieve paging page data.

Response

Success response code: 200 OK

Response header

link

<{Integration Api Url}/v1/accesszones?pagesize={pagesize}&pagetoken={pagetoken}>; rel="previous"; 

<{Integration Api Url}/v1/accesszones?pagesize={pagesize}&pagetoken={pagetoken}>; rel="next";

Example

<https://api.enviso.io/integrationapi/v1/accesszones?pagesize=25&pagetoken=eyJHU0kxX1JhbmdlS2V5Ijp7IlMiOiJhY2Nlc3N6b25lIzE2NzY2MDgxMjUifSwiUmFuZ2VLZXkiOnsiUyI6ImFjY2Vzc3pvbmUjZGM5MTEzM2QtZWFhZi00OWZmLWEwZj ktNDM4OTEzMGI1Y2M5In0sIkdTSTFfSGFzaEtleSI6eyJTIjoidG50IzQxM3xhY2Nlc3N6b25lIn0sIkhhc2hLZXkiOnsiUyI6InRudCM0MTN8YWNjZXNzem9uZSNkYzkxMTMzZC1lYWFmLTQ5ZmYtYTBmOS00Mzg5MTMwYjVjYzkifX0%3d>;rel="next"; <https://api.enviso.io/ integrationapi/v1/accesszonespagesize=25&pagetoken=eyJHU0kxX1JhbmdlS2V5Ijp7IlMiOiJhY2Nlc3N6b25lIzE2NzY2MDgxMjUifSwiUmFuZ2VLZXkiOnsiUyI6ImFjY2Vzc3pvbmUjZGM5MTEzM2QtZWFhZi00OWZmLWEwZjktNDM4OTEzMGI1Y2M5In0sIkdTSTFfSGFzaE tleSI6eyJTIjoidG50IzQxM3xhY2Nlc3N6b25lIn0sIkhhc2hLZXkiOnsiUyI6InRudCM0MTN8YWNjZXNzem9uZSNkYzkxMTMzZC1lYWFmLTQ5ZmYtYTBmOS00Mzg5MTMwYjVjYzkifX0%3d>; rel="previous";

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/accesszones");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/integrationapi/v1/accesszones")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.staging-enviso.io/integrationapi/v1/accesszones");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("GET", "/v1/accesszones", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
[
	{
  		"id": "GUID",
  		"name": "string"
	},
	{
  		"id": "GUID",
  		"name": "string"
	}
]
json
{
	"errors": [{
		"message": "string",
		"code": "number"
	}]
}

Gets access readers

URL parameter

Name

Type

Required

Description

id

Guid

true

The ID of the access zone.

Response

Success response code: 200 OK

Request
var client = new RestClient("https://api.staging-enviso.io/integrationapi/v1/accesszones/497f6eca-6276-4993-bfeb-53cbbbba6f08/accessreaders");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
Request
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/integrationapi/v1/accesszones/497f6eca-6276-4993-bfeb-53cbbbba6f08/accessreaders")
  .header("Accept", "text/plain")
  .header("Authorization", "string")
  .header("x-tenantsecretkey", "string")
  .header("origin", "string")
  .header("x-api-key", "API_KEY")
  .asString();
Request
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.staging-enviso.io/integrationapi/v1/accesszones/497f6eca-6276-4993-bfeb-53cbbbba6f08/accessreaders");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");

xhr.send(data);
Request
import http.client

conn = http.client.HTTPSConnection("https://api.staging-enviso.io/integrationapi")

headers = {
    'Accept': "text/plain",
    'Authorization': "string",
    'x-tenantsecretkey': "string",
    'origin': "string",
    'x-api-key': "API_KEY"
    }

conn.request("GET", "/v1/accesszones/497f6eca-6276-4993-bfeb-53cbbbba6f08/accessreaders", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response
[
	{
  		"id": "GUID",
  		"name": "string"
	},
	{
  		"id": "GUID",
  		"name": "string"
	}
]
json
{
	"errors": [{
		"message": "string",
		"code": "number"
	}]
}

Changelog

This section contains the notable changes in the Integration API.

Integration API v1